CN112688934B - Contract calling method and system based on intelligent gateway and contract engine - Google Patents

Contract calling method and system based on intelligent gateway and contract engine Download PDF

Info

Publication number
CN112688934B
CN112688934B CN202011522893.8A CN202011522893A CN112688934B CN 112688934 B CN112688934 B CN 112688934B CN 202011522893 A CN202011522893 A CN 202011522893A CN 112688934 B CN112688934 B CN 112688934B
Authority
CN
China
Prior art keywords
chain
cross
contract
intelligent gateway
intelligent
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.)
Active
Application number
CN202011522893.8A
Other languages
Chinese (zh)
Other versions
CN112688934A (en
Inventor
黄步添
殷昱煜
罗春凤
王硕苹
姜建成
刘振广
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Yunxiang Network Technology Co Ltd
Original Assignee
Hangzhou Yunxiang Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Yunxiang Network Technology Co Ltd filed Critical Hangzhou Yunxiang Network Technology Co Ltd
Priority to CN202011522893.8A priority Critical patent/CN112688934B/en
Publication of CN112688934A publication Critical patent/CN112688934A/en
Application granted granted Critical
Publication of CN112688934B publication Critical patent/CN112688934B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a contract calling method and a system based on an intelligent gateway and a contract engine, aiming at the problem that the interconnection and intercommunication can not be realized due to the data structure isomerism between heterogeneous block chains, automatically triggering and executing a Cross-link task by deploying a Cross-link transaction intelligent contract, wherein the Cross-link transaction intelligent contract comprises a CCTP (China clear for Protocol), and realizes Cross-link data transmission between a Cross-link special intelligent gateway and a Cross-link network based on the CCTP, the data transmission process combines a PKI system and a cryptographic algorithm to ensure the data security and privacy in the cross-link contract calling execution process, under the cross-chain mode of partition layering, the intelligent gateway and the contract engine are arranged to complete the calling process of cross-chain transaction intelligent contracts, the intelligent gateway comprises an event flow trigger and an application chain plug-in, and is adapted to the intelligent gateway based on a contract engine to realize cross-chain contract calling. The intelligent contract calling method can realize the calling of the cross-chain intelligent contract.

Description

Contract calling method and system based on intelligent gateway and contract engine
Technical Field
The invention belongs to the technical field of block chain cross-linking, and particularly relates to a contract calling method and system based on an intelligent gateway and a contract engine.
Background
With the development of block chain technology, obvious appeal is provided for chain crossing among multiple block chains. Along with the gradual enrichment and perfection of an intelligent contract development platform, a large number of complicated block chain business applications are displayed, a plurality of independent infrastructures and service systems are formed, and the block chain applications are urgently required to realize functional extension, namely, the infrastructures and the service systems are required to be interoperated, so that the interconnection and intercommunication among the block chains are realized, and further, the inter-chain transfer of values and services is realized. In economy, the most common method for realizing value transfer between block chain networks is a centralized exchange, and a decentralized exchange built based on a cross-chain technology can reduce inter-chain transaction friction and improve value liquidity, and becomes an effective supplement means for the centralized exchange. These all require a block chaining contract based call implementation.
At present, a cross-chain technology is not mature, wherein the calling of the cross-chain contract guarantees the smooth execution of the cross-chain transaction, but the calling technology of the cross-chain contract is in a preliminary stage.
The patent with the patent number of CN201810551462.0, "a cross-link data transfer method and device suitable for a license link scenario," can implement cross-link contract invocation, and the technical scheme is suitable for a cross-link data transfer method in a license link scenario, and can create a side chain by using a verified part of participants on a main chain, deploy an intelligent contract on the main chain and the side chain at the same time, and transfer cross-link invocation information by using an independent messenger, thereby implementing cross-link invocation between the main chain and the side chain under the condition of ensuring the security of information transfer. But the cross-chain calling refers to calling a related intelligent contract which needs to be executed on a side chain on a main chain, and the final purpose is to realize cross-chain interaction, the interaction is block chain interaction in a broad sense, can be asset transfer, and can also be a section of common code of the intelligent contract.
Therefore, there is a need to provide a new method and system for cross-chain intelligent contract invocation.
Disclosure of Invention
Based on the background and the problems in the prior art, the invention is to design a contract calling method and a system thereof based on an intelligent gateway and a contract engine, which can realize the calling process of a cross-chain intelligent contract.
Aiming at the problem that data structure isomerism between heterogeneous block chains cannot be interconnected and intercommunicated, in order to achieve the purposes and other advantages of the invention, the invention provides a contract calling method based on an intelligent gateway and a contract engine, which comprises the following specific implementation steps:
deploying a cross-chain transaction intelligent contract to automatically trigger and execute a cross-chain task;
and the triggering execution of the cross-link task is based on calling a cross-link transmission protocol, so that cross-link data transmission between the cross-link intelligent gateway and the contract engine is realized. The data transmission process is combined with a PKI system and a cryptographic algorithm, and data security and privacy in the cross-link contract calling execution process are guaranteed. The Cross Chain Transport Protocol (CCTP) is included in the Cross Chain transaction intelligent contract. The cross-chain transmission protocol comprises one or more fields of a chain code event structure body, a cross-chain event credibility certificate, a cross-chain event timestamp and a cross-chain transmission protocol version number;
setting an intelligent gateway, deploying an intelligent contract screening intelligent gateway to intelligently layer the requests of different block chains according to function types, partitioning each layer according to different request emergency importance degrees, and concurrently performing response reply to realize the intelligent gateway in a partition layering mode; the intelligent gateway comprises an event flow trigger and an application chain plug-in;
under a partition layering cross-chain mode, a cross-chain contract invoking request from different block chains in a cross-chain network is connected based on an intelligent gateway, a contract engine is set to adapt to a cross-chain transaction intelligent contract, and cross-chain intelligent contract invoking is achieved.
Further, the step of implementing cross-chain data transmission by the CCTP protocol includes: and generating a cross-chain transmission protocol packet to realize communication between the intelligent gateway and the contract engine, wherein the cross-chain transmission protocol packet carries cross-chain related data. Each cross-link dedicated intelligent gateway is both a message publisher and a message subscriber to the cross-link network. The communication between the special intelligent gateway of the cross-chain and the cross-chain network is realized through a CCTP protocol packet, and the CCTP protocol packet carries the data related to the cross-chain. A subscriber subscribes CCTP protocol packet messages sent to an application chain to a cross-chain network, registration of the application chain to the cross-chain network by a cross-chain special intelligent gateway is achieved, the cross-chain special intelligent gateway serves as a message publisher after converting an application chain event into a CCTP protocol packet, the CCTP protocol packet is published to the cross-chain network, different block chain bottom layers have different data definitions, different heterogeneous block chains and the cross-chain network are communicated, and a universal cross-chain data transmission CCTP protocol is designed and comprises the following main information:
cross-chain event information: specific matters for cross-chain operations;
cross-chain event attestation information: different block chains have different consensus, and the heterogeneous block chains cannot perform credibility verification on cross-chain events of other chains, so that the CCTP contains evidence for proving the credibility of the cross-chain events, and the credibility of the cross-chain events is confirmed by a contract engine;
auxiliary information: for determining a cross-chain time and a cross-chain version.
Further, aiming at the rapid release requirement of the event stream of the block link protocol stack, the intelligent gateway is realized based on the event stream trigger, the source chain, the target chain name and the contract identifier of a cross-chain event are included, the freshness is ensured by injecting random numbers, the intelligent gateway which forwards all node events and realizes intelligent screening is introduced, the f +1 signatures from the same event are waited and packaged, the network communication cost is reduced to the maximum extent, the specialization and the intelligence of the intelligent gateway are realized, and the realization of the intelligent gateway comprises the following steps:
and (3) application chain management: for registering an application chain to a cross-chain network;
protocol packet receiving and sending: the method is used for forwarding a communication protocol packet with a cross-link network;
application chain plug-ins: for interaction with a specific type of application chain.
Furthermore, different block chains adopt different data definitions and interaction modes, in order to support heterogeneous block chains, the application chain plug-in realizes interaction among the block chains, and the block chains of different bottom layer types use different plug-ins; the application chain plug-in specifically comprises one or more of the following components:
interconversion between block chain cross-chain event and CCTP protocol packet;
subscribing a blockchain cross-chain event;
invoking the contract and querying the contract data enables contract interaction.
Realizing interaction between a special intelligent gateway for a cross-link and the Fabric by realizing a Fabric application chain plug-in, wherein the plug-in belongs to a single organization, is added into each channel and has the read-write permission of the channel; the plug-in is implemented using an SDK, the SDK implementation comprising:
a) reading the identity certificate of the special intelligent gateway node for the cross-link, and using the identity certificate to interact with the Fabric;
b) realizing the interconversion between the Fabric cross-link event and the CCTP protocol packet;
c) subscribing to Fabric cross-link events published across link contracts;
d) create transaction calls cross-chain contracts, perform cross-chain operations.
Further, cross-domain connection is realized based on the application chain, the application chain management comprises an application chain registration function, after a certain alliance chain is added, application chain information is registered to the cross-chain network by using an RPC interface provided by the cross-chain network, and the application chain information comprises:
the application chain and the namespace in which the gateway is located;
an application chain name;
and cross-chain special intelligent gateway domain names or IPs and ports.
Further, based on the application chain, designing a multilateral cross-domain application chain: the method comprises the steps that cross-chain contract implementation business logic is deployed in each application chain, then business intelligent contracts and cross-chain intelligent contracts are interactively operated, cross-chain underlying network construction is completed, different block chain networks are connected based on components such as intelligent gateways, contract engines and the like, multi-field cross-chain services are supported, and the cross-chain interaction requirements of heterogeneous multi-block chains are met.
Further, for different business process rules, the contract engine implements contract invocation, specifically including: and setting a data standard of a transaction process information chain and an associated database thereof based on the design, implementation and deployment of a cross-chain programmable intelligent contract, and adapting an intelligent gateway through a contract engine.
Further, by deploying a plurality of nodes and virtual machines in the cross-link network, based on deployment design rules of application chains, gateways and service contracts in different namespaces, a contract engine is used for searching contract addresses, determining contract names and calling contract parameters, obtaining data returned by the contracts, realizing contract calling, and calling a specified contract execution address through the contracts, so that the technical problem that energy is wasted due to the fact that a plurality of nodes compete to execute the contract calling and packing execution results is solved.
Further, the contract engine is located in a cross-chain network, and the cross-chain network manages the contract engine, and the cross-chain network management specifically includes:
setting a chain crossing function: the method comprises application chain management and cross-chain event management, wherein the application chain management specifically realizes application chain registration and connection of cross-chain special intelligent gateways of application chains; the cross-chain event management specifically realizes cross-chain data analysis, cross-chain data credibility verification and cross-chain data forwarding;
and setting a management function based on the set cross-link function in order to monitor and supervise functions provided by the cross-link network, so that a user logs in a background to view cross-link data.
On the other hand, the invention provides an intelligent contract invoking system, which comprises a cross-link data transmission protocol management module, an intelligent gateway management module, an application chain management module and a contract engine management module, and the intelligent contract invoking system specifically comprises the following components:
a cross-link data transmission protocol management module: the system is used for managing intelligent contracts containing a cross-chain transmission protocol and other data call transmission protocols, and managing a cross-chain transmission protocol package and 3 types of information contained in the cross-chain transmission protocol package;
an application chain management module: the method is used for application chain management, protocol packet transceiving and application chain plug-in management;
intelligent gateway management module: the intelligent gateway is used for managing event stream triggers and realizing the intelligent gateway, comprises a source chain, a target chain name and a contract identifier of a cross-chain event, ensures freshness by injecting random numbers, introduces the intelligent gateway which forwards all node events and realizes intelligent screening, and waits for and packages f +1 signatures from the same event;
the contract engine management module: the intelligent gateway is matched with a contract engine to finish searching contract addresses, determining contract names and calling contract parameters, obtaining data returned by contracts, realizing contract calling and calling a specified contract execution address through the contracts.
Based on the technical scheme, compared with the prior art, the invention has the following beneficial technical effects: the invention realizes contract calling based on an intelligent gateway and a contract engine, wherein the contract refers to an intelligent contract for realizing asset, transaction, affairs and value flow transfer on a block chain, the intelligent gateway is an intelligent special cross-chain gateway, the special purpose of the gateway is realized based on an event flow trigger, a gateway for forwarding all node events and realizing intelligent screening is introduced, and f +1 signatures from the same event are waited and packaged, so that the network communication cost is reduced to the maximum extent, and the intelligence of the intelligent gateway is realized; the contract engine is designed to search contract addresses, confirm contract names and call contract parameters and obtain data returned by contracts to realize the call of the contracts, and the technical problem of energy waste caused by the fact that a plurality of nodes compete to execute the contract call and package execution results is solved by adapting the cross-link gateway through the contract engine.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts, and the contents of the drawings of the present invention as embodiments of the present invention fall into the protection scope of the present invention.
FIG. 1 is a schematic diagram of an intelligent gateway and contract engine implementation of the present invention;
FIG. 2 is a process diagram of a contract engine implementing a contract invocation according to the present invention;
FIG. 3 is a diagram of a contract invocation function architecture according to the present invention;
FIG. 4 is a block diagram of the system of the present invention.
Detailed Description
In order to clearly illustrate the present invention and make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention are clearly and completely described below in conjunction with the drawings in the embodiments of the present invention, so that those skilled in the art can implement the technical solutions by referring to the description text. The technology of the present invention will be described in detail below with reference to the accompanying drawings in conjunction with specific embodiments.
The heterogeneous block chains refer to block chains using different consensus mechanisms, block structures and hash signature algorithms, the underlying contract designs of the block chains are different, the homogeneous block chains are special heterogeneous block chains, similar or identical components are used in each level of the homogeneous block chains, but contract logics of different service scenes are greatly different, and the system is relatively closed. Thus, contract interactions between heterogeneous multi-chains are difficult.
Example 1:
fig. 1 shows an implementation form of the present invention, and illustrates an implementation principle of the intelligent gateway of the present invention.
Aiming at the problem that data structure isomerism between heterogeneous block chains cannot be interconnected and communicated, a Cross-Chain transaction intelligent contract is deployed to automatically trigger and execute a Cross-Chain task, the Cross-Chain transaction intelligent contract comprises a CCTP (China telecom transaction Protocol), data transmission between a Cross-Chain special intelligent gateway and a Cross-Chain network is realized based on the CCTP Cross-Chain Protocol, the data transmission process is combined with a PKI (public key infrastructure) system and a national secret algorithm to guarantee data security and privacy in the Cross-Chain contract invoking execution process, under a Cross-Chain mode of partition layering, an intelligent gateway and a contract engine are arranged to complete the invoking process of the Cross-Chain transaction intelligent contract, and the intelligent gateway realizes Cross-Chain contract invoking based on the contract engine through an intelligent route and a Cross-Chain consensus algorithm. The concrete implementation steps comprise:
step 1: deploying a cross-chain transaction intelligent contract to automatically trigger and execute a cross-chain task;
step 2: executing a cross-link task, and realizing cross-link data transmission between a cross-link intelligent gateway and a contract engine based on a transfer cross-link transmission protocol; the cross-chain transmission protocol is contained in the cross-chain transaction intelligent contract; the cross-chain transmission protocol comprises one or more fields of a chain code event structure body, a cross-chain event credibility certificate, a cross-chain event timestamp and a cross-chain transmission protocol version number;
different block chain bottom layers have different data definitions, different block chains and cross-chain networks are opened, a universal cross-chain protocol needs to be designed, and the CCTP protocol contained in a cross-chain transaction intelligent contract is adopted to open different block chains and cross-chain networks. The CCTP protocol packet is a data packet communicated between a cross-link gateway and a cross-link network and carries cross-link related data. In the invention, each cross-chain special intelligent gateway is a message publisher and a message subscriber for a cross-chain network. Communication between a special cross-chain intelligent gateway and a cross-chain network is realized through a CCTP protocol packet, and the CCTP protocol packet carries cross-chain related data. When the cross-chain special intelligent gateway registers the application chain A with the cross-chain network, the CCTP protocol packet message sent to the application chain A is actually subscribed to the cross-chain network as a subscriber. After converting the application chain event into a CCTP protocol packet, the special intelligent gateway for the cross-chain is used as a message publisher to publish the protocol packet to a cross-chain network. CCTP contains 3 types of main information:
(1) cross-chain event information, namely specific matters of cross-chain operation;
(2) the CCTP comprises evidence for proving the credibility of the cross-chain event, and the credibility of the cross-chain event is finished by a cross-chain network;
(3) auxiliary information such as cross-chain time, cross-chain version.
Step 3: setting an intelligent gateway, deploying an intelligent contract screening intelligent gateway to intelligently layer the requests of different block chains according to function types, partitioning each layer according to different request emergency importance degrees, and concurrently performing response reply to realize the intelligent gateway in a partition layering mode; the intelligent gateway comprises an event flow trigger and an application chain plug-in;
aiming at the rapid release requirement of the event stream of the block link protocol stack, the intelligent gateway is realized based on the event stream trigger, including a source chain, a target chain name and a contract identifier of a cross-chain event, the freshness is ensured by injecting a random number, a gateway which forwards all node events and realizes intelligent screening is introduced, f +1 signatures from the same event are waited and packaged, the network communication cost is reduced to the maximum extent, the specialization and the intellectualization of the intelligent gateway are realized, and the specific realization of the intelligent gateway comprises the following steps:
and (3) application chain management: for registering an application chain to a cross-chain network;
protocol packet receiving and sending: the method is used for forwarding a communication protocol packet with a cross-link network;
application chain plug-ins: for interaction with a chain of applications of a particular type.
Namely, the intelligent gateway comprises 3 functions:
(1) application chain management: the system is responsible for registering an application chain to a cross-chain network;
(2) protocol packet receiving and sending: the method is responsible for forwarding a communication protocol packet of a cross-link network;
(3) application chain plug-ins: is responsible for interacting with specific types of application chains. The different block chains have different data definitions and interaction modes, in order to support different block chains, the function of interacting with the block chains can be made into plug-ins, and the block chains with different bottom layer types only use different plug-ins. The application chaining plug-in function comprises:
(1) interconversion between block chain cross-chain event and CCTP protocol packet;
(2) subscribing to a blockchain cross-chain event;
(3) contract interaction: invoking contracts and querying contract data.
(4) Fabric application chain plug-in: the Fabric cross-link only needs to realize a Fabric application chain plug-in. The intelligent gateway and the Fabric interaction are realized by realizing the Fabric application chain plug-in, and the intelligent gateway and the Fabric interaction need to belong to a single organization, add each channel and have the read-write permission of the channel. The Fabric cross-chain plug-in uses the Go language SDK to realize the following functions:
(1) reading the cross-link special intelligent gateway node certificate, and using the identity certificate to interact with the Fabric;
(2) the conversion between the Fabric cross-link event and the CCTP protocol packet;
(3) subscribing to Fabric cross-link events published by cross-link contracts;
(4) and creating a transaction call cross-chain contract and executing cross-chain operation.
And realizing cross-domain connection based on the application chain, wherein the function contained in the application chain management is an application chain registration function, and after a certain alliance chain is added, the application chain information is registered to the cross-chain network by using an RPC interface provided by the cross-chain network. The application chain information includes:
(1) the application chain and the namespace in which the gateway is located;
(2) an application chain name;
(3) cross-chain dedicated intelligent gateway domain name/IP and port.
Designing a multilateral cross-domain application chain: the method comprises the steps that cross-chain contract is deployed in each application chain to achieve business logic, then business contracts and cross-chain contract interaction operation are conducted, cross-chain bottom layer network construction is completed, different block chain networks are connected based on components such as a cross-chain special intelligent gateway and a cross-chain network, multi-field cross-chain services are supported, and the cross-chain interaction requirements of heterogeneous multi-block chains are met.
Step 4: under a partition layering cross-chain mode, a cross-chain contract invoking request from different block chains in a cross-chain network is connected based on an intelligent gateway, a contract engine is set to adapt to a cross-chain transaction intelligent contract, and cross-chain intelligent contract invoking is achieved.
FIG. 2 shows the procedure of implementing contract invocation by the contract engine according to the present invention, and the contract engine is designed to implement contract invocation according to different business process rules: the method comprises the steps of designing, realizing and deploying a programmable contract based on heterogeneous cross-links, setting a transaction process information chain data standard and an associated database thereof, and adapting a cross-link special intelligent gateway through a contract engine.
The method comprises the steps of deploying a plurality of nodes and virtual machines in a heterogeneous cross-chain network, completing searching for contract addresses, determining contract names and calling contract parameters through a contract engine based on deployment design rules of application chains, gateways and service contracts in different namespaces, obtaining data returned by the contracts, realizing contract calling, and calling a designated contract execution address through the contracts, so that the technical problem of energy waste caused by the fact that a plurality of nodes compete to execute the contract calling and packing execution results is solved.
The contract engine is located in a cross-chain network, the cross-chain network manages the contract engine, as shown in fig. 3, and fig. 3 is a diagram of a contract calling function structure of the present invention. The functions of cross-link network management include:
(1) the chain-crossing function: the method is a function necessary for cross-chaining and is divided into application chaining management (application chaining registration, connection of cross-chaining special intelligent gateways of application chaining) and cross-chaining event management (cross-chaining data analysis, cross-chaining data credibility verification and cross-chaining data forwarding).
(2) And (4) management functions: in order to monitor and supervise functions provided by the cross-link network, a user logs in to a background to view cross-link data. This function is provided during the maintenance period.
Namely:
the cross-link network management specifically includes:
setting a chain crossing function: the method comprises application chain management and cross-chain event management, wherein the application chain management specifically realizes application chain registration and connection of cross-chain special intelligent gateways of application chains; the cross-chain event management specifically realizes cross-chain data analysis, cross-chain data credibility verification and cross-chain data forwarding;
and setting a management function based on the set cross-chain function in order to monitor and supervise functions provided by the cross-chain network, so that a user logs in a background to view cross-chain data.
Example 2:
the embodiment proposes an intelligent contract invoking system as shown in fig. 4. The system comprises a cross-link data transmission protocol management module, an intelligent gateway management module, an application chain management module and a contract engine management module, and specifically comprises the following components:
a cross-link data transmission protocol management module: the system is used for managing an intelligent contract containing a cross-link transmission protocol and other data call transmission protocols, and managing a cross-link transmission protocol packet and 3 types of information contained in the cross-link transmission protocol packet;
an application chain management module: the method is used for application chain management, protocol packet transceiving and application chain plug-in management;
intelligent gateway management module: the intelligent gateway is used for managing event stream triggers and realizing the intelligent gateway, comprises a source chain, a target chain name and a contract identifier of a cross-chain event, ensures freshness by injecting random numbers, introduces the intelligent gateway which forwards all node events and realizes intelligent screening, and waits for and packages f +1 signatures from the same event;
a contract engine management module: the system is positioned in a cross-link network, is used for adapting an intelligent gateway, is used for designing, realizing and deploying the programmable contracts of heterogeneous cross-links, sets a data standard of a transaction process information link and an associated database thereof, adapts the intelligent gateway through a contract engine, finishes searching contract addresses, determining contract names and calling contract parameters, obtains data returned by contracts, realizes contract calling, and calls a specified contract execution address through the contracts.
The embodiments described above are presented to facilitate one of ordinary skill in the art to understand and practice the present invention. It will be readily apparent to those skilled in the art that various modifications to the above-described embodiments may be made, and the generic principles defined herein may be applied to other embodiments without the use of inventive faculty. Therefore, the present invention is not limited to the above embodiments, and those skilled in the art should make improvements and modifications to the present invention based on the disclosure of the present invention within the protection scope of the present invention.

