CN112508704A - Block chain cross-chain transaction method and device, computer equipment and storage medium - Google Patents
Block chain cross-chain transaction method and device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN112508704A CN112508704A CN202011494108.2A CN202011494108A CN112508704A CN 112508704 A CN112508704 A CN 112508704A CN 202011494108 A CN202011494108 A CN 202011494108A CN 112508704 A CN112508704 A CN 112508704A
- Authority
- CN
- China
- Prior art keywords
- cross
- chain
- architecture
- transaction
- chain transaction
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000012795 verification Methods 0.000 claims abstract description 30
- 238000004590 computer program Methods 0.000 claims description 26
- 238000010586 diagram Methods 0.000 description 13
- 230000007246 mechanism Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000011161 development Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000010200 validation analysis Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
Abstract
The application relates to a method, a device, a computer device and a storage medium for blockchain cross-chain transaction. The method comprises the following steps: obtaining architecture types among cross-chain transaction nodes participating in cross-chain transactions, and selecting a cross-chain transaction component corresponding to the architecture types according to the architecture types, wherein the cross-chain transaction component comprises a relay chain, a cross-chain gateway and a cross-chain verification engine; and constructing a cross-chain transaction architecture between cross-chain transaction nodes according to the cross-chain transaction component, and improving the architecture flexibility and the applicability of the cross-chain transaction by adopting the method.
Description
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a method and an apparatus for blockchain cross-chain transaction, a computer device, and a storage medium.
Background
With the development of the blockchain, on one hand, a plurality of blockchains with different architectures emerge; on the other hand, the application of other block chains in commerce is continuously enriched, such as financial products in public chain and company business in alliance chain. The cross-chain scenes derived on the basis of the block chains have different cross-chain requirements, and all scenes are difficult to apply in a single cross-chain mode.
In the existing chain-crossing technology, a relay chain or notary mechanism is often adopted. In the notary mechanism, a trusted third party is needed between two block chains needing to be linked, and the trusted third party is an entity or a union formed by a plurality of entities. The third party verifies the cross-chain transaction sent by one blockchain and submits the cross-chain transaction to another blockchain. The problems of different block chain transaction formats, different transaction verification modes, atomicity of cross-chain transaction and the like are all responsible for the notary. Another common is a relay chain mechanism, which does not require a trusted third party, but rather employs an entire blockchain exclusively for authentication and forwarding of cross-chain transactions.
In the two schemes, the two schemes are only suitable for specific scenes, for example, the notary mode can improve the efficiency of cross-chain transaction under the condition of high credibility, and the scheme is simple. The relay chain mechanism can deal with chain-crossing two parties or even multiple parties with insufficient mutual trust for chain-crossing, but the chain-crossing technology is complex for a scene with high trust degree, and the relay chain mechanism cannot be well adapted to a scene with an authoritative center.
Aiming at the problem that the adaptability of a cross-chain transaction scheme in the related technology is poor, an effective solution is not provided at present.
Disclosure of Invention
In view of the above, there is a need to provide a method, an apparatus, a computer device and a storage medium for blockchain cross-chain transaction.
In a first aspect, an embodiment of the present application provides a method for blockchain cross-chain transaction, where the method includes:
obtaining an architecture type between cross-chain transaction nodes participating in cross-chain transaction, and selecting a cross-chain transaction component corresponding to the architecture type according to the architecture type, wherein the cross-chain transaction component comprises a relay chain, a cross-chain gateway and a cross-chain verification engine;
and constructing a cross-chain trading architecture among the cross-chain trading nodes according to the cross-chain trading component.
In one embodiment, the obtaining of the architecture type between the cross-chain transaction nodes participating in the cross-chain transaction includes:
acquiring scene information, wherein the scene information comprises the trust degree and the centralization degree among cross-chain transaction nodes;
and selecting the architecture type corresponding to the scene information according to the scene information.
In one embodiment, the constructing a cross-chain transaction architecture between the cross-chain transaction nodes according to the cross-chain transaction component comprises:
acquiring configuration information of the cross-chain transaction component, and constructing the cross-chain transaction architecture according to the cross-chain transaction component and the configuration information, wherein the configuration information comprises the number of the cross-chain transaction components.
In one embodiment, the obtaining of the architecture type between the cross-chain transaction nodes participating in the cross-chain transaction, selecting a cross-chain transaction component corresponding to the architecture type according to the architecture type, and constructing the cross-chain transaction architecture according to the cross-chain transaction component includes:
under the condition that the cross-chain transaction nodes trust each other and the architecture type is a chain-to-chain mode, selecting the cross-chain gateway as the cross-chain transaction component;
the cross-chain transaction architecture is constructed by connecting each cross-chain transaction node with each cross-chain gateway and connecting each cross-chain gateway with each other.
In one embodiment, the obtaining of the architecture type between the cross-chain transaction nodes participating in the cross-chain transaction, selecting a cross-chain transaction component corresponding to the architecture type according to the architecture type, and constructing the cross-chain transaction architecture according to the cross-chain transaction component includes:
under the condition that the first cross-link trading node manages a second cross-link trading node and the architecture type is a master-slave chain mode, selecting the relay link and the cross-link gateway as the cross-link trading component;
connecting the first cross-chain transaction node with the cross-chain gateway, connecting the second cross-chain transaction node with the relay chain, and connecting the cross-chain gateway with the relay chain to construct the cross-chain transaction architecture
In one embodiment, the obtaining of the architecture type between the cross-chain transaction nodes participating in the cross-chain transaction, selecting a cross-chain transaction component corresponding to the architecture type according to the architecture type, and constructing the cross-chain transaction architecture according to the cross-chain transaction component includes:
under the condition that the cross-chain transaction nodes are not trusted mutually and the architecture type is a relay chain mode, selecting the relay chain, the cross-chain gateway and the cross-chain verification engine as the cross-chain transaction component;
connecting the cross-chain transaction nodes with the respective cross-chain gateways, wherein each cross-chain gateway constructs the cross-chain transaction architecture through the relay chain connection, and the relay chain further comprises the cross-chain verification engine.
In one embodiment, the method further comprises:
under the condition that the cross-chain transaction nodes are not trusted mutually and the architecture type is a relay chain mode, selecting the relay chain, the cross-chain gateway, the cross-chain verification engine and the relay chain gateway as the cross-chain transaction component, wherein the cross-chain transaction component further comprises the relay chain gateway;
and connecting the cross-chain transaction nodes with the respective cross-chain gateways, wherein each cross-chain gateway is connected with the relay chain, and each relay chain is connected with the relay chain gateway to construct the cross-chain transaction architecture.
In a second aspect, an embodiment of the present application further provides an apparatus for blockchain cross-chain transaction, where the apparatus includes a component module and an architecture module:
the component module is used for acquiring architecture types among cross-chain transaction nodes participating in cross-chain transactions, and selecting a cross-chain transaction component corresponding to the architecture type according to the architecture types, wherein the cross-chain transaction component comprises a relay chain, a cross-chain gateway and a cross-chain verification engine;
the architecture module is used for constructing a cross-chain trading architecture among the cross-chain trading nodes according to the cross-chain trading component.
In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the method for block chain cross-chain transaction described above when executing the computer program.
In a fourth aspect, embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for block chain cross-chain transaction described above.
According to the method, the device, the computer equipment and the storage medium for block chain cross-chain transaction, the architecture type between cross-chain transaction nodes participating in cross-chain transaction is obtained, and a cross-chain transaction component corresponding to the architecture type is selected according to the architecture type, wherein the cross-chain transaction component comprises a relay chain, a cross-chain gateway and a cross-chain verification engine; and a cross-chain transaction architecture between the cross-chain transaction nodes is constructed according to the cross-chain transaction component, so that the architecture flexibility and the applicability of the cross-chain transaction are improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is an application scenario diagram of a method for blockchain cross-chain transaction according to an embodiment of the present invention;
FIG. 2 is a flow diagram of a method of blockchain cross-chain transactions according to an embodiment of the invention;
FIG. 3 is a schematic diagram of a chain-to-chain mode in blockchain cross-chain transactions implemented in accordance with the present invention;
fig. 4 is a schematic diagram of a blockchain inter-chain transaction relay chain mode implemented in accordance with the present invention;
FIG. 5 is a schematic diagram of a master-slave chain mode in a blockchain inter-chain transaction implemented in accordance with the present invention;
FIG. 6 is a schematic structural diagram of an apparatus for block chain cross-chain transactions according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a blockchain cross-chain transaction computer device according to an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application.
It is obvious that the drawings in the following description are only examples or embodiments of the present application, and that it is also possible for a person skilled in the art to apply the present application to other similar contexts on the basis of these drawings without inventive effort. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of ordinary skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Reference to "connected," "coupled," and the like in this application is not intended to be limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as referred to herein means two or more. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. Reference herein to the terms "first," "second," "third," and the like, are merely to distinguish similar objects and do not denote a particular ordering for the objects.
Fig. 1 is an application scenario diagram of a method for a blockchain cross-chain transaction according to an embodiment of the present invention, and the method embodiment provided in this embodiment may be applied to the scenario shown in fig. 1. As shown in fig. 1, an application scenario of blockchain cross-chain transaction includes a cross-chain transaction architecture 102, a first application chain 104, and a second application chain 106, where the first application chain 104 and the second application chain 106 are blockchains that need cross-chain transaction, that is, cross-chain transaction nodes, only two application chains are shown in the figure, and more application chains may be included in an actual application scenario. According to different application scenarios, the requirements of the cross-chain transaction architecture 102 between the first application chain 104 and the second application chain 106 are different, and a plurality of nodes may be included in each of the cross-chain transaction architecture 102, the first application chain 104, and the second application chain 106.
In some application scenarios, for example, each department in a company has different block chains, and after each data is linked up, how to perform data exchange and service cooperation through the block chains needs to use a cross-chain technique; in this scenario, each application chain inside the company is secure and can trust each other, and only the format of the cross-chain transaction needs to be converted and whether the basic information of the cross-chain transaction is correct or not needs to be verified when the cross-chain transaction is performed.
In other application scenarios, in a federation formed by multiple companies, the companies are required to collaborate business on the blockchains they each maintain. In this case, the blockchain between companies is relatively closed, and the data on the chain of other people is not completely credible, and in this scenario, a relay chain composed of companies is required to endorse the cross-chain transaction of each family together.
In still other application scenarios, in scenarios where there is a unique authority center, the authority center requires management and supervision of the blockchain used by the company of the subordinate organization. In this case, it is not suitable for the subordinate block chains to constitute the relay chain, because there is a logical dependency relationship in this case, and the status is not equal. A unique backbone is required and can be supervised through a blockchain across chains to subordinate agencies. Therefore, a method for providing more flexible cross-chain transaction for cross-chain transaction of application chain is needed.
In an embodiment, fig. 2 is a flowchart of a method for block chain cross-chain transaction according to an embodiment of the present invention, and as shown in fig. 2, a method for cross-chain transaction is provided, which is described by taking an application scenario in fig. 1 as an example, and includes the following steps:
step S210, obtaining an architecture type between the cross-chain transaction nodes participating in the cross-chain transaction, and selecting a cross-chain transaction component corresponding to the architecture type according to the architecture type. The architecture type is an architecture classification for cross-chain transaction according to a common application scenario, and the cross-chain transaction component is a component included in various architecture types, such as a relay chain, a cross-chain gateway, a cross-chain verification engine, and the like. The relay chain can carry out uniform endorsement and verification on cross-chain transactions initiated by each block chain; the cross-chain gateway is used for monitoring cross-chain transactions on a certain block chain and executing forwarding and routing functions; the cross-chain verification engine is a component for verifying on-chain verification information carried by cross-chain transactions out of the block chain. Optionally, the management and maintenance of the architecture type and the corresponding cross-chain trading component are performed through a cross-chain management platform, the cross-chain management platform acquires the architecture type from the client or the platform of the cross-chain management platform, and the cross-chain trading component is configured in advance for each architecture type on the cross-chain management platform. For example, for a high-trust scenario, that is, for a cross-chain transaction between blockchains of different departments in the same company, the cross-chain management platform provides a high-trust architecture, and a preset cross-chain transaction component corresponding to the architecture is a cross-chain gateway, so that the cross-chain management platform selects the cross-chain gateway as a component for constructing the cross-chain transaction architecture.
Step S220, constructing a cross-chain transaction architecture between cross-chain transaction nodes according to the cross-chain transaction component. In step S210, the cross-chain transaction components are determined only according to the architecture type, but specifically in the application scenario, the number of the cross-chain transaction components is selected according to the specific application scenario, parameters are set for the cross-chain transaction components, and finally, a cross-chain transaction architecture is constructed and started. For example, in the high-confidence scenario, in step S210, the cross-chain management platform selects a cross-chain gateway as a component for constructing the cross-chain transaction architecture, and in this step, the cross-chain transaction management platform further needs to select a corresponding number of cross-chain gateways according to the number of application chains in the current scenario, and indicate each application chain to connect to one cross-chain gateway, and connect the cross-chain gateways to each other, and finally construct and start the cross-chain transaction architecture.
In steps S210 to S220, by acquiring the architecture type between transaction nodes participating in the cross-chain transaction, selecting a cross-chain transaction component corresponding to the architecture type according to the architecture type, and constructing and starting a cross-chain transaction architecture according to the cross-chain transaction component, the processing flow of the cross-chain transaction is modularized, the architecture type can be determined according to different scenes, the cross-chain components can be flexibly combined, the complexity of deploying and maintaining a cross-chain system is simplified, and the architecture flexibility and applicability of the cross-chain transaction are improved.
The cross-chain management platform supports a user-defined mode to start the cross-chain system, and the system can automatically judge how to select the cross-chain architecture and start the cross-chain architecture by inputting the description of the scene by the user. In some embodiments, in the automatic recommendation mode, the user is required to provide scenario information through the client, optionally, the cross-chain management slip provides some scenario questions, and the user is required to answer the corresponding scenario questions, for example, performance requirements of the cross-chain transaction, whether an authority center is required in the cross-chain transaction, whether each node performing the cross-chain transaction mutually believes, and the like. The cross-chain management platform can analyze the results of the problems and recommend the corresponding architecture type through an artificial intelligence algorithm. Optionally, a default configuration corresponding to the architecture type and the cross-chain transaction component can be provided while determining the architecture type, and the user can also make configuration modification if the recommended default configuration is not satisfied. The cross-chain architecture automatic selection function provided by the cross-chain management platform can adapt to the cross-chain architecture according to the scene information, and the building efficiency of the cross-chain transaction architecture is further improved.
In some embodiments, in a user-defined mode, a user can specify one of several architectures provided by the cross-chain management platform to launch the cross-chain architecture, and the user also needs to specify configuration information for the corresponding cross-chain trading component. For example, the number of inter-link gateways that need to be started in the current inter-link architecture, the plug-in adapted to which blockchain system each inter-link gateway uses, the number of nodes for starting relay links, and the like. As another example, multiple cross-chain gateways may be selected for an application chain for high availability considerations. The user-defined mode provides a cross-chain architecture mode with higher selectivity for the user, the customization degree of the cross-chain transaction architecture is increased while the construction efficiency of the cross-chain transaction architecture is improved, and the compatibility and the adaptability of the cross-chain transaction architecture are higher.
In one embodiment, where the architecture type is a chain-to-chain mode, a cross-chain gateway is selected as the cross-chain transaction component. The chain-to-chain mode is suitable for a scenario in which the trust between cross-chain transaction nodes is high, fig. 3 is a schematic diagram of the chain-to-chain mode in blockchain cross-chain transaction implemented according to the present invention, as shown in fig. 3, in this scenario, an application chain a and an application chain B are in a relatively trusted and secure environment, and only data that needs to be shared by a part of the application chain a needs to be transmitted to the application chain B, and the data is provided to a service of the application chain B for use. Therefore, the cross-chain trading platform selects a cross-chain gateway as a cross-chain trading component, and constructs a cross-chain trading architecture to use the cross-chain gateway A for the application chain A and the cross-chain gateway B for the application chain B, and the cross-chain gateway converts the format of the trading on each application chain, directly interfaces with the cross-chain gateway of the other chain and interacts according to the uniform cross-chain trading format. Only two application chains are shown in fig. 3, and more application chains and more cross-chain gateways corresponding to the application chains may be included in an actual application scenario. The combined mode is simple enough for both cross-chain parties, the operation and maintenance cost can be reduced, and the routing and transmission efficiency of cross-chain transactions is high.
In one embodiment, where the architecture type is relay chain mode, a relay chain, a cross-chain gateway, and a cross-chain validation engine are selected as cross-chain transaction components. The relay chain mode is suitable for a multi-union scenario with weak trust, fig. 4 is a schematic diagram of the relay chain mode in block chain cross-chain transaction implemented according to the present invention, as shown in fig. 4, in this scenario, a cross-chain transaction platform selects a relay chain, a cross-chain gateway, and a cross-chain verification engine as cross-chain transaction components, and constructs a cross-chain transaction architecture as an application chain a connected to a cross-chain gateway a, an application chain B connected to a cross-chain gateway B, and the cross-chain gateway a and the cross-chain gateway B are indirectly connected through the relay chain components. Due to the weak trust, application chain B cannot fully trust its transactions if just the transactions obtained from the cross-chain gateway of application chain a in chain-to-chain mode. In the relay chain mode, the validity of the cross-chain transaction is guaranteed by the relay chain itself, because each node of the relay chain is responsible for each alliance participating in the cross-chain transaction, and the cross-chain transaction needs to be signed by each node of the relay chain and can be executed through the verification of a cross-chain transaction verification engine (the cross-chain transaction verification engine is not shown in the figure). Fig. 4 shows only two application chains, and in an actual application scenario, more application chains may be included, and the application chains may interact with each other through the same relay chain or through multiple relay chains. In some embodiments, for better expansion, the cross-link trading component further includes a relay link gateway, and the cross-link trading platform further selects the relay link gateway, so that the relay link can further interconnect through the relay link gateway, and the relay link gateway undertakes routing of the cross-relay link.
In one embodiment, where the architecture type is master-slave mode, relay chains and cross-chain gateways are selected as cross-chain transaction components. The master-slave chain mode is suitable for a single authority center scenario, fig. 5 is a schematic diagram of the master-slave chain mode in block chain cross-chain transaction implemented according to the present invention, as shown in fig. 5, in this scenario, a business party represented by an application chain has a logical up-down management relationship. The cross-chain trading platform selects a relay chain and a cross-chain gateway as cross-chain trading components, the relay chain represents a party in an authority center at the moment and is called a main chain, and other application chains are called slave chains. The cross-chain trading platform constructs a cross-chain trading architecture as shown in fig. 5, a main chain in fig. 5 is a relay chain, a slave chain a, a slave chain B and a slave chain C are all application chains, the slave chain a is connected with the cross-chain gateway a, the cross-chain gateway a is connected with the relay chain, the slave chain B is connected with the cross-chain gateway B, the cross-chain gateway B is connected with the relay chain, the slave chain C is connected with the cross-chain gateway C, and the cross-chain gateway C is connected with the relay chain. Only three application chains and one main chain are shown in fig. 5, and more application chains or more main chains may be included in an actual application scenario. The relay chain has corresponding management authority for cross-chain transaction between the slave chains, and even can manage and supervise data and contracts inside the slave chains.
It should be understood that the steps in the above-described flowcharts are shown in order as indicated by the arrows, but the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, fig. 6 is a schematic structural diagram of an apparatus for blockchain cross-chain transaction according to an embodiment of the present invention, and as shown in fig. 6, an apparatus for blockchain cross-chain transaction is provided, which includes a component module 62 and a framework module 64:
the component module 62 is configured to obtain an architecture type between cross-link transaction nodes participating in cross-link transaction, and select a cross-link transaction component corresponding to the architecture type according to the architecture type, where the cross-link transaction component includes a relay link, a cross-link gateway, and a cross-link verification engine;
For specific definition of the device related to blockchain cross-chain transaction, reference may be made to the above definition of the blockchain cross-chain transaction method, which is not described herein again. The modules in the block chain cross-link transaction device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device runs a blockchain technique to become a node of a blockchain network, the computer device including a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing cross-chain transaction architecture and cross-chain transaction component data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a blockchain cross-chain transaction method.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
obtaining architecture types among cross-chain transaction nodes participating in cross-chain transactions, and selecting a cross-chain transaction component corresponding to the architecture types according to the architecture types, wherein the cross-chain transaction component comprises a relay chain, a cross-chain gateway and a cross-chain verification engine;
and constructing a cross-chain transaction architecture between the cross-chain transaction nodes according to the cross-chain transaction component.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
acquiring scene information, wherein the scene information comprises the trust degree and the centralization degree among cross-chain transaction nodes;
and selecting the architecture type corresponding to the scene information according to the scene information.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and acquiring configuration information of the cross-chain transaction components, and constructing a cross-chain transaction architecture according to the cross-chain transaction components and the configuration information, wherein the configuration information comprises the number of the cross-chain transaction components.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
under the condition that cross-chain transaction nodes trust each other and the architecture type is a chain-to-chain mode, selecting a cross-chain gateway as a cross-chain transaction component;
and constructing a cross-chain transaction framework by connecting each cross-chain transaction node with each cross-chain gateway and connecting each cross-chain gateway with each other.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
under the condition that the first cross-link trading node manages a second cross-link trading node and the architecture type is a master-slave chain mode, selecting a relay chain and a cross-link gateway as cross-link trading components;
the first cross-link transaction node is connected with the cross-link gateway, the second cross-link transaction node is connected with the relay link, and the cross-link gateway and the relay link are connected to form a cross-link transaction framework
In one embodiment, the processor, when executing the computer program, further performs the steps of:
under the condition that cross-chain transaction nodes are mutually untrusted and the architecture type is a relay chain mode, selecting a relay chain, a cross-chain gateway and a cross-chain verification engine as cross-chain transaction components;
the cross-chain transaction nodes are connected with the respective cross-chain gateways, the cross-chain gateways construct a cross-chain transaction framework through relay chain connection, and a cross-chain verification engine is further included on the relay chain.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
under the condition that cross-link transaction nodes are mutually untrusted and the architecture type is a relay link mode, selecting a relay link, a cross-link gateway, a cross-link verification engine and the relay link gateway as a cross-link transaction component, wherein the cross-link transaction component further comprises the relay link gateway;
each inter-link gateway is connected with a relay link by connecting the inter-link transaction node with the respective inter-link gateway, and each relay link is connected with the relay link gateway to construct an inter-link transaction framework.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
obtaining architecture types among cross-chain transaction nodes participating in cross-chain transactions, and selecting a cross-chain transaction component corresponding to the architecture types according to the architecture types, wherein the cross-chain transaction component comprises a relay chain, a cross-chain gateway and a cross-chain verification engine;
and constructing a cross-chain transaction architecture between the cross-chain transaction nodes according to the cross-chain transaction component.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring scene information, wherein the scene information comprises the trust degree and the centralization degree among cross-chain transaction nodes;
and selecting the architecture type corresponding to the scene information according to the scene information.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and acquiring configuration information of the cross-chain transaction components, and constructing a cross-chain transaction architecture according to the cross-chain transaction components and the configuration information, wherein the configuration information comprises the number of the cross-chain transaction components.
In one embodiment, the computer program when executed by the processor further performs the steps of:
under the condition that cross-chain transaction nodes trust each other and the architecture type is a chain-to-chain mode, selecting a cross-chain gateway as a cross-chain transaction component;
and constructing a cross-chain transaction framework by connecting each cross-chain transaction node with each cross-chain gateway and connecting each cross-chain gateway with each other.
In one embodiment, the computer program when executed by the processor further performs the steps of:
under the condition that the first cross-link trading node manages a second cross-link trading node and the architecture type is a master-slave chain mode, selecting a relay chain and a cross-link gateway as cross-link trading components;
the first cross-link transaction node is connected with the cross-link gateway, the second cross-link transaction node is connected with the relay link, and the cross-link gateway and the relay link are connected to form a cross-link transaction framework
In one embodiment, the computer program when executed by the processor further performs the steps of:
under the condition that cross-chain transaction nodes are mutually untrusted and the architecture type is a relay chain mode, selecting a relay chain, a cross-chain gateway and a cross-chain verification engine as cross-chain transaction components;
the cross-chain transaction nodes are connected with the respective cross-chain gateways, the cross-chain gateways construct a cross-chain transaction framework through relay chain connection, and a cross-chain verification engine is further included on the relay chain.
In one embodiment, the computer program when executed by the processor further performs the steps of:
under the condition that cross-link transaction nodes are mutually untrusted and the architecture type is a relay link mode, selecting a relay link, a cross-link gateway, a cross-link verification engine and the relay link gateway as a cross-link transaction component, wherein the cross-link transaction component further comprises the relay link gateway;
each inter-link gateway is connected with a relay link by connecting the inter-link transaction node with the respective inter-link gateway, and each relay link is connected with the relay link gateway to construct an inter-link transaction framework.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (10)
1. A method of blockchain cross-chain transactions, the method comprising:
obtaining an architecture type between cross-chain transaction nodes participating in cross-chain transaction, and selecting a cross-chain transaction component corresponding to the architecture type according to the architecture type, wherein the cross-chain transaction component comprises a relay chain, a cross-chain gateway and a cross-chain verification engine;
and constructing a cross-chain trading architecture among the cross-chain trading nodes according to the cross-chain trading component.
2. The method of claim 1, wherein obtaining the architecture type between cross-chain transaction nodes participating in cross-chain transactions comprises:
acquiring scene information, wherein the scene information comprises the trust degree and the centralization degree among the cross-chain transaction nodes;
and selecting the architecture type corresponding to the scene information according to the scene information.
3. The method of claim 1, wherein constructing a cross-chain transaction architecture between the cross-chain transaction nodes according to the cross-chain transaction component comprises:
acquiring configuration information of the cross-chain transaction component, and constructing the cross-chain transaction architecture according to the cross-chain transaction component and the configuration information, wherein the configuration information comprises the number of the cross-chain transaction components.
4. The method according to any one of claims 1 to 3, wherein the obtaining of architecture types between cross-chain transaction nodes participating in cross-chain transactions, selecting cross-chain transaction components corresponding to the architecture types according to the architecture types, and the constructing of the cross-chain transaction architecture according to the cross-chain transaction components comprises:
under the condition that the cross-chain transaction nodes trust each other and the architecture type is a chain-to-chain mode, selecting the cross-chain gateway as the cross-chain transaction component;
the cross-chain transaction architecture is constructed by connecting each cross-chain transaction node with each cross-chain gateway and connecting each cross-chain gateway with each other.
5. The method according to any one of claims 1 to 3, wherein the obtaining of architecture types between cross-chain transaction nodes participating in cross-chain transactions, selecting cross-chain transaction components corresponding to the architecture types according to the architecture types, and the constructing of the cross-chain transaction architecture according to the cross-chain transaction components comprises:
under the condition that the first cross-link trading node manages a second cross-link trading node and the architecture type is a master-slave chain mode, selecting the relay link and the cross-link gateway as the cross-link trading component;
connecting the first cross-chain transaction node with the cross-chain gateway, connecting the second cross-chain transaction node with the relay chain, and connecting the cross-chain gateway with the relay chain to construct the cross-chain transaction architecture.
6. The method according to any one of claims 1 to 3, wherein the obtaining of architecture types between cross-chain transaction nodes participating in cross-chain transactions, selecting cross-chain transaction components corresponding to the architecture types according to the architecture types, and the constructing of the cross-chain transaction architecture according to the cross-chain transaction components comprises:
selecting the relay chain, the cross-chain gateway and the cross-chain verification engine as the cross-chain transaction component under the condition that the cross-chain transaction nodes are not trusted with each other and the architecture type is a relay chain mode;
connecting the cross-chain transaction nodes with the respective cross-chain gateways, wherein each cross-chain gateway constructs the cross-chain transaction architecture through the relay chain connection, and the relay chain further comprises the cross-chain verification engine.
7. The method of claim 6, further comprising:
under the condition that the cross-chain transaction nodes are not trusted mutually and the architecture type is a relay chain mode, selecting the relay chain, the cross-chain gateway, the cross-chain verification engine and the relay chain gateway as the cross-chain transaction component, wherein the cross-chain transaction component further comprises the relay chain gateway;
and connecting the cross-chain transaction nodes with the respective cross-chain gateways, wherein each cross-chain gateway is connected with the relay chain, and each relay chain is connected with the relay chain gateway to construct the cross-chain transaction architecture.
8. An apparatus for blockchain cross-chain transactions, the apparatus comprising a component module and an architecture module:
the component module is used for acquiring architecture types among cross-chain transaction nodes participating in cross-chain transactions, and selecting a cross-chain transaction component corresponding to the architecture type according to the architecture types, wherein the cross-chain transaction component comprises a relay chain, a cross-chain gateway and a cross-chain verification engine;
the architecture module is used for constructing a cross-chain trading architecture among the cross-chain trading nodes according to the cross-chain trading component.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011494108.2A CN112508704A (en) | 2020-12-17 | 2020-12-17 | Block chain cross-chain transaction method and device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011494108.2A CN112508704A (en) | 2020-12-17 | 2020-12-17 | Block chain cross-chain transaction method and device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112508704A true CN112508704A (en) | 2021-03-16 |
Family
ID=74922179
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011494108.2A Pending CN112508704A (en) | 2020-12-17 | 2020-12-17 | Block chain cross-chain transaction method and device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112508704A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113111126A (en) * | 2021-04-12 | 2021-07-13 | 浙江永旗区块链科技有限公司 | Block chain cross-chain forwarding system and forwarding method thereof |
CN113242131A (en) * | 2021-04-22 | 2021-08-10 | 卓尔智联(武汉)研究院有限公司 | Block chain cross-chain method and device, electronic equipment and storage medium |
CN115357932A (en) * | 2022-08-18 | 2022-11-18 | 地心引力(武汉)科技有限公司 | Cross-chain secure storage method and device based on block chain technology |
CN115460142A (en) * | 2021-06-07 | 2022-12-09 | 京东科技控股股份有限公司 | Routing addressing method and device based on cross-chain transaction |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110266655A (en) * | 2019-05-30 | 2019-09-20 | 中国工商银行股份有限公司 | A kind of across chain interconnected method, equipment and system based on block chain |
US20190340267A1 (en) * | 2018-05-01 | 2019-11-07 | International Business Machines Corporation | Blockchain implementing cross-chain transactions |
CN110751475A (en) * | 2019-10-24 | 2020-02-04 | 杭州趣链科技有限公司 | Cross-chain method, system, equipment and storage medium for blockchain transaction |
CN111741114A (en) * | 2020-06-24 | 2020-10-02 | 陈鹏 | System, method and equipment capable of monitoring cross-chain interaction based on block chain |
CN111917865A (en) * | 2020-07-29 | 2020-11-10 | 成都质数斯达克科技有限公司 | Block chain network system, gateway and networking method |
-
2020
- 2020-12-17 CN CN202011494108.2A patent/CN112508704A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190340267A1 (en) * | 2018-05-01 | 2019-11-07 | International Business Machines Corporation | Blockchain implementing cross-chain transactions |
CN110266655A (en) * | 2019-05-30 | 2019-09-20 | 中国工商银行股份有限公司 | A kind of across chain interconnected method, equipment and system based on block chain |
CN110751475A (en) * | 2019-10-24 | 2020-02-04 | 杭州趣链科技有限公司 | Cross-chain method, system, equipment and storage medium for blockchain transaction |
CN111741114A (en) * | 2020-06-24 | 2020-10-02 | 陈鹏 | System, method and equipment capable of monitoring cross-chain interaction based on block chain |
CN111917865A (en) * | 2020-07-29 | 2020-11-10 | 成都质数斯达克科技有限公司 | Block chain network system, gateway and networking method |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113111126A (en) * | 2021-04-12 | 2021-07-13 | 浙江永旗区块链科技有限公司 | Block chain cross-chain forwarding system and forwarding method thereof |
CN113242131A (en) * | 2021-04-22 | 2021-08-10 | 卓尔智联(武汉)研究院有限公司 | Block chain cross-chain method and device, electronic equipment and storage medium |
CN113242131B (en) * | 2021-04-22 | 2023-10-24 | 卓尔智联(武汉)研究院有限公司 | Block chain crossing method and device, electronic equipment and storage medium |
CN115460142A (en) * | 2021-06-07 | 2022-12-09 | 京东科技控股股份有限公司 | Routing addressing method and device based on cross-chain transaction |
CN115357932A (en) * | 2022-08-18 | 2022-11-18 | 地心引力(武汉)科技有限公司 | Cross-chain secure storage method and device based on block chain technology |
CN115357932B (en) * | 2022-08-18 | 2023-11-28 | 山东浪潮智慧供应链科技有限公司 | Cross-chain secure storage method and device based on blockchain technology |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112508704A (en) | Block chain cross-chain transaction method and device, computer equipment and storage medium | |
CN108256864B (en) | Foundation across chain alliance and communication means, system between a kind of block chain | |
CN109936457B (en) | Block chain multi-party witness method, device, equipment and computer readable storage medium | |
CN110311790B (en) | Method and device for sending authenticable message in cross-link mode | |
CN112765677B (en) | Federal learning method, device and system based on blockchain | |
CN109634810A (en) | Block chain business platform and operation method based on Fabric | |
CN109359994B (en) | Service processing method, device and system based on block chain | |
CN109542767B (en) | Automatic testing method and device based on block chain, computer equipment and storage medium | |
CN111612615A (en) | Block chain sub-chain creation method and system based on public chain | |
CN111628886B (en) | Method, device and computer equipment for building blockchain network in private cloud environment | |
CN109587142B (en) | Data security access module and equipment for service flow | |
CN113761067B (en) | De-centralized joint modeling system based on blockchain and trusted execution environment | |
CN113328997A (en) | Alliance chain cross-chain system and method | |
US11245709B2 (en) | Multi-verifier approach for attestation of nodes in a network | |
CN113111126A (en) | Block chain cross-chain forwarding system and forwarding method thereof | |
CN110908812A (en) | Business data processing method and device, readable storage medium and computer equipment | |
CN113469371A (en) | Federal learning method and device | |
CN112699136B (en) | Cross-link certificate storage method and related device | |
CN113704768A (en) | Safety audit method, device and system for federal learning execution flow | |
CN110099068A (en) | The method, device and equipment of interaction between open platform based on block chain | |
CN112615868B (en) | Method and device for transmitting authenticatable message across chains | |
CN115865537B (en) | Privacy computing method based on centralized system management, electronic equipment and storage medium | |
CN114465714B (en) | Node configuration method and system in alliance chain | |
CN115865705A (en) | Multi-party federal learning system, method, equipment and medium based on supervision mechanism | |
CN113014540A (en) | Data processing method, device, equipment and storage medium |
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 |