CN115208817B - A trusted cross-link routing method based on cross-chain gateway and Floyd algorithm - Google Patents
A trusted cross-link routing method based on cross-chain gateway and Floyd algorithm Download PDFInfo
- Publication number
- CN115208817B CN115208817B CN202210595413.3A CN202210595413A CN115208817B CN 115208817 B CN115208817 B CN 115208817B CN 202210595413 A CN202210595413 A CN 202210595413A CN 115208817 B CN115208817 B CN 115208817B
- Authority
- CN
- China
- Prior art keywords
- chain
- cross
- gateway
- task
- target
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/66—Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/12—Shortest path evaluation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0876—Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Power Engineering (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域Technical field
本发明涉及一种基于跨链网关和Floyd算法的可信跨链路由方法,属于区块链跨链路由技术领域。The invention relates to a trusted cross-link routing method based on a cross-chain gateway and Floyd algorithm, and belongs to the technical field of blockchain cross-link routing.
背景技术Background technique
目前,现有的跨链方式主要有以下几种:Currently, the existing cross-chain methods mainly include the following:
1.公证人机制。引入一方或多方可信的中心化实体做信用背书进行信息跨链。公证人机制在技术上实现较为简单,但因公证人机制需要对公证人有足够的信任,因此存在中心化的风险。1. Notary mechanism. Introduce one or more trusted centralized entities for credit endorsement to carry out information cross-chain. The notary mechanism is relatively simple to implement technically, but because the notary mechanism requires sufficient trust in the notary, there is a risk of centralization.
2.哈希锁定机制。该机制利用了哈希函数的低碰撞特性以及区块链交易的延迟执行的特点,通过交易双方设置哈希谜题,用户在规定的时间段通过猜测哈希值的原值来支付交易,进而实现交易的跨链机制。2. Hash locking mechanism. This mechanism takes advantage of the low collision characteristics of the hash function and the delayed execution characteristics of blockchain transactions. By setting a hash puzzle between the two parties of the transaction, the user pays for the transaction by guessing the original value of the hash value within a specified time period, and then A cross-chain mechanism to realize transactions.
3.中继链机制。通过引入其他的区块链系统来负责进行交易收集、背书和转发,即构造一个第三方公有链连接区块链网络中的其它链。中继链机制可以将交易的验证和背书工作委托到中继链上进行,但是该跨链实现方式复杂,并且在一定程度上依赖于自身的一套跨链协议,对异构链的接入存在一定困难。3. Relay chain mechanism. By introducing other blockchain systems to be responsible for transaction collection, endorsement and forwarding, a third-party public chain is constructed to connect other chains in the blockchain network. The relay chain mechanism can entrust the verification and endorsement of transactions to the relay chain. However, the cross-chain implementation method is complex and relies on its own set of cross-chain protocols to a certain extent. The access to heterogeneous chains There are certain difficulties.
在现有跨链机制的背景下,网关跨链实现机理简洁,且由于网关跨链本质是在接入应用链的跨链网关上实现数据同步,没有异构链的限制。同时,为实现跨链过程中的大规模路由求解问题,传统的迪杰斯特拉路由算法和动态规划难以满足大规模应用的需求。网关节点在1000以内的程序执行时间可以接受,然而继续扩大规模至10倍、100倍,能耗和时间代价过大。因此,为了降低时间和能耗的代价,提高跨链任务程序执行的效率,需要降低迭代次数,并处理中间数据的存储,以实现在时间、空间上都进行优化的目的。In the context of the existing cross-chain mechanism, the gateway cross-chain implementation mechanism is simple, and because the essence of gateway cross-chain is to achieve data synchronization on the cross-chain gateway connected to the application chain, there are no restrictions on heterogeneous chains. At the same time, in order to solve large-scale routing problems in the cross-chain process, the traditional Dijkstra routing algorithm and dynamic programming are difficult to meet the needs of large-scale applications. The program execution time for gateway nodes within 1,000 is acceptable. However, if the scale continues to expand to 10 times or 100 times, the cost of energy consumption and time will be too high. Therefore, in order to reduce the cost of time and energy consumption and improve the efficiency of cross-chain task program execution, it is necessary to reduce the number of iterations and process the storage of intermediate data to achieve optimization in both time and space.
发明内容Contents of the invention
本发明的目的是为了克服现有技术存在的缺陷,为了解决区块链系统大规模跨链路由时间长、效率低的技术问题,提出一种基于跨链网关和Floyd算法的可信跨链路由方法。The purpose of this invention is to overcome the shortcomings of the existing technology and to solve the technical problems of long time and low efficiency in large-scale cross-link routing in blockchain systems, and proposes a trusted cross-chain based on cross-chain gateway and Floyd algorithm. routing method.
本发明利用跨链网关实现区块链之间的信息交互,在跨链路由网络中求最短路径问题时降低迭代次数和中间数据,利用Floyd算法选择跨链任务路由的跨链最短路径。The present invention uses a cross-chain gateway to realize information interaction between blockchains, reduces the number of iterations and intermediate data when finding the shortest path problem in a cross-chain routing network, and uses the Floyd algorithm to select the shortest cross-chain path for cross-chain task routing.
为了达到上述目的,本发明采取如下技术方案。In order to achieve the above object, the present invention adopts the following technical solutions.
首先对本发明涉及的概念内容进行说明。First, the conceptual content involved in the present invention will be described.
1.跨链网关。是一种连接不同区块链系统的交互组件,承担区块链之间收集和传播交易的角色,且支持应用链与应用链之间的消息交互。1. Cross-chain gateway. It is an interactive component that connects different blockchain systems, assumes the role of collecting and disseminating transactions between blockchains, and supports message interaction between application chains.
2.网关路由表。由跨链网关生成、更新和维护。网关路由表存储了跨链路由网络中所有跨链网关的地址、本地跨链网关到其他跨链网关的最佳距离以及最佳距离的路由选择(此时的路由选择是最佳路由选择)。最佳距离表示两个跨链网关之间信息传递时的能耗最小。2. Gateway routing table. Generated, updated and maintained by cross-chain gateway. The gateway routing table stores the addresses of all cross-chain gateways in the cross-link routing network, the optimal distance from the local cross-chain gateway to other cross-chain gateways, and the routing selection for the optimal distance (the routing selection at this time is the best routing selection) . The optimal distance represents the minimum energy consumption when transmitting information between two cross-chain gateways.
为了保持网关路由表中两个跨链网关的最佳距离,每个跨链网关与它所有的相邻网关定期交换信息。如果交换结束后,一个网关到任何一个相邻网关的最佳距离发生变化,则交换过程将一直重复,直到所有的网关完成路由表的更新。In order to maintain the optimal distance between two cross-chain gateways in the gateway routing table, each cross-chain gateway periodically exchanges information with all its neighboring gateways. If the optimal distance from a gateway to any adjacent gateway changes after the exchange, the exchange process will be repeated until all gateways complete the routing table update.
3.Floyd算法。又称为插点法,是一种用于寻找给定的加权图中多源点之间最短路径的算法。初始时,对于任意两个节点,若节点之间存在边,则以此边上的权值作为它们之间的最短路径长度;若不存在有向边,则以∞作为它们之间的最短路径长度,之后逐步尝试在原路径中加入节点作为中间节点,如果增加中间节点后,得到的路径比原来的路径短,则以此新路径代替原路径。3.Floyd algorithm. Also known as the interpolation point method, it is an algorithm used to find the shortest path between multiple source points in a given weighted graph. Initially, for any two nodes, if there is an edge between the nodes, the weight on this edge will be used as the shortest path length between them; if there is no directed edge, then ∞ will be used as the shortest path between them. length, and then gradually try to add nodes to the original path as intermediate nodes. If the path obtained after adding intermediate nodes is shorter than the original path, replace the original path with this new path.
4.应用链。负责跨链任务具体的业务逻辑,同构应用链具有类似的区块结构和交易数据存储格式,并具有相同的共识算法和加密机制。4. Application chain. Responsible for the specific business logic of cross-chain tasks, isomorphic application chains have similar block structures and transaction data storage formats, and have the same consensus algorithm and encryption mechanism.
5.智能合约。一种旨在以信息化方式传播、验证或执行合同的计算机协议。智能合约接受用户的业务请求,将业务转移到分配服务器,并且将身份管理和抵押贷款中各业务的数据信息上链。5. Smart contracts. A computer protocol designed to communicate, verify, or enforce contracts in an information-based manner. The smart contract accepts the user's business request, transfers the business to the distribution server, and uploads the data information of each business in identity management and mortgage loans to the chain.
6.跨链任务。由应用链上的账户提起的跨链消息或跨链交易,包括本地账户地址,来源应用链ID、目标账户地址、目标应用链ID、跨链事件发生的时间戳、跨链任务内容和跨链任务证明。6. Cross-chain tasks. Cross-chain messages or cross-chain transactions initiated by accounts on the application chain, including local account address, source application chain ID, target account address, target application chain ID, timestamp of cross-chain events, cross-chain task content and cross-chain Mission proof.
7.跨链路由网络。由多个跨链网关组成的P2P网络,包括和应用链关联的跨链网关,跨链任务在跨链路由网络中传递和转发。7. Cross-link routing network. A P2P network composed of multiple cross-chain gateways, including cross-chain gateways associated with application chains. Cross-chain tasks are delivered and forwarded in the cross-chain routing network.
一种基于跨链网关和Floyd算法的可信跨链路由方法,包括跨链任务提出与验证,跨链路由选择和跨链任务回执,具体如下:A trusted cross-link routing method based on cross-chain gateway and Floyd algorithm, including cross-chain task proposal and verification, cross-chain routing and cross-chain task receipt, as follows:
步骤1:跨链网关接入应用链,配置应用链端口信息。Step 1: Connect the cross-chain gateway to the application chain and configure the application chain port information.
步骤2:跨链网关之间对相互的地址进行注册,以便寻找相邻应用链的操跨链网关;根据网关之间信息传的递能耗值,基于生成Floyd算法并维护网关路由表。Step 2: Cross-chain gateways register each other's addresses in order to find operating cross-chain gateways for adjacent application chains; based on the energy consumption value of information transmitted between gateways, the Floyd algorithm is generated and the gateway routing table is maintained.
步骤3:跨链网关进入初始化监听状态,监听用户操作;根据跨链任务的来源链ID、目标链ID和网关路由表,找到跨链任务的最佳路由选择。Step 3: The cross-chain gateway enters the initial listening state and monitors user operations; based on the source chain ID, target chain ID and gateway routing table of the cross-chain task, find the best route for the cross-chain task.
具体地,步骤3可以包括以下步骤:Specifically, step 3 may include the following steps:
步骤3.1:应用链上的本地账户发起跨链任务,跨链任务被提交到应用链所关联的跨链网关;Step 3.1: The local account on the application chain initiates a cross-chain task, and the cross-chain task is submitted to the cross-chain gateway associated with the application chain;
具体地,步骤3.1可以包括以下步骤:Specifically, step 3.1 may include the following steps:
步骤3.1.1:本地账户将跨链任务请求通过智能合约提交给应用链;Step 3.1.1: The local account submits the cross-chain task request to the application chain through the smart contract;
步骤3.1.2:应用链收到跨链任务请求后,验证跨链任务的结构和内容是否有效(本地账户地址是否合法等),如果不合法,则拒绝跨链任务的执行,如果合法,则执行步骤3.1.3;Step 3.1.2: After the application chain receives the cross-chain task request, it verifies whether the structure and content of the cross-chain task are valid (whether the local account address is legal, etc.). If it is not legal, the execution of the cross-chain task is rejected. If it is legal, then Perform step 3.1.3;
步骤3.1.3:应用链将跨链任务转发到关联的跨链网关,同时跨链任务存储到区块链上。Step 3.1.3: The application chain forwards the cross-chain task to the associated cross-chain gateway, and at the same time, the cross-chain task is stored on the blockchain.
步骤3.2:跨链网关检测账户跨链任务的有效性(包括本地账户是否具有权限,账户资产是否充足等);若本地账户提起的跨链任务不合法,则拒绝跨链任务的执行,若跨链事务合法,则执行步骤3.3;Step 3.2: The cross-chain gateway detects the validity of the account's cross-chain tasks (including whether the local account has permissions, whether the account assets are sufficient, etc.); if the cross-chain task initiated by the local account is illegal, the execution of the cross-chain task will be refused. If the chain transaction is legal, proceed to step 3.3;
步骤3.3:跨链网关根据跨链任务的目标应用链ID,在本地存储的网关路由表中查询目标应用链关联的目标跨链网关,根据网关路由表的信息找到本地跨链网关到目标跨链网关的最佳路由,并按照最佳路由选择将跨链任务转发到目标跨链网关;Step 3.3: The cross-chain gateway queries the target cross-chain gateway associated with the target application chain in the locally stored gateway routing table based on the target application chain ID of the cross-chain task, and finds the local cross-chain gateway to the target cross-chain based on the information in the gateway routing table. The best route of the gateway, and forward the cross-chain task to the target cross-chain gateway according to the best route selection;
步骤4:目标跨链网关检测到跨链任务,首先检测跨链任务目标账户地址是否合法,若目标账户地址不合法,则拒绝执行,发回拒绝回执;若目标账户地址合法,则目标跨链网关接受跨链任务,将跨链任务转发给目标应用链;Step 4: When the target cross-chain gateway detects the cross-chain task, it first detects whether the target account address of the cross-chain task is legal. If the target account address is illegal, it refuses to execute and sends a rejection receipt; if the target account address is legal, the target cross-chain The gateway accepts cross-chain tasks and forwards cross-chain tasks to the target application chain;
步骤5:目标应用链根据跨链任务中的目标账户地址将跨链任务转发给目标账户执行,返回跨链任务执行成功回执。Step 5: The target application chain forwards the cross-chain task to the target account for execution based on the target account address in the cross-chain task, and returns a successful cross-chain task execution receipt.
具体地,步骤5可以包括以下步骤:Specifically, step 5 may include the following steps:
步骤5.1:目标应用链根据跨链任务中的目标账户地址,将确定执行的跨链任务经智能合约发送至目标账户;Step 5.1: Based on the target account address in the cross-chain task, the target application chain sends the cross-chain task determined to be executed to the target account through the smart contract;
步骤5.2:目标应用链各节点对跨链任务进行共识;Step 5.2: Each node of the target application chain reaches consensus on the cross-chain task;
步骤5.3:目标应用链各节点共识成功后,将跨链任务添加在区块链上;Step 5.3: After the consensus among the nodes of the target application chain is successful, the cross-chain task will be added to the blockchain;
步骤5.4:目标应用链返回跨链任务执行成功回执。Step 5.4: The target application chain returns a successful cross-chain task execution receipt.
步骤6:跨链网关在检测到跨链任务执行成功后,向应用链发回执行成功回执,此时完成一次跨链任务。Step 6: After detecting that the cross-chain task is successfully executed, the cross-chain gateway sends back a successful execution receipt to the application chain. At this time, a cross-chain task is completed.
有益效果beneficial effects
本发明方法,与现有技术相比,具有以下优点:Compared with the existing technology, the method of the present invention has the following advantages:
1.本方法采用了跨链网关进行了不同区块链之间的信息交互,没有异构区块链的限制和中心化的风险,提高了区块链系统的可扩展性。1. This method uses a cross-chain gateway to interact with information between different blockchains, without the restrictions and centralization risks of heterogeneous blockchains, and improves the scalability of the blockchain system.
2.本方法具有良好的可靠性,采用了迪杰斯特拉算法添加动态规划的思路,可执行性可以保证。2. This method has good reliability. It adopts the idea of adding dynamic programming to Dijkstra's algorithm, and its executability can be guaranteed.
3.本方法效率高,无论是在空间复杂度还是时间复杂度上都进行了显著优化。3. This method is highly efficient and has been significantly optimized in both space complexity and time complexity.
附图说明Description of the drawings
图1为本发明方法的流程示意图。Figure 1 is a schematic flow chart of the method of the present invention.
具体实施方式Detailed ways
下面结合附图和具体实施方式对本发明做进一步详细说明。所描述的实施例仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. The described embodiments are only some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
如图1所示,一种基于跨链网关和Floyd算法的可信跨链路由方法。As shown in Figure 1, a trusted cross-link routing method based on cross-chain gateway and Floyd algorithm.
本实施例详细阐述了在区块链赋能的信息交互场景下的跨链网关路由。如在招聘场景下,某招聘公司甲公司存在对应聘者乙学生的学位信息采集和认证等业务需求。针对甲公司的学位信息认证业务请求,需要乙学生所在的大学丙大学提供乙学生的学位证明。This embodiment elaborates on cross-chain gateway routing in the information interaction scenario empowered by the blockchain. For example, in a recruitment scenario, Company A, a recruitment company, has business needs such as collection and certification of degree information for applicants B and students. In response to Company A’s request for degree information certification, University C, where Student B is located, needs to provide Student B’s degree certificate.
本实施例叙述了采用本发明所述方法对上述招聘场景中学位证明从丙大学跨链传输到甲公司,包括如下过程:This embodiment describes the cross-chain transmission of degree certificates from University C to Company A in the above-mentioned recruitment scenario using the method of the present invention, including the following process:
步骤1:跨链网关A接入丙大学应用链,配置丙大学应用链端口信息;跨链网关B接入甲公司应用链,配置甲公司应用链端口信息。Step 1: Cross-chain gateway A connects to University C’s application chain and configures University C’s application chain port information; cross-chain gateway B connects to Company A’s application chain and configures Company A’s application chain port information.
步骤2:跨链网关之间对相互的地址进行注册,以便寻找相邻应用链的操跨链网关,跨链网关A和跨链网关B根据网关之间信息传递的能耗值,基于Floyd算法,分别生成并维护网关路由表A和网关路由表B。Step 2: Cross-chain gateways register each other’s addresses in order to find operating cross-chain gateways for adjacent application chains. Cross-chain gateway A and cross-chain gateway B use the Floyd algorithm based on the energy consumption value of information transmitted between gateways. , generate and maintain gateway routing table A and gateway routing table B respectively.
具体地,本方法利用跨链网关之间的消息传递的能耗,基于Floyd算法生成网关路由表用于信息转发时的跨链网关选择。在跨链路由网络构成的图中,节点代表跨链网关,两个节点之间的边代表两个跨链网关之间可以信息交互,边的权值是表示两个节点之间的距离,即信息在两个跨链网关之间传递时的能耗成本。Specifically, this method utilizes the energy consumption of message transfer between cross-chain gateways and generates a gateway routing table based on the Floyd algorithm for cross-chain gateway selection when forwarding information. In a graph composed of cross-link networks, nodes represent cross-chain gateways, and the edges between two nodes represent the information that can be exchanged between the two cross-chain gateways. The weight of the edge represents the distance between the two nodes. That is, the energy consumption cost when information is transmitted between two cross-chain gateways.
本实施例中的方法涉及的字符如表1:The characters involved in the method in this embodiment are as shown in Table 1:
表1本实施例中方法涉及字符说明Table 1 The method in this embodiment involves character descriptions
输入:G,iInput:G,i
输出:GopOutput:Gop
首先,每个节点都要生成本地的初始路由矩阵,初始路由矩阵记录着本地节点和其他所有节点之间的初始距离。First, each node must generate a local initial routing matrix. The initial routing matrix records the initial distance between the local node and all other nodes.
以节点i生成初始路由矩阵为例,对于任意节点j,若i和j之间存在边,则以此边的权值g[i][j]作为它们之间的初始距离,若不存在有向边,则它们之间的初始距离是无限大,即g[i][j]=∞,此时i和j之间的最佳路由就是节点i到节点j,设置i和j之间的最佳路由为-1,由此生成初始路由矩阵。Taking the initial routing matrix generated by node i as an example, for any node j, if there is an edge between i and j, then the weight g[i][j] of this edge is used as the initial distance between them. If there is no to the edge, then the initial distance between them is infinite, that is, g[i][j]=∞. At this time, the best route between i and j is from node i to node j. Set the The optimal route is -1, from which the initial routing matrix is generated.
然后,更新初始路由矩阵通过插点生成网关路由表,对本地节点i到其他每个节点的初始距离进行如下操作:若从节点i到节点j经过节点k,且g[i][j]>g[i][k]+g[k][j],则从i到j的最佳距离为g[i][k]+g[k][j],i到j的最佳路由更新为从i到k再到j。由此生成本地节点的网关路由表;Then, update the initial routing matrix to generate a gateway routing table by inserting points, and perform the following operations on the initial distance from local node i to each other node: If from node i to node j passes through node k, and g[i][j]> g[i][k]+g[k][j], then the best distance from i to j is g[i][k]+g[k][j], and the best route from i to j is updated from i to k and then to j. This generates the gateway routing table of the local node;
同理,对跨链路由网络的每个节点,均按照上述过程生成网关路由表。Similarly, for each node in the cross-link routing network, the gateway routing table is generated according to the above process.
步骤3:跨链网关A进入初始化监听状态,监听丙大学应用链上乙学生操作,根据乙学生跨链任务的来源链ID,目标链ID和网关路由表A,选择到跨链网关B的最佳路由。Step 3: Cross-chain gateway A enters the initialization listening state, monitors the operations of student B on the application chain of University C, and selects the best link to cross-chain gateway B based on the source chain ID, target chain ID and gateway routing table A of student B’s cross-chain task. Best route.
步骤3.1:丙大学应用链上的乙学生账户发起学位证明跨链任务,学位证明跨链任务被提交到丙大学应用链所关联的跨链网关A上,学位证明跨链任务包括乙学生账户地址,丙大学应用链ID、甲公司应用链ID、甲公司招聘单位账户地址,跨链事件发生的时间戳、乙学生学位证明和跨链任务证明;Step 3.1: Student B’s account on University C’s application chain initiates a degree certificate cross-chain task. The degree certificate cross-chain task is submitted to the cross-chain gateway A associated with University C’s application chain. The degree certificate cross-chain task includes Student B’s account address. , University C’s application chain ID, Company A’s application chain ID, Company A’s recruiting unit account address, timestamp of cross-chain events, student B’s degree certificate and cross-chain task certificate;
步骤3.1.1:乙学生账户将学位证明跨链任务请求通过智能合约提交给丙大学应用链;Step 3.1.1: Student B’s account submits the degree certificate cross-chain task request to University C’s application chain through the smart contract;
步骤3.1.2:丙大学应用链收到学位证明跨链任务请求后,验证学位证明跨链任务的结构和内容是否有效(乙同学账户地址是否合法等),如果不合法,则拒绝学位证明跨链任务的执行,如果合法,则执行步骤3.1.3;Step 3.1.2: After receiving the degree certificate cross-chain task request, the University C application chain verifies whether the structure and content of the degree certificate cross-chain task are valid (whether the account address of student B is legal, etc.). If it is not legal, it rejects the degree certificate cross-chain task. Execution of chain tasks, if legal, proceed to step 3.1.3;
步骤3.1.3:丙大学应用链将学位证明跨链任务转发到关联的跨链网关A,同时学位证明跨链任务存储到丙大学应用链上。Step 3.1.3: The University C application chain forwards the degree certificate cross-chain task to the associated cross-chain gateway A, and at the same time, the degree certificate cross-chain task is stored in the University C application chain.
步骤3.2:跨链网关A检测乙学生账户学位证明跨链任务的有效性(乙学生账户是否具有权限,账户资产是否充足等),若乙学生账户提起的学位证明跨链任务不合法,则拒绝学位证明跨链任务的执行;若学位证明跨链事务合法,则执行步骤3.3;Step 3.2: Cross-chain gateway A detects the validity of the degree certificate cross-chain task of student B’s account (whether student B’s account has permissions, whether the account assets are sufficient, etc.). If the degree certificate cross-chain task initiated by student B’s account is illegal, it will be rejected. The degree proves the execution of the cross-chain task; if the degree proves that the cross-chain transaction is legal, proceed to step 3.3;
步骤3.3:跨链网关A根据学位证明跨链任务的甲公司应用链ID,在跨链网关A本地存储的网关路由表A中查询甲公司应用链关联的跨链网关B,根据网关路由表A记录的跨链网关A和B的最佳距离和最佳路由,并按照最佳路由选择将跨链任务转发到跨链网关B;Step 3.3: Cross-chain gateway A queries the cross-chain gateway B associated with company A's application chain in the gateway routing table A stored locally in cross-chain gateway A based on the application chain ID of company A that proves the cross-chain task. According to the gateway routing table A Record the best distance and best route between cross-chain gateways A and B, and forward the cross-chain task to cross-chain gateway B according to the best route selection;
步骤4:跨链网关B检测到学位证明跨链任务,首先检测学位证明跨链任务甲公司招聘单位账户地址是否合法,若甲公司招聘单位账户地址不合法,则拒绝执行,发回拒绝回执;若甲公司招聘单位账户地址合法,则跨链网关B接受学位证明跨链任务,将学位证明跨链任务转发给甲公司应用链;Step 4: Cross-chain gateway B detects the degree certificate cross-chain task. It first detects whether the degree certificate cross-chain task of Company A’s recruiting unit account address is legal. If the account address of Company A’s recruiting unit is illegal, it refuses to execute and sends a rejection receipt; If the account address of Company A’s recruiting unit is legal, cross-chain gateway B accepts the degree certificate cross-chain task and forwards the degree certificate cross-chain task to Company A’s application chain;
步骤5:甲公司应用链根据跨链任务中的甲公司招聘单位账户地址将学位证明跨链任务转发给甲公司招聘单位账户执行,返回学位证明跨链任务执行成功回执给跨链网关B;Step 5: Company A’s application chain forwards the cross-chain task of degree certificate to Company A’s recruitment unit account for execution based on the account address of Company A’s recruiting unit in the cross-chain task, and returns a receipt of successful execution of the degree certificate cross-chain task to cross-chain gateway B;
步骤5.1:甲公司应用链根据学位证明跨链任务中的目标账户地址,将确定执行的学位证明跨链任务经智能合约发送至甲公司招聘单位;Step 5.1: Based on the target account address in the degree certificate cross-chain task, Company A’s application chain sends the confirmed degree certificate cross-chain task to Company A’s recruitment unit through the smart contract;
步骤5.2:甲公司招聘单位各节点对学位证明跨链任务进行共识;Step 5.2: Each node of Company A’s recruitment unit reaches consensus on the cross-chain task of degree certificate;
步骤5.3:甲公司招聘单位各节点共识成功后,将学位证明跨链任务添加在甲公司应用链上;Step 5.3: After the consensus among the nodes of Company A’s recruitment unit is successful, add the degree certificate cross-chain task to Company A’s application chain;
步骤5.4:甲公司应用链返回学位证明跨链任务执行成功回执给跨链网关B。Step 5.4: Company A’s application chain returns a receipt proving the successful execution of the cross-chain task to cross-chain gateway B.
步骤6:跨链网关B在检测到学位证明跨链任务执行成功后,向跨链网关A发回执行成功回执,跨链网关A向丙大学应用链发回执行成功回执完成一次跨链任务。Step 6: After detecting that the degree certificate cross-chain task is successfully executed, cross-chain gateway B sends back an execution success receipt to cross-chain gateway A. Cross-chain gateway A sends back an execution success receipt to the University C application chain to complete a cross-chain task.
Claims (4)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210595413.3A CN115208817B (en) | 2022-05-29 | 2022-05-29 | A trusted cross-link routing method based on cross-chain gateway and Floyd algorithm |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210595413.3A CN115208817B (en) | 2022-05-29 | 2022-05-29 | A trusted cross-link routing method based on cross-chain gateway and Floyd algorithm |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN115208817A CN115208817A (en) | 2022-10-18 |
| CN115208817B true CN115208817B (en) | 2023-10-10 |
Family
ID=83576697
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210595413.3A Active CN115208817B (en) | 2022-05-29 | 2022-05-29 | A trusted cross-link routing method based on cross-chain gateway and Floyd algorithm |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115208817B (en) |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110266655A (en) * | 2019-05-30 | 2019-09-20 | 中国工商银行股份有限公司 | A kind of across chain interconnected method, equipment and system based on block chain |
| CN112887380A (en) * | 2021-01-15 | 2021-06-01 | 杭州链网科技有限公司 | Cross-chain intercommunication method and system |
| WO2021136251A1 (en) * | 2019-12-30 | 2021-07-08 | 北京金山云网络技术有限公司 | Cross-blockchain communication method and apparatus, cross-chain service system and cross-chain transaction system |
| WO2021218459A1 (en) * | 2020-04-28 | 2021-11-04 | 北京邮电大学 | Cross-chain interaction method, apparatus and system |
| CN113807960A (en) * | 2021-03-04 | 2021-12-17 | 京东科技控股股份有限公司 | Cross-link processing method, device and system between heterogeneous chains and electronic equipment |
| CN113923044A (en) * | 2021-10-29 | 2022-01-11 | 博雅正链(北京)科技有限公司 | Chain crossing system and method based on trusted execution environment |
| CN113965329A (en) * | 2021-10-25 | 2022-01-21 | 浙江师范大学 | A cross-chain interoperability system, method, medium and data processing terminal |
-
2022
- 2022-05-29 CN CN202210595413.3A patent/CN115208817B/en active Active
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110266655A (en) * | 2019-05-30 | 2019-09-20 | 中国工商银行股份有限公司 | A kind of across chain interconnected method, equipment and system based on block chain |
| WO2021136251A1 (en) * | 2019-12-30 | 2021-07-08 | 北京金山云网络技术有限公司 | Cross-blockchain communication method and apparatus, cross-chain service system and cross-chain transaction system |
| WO2021218459A1 (en) * | 2020-04-28 | 2021-11-04 | 北京邮电大学 | Cross-chain interaction method, apparatus and system |
| CN112887380A (en) * | 2021-01-15 | 2021-06-01 | 杭州链网科技有限公司 | Cross-chain intercommunication method and system |
| CN113807960A (en) * | 2021-03-04 | 2021-12-17 | 京东科技控股股份有限公司 | Cross-link processing method, device and system between heterogeneous chains and electronic equipment |
| CN113965329A (en) * | 2021-10-25 | 2022-01-21 | 浙江师范大学 | A cross-chain interoperability system, method, medium and data processing terminal |
| CN113923044A (en) * | 2021-10-29 | 2022-01-11 | 博雅正链(北京)科技有限公司 | Chain crossing system and method based on trusted execution environment |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115208817A (en) | 2022-10-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12301660B2 (en) | Fast propagation of recent transactions over a blockchain network | |
| CN110741400B (en) | Blockchain network interaction controller | |
| US20230316273A1 (en) | Data processing method and apparatus, computer device, and storage medium | |
| CN107332826B (en) | The communication means and device of block chain agent node | |
| CN112953821B (en) | Message transmission method and device | |
| JP2023168539A (en) | Maintaining blocks of blockchain in partitioned blockchain network | |
| CN107895111B (en) | Internet of things equipment supply chain trust system management method, computer program and computer | |
| CN110378690B (en) | Transaction method and device based on anonymous secure payment channel | |
| Zhang et al. | Robustpay+: Robust payment routing with approximation guarantee in blockchain-based payment channel networks | |
| CN107742210A (en) | A cross-chain transfer system and method between different blockchains | |
| CN115361395B (en) | Internet of things data sharing method based on blockchain payment channel network | |
| Jourenko et al. | Lightweight virtual payment channels | |
| CN112884476A (en) | CA cross-domain authentication method and system based on block chain | |
| CN110084594A (en) | A kind of block chain method of commerce and device by lightning network | |
| CN115271718A (en) | Hub-based state channel transaction method in block chain | |
| Aumayr et al. | Donner: UTXO-Based Virtual Channels Across Multiple Hops. | |
| Xiao et al. | A multi-blockchain architecture supporting cross-blockchain communication | |
| CN115842676A (en) | Cross-chain transaction method, system and medium based on notary group | |
| CN106559474B (en) | High-throughput data processing method and system for distributed general ledger | |
| Dinesha et al. | A conceptual insight into achieving interoperability between heterogeneous blockchain enabled interconnected smart microgrids | |
| CN115208817B (en) | A trusted cross-link routing method based on cross-chain gateway and Floyd algorithm | |
| CN116596533B (en) | Transaction-oriented payment method and system | |
| CN116258609B (en) | A power system transaction coordination method, device and storage medium | |
| Dinesha et al. | Achieving interoperability in heterogeneous blockchain users through inter-blockchain communication protocol | |
| CN118118892A (en) | Vehicle self-organizing network anonymous trust management method and system based on blockchain |
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 |