Claims (8)

1. A contract calling method based on an intelligent gateway and a contract engine is characterized by comprising the following concrete implementation steps:
automatically triggering and executing a cross-chain task by utilizing a cross-chain transaction intelligent contract; the triggering execution of the cross-link task is based on calling a cross-link transmission protocol, so that cross-link data transmission between a cross-link intelligent gateway and a contract engine is realized; the cross-chain transmission protocol is contained in the cross-chain transaction intelligent contract; the cross-chain transmission protocol comprises one or more fields of a chain code event structure body, a cross-chain event credibility certificate, a cross-chain event timestamp and a cross-chain transmission protocol version number; the step of realizing the cross-chain data transmission through the cross-chain transmission protocol comprises the following steps: generating a cross-chain transmission protocol packet to realize communication between the intelligent gateway and the contract engine, wherein the cross-chain transmission protocol packet carries cross-chain related data; each intelligent gateway is a message publisher and a message subscriber for the contract engine; a subscriber subscribes a cross-chain transmission protocol packet message sent to an application chain to a cross-chain network, application chain registration through an intelligent gateway is realized, the intelligent gateway serves as a message publisher after converting an application chain event into a cross-chain transmission protocol packet, the protocol packet is published to a contract engine, and different heterogeneous block chains and the contract engine are communicated; the cross-chain transmission protocol comprises one or more of the following information:
cross-chain event information: specific matters for cross-chain operations;
cross-chain event attestation information: evidence proof for the trustworthiness of the cross-chain event, wherein the trustworthiness of the cross-chain event is confirmed by the contract engine;
auxiliary information: for determining a cross-chain time and a cross-chain version;
setting an intelligent gateway, deploying an intelligent contract screening intelligent gateway to intelligently layer the requests of different block chains according to function types, partitioning each layer according to the emergency importance of different requests, and responding and replying to realize the intelligent gateway in a partition layering mode;
the intelligent gateway comprises an event flow trigger and an application chain plug-in; the method comprises the steps of realizing an intelligent gateway based on an event flow trigger, wherein the intelligent gateway comprises a source chain, a target chain name and a contract identifier of a cross-chain event, ensuring freshness by injecting random numbers, introducing the intelligent gateway which forwards all node events and realizes intelligent screening, and reducing network communication cost to the maximum extent and realizing intellectualization of the intelligent gateway by waiting and packing f +1 signatures from the same event; the intelligent gateway performs application chain management, protocol packet transceiving and application chain plug-in management, and the specific implementation steps comprise:
and (3) application chain management: for registering an application chain to a cross-chain network;
protocol packet receiving and sending: the method is used for forwarding a communication protocol packet with a cross-link network;
application chain plug-ins: for interaction with specific types of application chains;
under a partition layering cross-chain mode, a cross-chain contract invoking request from different block chains in a cross-chain network is connected based on an intelligent gateway, a contract engine is set to adapt to a cross-chain transaction intelligent contract, and cross-chain intelligent contract invoking is achieved.
2. The contract invoking method based on intelligent gateway and contract engine according to claim 1, wherein the application chain plug-in implements interaction between blockchains, and blockchains of different underlying types use different plug-ins; the application chain plug-in implementation comprises one or more of the following:
interconversion between block chain cross-chain events and cross-chain transport protocol packets;
subscribing to a blockchain cross-chain event;
calling a contract and inquiring contract data to realize contract interaction;
the interaction between the intelligent gateway and the Fabric is realized through a Fabric application chain plug-in, which belongs to a single organization, is added into each channel and has the read-write permission of the channel; the plug-in is implemented using an SDK, the SDK implementation comprising:
reading an intelligent gateway node identity certificate, and using the identity certificate to interact with the Fabric;
the method realizes the interconversion between the Fabric cross-link event and the cross-link transmission protocol packet;
subscribing to Fabric cross-link events published by cross-link contracts;
and creating a transaction calling cross-chain contract and executing cross-chain operation.
3. The intelligent gateway and contract engine-based contract calling method according to claim 1, wherein cross-domain connection is realized based on the application chain, the application chain management comprises an application chain registration function, after a certain alliance chain is added, application chain information is registered to a cross-chain network by using an RPC interface provided by the cross-chain network, and the application chain information comprises:
the application chain and the namespace in which the gateway is located;
an application chain name;
and cross-chain special intelligent gateway domain names or IPs and ports.
4. The intelligent gateway and contract engine based contract invoking method according to claim 3, wherein based on said application chain, designing a multi-edge cross-domain application chain: and a cross-chain intelligent contract is deployed in each application chain to realize business logic, so that business intelligent contracts and the cross-chain intelligent contracts are interactively operated, and different block chain networks are connected based on two components, namely an intelligent gateway and a contract engine.
5. The intelligent gateway and contract engine based contract invoking method according to claim 1, wherein the contract engine implements intelligent contract invocation, specifically comprising: and setting a data standard of a transaction process information chain and an associated database thereof based on the design, implementation and deployment of a cross-chain programmable intelligent contract, and adapting an intelligent gateway through a contract engine.
6. The intelligent gateway and contract engine-based contract invoking method according to claim 5, characterized in that, by deploying multiple nodes and virtual machines in the cross-chain network, based on deployment design rules of application chains, gateways and service contracts under different namespaces, searching contract addresses, determining contract names and invoking contract parameters are completed by the contract engine, data returned by contracts is obtained, contract invoking is realized, and contract execution addresses are specified by the contract invoking.
7. The intelligent gateway and contract engine based contract invoking method according to claim 1, wherein the contract engine is located in a cross-chain network, and the cross-chain network manages the contract engine, specifically comprising:
setting a chain crossing function: the method comprises application chain management and cross-chain event management, wherein the application chain management specifically realizes application chain registration and connection of cross-chain special intelligent gateways of application chains; the cross-chain event management specifically realizes cross-chain data analysis, cross-chain data credibility verification and cross-chain data forwarding;
and setting a management function based on the set cross-link function in order to monitor and supervise functions provided by the cross-link network, so that a user logs in a background to view cross-link data.
8. A contract calling system based on an intelligent gateway and a contract engine is characterized by comprising a cross-link data transmission protocol management module, an intelligent gateway management module, an application chain management module and a contract engine management module, and specifically comprising:
a cross-link data transmission protocol management module: the system is used for managing intelligent contracts containing a cross-chain transmission protocol and other data call transmission protocols, managing the cross-chain transmission protocol package and cross-chain event information, cross-chain event certification information and auxiliary information type 3 information contained in the cross-chain transmission protocol package; the step of realizing the cross-chain data transmission through the cross-chain transmission protocol comprises the following steps: generating a cross-chain transmission protocol packet to realize communication between the intelligent gateway and the contract engine, wherein the cross-chain transmission protocol packet carries cross-chain related data; each intelligent gateway is a message publisher and a message subscriber for the contract engine; a subscriber subscribes a cross-chain transmission protocol packet message sent to an application chain to a cross-chain network, application chain registration through an intelligent gateway is realized, the intelligent gateway serves as a message publisher after converting an application chain event into a cross-chain transmission protocol packet, the protocol packet is published to a contract engine, and different heterogeneous block chains and the contract engine are communicated; the cross-chain transmission protocol comprises one or more of the following information: cross-chain event information: specific matters for cross-chain operations; cross-chain event attestation information: evidence proof for the trustworthiness of the cross-chain event, wherein the trustworthiness of the cross-chain event is confirmed by the contract engine; auxiliary information: for determining a cross-chain time and a cross-chain version; an application chain management module: the method is used for application chain management, protocol packet transceiving and application chain plug-in management;
intelligent gateway management module: the intelligent gateway is used for managing event stream triggers and realizing the intelligent gateway, comprises a source chain, a target chain name and a contract identifier of a cross-chain event, ensures freshness by injecting random numbers, introduces the intelligent gateway which forwards all node events and realizes intelligent screening, and waits for and packages f +1 signatures from the same event; the intelligent gateway comprises an event stream trigger and an application chain plug-in; the method comprises the steps of realizing an intelligent gateway based on an event flow trigger, wherein the intelligent gateway comprises a source chain, a target chain name and a contract identifier of a cross-chain event, ensuring freshness by injecting random numbers, introducing the intelligent gateway which forwards all node events and realizes intelligent screening, and reducing network communication cost to the maximum extent and realizing intellectualization of the intelligent gateway by waiting and packing f +1 signatures from the same event; the intelligent gateway performs application chain management, protocol packet transceiving and application chain plug-in management, and the specific implementation steps comprise: and (3) application chain management: for registering an application chain to a cross-chain network; protocol packet receiving and sending: the method is used for forwarding a communication protocol packet with a cross-link network; application chain plug-ins: for interaction with specific types of application chains;
the contract engine management module: the system is positioned in a cross-link network, is used for adapting an intelligent gateway, is used for designing, realizing and deploying a programmable contract of a heterogeneous cross-link, sets a data standard of a transaction process information link and an associated database thereof, adapts a special intelligent gateway of the cross-link through a contract engine, finishes searching a contract address, determining a contract name and calling a contract parameter, obtains data returned by the contract, realizes contract calling, and designates a contract execution address through the contract calling.
CN202011522893.8A 2020-12-21 2020-12-21 Contract calling method and system based on intelligent gateway and contract engine Active CN112688934B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011522893.8A CN112688934B (en) 2020-12-21 2020-12-21 Contract calling method and system based on intelligent gateway and contract engine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011522893.8A CN112688934B (en) 2020-12-21 2020-12-21 Contract calling method and system based on intelligent gateway and contract engine

