CN114357066A - Block chain cross-chain interaction method, device, equipment and storage medium - Google Patents
Block chain cross-chain interaction method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN114357066A CN114357066A CN202111518962.2A CN202111518962A CN114357066A CN 114357066 A CN114357066 A CN 114357066A CN 202111518962 A CN202111518962 A CN 202111518962A CN 114357066 A CN114357066 A CN 114357066A
- Authority
- CN
- China
- Prior art keywords
- information
- interaction
- chain
- cross
- node
- 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
Images
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a block chain cross-chain interaction method, which comprises the following steps: responding to a detected cross-chain interaction request, and acquiring an information interaction party corresponding to the cross-chain interaction request, wherein the information interaction party comprises an information provider and an information demander, and the information provider and the information demander are nodes located on different chains; tracing to a public node of a chain where the information provider and the information demander are located layer by layer; and acquiring the intelligent contract corresponding to the public node, and performing information interaction according to the interaction rule corresponding to the intelligent contract. The invention also discloses a block chain cross-chain interaction device, equipment and a storage medium. According to the invention, through the public node of the information interaction party, the intelligent contract of the public node is suitable for the lower node of the public node, so that the interaction is carried out based on the interaction rule of the public node corresponding to the intelligent contract, the information interaction between isomorphic chains or heterogeneous chains can be realized, and the purpose of cross-chain information interaction is achieved.
Description
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a method, an apparatus, a device, and a storage medium for blockchain cross-chain interaction.
Background
With the continuous development of communication technology, more and more information interaction demands are generated among different blockchain systems and different chains in the same blockchain system, and currently, common blockchain cross-chain interactions are mostly generated in a blockchain ecosystem where the same main chain is located, that is, information interactions between the main chain and a side chain and between the side chain and the side chain in the ecosystem of the same main chain are within the same ecosystem, so that the information interactions among different chains are called homogeneous cross-chain information interactions. The isomorphic cross-chain is relatively simple to realize, heterogeneous chains with different structures are often located in different block chain systems or ecosystems with different main chains, and the existing cross-chain information interaction mode of the isomorphic chains is mostly not suitable for the heterogeneous chains, so that the information interaction of the block chains has limitations.
Disclosure of Invention
The invention mainly aims to provide a block chain cross-chain interaction method, a block chain cross-chain interaction device and a block chain cross-chain interaction storage medium, and aims to solve the technical problem that information interaction of a block chain is limited due to the fact that the existing cross-chain interaction mode between isomorphic chains is not suitable for heterogeneous chains.
In addition, to achieve the above object, the present invention further provides a block chain cross-chain interaction method, where the block chain cross-chain interaction method includes the following steps:
responding to a detected cross-chain interaction request, and acquiring an information interaction party corresponding to the cross-chain interaction request, wherein the information interaction party comprises an information provider and an information demander, and the information provider and the information demander are nodes located on different chains;
tracing to a public node of a chain where the information provider and the information demander are located layer by layer;
and acquiring the intelligent contract corresponding to the public node, and performing information interaction according to the interaction rule corresponding to the intelligent contract.
Optionally, the step of obtaining an intelligent contract corresponding to the public node includes:
the method comprises the steps that indexing is carried out by utilizing a preset contract engine on the basis of the public node, and contract information corresponding to the public node is determined, wherein the contract information comprises a contract address and a contract name;
and acquiring the intelligent contract corresponding to the public node according to the contract address and the contract name in the contract information.
Optionally, the contract information further includes a contract invoking parameter, and the step of performing information interaction according to an interaction rule corresponding to the intelligent contract includes:
calling an intelligent contract corresponding to the public node according to contract calling parameters in the contract information to determine a target interactive address;
and carrying out information interaction at the target interaction address according to the interaction rule corresponding to the intelligent contract.
Optionally, the step of tracing up to the public node of the chain where the information provider and the information demander are located layer by layer includes:
tracing the upper nodes of the chain where the information provider and the information demander are located in the same level layer by layer;
detecting a node type of the upper node, wherein the node type comprises a full node;
and when the node type of the upper node is a full node, taking the upper node as a public node of the information provider and the information demander.
Optionally, the full node contains global information of the block chain.
Optionally, the step of performing information interaction according to an interaction rule corresponding to the intelligent contract includes:
verifying the cross-chain interaction request according to global information in the public node;
and when the verification is passed, forwarding the cross-chain interaction request to the information provider, so that the information provider can respond to the cross-chain interaction request and perform information interaction with the information demand party.
Optionally, a predicting machine is arranged in the blockchain, and the predicting machine is used for monitoring a cross-chain request event log, forwarding and verifying the interaction data of the information interaction party.
In addition, to achieve the above object, the present invention further provides a device for interacting across chains of blocks, where the device for interacting across chains of blocks includes:
the request response module is used for responding to the detected cross-chain interaction request and acquiring an information interaction party corresponding to the cross-chain interaction request, wherein the information interaction party comprises an information provider and an information demander, and the information provider and the information demander are nodes positioned on different chains;
the node tracing module is used for tracing to a public node of a chain where the information provider and the information demander are located layer by layer;
and the information interaction module is used for acquiring the intelligent contract corresponding to the public node and carrying out information interaction according to the interaction rule corresponding to the intelligent contract.
In addition, to achieve the above object, the present invention also provides a terminal device, including: the system comprises a memory, a processor and a block chain cross-chain interactive program which is stored on the memory and can run on the processor, wherein when the block chain cross-chain interactive program is executed by the processor, the steps of the block chain cross-chain interactive method are realized.
In addition, to achieve the above object, the present invention further provides a computer readable storage medium, where a blockchain cross-chain interactive program is stored, and when executed by a processor, the blockchain cross-chain interactive program implements the steps of the blockchain cross-chain interactive method as described above.
Furthermore, to achieve the above object, the present invention also provides a computer program product, which includes a computer program, and when being executed by a processor, the computer program implements the steps of the block chain cross-chain interaction method as described above.
The embodiment of the invention provides a block chain cross-chain interaction method, a block chain cross-chain interaction device, a block chain cross-chain interaction equipment and a storage medium. Compared with the prior art, in the embodiment of the invention, in response to a detected cross-chain interaction request, an information interaction party corresponding to the cross-chain interaction request is obtained, wherein the information interaction party comprises an information provider and an information demander, and the information provider and the information demander are nodes located on different chains; tracing to a public node of a chain where the information provider and the information demander are located layer by layer; and acquiring the intelligent contract corresponding to the public node, and performing information interaction according to the interaction rule corresponding to the intelligent contract. The intelligent contracts are respectively deployed based on different low-level public chains, and the intelligent contracts of the public nodes are suitable for the lower-level nodes of the public nodes through the public nodes of the information interaction parties, so that the interaction is carried out based on the interaction rules of the public nodes corresponding to the intelligent contracts, the information interaction between isomorphic chains or heterogeneous chains can be realized, and the purpose of cross-chain information interaction is achieved.
Drawings
Fig. 1 is a schematic hardware structure diagram of an implementation manner of a terminal device according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of a block chain cross-chain interaction method according to the present invention;
fig. 3 is a functional module diagram of an embodiment of a block chain inter-chain device according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The blockchain cross-chain interactive terminal (also called terminal, equipment or terminal equipment) in the embodiment of the invention can be a PC (personal computer), and can also be mobile terminal equipment with communication and data processing functions, such as a smart phone, a tablet personal computer, a portable computer and the like.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the terminal may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that may turn off the display screen and/or the backlight when the mobile terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the mobile terminal is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer and tapping) and the like for recognizing the attitude of the mobile terminal; of course, the mobile terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer-readable storage medium, may include therein an operating system, a network communication module, a user interface module, and a block chain inter-chain program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to invoke a blockchain inter-chain program stored in the memory 1005, which when executed by the processor, implements the operations in the blockchain inter-chain method provided by the embodiments described below.
Based on the hardware structure of the device, the embodiment of the block chain cross-chain interaction method is provided.
Referring to fig. 2, in a first embodiment of the block chain cross-chain interaction method of the present invention, the block chain cross-chain interaction method includes:
step S10, in response to the detected cross-chain interaction request, acquiring an information interacting party corresponding to the cross-chain interaction request, wherein the information interacting party comprises an information providing party and an information requiring party, and the information providing party and the information requiring party are nodes located on different chains;
in this embodiment, the cross-chain interaction method of the blockchain is applied to information interaction between different blockchain systems or between different chains in the same blockchain system. It can be understood that, in the blockchain, when a transaction request is generated, a corresponding transaction process needs to be triggered based on the transaction request, in the transaction process, transaction data needs to be exchanged between nodes located in the blockchain, and the nodes where data exchange exists may be on the same chain or different chains, which is not specifically limited herein. In the following, the nodes performing information interaction are located on different chains as an example.
When a cross-chain interaction request is detected, in order to respond to the detected cross-chain interaction request, an information interaction party corresponding to the cross-chain interaction request is obtained, wherein the cross-chain interaction request can be a transaction request or a data interaction request generated based on the transaction request of a user. The two parties for information interaction are an information demander and an information provider, wherein the information demander is a party initiating a cross-chain interaction request, the information provider is a party requesting interaction by the information demander, and the information demander and the information provider are respectively positioned on different chains and are nodes on different chains. The chain structure of the information demander and the information provider can be the same or different.
Step S20, tracing to the public nodes of the chain where the information provider and the information demander are located layer by layer;
after determining the information provider and the information demander which need to perform information interaction, tracing to a common node of a chain where the information provider and the information demander are located layer by layer, where the common node may be a node located at an intersection of the chain where the information provider and the information demander are located, or a node of a main chain of the chain where the information provider and the information demander are located, and is not limited herein. In this embodiment, the block chain is hierarchically divided according to main chains in the block chain, and asset data interaction between heterogeneous chains is realized based on a hierarchical partition mode, where each main chain is a parent domain, a side chain extended from the main chain is a sub-domain of the parent domain where the main chain is located, and when information interaction is performed on nodes located in different sub-domains, it is necessary to trace up to a common node layer by layer to determine a common parent domain of an information machine interaction party, and form a domain set, and then perform interaction based on an information interaction rule of the parent domain, and record all information related to the information interaction in all domains included in the domain set. It should be noted that, in the blockchain system, the bottom main chain is a parent domain of all the side chains extending from the bottom main chain, and the side chains extending from the main chain can also be used as parent domains of other side chains, that is, the same side chain on the bottom main chain can be used as a child domain of the main chain and a parent domain of other side chains at the same time.
It is known that, according to the network range of the blockchain, the chains in the blockchain can be divided into a public chain, a private chain and a federation chain, the main chain is generally an independent blockchain network, and the public chain is generally a blockchain that anyone can read, can send a transaction, can effectively confirm the transaction, and can participate in the consensus process. In this embodiment, the main chain is generally a public chain, the nodes on the main chain are public nodes, and the side chains on the main chain may be public chains or private chains or alliance chains.
And step S30, acquiring the intelligent contract corresponding to the public node, and performing information interaction according to the interaction rule corresponding to the intelligent contract.
After tracing to the public nodes of the information provider and the information demander, acquiring the intelligent contract corresponding to the public nodes, and performing information interaction by the information provider and the information demander according to the interaction rule corresponding to the intelligent contract. The intelligent contract corresponding to the public node is about an intelligent contract deployed in a parent domain where the public node is located, and the interaction rule corresponding to the intelligent contract is suitable for the parent domain where the public node is located and all sub-domains contained in the parent domain.
Further, in an embodiment, the step of obtaining the intelligent contract corresponding to the public node includes:
step S301, based on the public node, utilizing a preset contract engine to perform indexing, and determining contract information corresponding to the public node, wherein the contract information comprises a contract address and a contract name;
step S302, obtaining an intelligent contract corresponding to the public node according to the contract address and the contract name in the contract information.
In this embodiment, a contract engine is preset in the block chain, and when an intelligent contract corresponding to a public node of the information demander and the information provider is obtained, the preset contract engine is used for indexing based on the public node to determine contract information corresponding to the public node, where the contract information includes a contract address and a contract name, and further includes contract parameters. And determining and acquiring the intelligent contract corresponding to the public node according to the contract address and the contract name in the contract information.
Further, in an embodiment, the refining of step S30 further includes:
step S303, calling an intelligent contract corresponding to the public node according to contract calling parameters in the contract information to determine a target interactive address;
and step S304, performing information interaction at the target interaction address according to the interaction rule corresponding to the intelligent contract.
In this embodiment, the contract parameters include contract calling parameters, and when information interaction is performed according to interaction rules corresponding to the intelligent contracts, the intelligent contracts corresponding to the common nodes are called according to the contract calling parameters in the acquired contract information, so as to determine interactive target addresses, and information interaction is performed at the target interactive addresses according to the interaction rules corresponding to the intelligent contracts. By calling the intelligent contract, the interaction of the information demander and the information provider is actually the interaction between the intelligent contracts deployed on the public chain of the chain where the information demander and the information provider are located, and based on the intelligent contracts respectively deployed on the public chain at the bottom layer, the information interaction between different block chain systems and between different chains in the same block chain system can be realized, and the chain-crossing interaction of the block chains is realized.
In this embodiment, in response to a detected cross-chain interaction request, an information interacting party corresponding to the cross-chain interaction request is acquired, where the information interacting party includes an information providing party and an information requiring party, and the information providing party and the information requiring party are nodes located on different chains; tracing to a public node of a chain where the information provider and the information demander are located layer by layer; and acquiring the intelligent contract corresponding to the public node, and performing information interaction according to the interaction rule corresponding to the intelligent contract. The intelligent contracts are respectively deployed based on different low-level public chains, and the intelligent contracts of the public nodes are suitable for the lower-level nodes of the public nodes through the public nodes of the information interaction parties, so that the interaction is carried out based on the interaction rules of the public nodes corresponding to the intelligent contracts, the information interaction between isomorphic chains or heterogeneous chains can be realized, and the purpose of cross-chain information interaction is achieved.
Further, on the basis of the above embodiments of the present invention, a second embodiment of the block chain cross-chain interaction method of the present invention is provided.
This embodiment is a step of step S20 refinement in the first embodiment, and in this embodiment, the refinement of step S20 includes:
step S201, tracing the upper nodes of the chain where the information provider and the information demander are located in the same level layer by layer;
in this embodiment, when tracing up to the public node of the chain where the information provider and the information demander are located layer by layer, specifically, tracing up to the upper node of the chain where the information provider and the information demander are located in the same hierarchy layer by layer. In the implementation, the blockchain is hierarchically divided according to the main chain of the chain where the information provider and the information demander are located, and upper-layer nodes are traced layer by layer until the common nodes of the chain where the information provider and the information demander are located on the same level are determined, so that the common parent domain of the sub-domains where the information provider and the information demander are located is determined.
Step S202, detecting the node type of the upper node, wherein the node type comprises all nodes;
further, when the common nodes of the chain where the information provider and the information demander are located are traced, specifically, upper-layer nodes are traced on the chain where the information provider and the information demander are located layer by layer, and then the node types of the upper-layer nodes are detected, wherein the node types include full nodes and light nodes. In the block chain, the more nodes, the more widely distributed the nodes, the more decentralized the block chain network, and the safer and more stable the operation of the block chain network. In a decentralized blockchain network, the node type may be determined according to the type of the chain in which the node is located, for example, a node on a public chain is generally a full node, the full node possesses all transaction data of the blockchain whole network, a node on a private chain is generally a light node, and the light node possesses only transaction data related to itself.
Step S203, when the node type of the upper node is a global node, using the upper node as a public node of the information provider and the information demander.
When an upper node is traced, whether the upper node is a public node is judged, the upper node is mainly determined according to the node type of the upper node, if the node type of the upper node is a full node and is positioned at the same level of a chain where an information provider and an information demander are positioned, the upper node is a node in a parent domain of a subdomain where the information provider and the information demander are positioned, and therefore the upper node can be used as a public node of the information provider and the information demander.
Further, the public node is a full node, which contains global information of the block chain, and based on this, the step of interacting according to the interaction rule corresponding to the intelligent contract corresponding to the public node may further include:
step A1, verifying the cross-chain interaction request according to the global information in the public node;
step A2, when the verification is passed, the cross-chain interaction request is forwarded to the information provider, so that the information provider can respond to the cross-chain interaction request according to the interaction rule corresponding to the intelligent contract, and perform information interaction with the information demander.
After calling an intelligent contract and determining a target interaction address, when interaction is performed according to interaction rules corresponding to the intelligent contract, firstly, a detected cross-link request is verified according to global information in a public node, and when the verification is passed, the cross-link request is forwarded to an information provider so that the information provider can respond to the cross-link request according to the interaction rules corresponding to the intelligent contract, and information interaction is performed with an information demand party.
Further, in this embodiment, a predictive engine is also preset in the blockchain, and the predictive engine may be configured to listen to the cross-chain request event log, and forward and verify the interaction data of the information interaction party. The method comprises the steps that a prediction machine creates a monitoring node in a block chain and is used for monitoring whether a cross-chain request event exists or not, when a cross-chain interaction request is detected, after a public node verifies the cross-chain interaction request, the cross-chain protection request is transmitted to an information provider, the information provider responds to the cross-chain interaction request, and a processing result of the information provider is returned to the public node for recording. The prediction machine also verifies the data returned by the information provider, and finally forwards the verification result and the returned data to the information demand side together to complete the cross-chain interaction event.
In this embodiment, the common node is determined according to the node types of the upper nodes of the chain where the information provider and the information demander are located, the common node which can be used for information interaction can be rapidly determined, the interaction efficiency is improved, information interaction is performed based on an intelligent contract corresponding to the common node, cross-chain interaction request event log monitoring is performed through a predictive engine, and the reliability and the safety of the interaction process are guaranteed.
In addition, referring to fig. 3, an embodiment of the present invention further provides a block chain inter-chain interaction device, where the block chain inter-chain interaction device includes:
a request response module 10, configured to respond to a detected cross-chain interaction request, and acquire an information interacting party corresponding to the cross-chain interaction request, where the information interacting party includes an information providing party and an information demanding party, and the information providing party and the information demanding party are nodes located on different chains;
a node tracing module 20, configured to trace up to a public node of a chain where the information provider and the information demander are located layer by layer;
and the information interaction module 30 is configured to obtain the intelligent contract corresponding to the public node, and perform information interaction according to an interaction rule corresponding to the intelligent contract.
Optionally, the node tracing module 20 is further configured to:
tracing the upper nodes of the chain where the information provider and the information demander are located in the same level layer by layer;
detecting a node type of the upper node, wherein the node type comprises a full node;
and when the node type of the upper node is a full node, taking the upper node as a public node of the information provider and the information demander.
Optionally, the information interaction module 30 is further configured to:
the method comprises the steps that indexing is carried out by utilizing a preset contract engine on the basis of the public node, and contract information corresponding to the public node is determined, wherein the contract information comprises a contract address and a contract name;
and acquiring the intelligent contract corresponding to the public node according to the contract address and the contract name in the contract information.
Optionally, the information interaction module 30 is further configured to:
calling an intelligent contract corresponding to the public node according to contract calling parameters in the contract information to determine a target interactive address;
and carrying out information interaction at the target interaction address according to the interaction rule corresponding to the intelligent contract.
Optionally, the information interaction module 30 is further configured to:
verifying the cross-chain interaction request according to global information in the public node;
and when the verification is passed, forwarding the cross-chain interaction request to the information provider, so that the information provider can respond to the cross-chain interaction request and perform information interaction with the information demand party.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a blockchain cross-chain interaction program is stored on the computer-readable storage medium, and when executed by a processor, the blockchain cross-chain interaction program implements operations in the blockchain cross-chain interaction method provided in the foregoing embodiment.
In addition, an embodiment of the present invention further provides a computer program product, which includes a computer program, and when executed by a processor, the computer program implements the operations in the block chain cross-chain interaction method provided in the foregoing embodiments.
For the embodiments of the device, the computer program product, and the computer-readable storage medium of the present invention, reference may be made to the embodiments of the block chain cross-chain interaction method of the present invention, which are not described herein again.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity/action/object from another entity/action/object without necessarily requiring or implying any actual such relationship or order between such entities/actions/objects; the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
For the apparatus embodiment, since it is substantially similar to the method embodiment, it is described relatively simply, and reference may be made to some descriptions of the method embodiment for relevant points. The above-described apparatus embodiments are merely illustrative, in that elements described as separate components may or may not be physically separate. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention. One of ordinary skill in the art can understand and implement it without inventive effort.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the block chain cross-chain interaction method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. A block chain cross-chain interaction method is characterized by comprising the following steps:
responding to a detected cross-chain interaction request, and acquiring an information interaction party corresponding to the cross-chain interaction request, wherein the information interaction party comprises an information provider and an information demander, and the information provider and the information demander are nodes located on different chains;
tracing to a public node of a chain where the information provider and the information demander are located layer by layer;
and acquiring the intelligent contract corresponding to the public node, and performing information interaction according to the interaction rule corresponding to the intelligent contract.
2. The method for interacting across block chains according to claim 1, wherein the step of obtaining the intelligent contract corresponding to the public node comprises:
the method comprises the steps that indexing is carried out by utilizing a preset contract engine on the basis of the public node, and contract information corresponding to the public node is determined, wherein the contract information comprises a contract address and a contract name;
and acquiring the intelligent contract corresponding to the public node according to the contract address and the contract name in the contract information.
3. The method for interacting across chains of blocks according to claim 2, wherein the contract information further includes a contract invocation parameter, and the step of performing information interaction according to the interaction rule corresponding to the intelligent contract includes:
calling an intelligent contract corresponding to the public node according to contract calling parameters in the contract information to determine a target interactive address;
and carrying out information interaction at the target interaction address according to the interaction rule corresponding to the intelligent contract.
4. The blockchain cross-chain interaction method according to claim 1, wherein the step of tracing up to the common node of the chain where the information provider and the information demander are located layer by layer comprises:
tracing the upper nodes of the chain where the information provider and the information demander are located in the same level layer by layer;
detecting a node type of the upper node, wherein the node type comprises a full node;
and when the node type of the upper node is a full node, taking the upper node as a public node of the information provider and the information demander.
5. The blockchain cross-chain interaction method of claim 4, wherein the full node contains global information of a blockchain.
6. The method for block chain cross-chain interaction according to claim 5, wherein the step of performing information interaction according to the interaction rule corresponding to the intelligent contract comprises:
verifying the cross-chain interaction request according to global information in the public node;
and when the verification is passed, forwarding the cross-chain interaction request to the information provider, so that the information provider can respond to the cross-chain interaction request and perform information interaction with the information demand party.
7. The blockchain cross-chain interaction method according to claim 4, wherein a predictive engine is provided in the blockchain, and the predictive engine is used for monitoring a cross-chain request event log, forwarding and verifying interaction data of the information interaction party.
8. A blockchain inter-chain interaction device, the blockchain inter-chain interaction device comprising:
the request response module is used for responding to the detected cross-chain interaction request and acquiring an information interaction party corresponding to the cross-chain interaction request, wherein the information interaction party comprises an information provider and an information demander, and the information provider and the information demander are nodes positioned on different chains;
the node tracing module is used for tracing to a public node of a chain where the information provider and the information demander are located layer by layer;
and the information interaction module is used for acquiring the intelligent contract corresponding to the public node and carrying out information interaction according to the interaction rule corresponding to the intelligent contract.
9. A terminal device, characterized in that the terminal device comprises: a memory, a processor, and a blockchain cross-chain interactive program stored on the memory and executable on the processor, the blockchain cross-chain interactive program when executed by the processor implementing the steps of the blockchain cross-chain interactive method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, having stored thereon a blockchain cross-chain interactive program, which when executed by a processor implements the steps of the blockchain cross-chain interactive method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111518962.2A CN114357066A (en) | 2021-12-13 | 2021-12-13 | Block chain cross-chain interaction method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111518962.2A CN114357066A (en) | 2021-12-13 | 2021-12-13 | Block chain cross-chain interaction method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114357066A true CN114357066A (en) | 2022-04-15 |
Family
ID=81098640
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111518962.2A Pending CN114357066A (en) | 2021-12-13 | 2021-12-13 | Block chain cross-chain interaction method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114357066A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115774728A (en) * | 2023-02-15 | 2023-03-10 | 湖南大学 | President machine-based alliance chain cross-chain operation method, apparatus, device and medium |
-
2021
- 2021-12-13 CN CN202111518962.2A patent/CN114357066A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115774728A (en) * | 2023-02-15 | 2023-03-10 | 湖南大学 | President machine-based alliance chain cross-chain operation method, apparatus, device and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110869907B (en) | Method and terminal for browsing application page | |
CN105630685A (en) | Method and device for testing program interface | |
US10972914B2 (en) | Image sharing method and system, and electronic device | |
CN103383620B (en) | Show method and the mobile terminal of help information on mobile terminals | |
CN105786878A (en) | Browse object display method and device | |
CN113111018B (en) | Bus device addressing method and computer readable storage medium | |
TWI618430B (en) | System, method and computer-readable recording medium for providing notice according to location secession | |
CN105471931A (en) | Method, device and system for querying service data | |
CN107958365B (en) | Material information changing method and device, storage medium and electronic equipment | |
US20160042070A1 (en) | Web Resource Compatibility With Web Applications | |
CN109710832B (en) | Method and equipment for searching hosted program | |
JP2020509622A (en) | Wireless network type detection method and apparatus and electronic device | |
CN113468515A (en) | User identity authentication method and device, electronic equipment and storage medium | |
CN106255102A (en) | The authentication method of a kind of terminal unit and relevant device | |
CN106034319A (en) | Connection method and device of wireless access point | |
CN114357066A (en) | Block chain cross-chain interaction method, device, equipment and storage medium | |
CN105740419A (en) | Method and apparatus for acquiring dynamically loaded content in webpage | |
CN108462580B (en) | Numerical value transferring method and device | |
CN110674050B (en) | Memory out-of-range detection method and device, electronic equipment and computer storage medium | |
CN105631059A (en) | Data processing method, data processing device and data processing system | |
CN110852649A (en) | Resource management method, terminal, device and readable storage medium | |
CN112910985B (en) | Protocol conversion method, device, equipment and storage medium based on intelligent contract | |
CN115600213A (en) | Vulnerability management method, device, medium and equipment based on application program | |
CN110784824B (en) | Travel data sharing method and mobile terminal | |
CN113872798A (en) | Method and device for constructing space network topological graph, storage medium and electronic equipment |
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 |