CN115189965B - Cross-chain management system and cross-chain operation method of block chain - Google Patents
Cross-chain management system and cross-chain operation method of block chain Download PDFInfo
- Publication number
- CN115189965B CN115189965B CN202211082288.2A CN202211082288A CN115189965B CN 115189965 B CN115189965 B CN 115189965B CN 202211082288 A CN202211082288 A CN 202211082288A CN 115189965 B CN115189965 B CN 115189965B
- Authority
- CN
- China
- Prior art keywords
- blockchain
- interaction
- level
- information
- module
- 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
Images
Classifications
-
- 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/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/382—Payment protocols; Details thereof insuring higher security of transaction
- G06Q20/3829—Payment protocols; Details thereof insuring higher security of transaction involving key management
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Accounting & Taxation (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Databases & Information Systems (AREA)
- Finance (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Data Mining & Analysis (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
- Storage Device Security (AREA)
Abstract
本发明涉及信息技术领域,具体涉及一种区块链的跨链管理系统及跨链操作方法,跨链管理系统包括在每个参与跨链管理的区块链上设置管理平台程序,管理平台程序包括接入模块、审核模块和交互模块,接入模块向上级区块链的审核模块发送接入请求,审核模块审核通过后,与接入模块交换区块链标识信息、身份验证信息和约定秘钥,交互模块周期性发送交互请求至上级区块链,上级区块链的交互模块验证后与下级区块链的交互模块建立加密通信连接,将下级区块链运行信息发送给上级区块链交互模块,上级区块链交互模块生成交易信息将下级区块链运行信息打包进区块存储。本发明的实质性效果是:实现了区块链的跨链操作及跨链管理,同时保证区块链的运行安全。
The present invention relates to the field of information technology, in particular to a blockchain cross-chain management system and a cross-chain operation method. The cross-chain management system includes setting a management platform program on each blockchain participating in cross-chain management, and a management platform program It includes an access module, an audit module and an interaction module. The access module sends an access request to the audit module of the superior blockchain. After the audit module passes the audit, it exchanges blockchain identification information, identity verification information and agreed secrets with the access module. key, the interaction module periodically sends interaction requests to the upper-level blockchain, and the interaction module of the upper-level blockchain establishes an encrypted communication connection with the interaction module of the lower-level blockchain after verification, and sends the operation information of the lower-level blockchain to the upper-level blockchain Interaction module, the upper-level blockchain interaction module generates transaction information and packs the lower-level blockchain operation information into block storage. The substantive effect of the present invention is to realize the cross-chain operation and cross-chain management of the block chain, and at the same time ensure the safe operation of the block chain.
Description
技术领域technical field
本发明涉及信息技术领域,具体涉及一种区块链的跨链管理系统及跨链操作方法。The invention relates to the field of information technology, in particular to a blockchain cross-chain management system and a cross-chain operation method.
背景技术Background technique
区块链技术能够建立天然的信任环境,简化业务的处理流程,近年来不断获得发展和应用。目前公有链、私有链、联盟链均获得的广泛的使用。联盟链是只针对某个特定群体的成员和有限的第三方,其内部指定多个预选节点为记账人,每个块的生成由所有的预选节点共同决定。其他接入节点可以参与交易,但不过问记账过程。联盟链使用的主要群体是银行、保险、证券、商业协会、集团企业及上下游企业。同一企业部署的区块链也越来越多,导致链与链之间的互操作也越来越频繁。为了方便跨区块链系统的业务操作,有必要研究跨链管理及操作技术。Blockchain technology can establish a natural trust environment and simplify business processing procedures, and has been continuously developed and applied in recent years. At present, public chains, private chains, and alliance chains are widely used. The alliance chain is only aimed at members of a specific group and limited third parties. It internally designates multiple pre-selected nodes as bookkeepers, and the generation of each block is jointly decided by all pre-selected nodes. Other access nodes can participate in transactions, but do not intervene in the accounting process. The main groups used by the alliance chain are banks, insurance, securities, business associations, group companies and upstream and downstream enterprises. There are more and more blockchains deployed by the same enterprise, resulting in more frequent interoperability between chains. In order to facilitate business operations across blockchain systems, it is necessary to study cross-chain management and operating technologies.
如中国专利CN113228076A,公开日2021年8月6日,公开了一种区块链管理系统。其虽然能够实现跨链的交易,但不能实现跨链的管理和操作。For example, Chinese patent CN113228076A, published on August 6, 2021, discloses a blockchain management system. Although it can realize cross-chain transactions, it cannot realize cross-chain management and operation.
发明内容Contents of the invention
本发明要解决的技术问题是:目前缺乏兼具安全性和便捷性的区块链跨链管理及操作方案的技术问题。提出了一种区块链的跨链管理系统及跨链操作方法,能够在保障区块链安全运行的前提下,方便区块链的跨链管理和跨链操作。The technical problem to be solved by the present invention is: at present, there is a technical problem that there is a lack of a blockchain cross-chain management and operation scheme that is both safe and convenient. A blockchain cross-chain management system and cross-chain operation method are proposed, which can facilitate the cross-chain management and cross-chain operation of the blockchain under the premise of ensuring the safe operation of the blockchain.
为解决上述技术问题,本发明所采取的技术方案为:一种区块链的跨链管理系统,用于若干个联盟链和/或私有链的跨链管理,包括在每个参与跨链管理的区块链上设置管理平台程序,所述管理平台程序运行在区块链的每个节点上,所述管理平台程序包括接入模块、审核模块和交互模块,拟作为下级的区块链任一节点通过所述接入模块向上级区块链的审核模块发送接入请求,所述审核模块审核通过后,与接入模块交换区块链标识信息、身份验证信息和约定秘钥,并分别发送给各自的交互模块存储,下级区块链的交互模块周期性发送交互请求至上级区块链的交互模块,所述交互请求包括区块链标识信息和身份验证信息,上级区块链的交互模块验证后与下级区块链的交互模块建立加密通信连接,下级区块链交互模块将下级区块链运行信息发送给上级区块链的交互模块,上级区块链的交互模块生成交易信息将下级区块链运行信息打包进区块存储。In order to solve the above technical problems, the technical solution adopted by the present invention is: a blockchain cross-chain management system, which is used for cross-chain management of several alliance chains and/or private chains, including The management platform program is set on the block chain, and the management platform program runs on each node of the block chain. A node sends an access request to the review module of the superior block chain through the access module, and after the review module passes the review, it exchanges block chain identification information, identity verification information and agreed secret keys with the access module, and respectively Sent to the respective interaction modules for storage, the interaction modules of the lower-level blockchain periodically send interaction requests to the interaction modules of the upper-level blockchain, the interaction requests include blockchain identification information and identity verification information, and the interaction of the upper-level blockchain After the module is verified, an encrypted communication connection is established with the interactive module of the lower-level blockchain, and the lower-level blockchain interactive module sends the operation information of the lower-level blockchain to the interactive module of the upper-level blockchain, and the transaction information generated by the interactive module of the upper-level blockchain will be The lower-level blockchain operation information is packaged into block storage.
作为优选,所述区块链标识信息为区块链的唯一标识ID,所述唯一标识ID由区块链创建时,向运行有管理平台程序的任一区块链的节点申请获得,所述身份验证信息包括属性验证信息和密文验证信息,所述属性验证信息为建立上下级关系时,上级区块链向下级区块链分配的身份信息、区块链类型信息及业务属性信息,所述密文验证信息为上级区块链和下级区块链之间约定的成对的秘钥信息,上级区块链交互模块收到下级区块链交互模块发送的交互请求时,验证交互请求携带的唯一标识ID、身份信息、区块链类型信息及业务属性信息是否与存储的相匹配,若不匹配则拒绝交互,若匹配则验证交互请求携带的密文验证信息,若验证不通过,则拒绝交互,若验证通过,则生成本次交互的加密秘钥,通过约定秘钥将加密秘钥发送给下级区块链的交互模块,下级区块链的交互模块使用加密秘钥将区块链运行信息加密后发送给上级区块链的交互模块。Preferably, the blockchain identification information is the unique identification ID of the blockchain, and when the unique identification ID is created by the blockchain, it is obtained by applying to any node of the blockchain running the management platform program. The identity verification information includes attribute verification information and ciphertext verification information. The attribute verification information is the identity information, block chain type information and business attribute information assigned by the upper-level blockchain to the lower-level blockchain when establishing a superior-subordinate relationship. The ciphertext verification information is the paired secret key information agreed between the upper-level blockchain and the lower-level blockchain. When the upper-level blockchain interaction module receives the interaction request sent by the lower-level blockchain interaction module, it will verify that the interaction request carries Whether the unique identification ID, identity information, blockchain type information, and business attribute information of the user match the stored ones. If they do not match, the interaction will be rejected. If they match, the ciphertext verification information carried in the interaction request will be verified. If the verification fails, then Reject the interaction, if the verification is passed, generate the encryption key for this interaction, and send the encryption key to the interaction module of the lower-level blockchain through the agreed key, and the interaction module of the lower-level blockchain uses the encryption key to convert the blockchain The operation information is encrypted and sent to the interactive module of the upper-level blockchain.
作为优选,上级区块链的节点的交互模块向下级区块链的节点的交互模块发送数据交互请求,所述数据交互请求包括属性验证信息、密文验证信息、数据交互指令和交互秘钥,下级区块链交互模块验证属性验证信息与下级区块链是否匹配,若不匹配则拒绝交互,若匹配则验证密文验证信息,若验证不通过,则拒绝交互,若验证通过则执行数据交互请求中的数据交互指令,将读取到的数据使用交互秘钥加密后反馈给上级区块链的节点,上级区块链节点将获得的数据存储在本地。Preferably, the interaction module of the node of the upper-level blockchain sends a data interaction request to the interaction module of the node of the lower-level blockchain, and the data interaction request includes attribute verification information, ciphertext verification information, data interaction instructions and interaction keys, The lower-level blockchain interaction module verifies whether the attribute verification information matches the lower-level blockchain. If it does not match, it rejects the interaction. If it matches, it verifies the ciphertext verification information. If the verification fails, it rejects the interaction. If it passes the verification, it executes data interaction. The data interaction instruction in the request encrypts the read data with the interaction key and feeds it back to the node of the upper-level blockchain, and the upper-level blockchain node stores the obtained data locally.
作为优选,所述数据交互指令包括读取当前区块高度指令、读取指定区块数据指令、验证交易指定交易信息指令及添加交易信息指令,每个数据交互指令均关联有允许权限等级,下级区块链的交互模块存储有权限表,所述权限表记录区块链标识信息对应的权限等级。Preferably, the data interaction instructions include instructions for reading the current block height, instructions for reading specified block data, instructions for verifying transaction specified transaction information, and instructions for adding transaction information. Each data interaction instruction is associated with a permission level, and the lower level The interaction module of the blockchain stores a permission table, and the permission table records the permission level corresponding to the identification information of the blockchain.
作为优选,上级区块链的审核模块审核接入请求通过后,上级区块链的审核模块生成加密多项式f(x),生成自变量x的取值集合E,计算加密多项式f(x)在取值集合E上的多项式值,生成等效多项式f’(x),等效多项式f’(x) 在取值集合E上的多项式值与加密多项式f(x)相同,将等效多项式f’(x)发送给下级区块链的接入模块,上级区块链交互模块收到下级区块链交互模块发送的交互请求时,验证属性验证信息后,随机生成若干个自变量x的值,x∈E,将若干个自变量x的值发送给下级区块链交互模块,下级区块链交互模块收到后,将若干个自变量x的值代入等效多项式f’(x),获得等效多项式f’(x)的多项式值反馈给上级区块链交互模块,上级区块链模块验证收到的等效多项式f’(x)的多项式值与相应的加密多项式f(x)是否相符,若相符,则判定密文验证信息验证通过,反之,则判定密文验证信息验证不通过。Preferably, after the audit module of the upper-level blockchain audits the access request, the audit module of the upper-level blockchain generates an encrypted polynomial f(x), generates a value set E of the argument x, and calculates the encrypted polynomial f(x) in Take the polynomial value on the value set E to generate the equivalent polynomial f'(x), the polynomial value of the equivalent polynomial f'(x) on the value set E is the same as the encrypted polynomial f(x), and the equivalent polynomial f '(x) is sent to the access module of the lower-level blockchain. When the upper-level blockchain interaction module receives the interaction request sent by the lower-level blockchain interaction module, it verifies the attribute verification information and randomly generates several values of the independent variable x , x∈E, send the values of several independent variables x to the lower-level blockchain interaction module, and after receiving them, the lower-level blockchain interaction module substitutes the values of several independent variables x into the equivalent polynomial f'(x), Obtain the polynomial value of the equivalent polynomial f'(x) and feed it back to the upper-level blockchain interaction module, and the upper-level blockchain module verifies the received polynomial value of the equivalent polynomial f'(x) and the corresponding encrypted polynomial f(x) Whether they match, if they match, it is determined that the verification of the ciphertext verification information passes, otherwise, it is determined that the verification of the ciphertext verification information fails.
作为替代,上级区块链的审核模块审核接入请求通过后,上级区块链的审核模块生成小数g、正奇数c和正奇数d,使g*c*d=(2*k*π)_N,k为正整数,N表示括号内的数保留N位小数,将正奇数d发送给下级区块链的接入模块,上级区块链交互模块收到下级区块链交互模块发送的交互请求时,验证属性验证信息后,随机生成整数m,计算中间值P1=(cos(g*m))_N,将中间值P1发送给下级区块链的交互模块,下级区块链交互模块使用余弦函数的倍角公式计算中间值P2=(cos(d*g*m))_N,将中间值P2发送给上级区块链交互模块,上级区块链交互模块使用余弦函数的倍角公式计算中间值P3=(cos(c*d*g*m))_N,若P3与1的差值的绝对值小于预设阈值ε,则判定密文验证信息验证通过,反之,则判定密文验证信息验证不通过。Instead, after the audit module of the upper-level blockchain audits the access request, the audit module of the upper-level blockchain generates a decimal g, a positive odd number c, and a positive odd number d, so that g*c*d=(2*k*π)_N , k is a positive integer, N means that the number in brackets retains N decimal places, and the positive odd number d is sent to the access module of the lower-level blockchain, and the upper-level blockchain interaction module receives the interaction request sent by the lower-level blockchain interaction module , after verifying the attribute verification information, randomly generate an integer m, calculate the intermediate value P1=(cos(g*m))_N, and send the intermediate value P1 to the interaction module of the lower-level blockchain, and the lower-level blockchain interaction module uses cosine The double-angle formula of the function calculates the intermediate value P2=(cos(d*g*m))_N, and sends the intermediate value P2 to the upper-level blockchain interaction module, which uses the double-angle formula of the cosine function to calculate the intermediate value P3 =(cos(c*d*g*m))_N, if the absolute value of the difference between P3 and 1 is less than the preset threshold ε, it is determined that the verification of the ciphertext verification information is passed; otherwise, it is determined that the verification of the ciphertext verification information is not valid pass.
作为优选,收到接入请求的上级区块链的节点的审核模块审核通过后,将接入请求及审核结果签名后在上级区块链网络中广播,其他上级区块链的节点的审核模块审核接入请求,若审核结果与广播的审核结果一致,则在广播后添加节点签名,集齐预设数量节点的签名后,接入请求的审核结获得确认,而后收到接入请求的上级区块链的节点,与下级区块链的接入模块交换区块链标识信息、身份验证信息和约定秘钥,将约定的区块链标识信息、身份验证信息和约定秘钥广播至上级区块链的每个节点,此后下级区块链节点的交互模块能够与上级区块链的任一节点的交互模块进行数据交互。As a preference, after the audit module of the node of the upper-level blockchain that receives the access request passes the audit, the access request and the audit result are signed and broadcast in the upper-level blockchain network, and the audit modules of other upper-level blockchain nodes Review the access request. If the review result is consistent with the broadcast review result, add node signatures after the broadcast. After collecting the signatures of the preset number of nodes, the review result of the access request is confirmed, and then the superior who receives the access request The nodes of the blockchain exchange blockchain identification information, identity verification information and agreed secret key with the access module of the lower-level blockchain, and broadcast the agreed blockchain identification information, identity verification information and agreed secret key to the upper-level area Each node of the block chain, after that, the interaction module of the lower-level block chain node can perform data interaction with the interaction module of any node of the upper-level block chain.
一种在如前述的一种区块链的跨链管理系统上执行的区块链的跨链操作方法,包括以下步骤:在两个区块链上运行交互程序,两个区块链的交互程序之间交换区块链标识信息、身份验证信息和约定秘钥,所述身份验证信息包括属性验证信息和密文验证信息;区块链节点生成操作请求,发送给被操作区块链的任一节点,所述操作请求包括属性验证信息、密文验证信息、数据交互指令和交互秘钥;被操作区块链的节点验证属性验证信息及密文验证信息均通过,则执行数据交互指令,并将数据交互指令结果使用交互秘钥加密后,反馈给发送操作请求的区块链节点。A cross-chain operation method of a block chain executed on a block chain cross-chain management system as described above, comprising the following steps: running an interactive program on two block chains, and the interaction between the two block chains Blockchain identification information, identity verification information, and agreed secret key are exchanged between programs, and the identity verification information includes attribute verification information and ciphertext verification information; the block chain node generates an operation request and sends it to any user of the block chain being operated. A node, the operation request includes attribute verification information, ciphertext verification information, data interaction instructions and interaction keys; the node of the operated block chain verifies that both attribute verification information and ciphertext verification information pass, then executes the data interaction instruction, After encrypting the result of the data interaction command with the interaction key, it is fed back to the blockchain node that sent the operation request.
作为优选,所述数据交互指令包括读取当前区块高度指令、读取指定区块数据指令、验证交易指定交易信息指令及添加交易信息指令,每个数据交互指令均关联有允许权限等级,区块链的交互程序存储有权限表,所述权限表记录区块链标识信息对应的权限等级。Preferably, the data interaction instruction includes an instruction to read the current block height, an instruction to read specified block data, an instruction to verify transaction specified transaction information, and an instruction to add transaction information. Each data interaction instruction is associated with a permission level. The interactive program of the block chain stores a permission table, and the permission table records the permission level corresponding to the block chain identification information.
作为优选,生成密文验证信息的方法包括:其中一个区块链的交互程序生成小数g、正奇数c和正奇数d,使g*c*d=(2*k*π)_N,k为正整数,N表示括号内的数保留N位小数,将正奇数d发送给另一个区块链的交互程序,被操作区块链的交互程序收到操作请求时,验证属性验证信息,若验证不通过,则不做操作,反之,则随机生成整数m,计算中间值P1=(cos(g*m))_N,将中间值P1发送给发送操作请求的区块链的交互程序,发送操作请求的区块链的交互程序使用余弦函数的倍角公式计算中间值P2=(cos(d*g*m))_N,将中间值P2发送给被操作区块链的交互程序,被操作区块链的交互程序使用余弦函数的倍角公式计算中间值P3=(cos(c*d*g*m))_N,若P3与1的差值的绝对值小于预设阈值ε,则判定密文验证信息验证通过,执行数据交互指令,反之,则判定密文验证信息验证不通过。Preferably, the method for generating ciphertext verification information includes: wherein an interactive program of a block chain generates a decimal number g, a positive odd number c, and a positive odd number d, so that g*c*d=(2*k*π)_N, k is positive Integer, N means that the number in brackets retains N decimal places, and the positive odd number d is sent to the interactive program of another blockchain. When the interactive program of the operated blockchain receives the operation request, it will verify the attribute verification information. If passed, no operation is performed, otherwise, the integer m is randomly generated, the intermediate value P1=(cos(g*m))_N is calculated, and the intermediate value P1 is sent to the interactive program of the blockchain that sends the operation request, and the operation request is sent The interactive program of the blockchain uses the double-angle formula of the cosine function to calculate the intermediate value P2=(cos(d*g*m))_N, and sends the intermediate value P2 to the interactive program of the operated blockchain, and the operated blockchain The interactive program uses the double angle formula of the cosine function to calculate the intermediate value P3=(cos(c*d*g*m))_N, if the absolute value of the difference between P3 and 1 is less than the preset threshold ε, the ciphertext verification information is determined If the verification is passed, the data interaction instruction is executed; otherwise, it is determined that the verification of the ciphertext verification information fails.
本发明的实质性效果是:通过建立跨链交互或操作机制,并建立身份验证机制,实现了区块链的跨链操作及跨链管理,同时保证区块链的运行安全;通过跨链管理实现多条业务区块链的高效管理,保障业务区块链的高效安全运行,提高生产效率;通过改进的身份验证机制,保障跨链管理及跨链操作的安全性。The substantive effect of the present invention is: by establishing a cross-chain interaction or operation mechanism, and establishing an identity verification mechanism, the cross-chain operation and cross-chain management of the blockchain are realized, and the operation safety of the blockchain is guaranteed at the same time; through the cross-chain management Realize the efficient management of multiple business blockchains, ensure the efficient and safe operation of business blockchains, and improve production efficiency; through the improved identity verification mechanism, ensure the security of cross-chain management and cross-chain operations.
附图说明Description of drawings
图1为实施例一跨链管理系统示意图。Figure 1 is a schematic diagram of a cross-chain management system in Embodiment 1.
图2为实施例一管理平台程序示意图。Fig. 2 is a schematic diagram of a management platform program in Embodiment 1.
图3为实施例一交互请求示意图。Fig. 3 is a schematic diagram of an interaction request in Embodiment 1.
图4为实施例一数据交互示意图。Fig. 4 is a schematic diagram of data interaction in Embodiment 1.
图5为实施例一跨链操作方法流程示意图。Fig. 5 is a schematic flow chart of the cross-chain operation method of Embodiment 1.
图6为实施例二生成密文验证信息方法流程示意图。Fig. 6 is a schematic flowchart of the method for generating ciphertext verification information in Embodiment 2.
其中:100、区块链,200、管理平台程序,1、接入模块,2、审核模块,3、交互模块,4、交互请求,41、区块链标识信息,42、身份验证信息,411、唯一标识ID,421、属性验证信息,422、密文验证信息,4211、身份信息,4212、区块链类型信息,4213、业务属性信息,4221、秘钥信息。Among them: 100. Blockchain, 200. Management platform program, 1. Access module, 2. Audit module, 3. Interaction module, 4. Interaction request, 41. Blockchain identification information, 42. Identity verification information, 411 , unique identification ID, 421, attribute verification information, 422, ciphertext verification information, 4211, identity information, 4212, blockchain type information, 4213, business attribute information, 4221, secret key information.
具体实施方式detailed description
下面通过具体实施例,并结合附图,对本发明的具体实施方式作进一步具体说明。The specific embodiments of the present invention will be further specifically described below through specific embodiments in conjunction with the accompanying drawings.
实施例一:Embodiment one:
一种区块链的跨链管理系统,用于若干个联盟链和/或私有链的跨链管理,请参阅附图1,跨链管理系统包括在每个参与跨链管理的区块链100上设置管理平台程序200,管理平台程序200运行在区块链100的每个节点上。请参阅附图2,管理平台程序200包括接入模块1、审核模块2和交互模块3,拟作为下级的区块链任一节点通过接入模块1向上级区块链的审核模块2发送接入请求,审核模块2审核通过后,与接入模块1交换区块链标识信息41、身份验证信息42和约定秘钥,并分别发送给各自的交互模块3存储,下级区块链的交互模块3周期性发送交互请求4至上级区块链的交互模块3。A blockchain cross-chain management system, used for cross-chain management of several consortium chains and/or private chains, please refer to Figure 1, the cross-chain management system includes 100 in each blockchain that participates in cross-chain management The management platform program 200 is set on the platform, and the management platform program 200 runs on each node of the
如区块链A和区块链B需要在区块链C上进行管理。即区块链C作为区块链A和区块链B的上级区块链,则区块链A和区块链B的任一节点的管理平台程序200发起向区块链C的接入请求。接入请求首先在区块链A及区块链B自身的节点之间广播并收集签名。当集齐预设数量个签名后,向区块链C的接入请求得到区块链A及区块链B自身的大部分节点的确认,首先广播接入请求的节点向区块链C的任一节点的管理平台程序200发送接入请求。接收接入请求的区块链C的节点审核,若审核不通过,则不做操作,若审核通过,则将接入请求和审核结果在区块链C的节点之间进行广播,得到预设数量个节点签名后,认为接入请求已被区块链C确认,完成区块链A及区块链B的接入。For example, blockchain A and blockchain B need to be managed on blockchain C. That is, blockchain C is the upper-level blockchain of blockchain A and blockchain B, and the management platform program 200 of any node of blockchain A and blockchain B initiates an access request to blockchain C . The access request is first broadcast among the nodes of blockchain A and blockchain B itself and signatures are collected. When the preset number of signatures are collected, the access request to blockchain C is confirmed by most of the nodes in blockchain A and blockchain B itself, and the node that broadcasts the access request first sends the request to blockchain C. The management platform program 200 of any node sends an access request. The node of blockchain C that receives the access request is audited. If the audit fails, no operation will be performed. If the audit is passed, the access request and audit results will be broadcast among the nodes of blockchain C to obtain the preset After a certain number of nodes sign, it is considered that the access request has been confirmed by blockchain C, and the access of blockchain A and blockchain B is completed.
审核模块2审核接入请求时,审核区块链标识信息41是否为允许接入的标识信息,或者区块链标识信息41的格式是否符合预设格式要求。需要进行跨链管理的区块链通常为联盟链或者私有链,链与链之间具有业务关系或者具有关联。当部署新的区块链时,按照预设的格式设置新区块链的区块链标识信息41,当新部署的区块链发出接入请求时,上级区块链的审核模块2审核区块链标识信息41是否符合预设的格式即可判断出发出接入请求的区块链是否为具有关联的区块链。若区块链标识信息41符合预设的格式,则审核通过,反之,则审核不通过。When the review module 2 reviews the access request, it checks whether the block chain identification information 41 is the identification information that allows access, or whether the format of the block chain identification information 41 meets the preset format requirements. Blockchains that require cross-chain management are usually alliance chains or private chains, and there are business relationships or associations between chains. When deploying a new blockchain, the blockchain identification information 41 of the new blockchain is set according to the preset format. When the newly deployed blockchain sends an access request, the audit module 2 of the superior blockchain audits the block Whether the chain identification information 41 conforms to the preset format can determine whether the block chain that sends the access request is an associated block chain. If the block chain identification information 41 conforms to the preset format, then the audit is passed; otherwise, the audit is not passed.
作为替代的方案,当新的区块链被部署时,赋予区块链以区块链标识,并将区块链标识提交至已有的区块链上打包存储。当新部署的区块链发出接入请求时,上级区块链查询区块内的数据,若存在相符的区块链标识,则判定区块链标识信息41为允许接入的标识信息,将接入请求审核通过,反之,若区块内查询不到相符的区块链标识信息41,则接入请求审核不通过。As an alternative, when a new blockchain is deployed, the blockchain is given a blockchain identifier, and the blockchain identifier is submitted to the existing blockchain for packaged storage. When the newly deployed blockchain sends an access request, the upper-level blockchain queries the data in the block, and if there is a matching blockchain identifier, it is determined that the blockchain identifier information 41 is the identifier information that allows access, and the The access request is approved, otherwise, if no matching blockchain identification information 41 is found in the block, the access request fails the review.
请参阅附图3,交互请求4包括区块链标识信息41和身份验证信息42,上级区块链的交互模块3验证后与下级区块链的交互模块3建立加密通信连接,下级区块链交互模块3将下级区块链运行信息发送给上级区块链的交互模块3,上级区块链的交互模块3生成交易信息将下级区块链运行信息打包进区块存储。Please refer to accompanying drawing 3, interaction request 4 includes block chain identification information 41 and identity verification information 42, and the interactive module 3 of superior block chain establishes encrypted communication connection with the interactive module 3 of subordinate block chain after verification, and subordinate block chain The interaction module 3 sends the lower-level blockchain operation information to the upper-level blockchain interaction module 3, and the upper-level blockchain interaction module 3 generates transaction information and packs the lower-level blockchain operation information into block storage.
下级区块链发送的运行信息包括当前块高、最近出块时间及健康状态。健康状态是管理平台程序200对一条链的健康评估,即:如果某条链的所有节点状态为正常,那么链的健康状态为“正常”;如果部分节点状态不正常,那么链的健康状态为“警告”;如果全部不正常或者不正常节点数量超过全部节点达预设比例,则链的健康状态为“故障”。The operation information sent by the lower-level blockchain includes the current block height, the latest block generation time and health status. The health status is the health assessment of a chain by the management platform program 200, that is, if all the nodes of a certain chain are in normal status, then the health status of the chain is "normal"; if some nodes are not in normal status, then the health status of the chain is "Warning"; if all abnormal nodes or the number of abnormal nodes exceeds the preset ratio of all nodes, the health status of the chain is "fault".
区块链标识信息41为区块链的唯一标识ID411,唯一标识ID411由区块链创建时,向运行有管理平台程序200的任一区块链的节点申请获得,身份验证信息42包括属性验证信息421和密文验证信息422,属性验证信息421为建立上下级关系时,上级区块链向下级区块链分配的身份信息4211、区块链类型信息4212及业务属性信息4213,密文验证信息422为上级区块链和下级区块链之间约定的成对的秘钥信息4221,上级区块链交互模块3收到下级区块链交互模块3发送的交互请求4时,验证交互请求4携带的唯一标识ID411、身份信息4211、区块链类型信息4212及业务属性信息4213是否与存储的相匹配,若不匹配则拒绝交互,若匹配则验证交互请求4携带的密文验证信息422,若验证不通过,则拒绝交互,若验证通过,则生成本次交互的加密秘钥,通过约定秘钥将加密秘钥发送给下级区块链的交互模块3,下级区块链的交互模块3使用加密秘钥将区块链运行信息加密后发送给上级区块链的交互模块3。区块链A的属性信息为:{身份信息4211:SubC-r-A,区块链类型信息4212:私有链,业务属性信息4213:销售业务数据链}。即区块链C为区块链A分配了一个身份信息4211,SubC-r-A,身份信息4211的格式和分配规则由区块链C自行设定。区块链A为私有链,则区块链类型信息4212即为私有链。区块链A的业务属性为销售业务数据链。则区块链C通过与区块链A交互,能够通过区块链C获得区块链A上记录的销售数据情况。The block chain identification information 41 is the unique identification ID411 of the block chain. When the unique identification ID411 is created by the block chain, it is obtained by applying to any block chain node running the management platform program 200. The identity verification information 42 includes attribute verification. Information 421 and ciphertext verification information 422, attribute verification information 421 is the identity information 4211, blockchain type information 4212 and business attribute information 4213 assigned by the upper-level blockchain to the lower-level blockchain when establishing a superior-subordinate relationship. The information 422 is the paired secret key information 4221 agreed between the upper-level blockchain and the lower-level blockchain. When the upper-level blockchain interaction module 3 receives the interaction request 4 sent by the lower-level blockchain interaction module 3, it verifies the interaction request. Whether the unique identification ID411, identity information 4211, blockchain type information 4212 and business attribute information 4213 carried by 4 match the stored ones, if they do not match, the interaction is rejected, and if they match, the ciphertext verification information 422 carried by the interaction request 4 is verified , if the verification fails, the interaction will be rejected. If the verification is passed, the encryption key for this interaction will be generated, and the encryption key will be sent to the interaction module 3 of the lower-level blockchain through the agreed secret key. The interaction module of the lower-level blockchain 3 Use the encryption key to encrypt the blockchain operation information and send it to the interaction module 3 of the upper-level blockchain. The attribute information of blockchain A is: {identity information 4211: SubC-r-A, blockchain type information 4212: private chain, business attribute information 4213: sales business data chain}. That is, blockchain C assigns an identity information 4211, SubC-r-A, to blockchain A, and the format and distribution rules of identity information 4211 are set by blockchain C itself. Blockchain A is a private chain, and the blockchain type information 4212 is a private chain. The business attribute of blockchain A is the sales business data chain. Then, by interacting with blockchain A, blockchain C can obtain the sales data recorded on blockchain A through blockchain C.
上级区块链的节点的交互模块3向下级区块链的节点的交互模块3发送数据交互请求,请参阅附图4,数据交互请求包括属性验证信息421、密文验证信息422、数据交互指令和交互秘钥,下级区块链交互模块3验证属性验证信息421与下级区块链是否匹配,若不匹配则拒绝交互,若匹配则验证密文验证信息422,若验证不通过,则拒绝交互,若验证通过则执行数据交互请求中的数据交互指令,将读取到的数据使用交互秘钥加密后反馈给上级区块链的节点,上级区块链节点将获得的数据存储在本地。作为上级的区块链,不仅能够周期性收到下级区块链发送的运行信息,还可以主动查询下级区块链的信息。向下级区块链查询数据的方式为向下级区块链的任一节点的交互模块3发送数据交互请求,数据交互请求携带的属性验证信息421和密文验证信息422通过后,下级区块链的节点将执行数据交互指令,进行数据的查询和获取,而后使用交互秘钥加密后,发送给发出数据交互请求的节点。数据交互指令查询获得的数据,存储在发起数据交互请求的上级区块链的节点本地。数据交互请求的属性验证信息421,指下级区块链的属性信息,若下级区块链验证与自身的属性信息相符,则审核通过。密文验证信息422是指建立上下级关系时,上级区块链和下级区块链之间约定的密文验证信息422。比如约定一个字符串口令、约定某个对时间戳的函数、约定对下级区块高度的函数等方式。本实施例则以约定加密函数的方式予以举例说明。The interaction module 3 of the node of the upper-level blockchain sends a data interaction request to the interaction module 3 of the node of the lower-level blockchain. Please refer to the accompanying drawing 4. The data interaction request includes attribute verification information 421, ciphertext verification information 422, and data interaction instructions. and the interaction secret key, the lower-level blockchain interaction module 3 verifies whether the attribute verification information 421 matches the lower-level blockchain, and if it does not match, the interaction is rejected; if it matches, the ciphertext verification information 422 is verified, and if the verification fails, the interaction is rejected , if the verification is passed, the data interaction instruction in the data interaction request will be executed, and the read data will be encrypted with the interaction key and fed back to the upper-level blockchain node, and the upper-level blockchain node will store the obtained data locally. As the upper-level blockchain, it can not only periodically receive the operation information sent by the lower-level blockchain, but also actively query the information of the lower-level blockchain. The way to query data to the lower-level blockchain is to send a data interaction request to the interaction module 3 of any node of the lower-level blockchain. After the attribute verification information 421 and ciphertext verification information 422 carried in the data interaction request pass, the lower-level blockchain The node will execute the data interaction command, query and obtain the data, and then encrypt it with the interaction key and send it to the node that sent the data interaction request. The data obtained by the data interaction command query is stored locally on the node of the upper-level blockchain that initiated the data interaction request. The attribute verification information 421 of the data interaction request refers to the attribute information of the lower-level blockchain. If the verification of the lower-level blockchain is consistent with its own attribute information, the verification is passed. The ciphertext verification information 422 refers to the ciphertext verification information 422 agreed between the upper-level blockchain and the lower-level blockchain when the upper-lower relationship is established. For example, agreeing on a string password, agreeing on a function for timestamps, agreeing on functions for lower-level block heights, etc. In this embodiment, an example is given by specifying an encryption function.
数据交互指令包括读取当前区块高度指令、读取指定区块数据指令、验证交易指定交易信息指令及添加交易信息指令,每个数据交互指令均关联有允许权限等级,下级区块链的交互模块3存储有权限表,权限表记录区块链标识信息41对应的权限等级。作为最佳的实施方式,读取当前区块高度指令及验证交易指定交易信息指令的权限等级为1,读取指定区块数据指令的权限等级为2,添加交易信息指令的权限等级为2。若上级区块链对下级区块链的权限等级为1,则上级区块链仅能够对下级区块链进行读取当前区块高度指令及验证交易指定交易信息指令。通过权限表能够方便的设置上级区块链对下级区块链的操作权限,方便多条区块链的管理。Data interaction instructions include instructions for reading the current block height, instructions for reading specified block data, instructions for verifying transaction specified transaction information, and instructions for adding transaction information. Each data interaction instruction is associated with a permission level, and the interaction of the lower blockchain The module 3 stores a permission table, and the permission table records the permission level corresponding to the block chain identification information 41 . As the best implementation mode, the authority level of the command to read the current block height and the instruction of verifying the specified transaction information is 1, the authority level of the instruction to read the specified block data is 2, and the authority level of the instruction to add transaction information is 2. If the authority level of the upper-level blockchain to the lower-level blockchain is 1, the upper-level blockchain can only read the current block height instruction and verify the specified transaction information instructions for the lower-level blockchain. Through the authority table, it is convenient to set the operation authority of the upper-level blockchain to the lower-level blockchain, which is convenient for the management of multiple blockchains.
上级区块链的审核模块2审核接入请求通过后,上级区块链的审核模块2生成加密多项式f(x),生成自变量x的取值集合E,计算加密多项式f(x)在取值集合E上的多项式值,生成等效多项式f’(x),等效多项式f’(x)在取值集合E上的多项式值与加密多项式f(x)相同,将等效多项式f’(x)发送给下级区块链的接入模块1,上级区块链交互模块3收到下级区块链交互模块3发送的交互请求4时,验证属性验证信息421后,随机生成若干个自变量x的值,x∈E,将若干个自变量x的值发送给下级区块链交互模块3,下级区块链交互模块3收到后,将若干个自变量x的值代入等效多项式f’(x),获得等效多项式f’(x)的多项式值反馈给上级区块链交互模块3,上级区块链模块验证收到的等效多项式f’(x)的多项式值与相应的加密多项式f(x)是否相符,若相符,则判定密文验证信息422验证通过,反之,则判定密文验证信息422验证不通过。加密多项式f(x)=5*x^2-24*x+16,设置取值集合E={2,3,4,6,8,9,12},则加密多项式在取值集合E上的值域为{-12,-11,0,52,144,205,448}。相应的生成等效多项式f’(x)=-0.00000116*x^8+0.00007*x^7-0.0017*x^6+0.0234*x^5-0.186*x^4+0.893*x^3+2.5*x^2-20.23*x+13.69。After the audit module 2 of the upper-level blockchain audits the access request, the audit module 2 of the upper-level blockchain generates an encrypted polynomial f(x), generates a value set E of the independent variable x, and calculates the encrypted polynomial f(x). The polynomial value on the value set E generates an equivalent polynomial f'(x), the polynomial value of the equivalent polynomial f'(x) on the value set E is the same as the encrypted polynomial f(x), and the equivalent polynomial f' (x) Send to the access module 1 of the lower-level blockchain, when the upper-level blockchain interaction module 3 receives the interaction request 4 sent by the lower-level blockchain interaction module 3, after verifying the attribute verification information 421, randomly generate several self- The value of the variable x, x∈E, sends the values of several independent variables x to the lower-level blockchain interaction module 3, and after receiving the value, the lower-level blockchain interaction module 3 substitutes the values of several independent variables x into the equivalent polynomial f'(x), obtain the polynomial value of the equivalent polynomial f'(x) and feed it back to the upper-level blockchain interaction module 3, and the upper-level blockchain module verifies that the received polynomial value of the equivalent polynomial f'(x) is consistent with the corresponding Whether the encrypted polynomial f(x) matches, if it matches, it is determined that the verification of the ciphertext verification information 422 is passed; otherwise, it is determined that the verification of the ciphertext verification information 422 is not passed. Encryption polynomial f(x)=5*x^2-24*x+16, set the value set E={2,3,4,6,8,9,12}, then the encryption polynomial is on the value set E The range of values is {-12,-11,0,52,144,205,448}. The corresponding generating equivalent polynomial f'(x)=-0.00000116*x^8+0.00007*x^7-0.0017*x^6+0.0234*x^5-0.186*x^4+0.893*x^3+2.5 *x^2-20.23*x+13.69.
上级区块链交互模块3收到下级区块链交互模块3发送的交互请求4时,验证属性验证信息421后,随机生成若干个自变量x的值,如生成x=2,3及6,将x=2,3及6发送给下级区块链交互模块3,下级区块链交互模块3收到后,将若干个自变量x的值代入等效多项式f’(x),即f’(x)=-0.00000116*x^8+0.00007*x^7-0.0017*x^6+0.0234*x^5-0.186*x^4+0.893*x^3+2.5*x^2-20.23*x+13.69。获得f’(2)=-11.95333696,f’(6)=-10.86262076及f’(6)=54.43236544。计算三个多项式值的误差率分别为(12-11.95333696)/12=0.38%、(11-10.86262076)/11=1.2%及(54.43236544-52)/52=4.6%,误差均小于10,则判定f’(x)的多项式值与相应的加密多项式f(x)相符。When the upper-level blockchain interaction module 3 receives the interaction request 4 sent by the lower-level blockchain interaction module 3, after verifying the attribute verification information 421, it randomly generates the values of several independent variables x, such as generating x=2, 3 and 6, Send x=2, 3 and 6 to the lower-level blockchain interaction module 3, and after the lower-level blockchain interaction module 3 receives it, substitute the values of several independent variables x into the equivalent polynomial f'(x), that is, f' (x)=-0.00000116*x^8+0.00007*x^7-0.0017*x^6+0.0234*x^5-0.186*x^4+0.893*x^3+2.5*x^2-20.23*x +13.69. Obtain f'(2)=-11.95333696, f'(6)=-10.86262076 and f'(6)=54.43236544. The error rates of calculating the three polynomial values are (12-11.95333696)/12=0.38%, (11-10.86262076)/11=1.2% and (54.43236544-52)/52=4.6%, and the errors are all less than 10, then the judgment The polynomial value of f'(x) corresponds to the corresponding encryption polynomial f(x).
收到接入请求的上级区块链的节点的审核模块2审核通过后,将接入请求及审核结果签名后在上级区块链网络中广播,其他上级区块链的节点的审核模块2审核接入请求,若审核结果与广播的审核结果一致,则在广播后添加节点签名,集齐预设数量节点的签名后,接入请求的审核结获得确认,而后收到接入请求的上级区块链的节点,与下级区块链的接入模块1交换区块链标识信息41、身份验证信息42和约定秘钥,将约定的区块链标识信息41、身份验证信息42和约定秘钥广播至上级区块链的每个节点,此后下级区块链节点的交互模块3能够与上级区块链的任一节点的交互模块3进行数据交互。After the review module 2 of the upper-level blockchain node that receives the access request passes the review, it signs the access request and the audit result and broadcasts it in the upper-level blockchain network, and the audit module 2 of other upper-level blockchain nodes audits For an access request, if the audit result is consistent with the broadcast audit result, the node signature will be added after the broadcast. After collecting the signatures of the preset number of nodes, the audit result of the access request will be confirmed, and then the upper-level district that receives the access request The node of the block chain exchanges the block chain identification information 41, identity verification information 42 and agreed secret key with the access module 1 of the lower level block chain, and transfers the agreed block chain identification information 41, identity verification information 42 and agreed key Broadcast to each node of the upper-level blockchain, and then the interaction module 3 of the lower-level blockchain node can perform data interaction with the interaction module 3 of any node of the upper-level blockchain.
一种区块链的跨链操作方法,请参阅附图5,包括以下步骤:步骤A01)在两个区块链上运行交互程序,两个区块链的交互程序之间交换区块链标识信息41、身份验证信息42和约定秘钥,身份验证信息42包括属性验证信息421和密文验证信息422;步骤A02)区块链节点生成操作请求,发送给被操作区块链的任一节点,操作请求包括属性验证信息421、密文验证信息422、数据交互指令和交互秘钥;步骤A03)被操作区块链的节点验证属性验证信息421及密文验证信息422均通过,则执行数据交互指令,并将数据交互指令结果使用交互秘钥加密后,反馈给发送操作请求的区块链节点。通过在区块链节点上运行交互程序,按照预定的交互信息格式及验证信息,即可实现区块链的跨链操作,实现多个区块链之间的跨链管理,便于同一个业务中具有多条区块链的管理和运行,提高业务效率。A cross-chain operation method of blockchain, please refer to attached drawing 5, including the following steps: Step A01) Run interactive programs on two blockchains, and exchange blockchain identifiers between the interactive programs of the two blockchains Information 41, identity verification information 42 and agreed secret key, identity verification information 42 includes attribute verification information 421 and ciphertext verification information 422; Step A02) The blockchain node generates an operation request and sends it to any node of the operated blockchain , the operation request includes attribute verification information 421, ciphertext verification information 422, data interaction instructions and interaction keys; step A03) the node of the operated blockchain verifies that both the attribute verification information 421 and the ciphertext verification information 422 pass, then the execution data Interaction instructions, and the result of the data interaction instruction is encrypted with the interaction key, and fed back to the blockchain node that sent the operation request. By running the interactive program on the blockchain node, according to the predetermined interactive information format and verification information, the cross-chain operation of the blockchain can be realized, and the cross-chain management between multiple blockchains can be realized, which is convenient for the same business. With the management and operation of multiple blockchains, business efficiency is improved.
数据交互指令包括读取当前区块高度指令、读取指定区块数据指令、验证交易指定交易信息指令及添加交易信息指令,每个数据交互指令均关联有允许权限等级,区块链的交互程序存储有权限表,权限表记录区块链标识信息41对应的权限等级。Data interaction instructions include instructions for reading the current block height, instructions for reading specified block data, instructions for verifying transaction specified transaction information, and instructions for adding transaction information. Each data interaction instruction is associated with a permission level, and the interactive program of the blockchain An authority table is stored, and the authority table records the authority level corresponding to the block chain identification information 41 .
本实施例的实质性效果是:通过建立跨链交互或操作机制,并建立身份验证机制,实现了区块链的跨链操作及跨链管理,同时保证区块链的运行安全;通过跨链管理实现多条业务区块链的高效管理,保障业务区块链的高效安全运行,提高生产效率;通过改进的身份验证机制,保障跨链管理及跨链操作的安全性。The substantive effect of this embodiment is: by establishing a cross-chain interaction or operation mechanism and establishing an identity verification mechanism, the cross-chain operation and cross-chain management of the blockchain are realized, while ensuring the operation security of the blockchain; Management Realize the efficient management of multiple business blockchains, ensure the efficient and safe operation of business blockchains, and improve production efficiency; through the improved identity verification mechanism, the security of cross-chain management and cross-chain operations is guaranteed.
实施例二:Embodiment two:
一种区块链的跨链管理系统,本实施例在实施例一的基础上,提供了新的密文验证信息422生成方案。在本实施例中,上级区块链的审核模块2审核接入请求通过后,上级区块链的审核模块2生成小数g、正奇数c和正奇数d,使g*c*d=(2*k*π)_N,k为正整数,N表示括号内的数保留N位小数,将正奇数d发送给下级区块链的接入模块1,上级区块链交互模块3收到下级区块链交互模块3发送的交互请求4时,验证属性验证信息421后,随机生成整数m,计算中间值P1=(cos(g*m))_N,将中间值P1发送给下级区块链的交互模块3,下级区块链交互模块3使用余弦函数的倍角公式计算中间值P2=(cos(d*g*m))_N,将中间值P2发送给上级区块链交互模块3,上级区块链交互模块3使用余弦函数的倍角公式计算中间值P3=(cos(c*d*g*m))_N,若P3的绝对值小于预设阈值ε,则判定密文验证信息422验证通过,反之,则判定密文验证信息422验证不通过。A blockchain cross-chain management system, this embodiment provides a new ciphertext verification information 422 generation scheme on the basis of the first embodiment. In this embodiment, after the audit module 2 of the upper-level blockchain audits the access request, the audit module 2 of the upper-level blockchain generates a decimal g, a positive odd number c, and a positive odd number d, so that g*c*d=(2* k*π)_N, k is a positive integer, N means that the number in brackets retains N decimal places, and the positive odd number d is sent to the access module 1 of the lower-level blockchain, and the upper-level blockchain interaction module 3 receives the lower-level block When the interaction request 4 sent by the chain interaction module 3, after verifying the attribute verification information 421, the integer m is randomly generated, the intermediate value P1=(cos(g*m))_N is calculated, and the intermediate value P1 is sent to the interaction of the lower blockchain Module 3, the lower-level blockchain interaction module 3 uses the double-angle formula of the cosine function to calculate the intermediate value P2=(cos(d*g*m))_N, and sends the intermediate value P2 to the upper-level blockchain interaction module 3, the upper-level block The chain interaction module 3 uses the double angle formula of the cosine function to calculate the intermediate value P3=(cos(c*d*g*m))_N. If the absolute value of P3 is less than the preset threshold ε, it is determined that the verification of the ciphertext verification information 422 is passed. Otherwise, it is determined that the verification of the ciphertext verification information 422 fails.
一种区块链的跨链操作方法,相对于实施例一,本实施例提供了生成密文验证信息422的替代方案。请参阅附图6,本实施例中,生成密文验证信息422的方法包括:步骤B01)其中一个区块链的交互程序生成小数g、正奇数c和正奇数d,使g*c*d=(2*k*π)_N,k为正整数,N表示括号内的数保留N位小数,将正奇数d发送给另一个区块链的交互程序;步骤B02)被操作区块链的交互程序收到操作请求时,验证属性验证信息421,若验证不通过,则不做操作,反之,则随机生成整数m;步骤B03)计算中间值P1=(cos(g*m))_N,将中间值P1发送给发送操作请求的区块链的交互程序;步骤B04)发送操作请求的区块链的交互程序使用余弦函数的倍角公式计算中间值P2=(cos(d*g*m))_N,将中间值P2发送给被操作区块链的交互程序;步骤B05)被操作区块链的交互程序使用余弦函数的倍角公式计算中间值P3=(cos(c*d*g*m))_N;步骤B06)若P3与1的差值的绝对值小于预设阈值ε,则判定密文验证信息422验证通过,执行数据交互指令,反之,则判定密文验证信息422验证不通过。A cross-chain operation method of a blockchain. Compared with the first embodiment, this embodiment provides an alternative solution for generating ciphertext verification information 422 . Please refer to accompanying drawing 6, in this embodiment, the method for generating ciphertext verification information 422 includes: Step B01) wherein an interactive program of a blockchain generates a decimal g, a positive odd number c, and a positive odd number d, so that g*c*d= (2*k*π)_N, k is a positive integer, N means that the number in the brackets retains N decimal places, and the positive odd number d is sent to the interactive program of another blockchain; step B02) the interaction of the operated blockchain When the program receives the operation request, it verifies the attribute verification information 421. If the verification fails, no operation is performed; otherwise, the integer m is randomly generated; step B03) calculates the intermediate value P1=(cos(g*m))_N, and will The intermediate value P1 is sent to the interactive program of the blockchain that sends the operation request; Step B04) The interactive program of the blockchain that sends the operation request uses the double angle formula of the cosine function to calculate the intermediate value P2=(cos(d*g*m)) _N, send the intermediate value P2 to the interactive program of the operated blockchain; Step B05) The interactive program of the operated blockchain uses the double angle formula of the cosine function to calculate the intermediate value P3=(cos(c*d*g*m) )_N; Step B06) If the absolute value of the difference between P3 and 1 is less than the preset threshold ε, it is determined that the ciphertext verification information 422 has passed the verification, and the data interaction instruction is executed; otherwise, it is determined that the ciphertext verification information 422 has failed the verification.
本实施例中设置小数g=388.95909、正奇数c=7和正奇数d=3,满足g*c*d=8168.14089=(2*1300*π)_N=8168.14089,其中N取值为5。预设阈值ε=0.001。In this embodiment, the decimal number g=388.95909, the positive odd number c=7 and the positive odd number d=3 are set to satisfy g*c*d=8168.14089=(2*1300*π)_N=8168.14089, where the value of N is 5. The preset threshold ε=0.001.
被操作区块链的交互程序收到操作请求后,验证属性验证信息421,验证通过后,则继续验证密文验证信息422。被操作区块链的交互程序生成整数m=5,计算中间值P1=(cos(g*m))_N=(cos(388.95909*5))_N=-0.98883。将P1=-0.98883发送给发送操作请求的区块链的交互程序。发送操作请求的区块链的交互程序使用余弦函数的倍角公式计算中间值P2=(cos(d*g*m))_N=(4*P1^3-3*P1)_N=-0.900961652。而后将中间值P2反馈给被操作区块链的交互程序。被操作区块链的交互程序使用余弦函数的倍角公式计算中间值P3=(cos(c*d*g*m))_N=(64*P2^7-112*P2^5+56*P2^3-7*P2)_N=0.99999。中间值P3与1的差距小于预设阈值ε=0.001,则判定密文验证信息422验证通过。After receiving the operation request, the interactive program of the operated blockchain verifies the attribute verification information 421 , and continues to verify the ciphertext verification information 422 after the verification is passed. The interactive program of the operated blockchain generates an integer m=5, and calculates the intermediate value P1=(cos(g*m))_N=(cos(388.95909*5))_N=-0.98883. Send P1=-0.98883 to the interactive program of the blockchain that sent the operation request. The interactive program of the blockchain that sends the operation request uses the double angle formula of the cosine function to calculate the intermediate value P2=(cos(d*g*m))_N=(4*P1^3-3*P1)_N=-0.900961652. Then feed back the intermediate value P2 to the interactive program of the operated blockchain. The interactive program of the operated blockchain uses the double-angle formula of the cosine function to calculate the intermediate value P3=(cos(c*d*g*m))_N=(64*P2^7-112*P2^5+56*P2^ 3-7*P2)_N=0.99999. If the difference between the intermediate value P3 and 1 is smaller than the preset threshold ε=0.001, it is determined that the verification of the ciphertext verification information 422 is passed.
相对于实施例一,本实施例提供的密文验证信息422具有更高的安全性,进一步提高了区块链跨链管理及跨链操作的安全性。Compared with Embodiment 1, the ciphertext verification information 422 provided by this embodiment has higher security, which further improves the security of blockchain cross-chain management and cross-chain operation.
以上所述的实施例只是本发明的一种较佳的方案,并非对本发明作任何形式上的限制,在不超出权利要求所记载的技术方案的前提下还有其它的变体及改型。The embodiment described above is only a preferred solution of the present invention, and does not limit the present invention in any form. There are other variations and modifications on the premise of not exceeding the technical solution described in the claims.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211082288.2A CN115189965B (en) | 2022-09-06 | 2022-09-06 | Cross-chain management system and cross-chain operation method of block chain |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211082288.2A CN115189965B (en) | 2022-09-06 | 2022-09-06 | Cross-chain management system and cross-chain operation method of block chain |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115189965A CN115189965A (en) | 2022-10-14 |
CN115189965B true CN115189965B (en) | 2022-12-13 |
Family
ID=83523092
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211082288.2A Active CN115189965B (en) | 2022-09-06 | 2022-09-06 | Cross-chain management system and cross-chain operation method of block chain |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115189965B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116933327A (en) * | 2023-07-05 | 2023-10-24 | 浙江工业大学 | A data traceability method in a cross-chain scenario |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112766740A (en) * | 2021-01-22 | 2021-05-07 | 湖南工商大学 | Public safety emergency information block chain sharing model and method based on side chain |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11048813B2 (en) * | 2018-08-29 | 2021-06-29 | Nucleus Vision, Llc | Method and system for managing consent data in a blockchain network |
US11250507B2 (en) * | 2019-02-20 | 2022-02-15 | Apifiny Group Inc. | Trusted tokenized transactions in a blockchain system |
CN109934592A (en) * | 2019-03-22 | 2019-06-25 | 深圳市网心科技有限公司 | A blockchain cross-chain communication method, system, electronic device and storage medium |
CN110266655B (en) * | 2019-05-30 | 2021-11-12 | 中国工商银行股份有限公司 | Cross-chain interconnection method, device and system based on block chain |
CN112435024B (en) * | 2020-11-17 | 2022-06-10 | 浙江大学 | Consortium chain cross-chain privacy protection method based on group signature and CA multi-party authentication |
CN112491846B (en) * | 2020-11-18 | 2023-04-18 | 深圳前海微众银行股份有限公司 | Cross-chain block chain communication method and device |
CN112667601B (en) * | 2020-12-30 | 2023-06-20 | 杭州趣链科技有限公司 | Block chain identification management method, terminal equipment and computer readable storage medium |
CN113259456B (en) * | 2021-06-02 | 2021-10-15 | 支付宝(杭州)信息技术有限公司 | Cross-chain interaction method and device |
CN113590718B (en) * | 2021-09-23 | 2022-11-08 | 南京慧链和信数字信息科技研究院有限公司 | Trusted data chain crossing system based on block chain all-in-one machine |
CN114285635A (en) * | 2021-12-23 | 2022-04-05 | 杨波 | Intelligent contract-based identity management system for participants on block chain |
CN114615095B (en) * | 2022-05-12 | 2022-09-09 | 北京邮电大学 | Blockchain cross-chain data processing method, relay chain, application chain and cross-chain network |
-
2022
- 2022-09-06 CN CN202211082288.2A patent/CN115189965B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112766740A (en) * | 2021-01-22 | 2021-05-07 | 湖南工商大学 | Public safety emergency information block chain sharing model and method based on side chain |
Non-Patent Citations (1)
Title |
---|
区块链跨链技术进展研究;李芳等;《软件学报》;20190327(第06期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN115189965A (en) | 2022-10-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112311772B (en) | Hyperridge-based cross-domain certificate management system and method | |
CN109377198A (en) | A Signing System Based on Consortium Chain Multi-Party Consensus | |
CN114329529A (en) | Asset data management method and system based on block chain | |
CN113360861B (en) | Mortgage loan oriented decentralized identity method based on repeater cross-chain | |
Fan et al. | Identity Management Security Authentication Based on Blockchain Technologies. | |
CN113079215B (en) | Block chain-based wireless security access method for power distribution Internet of things | |
CN113850599B (en) | Cross-link transaction method and system applied to alliance link | |
CN113779607A (en) | Industrial data asset management method, system and equipment | |
CN110555783A (en) | block chain-based power marketing data protection method and system | |
CN108876669A (en) | Course notarization system and method applied to multi-platform shared education resources | |
CN115270145A (en) | User electricity stealing behavior detection method and system based on alliance chain and federal learning | |
CN114139203A (en) | Blockchain-based heterogeneous identity alliance risk assessment system, method and terminal | |
CN115189965B (en) | Cross-chain management system and cross-chain operation method of block chain | |
Huang et al. | Building private blockchains over public blockchains (PoP) an attribute-based access control approach | |
CN117857075A (en) | Chain-up and chain-down trusted collaboration method for quantum-resistant blockchain system | |
CN117036027A (en) | Green power consumption authentication data processing method based on block chain and related equipment | |
CN115021927B (en) | Administrator identity management and control method and system for cryptographic machine cluster | |
CN113591103B (en) | Identity authentication method and system between intelligent terminals of electric power Internet of things | |
CN115186296A (en) | A process traceability method and device for oilfield sensitive data | |
CN114168996A (en) | Zero-knowledge-proof-based alliance-link order privacy data verification method | |
CN119544477A (en) | Log management method and device | |
CN112926983A (en) | Block chain-based deposit certificate transaction encryption system and method | |
CN118473631A (en) | A fast consensus method and system for identity authentication based on blockchain | |
CN112767104B (en) | Block chain-based due diligence file management system and method | |
CN115375305A (en) | Ship data credible tracing method based on block chain |
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 | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right |
Denomination of invention: A cross chain management system and cross chain operation method for blockchain Granted publication date: 20221213 Pledgee: Bank of Beijing Co.,Ltd. Hangzhou Yuhang sub branch Pledgor: ZHEJIANG SHUQIN TECHNOLOGY CO.,LTD. Registration number: Y2024330002485 |
|
PE01 | Entry into force of the registration of the contract for pledge of patent right |