Publications (2)

Publication Number Publication Date
CN112688934A CN112688934A (en) 2021-04-20
CN112688934B true CN112688934B (en) 2022-07-19

Family

ID=75450176

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011522893.8A Active CN112688934B (en) 2020-12-21 2020-12-21 Contract calling method and system based on intelligent gateway and contract engine

Country Status (1)

Country Link
CN (1) CN112688934B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113315832B (en) * 2021-05-26 2022-07-12 杭州云象网络技术有限公司 Cross-chain information synchronization method, system and device based on cloud cross-chain transfer protocol
CN115499128A (en) * 2021-06-01 2022-12-20 中移雄安信息通信科技有限公司 Block chain consensus method, device, system and storage medium
CN113259454B (en) * 2021-06-02 2021-10-15 支付宝(杭州)信息技术有限公司 Cross-chain interaction method and device
CN113487245B (en) * 2021-09-06 2021-12-07 苏州浪潮智能科技有限公司 Cross-project resource transfer method and system for cloud platform and computer storage medium
CN115208956B (en) * 2022-06-23 2023-06-02 北京链道科技有限公司 Implementation method of block chain gateway
CN116880857B (en) * 2023-09-07 2024-01-26 中国民航信息网络股份有限公司 Intelligent contract generation method and system of cross-region block chain engine

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108876618A (en) * 2018-06-15 2018-11-23 浙江华信区块链科技服务有限公司 A kind of exchange block catenary system and corresponding universal block chain mutual operation method and network
CN110868439A (en) * 2018-08-28 2020-03-06 傲为信息技术(江苏)有限公司 Block chain system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11146380B2 (en) * 2017-08-03 2021-10-12 Parity Technologies Ltd. Methods and systems for a heterogeneous multi-chain framework
CN110035046B (en) * 2018-11-16 2020-02-21 阿里巴巴集团控股有限公司 Cross-block chain interaction system
CN110266655B (en) * 2019-05-30 2021-11-12 中国工商银行股份有限公司 Cross-chain interconnection method, device and system based on block chain
CN111666336B (en) * 2020-05-15 2023-05-23 西安纸贵互联网科技有限公司 Method, system and electronic equipment for data intercommunication among block chains
CN111666323B (en) * 2020-05-15 2023-05-23 西安纸贵互联网科技有限公司 Cross-chain intercommunication method and system for block chain

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108876618A (en) * 2018-06-15 2018-11-23 浙江华信区块链科技服务有限公司 A kind of exchange block catenary system and corresponding universal block chain mutual operation method and network
CN110868439A (en) * 2018-08-28 2020-03-06 傲为信息技术(江苏)有限公司 Block chain system

Also Published As

Publication number Publication date
CN112688934A (en) 2021-04-20

Similar Documents

Publication Publication Date Title
CN112688934B (en) Contract calling method and system based on intelligent gateway and contract engine
CN112488679B (en) Cross-link contract analysis method of blockchain, relay chain and cross-link system
CN108134764B (en) Distributed data sharing and exchanging method and system
CN112866380B (en) Chain network architecture based on block chain
CN104243496A (en) Software defined network cross-domain security agent method and software defined network cross-domain security agent system
CN111447234A (en) Block chain structure suitable for edge calculation
CN113098982B (en) Block chain message transmission method and device
CN110336730A (en) A kind of network system and data transmission method
Zhang et al. Intelligent requests orchestration for microservice management based on blockchain in software defined networking: A security guarantee
CN113067898B (en) Method for scheduling computing services for business process contracts
CN111478776B (en) Trusted hybrid cloud system with digital identity and construction method thereof
CN113923228A (en) Cross-chain interaction method and device
Cheung et al. On virtual private networks security design issues
CN103475506B (en) Multiple equipment management control method and system
CN113259465B (en) Business execution method based on off-chain computing service
CN114422520A (en) Cross-chain interaction method and device
CN114079632A (en) Credible inter-domain routing method and system based on block chain
Gou et al. Dynamic IPsec VPN architecture for private cloud services
Terazono et al. Service oriented architecture realized by a messaging network
Singh et al. Structured design of communication protocols
Stäber et al. Interoperability challenges and solutions in automotive collaborative product development
CN116192846A (en) Cross-chain gateway architecture method suitable for multiple modes, electronic equipment and medium
Backes et al. Computational soundness for interactive primitives
Liu et al. 6G Distributed Network Technology
Kamali et al. Multiparty proactive communication: A perspective for evolving shared mental models

Legal Events

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