








技术领域technical field
本申请涉及区块链技术领域,尤其涉及一种基于区块链的交易监管方法、装置、电子设备和存储介质。The present application relates to the technical field of blockchain, and in particular to a transaction supervision method, device, electronic equipment and storage medium based on blockchain.
背景技术Background technique
区块链是由多个区块组成的链式存储结构。每个区块中保存了一定的信息,它们按照各自产生的时间顺序连接成链条。其中,在区块中可以记录密文形式的交易信息,交易信息包括交易中的付款方,交易中的收款方、数字货币种类,交易金额和监管方。监管方包括用于监控收款方的监管方、用于监控付款方的监管方和用于监控数字货币的监管方,分别验证交易信息的合规性和合法性。Blockchain is a chained storage structure composed of multiple blocks. Certain information is stored in each block, and they are connected into a chain according to the time sequence of their generation. Among them, the transaction information in the form of cipher text can be recorded in the block, and the transaction information includes the payer in the transaction, the payee in the transaction, the type of digital currency, the transaction amount and the supervisor. The supervisor includes the supervisor for monitoring the payee, the supervisor for monitoring the payer and the supervisor for monitoring digital currency, respectively verifying the compliance and legality of transaction information.
然而,监管方在监管交易信息的过程中,需要注意交易信息的隐私性,交易信息不能被区块链上的与交易信息无关的其他用户知晓,也不能被与该交易信息无关的监管方知晓。因此,监管方在保证数据隐私的情况下,如何验证交易信息的合规性和合法性,成为亟待解决的问题。However, in the process of supervising the transaction information, the regulator needs to pay attention to the privacy of the transaction information. The transaction information cannot be known by other users on the blockchain that have nothing to do with the transaction information, nor can it be known by the regulator that has nothing to do with the transaction information. . Therefore, how to verify the compliance and legality of transaction information while ensuring data privacy has become an urgent problem to be solved.
发明内容Contents of the invention
本申请实施例提供一种基于区块链的交易监管方法、装置、电子设备和存储介质,监管方在保证区块链数据隐私的情况下,能够监管交易信息的合规性和合法性。The embodiment of the present application provides a blockchain-based transaction supervision method, device, electronic equipment, and storage medium. The supervisor can supervise the compliance and legality of transaction information while ensuring the privacy of blockchain data.
为达到上述目的,本申请的实施例采用如下技术方案:In order to achieve the above object, the embodiments of the present application adopt the following technical solutions:
第一方面,提供了一种基于区块链的交易监管方法,该方法包括:付款方客户端节点获取交易的交易明文信息,并基于交易明文信息构造交易密文信息,交易涉及一个或多个关联监管方节点;付款方客户端节点根据了解客户KYC合约和交易密文信息,得到报送信息,并根据KYC合约中一个或多个关联监管方节点对应的一个或多个监管公钥分别对报送信息加密得到一个或多个交易监管密文信息;付款方客户端节点将交易密文信息、一个或多个交易监管密文信息和零知识证明,发送至区块链,零知识证明用于证明报送信息是否为正确且完整;区块链验证节点在根据交易密文信息,KYC合约和一个或多个交易监管密文信息,验证零知识证明成立的情况下,将交易密文信息和一个或多个交易监管密文信息存储至区块链;一个或多个关联监管方节点中的每个关联监管方节点从区块链获取一个或多个交易监管密文信息,并根据监管私钥对一个或多个交易监管密文信息进行解密,得到并验证报送信息。In the first aspect, a blockchain-based transaction supervision method is provided, the method includes: the client node of the payer obtains transaction plaintext information of the transaction, and constructs transaction ciphertext information based on the transaction plaintext information, and the transaction involves one or more Associated regulator node; the payer client node obtains the reporting information according to the customer's KYC contract and transaction ciphertext information, and according to one or more regulatory public keys corresponding to one or more associated regulator nodes in the KYC contract, respectively The submitted information is encrypted to obtain one or more transaction supervision ciphertext information; the payer client node sends the transaction ciphertext information, one or more transaction supervision ciphertext information and zero-knowledge proof to the blockchain, and the zero-knowledge proof uses To prove whether the submitted information is correct and complete; the blockchain verification node will pass the transaction ciphertext information to and one or more transaction regulatory ciphertext information are stored in the blockchain; each of the one or more associated regulator nodes obtains one or more transaction regulatory ciphertext information from the blockchain, and according to the supervision The private key decrypts one or more transaction supervision ciphertext information, obtains and verifies the submitted information.
可选的,上述基于区块链的交易监管方法中,交易明文信息包括收款方身份信息、交易金额和付款方身份信息,交易密文信息包括加密的付款地址、收款方加密的交易金额、加密的收款地址以及付款方加密的交易金额。Optionally, in the above blockchain-based transaction supervision method, the transaction plaintext information includes the identity information of the payee, the transaction amount and the identity information of the payer, and the transaction ciphertext information includes the encrypted payment address, the encrypted transaction amount of the payee , the encrypted receiving address and the encrypted transaction amount of the payer.
可选的,上述基于区块链的交易监管方法中,KYC合约中的向量矩阵元素包括用户身份向量、监管身份向量和公钥向量;用户身份向量对应存储收款方身份信息和付款方身份信息;监管身份向量对应存储一个或多个关联监管方节点的身份信息;公钥向量对应存储收款方公钥、付款方公钥和一个或多个监管公钥。Optionally, in the above blockchain-based transaction supervision method, the vector matrix elements in the KYC contract include the user identity vector, supervision identity vector and public key vector; the user identity vector corresponds to storing the identity information of the payee and the identity information of the payer ; The supervision identity vector corresponds to storing the identity information of one or more associated supervisor nodes; the public key vector corresponds to storing the public key of the payee, the public key of the payer and one or more public keys of supervision.
可选的,上述付款方客户端节点根据了解客户KYC合约和交易密文信息,得到报送信息,包括:付款方客户端节点根据付款方私钥,对加密的付款地址进行签名,得到签名付款地址;付款方客户端节点获取加密的收款地址对应的签名收款地址,签名收款地址是根据收款方私钥对加密的收款地址进行签名得到的;付款方客户端节点合并付款位置信息、收款位置信息、数字货币合约地址位置信息、签名付款地址、签名收款地址、第一金额加密参数,以及交易金额,生成报送信息;其中,付款位置信息是指KYC合约中付款方客户端节点对应的付款方公钥的位置信息;收款位置信息是指KYC合约中收款方客户端节点对应的收款方公钥的位置信息,收款方客户端节点为与交易的收款方对应的客户端节点;数字货币合约地址位置是指KYC合约中交易金额所属的数字货币类型的数字货币管理节点的位置信息;第一金额加密参数用于对交易金额加密得到付款方加密的交易金额。Optionally, the above-mentioned payer client node obtains the submission information based on knowing the customer’s KYC contract and transaction ciphertext information, including: the payer client node signs the encrypted payment address according to the payer’s private key, and obtains the signed payment address; the payer client node obtains the signature payment address corresponding to the encrypted payment address, and the signature payment address is obtained by signing the encrypted payment address according to the payee's private key; the payer client node merges the payment location information, payment location information, digital currency contract address location information, signature payment address, signature payment address, first amount encryption parameters, and transaction amount to generate reporting information; among them, payment location information refers to the payer in the KYC contract The location information of the payer's public key corresponding to the client node; the location information of the payee refers to the location information of the payee's public key corresponding to the payee's client node in the KYC contract, and the payee's client node is the recipient of the transaction. The client node corresponding to the payer; the address position of the digital currency contract refers to the location information of the digital currency management node of the digital currency type in the KYC contract; the first amount encryption parameter is used to encrypt the transaction amount to obtain the encrypted value of the payer Amount of the transaction.
可选的,上述基于区块链的交易监管方法中,一个或多个监管公钥包括:第一监管公钥、第二监管公钥和第三监管公钥;第一监管公钥对应的关联监管方节点,具有监管交易相关的监管对象中的付款方客户端的权限,第二监管公钥对应的关联监管方节点,具有监管交易相关的监管对象中的收款方客户端的权限,第三监管公钥对应的关联监管方节点,具有监管交易相关的监管对象中的交易金额所属的数字货币类型的权限;Optionally, in the above blockchain-based transaction supervision method, one or more supervision public keys include: a first supervision public key, a second supervision public key, and a third supervision public key; The supervisor node has the authority of the payer client in the supervisory object related to the supervisory transaction, and the associated supervisor node corresponding to the second supervisory public key has the authority of the payee client in the supervisory object related to the supervisory transaction. The associated supervisor node corresponding to the public key has the authority to supervise the type of digital currency to which the transaction amount in the supervisory object related to the supervisory transaction belongs;
付款方客户端节点根据KYC合约中一个或多个关联监管方节点对应的一个或多个监管公钥分别对报送信息加密得到一个或多个交易监管密文信息,包括:付款方客户端节点根据第一监管公钥、第二监管公钥和第三监管公钥,分别对报送信息加密,得到一个或多个交易监管密文信息;其中,第一监管公钥为KYC合约中付款位置信息对应的监管公钥;第二监管公钥为KYC合约中收款位置信息对应的监管公钥;第三监管公钥为KYC合约中数字货币合约地址位置对应的监管公钥。The payer client node encrypts the submitted information according to one or more supervision public keys corresponding to one or more associated supervisor nodes in the KYC contract to obtain one or more transaction supervision ciphertext information, including: payer client node According to the first supervisory public key, the second supervisory public key and the third supervisory public key, the submitted information is encrypted respectively to obtain one or more transaction supervisory ciphertext information; among them, the first supervisory public key is the payment position in the KYC contract The supervision public key corresponding to the information; the second supervision public key is the supervision public key corresponding to the payment location information in the KYC contract; the third supervision public key is the supervision public key corresponding to the digital currency contract address position in the KYC contract.
可选的,上述基于区块链的交易监管方法中,零知识证明包括以下至少一项:第一金额加密参数、付款方加密的交易金额和佩德森承诺,用于验证报送信息中的交易金额大于或等于0,并且,付款地址中账户余额大于或等于交易金额;付款方公钥和签名付款地址,用于验证付款位置信息是否正确;收款方公钥和签名付款地址,用于验证收款位置信息是否正确;第一监管公钥、第二监管公钥、第三监管公钥和多个交易监管密文信息,用于验证多个交易监管密文信息中的每个交易监管密文对应的报送信息相同,验证每个交易监管密文信息正确。Optionally, in the above blockchain-based transaction supervision method, the zero-knowledge proof includes at least one of the following: the first amount encryption parameter, the transaction amount encrypted by the payer and the Pedersen commitment, used to verify the submitted information The transaction amount is greater than or equal to 0, and the account balance in the payment address is greater than or equal to the transaction amount; the payer’s public key and signature payment address are used to verify whether the payment location information is correct; the payee’s public key and signature payment address are used to Verify whether the payment location information is correct; the first supervision public key, the second supervision public key, the third supervision public key and multiple transaction supervision ciphertext information are used to verify each transaction supervision The submitted information corresponding to the ciphertext is the same, and it is verified that the ciphertext information of each transaction supervision is correct.
可选的,上述基于区块链的交易监管方法中,加密的收款地址是根据非对称密钥假名算法对收款地址加密得到的;加密的付款地址是根据非对称密钥假名算法对付款地址加密得到的。Optionally, in the above blockchain-based transaction supervision method, the encrypted receiving address is obtained by encrypting the receiving address according to the asymmetric key pseudonym algorithm; the encrypted payment address is obtained by encrypting the payment address according to the asymmetric key pseudonym algorithm The address is encrypted.
可选的,上述基于区块链的交易监管方法中,加密的付款金额是根据佩德森承诺,以第一金额加密参数为混淆因子,对交易金额加密得到的;加密的收款金额是根据佩德森承诺,以第二金额加密参数为混淆因子,对交易金额加密得到的。Optionally, in the above blockchain-based transaction supervision method, the encrypted payment amount is obtained by encrypting the transaction amount according to the Pedersen commitment and using the first amount encryption parameter as the confusion factor; the encrypted collection amount is obtained according to Pedersen promised to encrypt the transaction amount by using the second amount encryption parameter as the confusion factor.
本申请提供的技术方案至少带来以下技术效果:通过付款方客户端节点构建交易密文信息保证交易信息的隐秘性,能够保障区块链上存储的交易信息对隐私信息的保护程度。根据KYC合约和零知识证明,证明加密多个交易监管密文信息所依据的报送信息正确且完整,能够确保关联监管方节点所监管的多个交易监管密文信息正确且完整,以此,避免关联监管方节点监管无效多个交易监管密文信息浪费关联监管方节点的系统资源。另外,由于多个交易监管密文信息是根据交易涉及到的所有关联监管节点对应的监管公钥加密得到的,因此,各个关联监管方节点通过监管私钥能够获取相应的目标交易监管信息,并且,目标交易监管信息属于关联监管方节点能够监管的信息,而无法获取到报送信息中非自身监管的信息,能够提高关联监管节点的监管效率。而且,报送信息中的相关监管信息只会由对应的关联监管节点获取到,其他监管节点则无法获取到,因而提高了交易信息的安全性。The technical solution provided by this application brings at least the following technical effects: the transaction ciphertext information is constructed by the payer client node to ensure the confidentiality of the transaction information, and the degree of protection of the transaction information stored on the block chain to the private information can be guaranteed. According to the KYC contract and zero-knowledge proof, it is proved that the submitted information based on the encryption of multiple transaction supervision ciphertext information is correct and complete, which can ensure that the multiple transaction supervision ciphertext information supervised by the associated regulator node is correct and complete. In this way, Avoid the invalid supervision of the associated regulator node. Multiple transaction regulatory ciphertext information wastes the system resources of the associated regulator node. In addition, since multiple transaction supervision ciphertext information is encrypted according to the supervision public key corresponding to all associated supervision nodes involved in the transaction, each associated supervisor node can obtain the corresponding target transaction supervision information through the supervision private key, and , the target transaction supervision information belongs to the information that can be supervised by the associated regulator node, but the information that is not self-supervised in the submitted information cannot be obtained, which can improve the supervision efficiency of the associated supervisory node. Moreover, the relevant regulatory information in the submitted information can only be obtained by the corresponding associated regulatory node, and other regulatory nodes cannot obtain it, thus improving the security of transaction information.
第二方面,提供了一种基于区块链的交易监管方法,应用于付款方客户端节点,该方法包括:付款方客户端节点获取交易的交易明文信息,并基于交易明文信息构造交易密文信息,交易涉及一个或多个关联监管方节点;根据了解客户KYC合约和交易密文信息,得到报送信息,并根据KYC合约中一个或多个关联监管方节点对应的一个或多个监管公钥分别对报送信息加密得到一个或多个交易监管密文信息;将交易密文信息、一个或多个交易监管密文信息和零知识证明,发送至区块链,零知识证明用于证明报送信息是否为正确且完整,以使得在零知识证明被验证成立的情况下,一个或多个交易监管密文信息被对应的关联监管方节点解密并监管。In the second aspect, a blockchain-based transaction supervision method is provided, which is applied to the payer client node. The method includes: the payer client node obtains the transaction plaintext information of the transaction, and constructs the transaction ciphertext based on the transaction plaintext information information, the transaction involves one or more associated regulator nodes; according to the customer’s KYC contract and transaction ciphertext information, the reporting information is obtained, and according to one or more regulatory public entities corresponding to one or more associated regulator nodes in the KYC contract key to encrypt the submitted information to obtain one or more transaction supervision ciphertext information; send the transaction ciphertext information, one or more transaction supervision ciphertext information and zero-knowledge proof to the blockchain, and the zero-knowledge proof is used to prove Whether the submitted information is correct and complete, so that when the zero-knowledge proof is verified, one or more transaction supervision ciphertext information is decrypted and supervised by the corresponding associated supervisor node.
可选的,上述基于区块链的交易监管方法中,交易明文信息包括收款方身份信息、交易金额和付款方身份信息,交易密文信息包括加密的付款地址、收款方加密的交易金额、加密的收款地址以及付款方加密的交易金额。Optionally, in the above blockchain-based transaction supervision method, the transaction plaintext information includes the identity information of the payee, the transaction amount and the identity information of the payer, and the transaction ciphertext information includes the encrypted payment address, the encrypted transaction amount of the payee , the encrypted receiving address and the encrypted transaction amount of the payer.
可选的,上述基于区块链的交易监管方法中,KYC合约中的向量矩阵元素包括用户身份向量、监管身份向量和公钥向量;用户身份向量对应存储收款方身份信息和付款方身份信息;监管身份向量对应存储一个或多个关联监管方节点的身份信息;公钥向量对应存储收款方公钥、付款方公钥和一个或多个监管公钥。Optionally, in the above blockchain-based transaction supervision method, the vector matrix elements in the KYC contract include the user identity vector, supervision identity vector and public key vector; the user identity vector corresponds to storing the identity information of the payee and the identity information of the payer ; The supervision identity vector corresponds to storing the identity information of one or more associated supervisor nodes; the public key vector corresponds to storing the public key of the payee, the public key of the payer and one or more public keys of supervision.
可选的,根据了解客户KYC合约和交易密文信息,得到报送信息,包括:付款方客户端节点根据付款方私钥,对加密的付款地址进行签名,得到签名付款地址;付款方客户端节点获取加密的收款地址对应的签名收款地址,签名收款地址是根据收款方私钥对加密的收款地址进行签名得到的;付款方客户端节点合并付款位置信息、收款位置信息、数字货币合约地址位置信息、签名付款地址、签名收款地址、第一金额加密参数,以及交易金额,生成报送信息;其中,付款位置信息是指KYC合约中付款方客户端节点对应的付款方公钥的位置信息;收款位置信息是指KYC合约中收款方客户端节点对应的收款方公钥的位置信息,收款方客户端节点为交易的收款方对应的客户端节点;数字货币合约地址位置是指KYC合约中交易金额所属的数字货币类型的数字货币管理节点的位置信息;第一金额加密参数用于对交易金额加密得到付款方加密的交易金额。Optionally, according to the customer’s KYC contract and transaction ciphertext information, the submission information is obtained, including: the payer’s client node signs the encrypted payment address according to the payer’s private key to obtain the signed payment address; the payer’s client The node obtains the signature receiving address corresponding to the encrypted receiving address. The signed receiving address is obtained by signing the encrypted receiving address according to the private key of the payee; the payer client node combines the payment location information and the receiving location information , digital currency contract address location information, signature payment address, signature receipt address, first amount encryption parameters, and transaction amount to generate reporting information; where the payment location information refers to the payment corresponding to the payer client node in the KYC contract The location information of the payee's public key; the location information of the payee refers to the location information of the payee's public key corresponding to the payee's client node in the KYC contract, and the payee's client node is the client node corresponding to the payee of the transaction The location of the digital currency contract address refers to the location information of the digital currency management node of the digital currency type to which the transaction amount belongs in the KYC contract; the first amount encryption parameter is used to encrypt the transaction amount to obtain the encrypted transaction amount of the payer.
可选的,上述基于区块链的交易监管方法中,一个或多个监管公钥包括:第一监管公钥、第二监管公钥和第三监管公钥;第一监管公钥对应的关联监管方节点,具有监管交易相关的监管对象中的付款方客户端的权限,第二监管公钥对应的关联监管方节点,具有监管交易相关的监管对象中的收款方客户端的权限,第三监管公钥对应的关联监管方节点,具有监管交易相关的监管对象中的交易金额所属的数字货币类型的权限;上述付款方客户端节点根据KYC合约中一个或多个关联监管方节点对应的一个或多个监管公钥分别对报送信息加密得到一个或多个交易监管密文信息,包括:付款方客户端节点根据第一监管公钥、第二监管公钥和第三监管公钥,分别对报送信息加密,得到一个或多个交易监管密文信息;其中,第一监管公钥为KYC合约中付款位置信息对应的监管公钥;第二监管公钥为KYC合约中收款位置信息对应的监管公钥;第三监管公钥为KYC合约中数字货币合约地址位置对应的监管公钥。Optionally, in the above blockchain-based transaction supervision method, one or more supervision public keys include: a first supervision public key, a second supervision public key, and a third supervision public key; The supervisor node has the authority of the payer client in the supervisory object related to the supervisory transaction, and the associated supervisor node corresponding to the second supervisory public key has the authority of the payee client in the supervisory object related to the supervisory transaction. The associated supervisor node corresponding to the public key has the authority to supervise the digital currency type of the transaction amount in the supervision object related to the supervision transaction; the above-mentioned payer client node is based on one or more associated supervisor nodes in the KYC contract. Multiple regulatory public keys encrypt the submitted information respectively to obtain one or more transaction regulatory ciphertext information, including: the payer client node, according to the first regulatory public key, the second regulatory public key and the third regulatory public key, respectively The submitted information is encrypted to obtain one or more transaction supervision ciphertext information; among them, the first supervision public key is the supervision public key corresponding to the payment location information in the KYC contract; the second supervision public key is the supervision public key corresponding to the payment location information in the KYC contract The supervision public key; the third supervision public key is the supervision public key corresponding to the address position of the digital currency contract in the KYC contract.
可选的,上述基于区块链的交易监管方法中,零知识证明包括以下至少一项:第一金额加密参数、交易金额和佩德森承诺,用于验证报送信息中的交易金额大于或等于0,并且,付款地址中账户余额大于或等于交易金额;付款方公钥和签名付款地址,用于验证付款位置信息是否正确;收款方公钥和签名付款地址,用于验证收款位置信息是否正确;第一监管公钥、第二监管公钥、第三监管公钥和多个交易监管密文信息,用于验证多个交易监管密文信息中的每个交易监管密文对应的报送信息相同,验证每个交易监管密文信息正确。Optionally, in the above blockchain-based transaction supervision method, the zero-knowledge proof includes at least one of the following: the first amount encryption parameter, transaction amount and Pedersen commitment, which are used to verify that the transaction amount in the submitted information is greater than or Equal to 0, and the account balance in the payment address is greater than or equal to the transaction amount; the payer’s public key and signature payment address are used to verify whether the payment location information is correct; the payee’s public key and signature payment address are used to verify the payment location Whether the information is correct; the first supervision public key, the second supervision public key, the third supervision public key and multiple transaction supervision ciphertext information are used to verify the corresponding The submitted information is the same, and the ciphertext information of each transaction supervision is verified to be correct.
可选的,上述基于区块链的交易监管方法中,加密的收款地址是根据非对称密钥假名算法对收款地址加密得到的;加密的付款地址是根据非对称密钥假名算法对付款地址加密得到的。Optionally, in the above blockchain-based transaction supervision method, the encrypted receiving address is obtained by encrypting the receiving address according to the asymmetric key pseudonym algorithm; the encrypted payment address is obtained by encrypting the payment address according to the asymmetric key pseudonym algorithm The address is encrypted.
可选的,上述基于区块链的交易监管方法中,加密的付款金额是根据佩德森承诺,以第一金额加密参数为混淆因子,对交易金额加密得到的;加密的收款金额是根据佩德森承诺,以第二金额加密参数为混淆因子,对交易金额加密得到的。Optionally, in the above blockchain-based transaction supervision method, the encrypted payment amount is obtained by encrypting the transaction amount according to the Pedersen commitment and using the first amount encryption parameter as the confusion factor; the encrypted collection amount is obtained according to Pedersen promised to encrypt the transaction amount by using the second amount encryption parameter as the confusion factor.
第三方面,提供了一种基于区块链的交易监管方法,应用于一个或多个关联监管方节点中的每个关联监管节点,该方法包括:从区块链获取一个或多个交易监管密文信息,一个或多个交易监管密文信息是付款方客户节点根据了解客户KYC合约中的一个或多个关联监管方节点对应的一个或多个监管公钥对报送信息加密得到,报送信息是根据KYC合约和交易密文信息得到的,交易密文信息是基于交易明文构造的,交易涉及多个关联监管方节点;根据监管私钥对一个或多个交易监管密文信息进行解密,得到并监管报送信息。In the third aspect, a blockchain-based transaction supervision method is provided, which is applied to each associated supervision node in one or more associated supervisor nodes, and the method includes: obtaining one or more transaction supervisory nodes from the blockchain Ciphertext information, one or more transaction regulatory ciphertext information is obtained by the payer client node encrypting the submitted information with one or more supervisory public keys corresponding to one or more associated regulator nodes in the customer KYC contract. The sending information is obtained based on the KYC contract and the transaction ciphertext information, the transaction ciphertext information is constructed based on the transaction plaintext, and the transaction involves multiple associated regulator nodes; one or more transaction supervision ciphertext information is decrypted according to the regulatory private key , Obtain and monitor the submitted information.
可选的,上述基于区块链的交易监管方法中,KYC合约中的向量矩阵元素包括用户身份向量、监管身份向量和公钥向量;用户身份向量对应存储收款方身份信息和付款方身份信息;监管身份向量对应存储一个或多个关联监管方节点的身份信息;公钥向量对应存储收款方公钥、付款方公钥和一个或多个监管公钥。Optionally, in the above blockchain-based transaction supervision method, the vector matrix elements in the KYC contract include the user identity vector, supervision identity vector and public key vector; the user identity vector corresponds to storing the identity information of the payee and the identity information of the payer ; The supervision identity vector corresponds to storing the identity information of one or more associated supervisor nodes; the public key vector corresponds to storing the public key of the payee, the public key of the payer and one or more public keys of supervision.
可选的,上述基于区块链的交易监管方法中,交易明文信息包括收款方身份信息、交易金额和付款方身份信息,交易密文信息包括加密的付款地址、收款方加密的交易金额、加密的收款地址以及付款方加密的交易金额。Optionally, in the above blockchain-based transaction supervision method, the transaction plaintext information includes the identity information of the payee, the transaction amount and the identity information of the payer, and the transaction ciphertext information includes the encrypted payment address, the encrypted transaction amount of the payee , the encrypted receiving address and the encrypted transaction amount of the payer.
可选的,上述基于区块链的交易监管方法中,一个或多个监管公钥包括:第一监管公钥、第二监管公钥和第三监管公钥;第一监管公钥对应的关联监管方节点,具有监管交易相关的监管对象中的付款方客户端的权限,第二监管公钥对应的关联监管方节点,具有监管交易相关的监管对象中的收款方客户端的权限,第三监管公钥对应的关联监管方节点,具有监管交易相关的监管对象中的交易金额所属的数字货币类型的权限。Optionally, in the above blockchain-based transaction supervision method, one or more supervision public keys include: a first supervision public key, a second supervision public key, and a third supervision public key; The supervisor node has the authority of the payer client in the supervisory object related to the supervisory transaction, and the associated supervisor node corresponding to the second supervisory public key has the authority of the payee client in the supervisory object related to the supervisory transaction. The associated supervisor node corresponding to the public key has the authority to supervise the digital currency type of the transaction amount in the supervisory object related to the supervisory transaction.
第四方面,提供了一种基于区块链的交易监管系统,包括:付款方客户端节点、区块链验证节点和关联监管方节点;付款方客户端节点,用于付款方客户端节点获取交易的交易明文信息,并基于交易明文信息构造交易密文信息,交易涉及一个或多个关联监管方节点;根据了解客户KYC合约和交易密文信息,得到报送信息,并根据KYC合约中一个或多个关联监管方节点对应的一个或多个监管公钥分别对报送信息加密得到一个或多个交易监管密文信息;将交易密文信息、一个或多个交易监管密文信息和零知识证明,发送至区块链,零知识证明用于证明报送信息是否为正确且完整;区块链验证节点,用于在根据交易密文信息,KYC合约和一个或多个交易监管密文信息,验证零知识证明成立的情况下,将交易密文信息和一个或多个交易监管密文信息存储至区块链;一个或多个关联监管方节点,用于从区块链获取一个或多个交易监管密文信息,根据监管私钥对一个或多个交易监管密文信息进行解密,得到并监管报送信息。In the fourth aspect, a blockchain-based transaction supervision system is provided, including: a payer client node, a blockchain verification node, and an associated supervisor node; a payer client node, used for the payer client node to acquire The transaction plaintext information of the transaction, and the transaction ciphertext information is constructed based on the transaction plaintext information. The transaction involves one or more associated regulator nodes; according to the customer KYC contract and transaction ciphertext information, the reporting information is obtained, and according to one of the KYC contracts One or more regulatory public keys corresponding to one or more associated regulator nodes encrypt the submitted information to obtain one or more transaction regulatory ciphertext information; the transaction ciphertext information, one or more transaction regulatory ciphertext information and zero Knowledge proof, sent to the blockchain, zero-knowledge proof is used to prove whether the submitted information is correct and complete; the blockchain verification node is used to supervise the ciphertext according to the transaction ciphertext information, KYC contract and one or more transactions Information, when verifying that the zero-knowledge proof is established, the transaction ciphertext information and one or more transaction regulatory ciphertext information are stored in the blockchain; one or more associated regulator nodes are used to obtain one or more For multiple transaction supervision ciphertext information, one or more transaction supervision ciphertext information is decrypted according to the supervision private key to obtain and supervise the reporting information.
第五方面,提供了一种基于区块链的交易监管装置,应用于付款方客户端节点,包括:构造单元、得到单元和发送单元;构造单元,用于付款方客户端节点获取交易的交易明文信息,并基于交易明文信息构造交易密文信息,交易涉及一个或多个关联监管方节点;得到单元,用于根据了解客户KYC合约和交易密文信息,得到报送信息,并根据KYC合约中一个或多个关联监管方节点对应的一个或多个监管公钥分别对报送信息加密得到一个或多个交易监管密文信息;发送单元,用于将交易密文信息、一个或多个交易监管密文信息和零知识证明,发送至区块链,零知识证明用于证明报送信息是否为正确且完整,以使得在零知识证明被验证成立的情况下,一个或多个交易监管密文信息被对应的关联监管方解密并监管。In the fifth aspect, a blockchain-based transaction supervision device is provided, which is applied to the payer client node, including: a construction unit, an obtaining unit, and a sending unit; a construction unit, used for the payer client node to acquire the transaction transaction Plaintext information, and construct transaction ciphertext information based on the transaction plaintext information. The transaction involves one or more associated supervisor nodes; the obtaining unit is used to obtain the reporting information based on understanding the customer KYC contract and transaction ciphertext information, and according to the KYC contract One or more supervisory public keys corresponding to one or more associated regulator nodes encrypt the submitted information respectively to obtain one or more transaction supervision ciphertext information; the sending unit is used to send transaction ciphertext information, one or more The transaction regulatory ciphertext information and zero-knowledge proof are sent to the blockchain, and the zero-knowledge proof is used to prove whether the submitted information is correct and complete, so that when the zero-knowledge proof is verified, one or more transaction supervision The ciphertext information is decrypted and supervised by the corresponding associated regulator.
第六方面,提供了一种基于区块链的交易监管装置,应用于一个或多个关联监管方节点,包括:获取单元和处理单元;获取单元,用于从区块链获取一个或多个交易监管密文信息,一个或多个交易监管密文信息是付款方客户节点根据了解客户KYC合约中的一个或多个关联监管方节点对应的一个或多个监管公钥对报送信息加密得到,报送信息是根据KYC合约和交易密文信息得到的,交易密文信息是基于交易明文构造的,交易涉及一个或多个关联监管方节点;处理单元,用于根据监管私钥对一个或多个交易监管密文信息进行解密,得到并监管报送信息。In the sixth aspect, a block chain-based transaction supervision device is provided, which is applied to one or more associated supervisor nodes, including: an acquisition unit and a processing unit; the acquisition unit is used to acquire one or more Transaction supervision ciphertext information, one or more transaction supervision ciphertext information is obtained by encrypting the submitted information by the payer customer node according to one or more supervision public keys corresponding to one or more associated supervisor nodes in the customer KYC contract , the reporting information is obtained according to the KYC contract and the transaction ciphertext information, the transaction ciphertext information is constructed based on the transaction plaintext, and the transaction involves one or more associated regulator nodes; the processing unit is used to pair one or more Multiple transaction supervision ciphertext information is decrypted to obtain and supervise the submission information.
第七方面,提供了一种电子设备,包括:处理器和存储器;该存储器用于存储计算机执行指令,当该电子设备运行时,该处理器执行该存储器存储的该计算机执行指令,以使该电子设备执行如上述第二方面或第三方面中任一项所述的基于区块链的交易监管方法。In a seventh aspect, an electronic device is provided, including: a processor and a memory; the memory is used to store computer-executable instructions, and when the electronic device is running, the processor executes the computer-executable instructions stored in the memory, so that the The electronic device executes the blockchain-based transaction supervision method described in any one of the second aspect or the third aspect above.
第八方面,提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机可以执行如上述第二方面或第三方面中任一项所述的基于区块链的交易监管方法。In an eighth aspect, there is provided a computer-readable storage medium, the computer-readable storage medium stores instructions, and when it is run on a computer, the computer can execute any one of the above-mentioned second aspect or third aspect. The transaction supervision method based on block chain.
第九方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机可以执行如上述第二方面或第三方面中任一项所述的基于区块链的交易监管方法。In the ninth aspect, there is provided a computer program product containing instructions, which, when run on a computer, enables the computer to execute the blockchain-based transaction supervision described in any one of the above-mentioned second or third aspects method.
其中,第二方面至第九方面中任一种设计方式所带来的技术效果可参见第一方面中不同设计方式所带来的技术效果,此处不再赘述。Wherein, the technical effect brought by any one of the design methods in the second aspect to the ninth aspect can refer to the technical effect brought by different design methods in the first aspect, and will not be repeated here.
附图说明Description of drawings
图1为本申请实施例提供的一种基于区块链的交易监管系统的结构示意图;FIG. 1 is a schematic structural diagram of a blockchain-based transaction supervision system provided by an embodiment of the present application;
图2为本申请实施例提供的一种基于区块链的交易监管方法的流程示意图之一;FIG. 2 is one of the schematic flow diagrams of a blockchain-based transaction supervision method provided by the embodiment of the present application;
图3为本申请实施例提供的一种基于区块链的交易监管方法的流程示意图之二;FIG. 3 is the second schematic flow diagram of a blockchain-based transaction supervision method provided by the embodiment of the present application;
图4为本申请实施例提供的一种基于区块链的交易监管方法的流程示意图之三;FIG. 4 is the third schematic flow diagram of a blockchain-based transaction supervision method provided by the embodiment of the present application;
图5为本申请实施例提供的一种基于区块链的交易监管方法的数据流示意图;FIG. 5 is a schematic diagram of a data flow of a blockchain-based transaction supervision method provided by an embodiment of the present application;
图6为本申请实施例提供的一种基于区块链的交易监管系统的结构框图;FIG. 6 is a structural block diagram of a blockchain-based transaction supervision system provided by an embodiment of the present application;
图7为本申请实施例提供的一种基于区块链的交易监管装置的结构示意图之一;FIG. 7 is one of the structural schematic diagrams of a blockchain-based transaction supervision device provided by the embodiment of the present application;
图8为本申请实施例提供的一种基于区块链的交易监管装置的结构示意图之二;Fig. 8 is the second structural schematic diagram of a blockchain-based transaction supervision device provided by the embodiment of the present application;
图9为本申请实施例提供的一种电子设备的结构示意图。FIG. 9 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请的描述中,除非另有说明,“/”表示前后关联的对象是一种“或”的关系,例如,A/B可以表示A或B;本申请中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,其中A,B可以是单数或者复数。并且,在本申请的描述中,除非另有说明,“多个”是指两个或多于两个。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。另外,为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。同时,在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念,便于理解。The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Among them, in the description of this application, unless otherwise specified, "/" indicates that the objects associated with each other are an "or" relationship, for example, A/B can indicate A or B; in this application, "and/or "It is just an association relationship describing associated objects, which means that there can be three kinds of relationships, for example, A and/or B, which can mean: A exists alone, A and B exist at the same time, and B exists alone. , B can be singular or plural. And, in the description of the present application, unless otherwise specified, "plurality" means two or more than two. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one item (piece) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple . In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with basically the same function and effect. Those skilled in the art can understand that words such as "first" and "second" do not limit the number and execution order, and words such as "first" and "second" do not necessarily limit the difference. Meanwhile, in the embodiments of the present application, words such as "exemplary" or "for example" are used as examples, illustrations or illustrations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present application shall not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. To be precise, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete manner for easy understanding.
此外,本申请实施例描述的区块链架构以及交易监管场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,区块链架构以及交易监管场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。In addition, the blockchain architecture and transaction supervision scenarios described in the embodiments of this application are for the purpose of more clearly explaining the technical solutions of the embodiments of this application, and do not constitute limitations on the technical solutions provided by the embodiments of this application. Those of ordinary skill in the art It can be seen that with the emergence of blockchain architecture and transaction supervision scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
区块链是由多个区块组成的链式存储结构。每个区块中保存了一定的信息,它们按照各自产生的时间顺序连接成链条。区块链具有两大核心特点:一是数据难以篡改、二是去中心化。基于这两个特点,使得区块链所记录的信息更加真实可靠。Blockchain is a chained storage structure composed of multiple blocks. Certain information is stored in each block, and they are connected into a chain according to the time sequence of their generation. The blockchain has two core features: one is that data is difficult to tamper with, and the other is decentralization. Based on these two characteristics, the information recorded in the blockchain is more authentic and reliable.
区块链上分布式存储密文信息,能够保护用户隐私,并且能够提高密文信息相关方的协作效率,但是,由于区块链的账本一致性要求又涉及数据隐私问题,不利于对用户交易信息的监管。假设记录在区块链上的交易,涉及的关联监管方包括用于监控本次交易收款方的监管方、用于监控本次交易付款方的监管方和用于监控本次交易涉及数字货币的监管方,那么关联监管方能够知晓并验证交易信息的合规性和合法性,同时其他监管方或用户不能获取该交易信息。关联监管方可以采用事后监管的方式监管交易信息,即,对完成交易的交易信息进行监管。Distributed storage of ciphertext information on the blockchain can protect user privacy and improve the collaboration efficiency of ciphertext information related parties. However, due to the consistency requirements of blockchain ledgers and data privacy issues, it is not conducive to user transactions. information regulation. Assuming that the transactions recorded on the blockchain, the related supervisors involved include the supervisors used to monitor the payee of this transaction, the supervisors used to monitor the payer of this transaction, and the supervisors used to monitor the digital currency involved in this transaction. If there is a regulator, the associated regulator can know and verify the compliance and legality of the transaction information, while other regulators or users cannot obtain the transaction information. The related supervisor can supervise the transaction information in the way of ex-post supervision, that is, supervise the transaction information of the completed transaction.
本公开实施例提供的一种基于区块链的交易监管方法可以适用于如图1示出的基于区块链的交易监管系统的结构示意图。如图1所示,基于区块链的交易监管系统关联监管方在保证区块链数据隐私的情况下,能够验证交易信息的合规性和合法性。基于区块链的交易监管系统包括:收款方客户端节点、付款方客户端节点、区块链、区块链验证节点和一个或多个关联监管方节点。A blockchain-based transaction supervision method provided by an embodiment of the present disclosure can be applied to the schematic structural diagram of a blockchain-based transaction supervision system as shown in FIG. 1 . As shown in Figure 1, the associated supervisor of the blockchain-based transaction supervision system can verify the compliance and legality of transaction information while ensuring the privacy of blockchain data. The blockchain-based transaction supervision system includes: a payee client node, a payer client node, a blockchain, a blockchain verification node, and one or more associated supervisor nodes.
收款方客户端节点是指在区块链上认证的用户账户对应的客户端节点中,在任一交易中,收款用户账户对应的客户端节点。在交易过程中通过智能合约使得收款方客户端节点和付款方客户端节点对该交易达成一致的情况下,收款方客户端节点提供收款地址和交易金额。为了收款方的隐私,切断付款方和收款方之间的联系付款方客户端节点可以采用预置加密方法对收款地址。在加密的收款地址接收付款方客户端节点支付的交易金额时,将交易金额进行加密,在支付过程中传输加密的交易金额,在收款方客户端节点在接收到加密的交易金额后,根据对加密的交易金额进行解密,根据解密后的实际的交易金额更改收款方地址中的当前账户余额。The payee client node refers to the client node corresponding to the user account authenticated on the blockchain, and in any transaction, the client node corresponding to the payee user account. When the payee client node and the payer client node reach an agreement on the transaction through the smart contract during the transaction, the payee client node provides the payment address and transaction amount. For the privacy of the payee, cut off the connection between the payer and the payee. The payer client node can use a preset encryption method to encrypt the payee address. When the encrypted receiving address receives the transaction amount paid by the payer client node, the transaction amount is encrypted, and the encrypted transaction amount is transmitted during the payment process. After the payee client node receives the encrypted transaction amount, According to decrypting the encrypted transaction amount, the current account balance in the payee address is changed according to the decrypted actual transaction amount.
付款方客户端节点是指在区块链上认证的用户账户对应的客户端节点中,在任一交易中,付款用户账户对应的客户端节点。在上述交易过程中通过智能合约使得收款方客户端节点和付款方客户端节点对该交易达成一致的情况下,付款方客户端节点根据加密的收款地址和加密的交易金额,进行付款,以便于完成上述交易。付款方客户端节点还用于将该交易的交易密文信息上传至区块链。交易密文信息为对上述交易的交易明文消息加密后得到的。The payer client node refers to the client node corresponding to the user account authenticated on the blockchain, and in any transaction, the client node corresponding to the paying user account. In the above transaction process, when the payee client node and the payer client node reach an agreement on the transaction through the smart contract, the payer client node makes the payment according to the encrypted receiving address and the encrypted transaction amount. In order to facilitate the completion of the above transactions. The payer client node is also used to upload the transaction ciphertext information of the transaction to the blockchain. The transaction ciphertext information is obtained by encrypting the transaction plaintext message of the above transaction.
区块链验证节点是指区块链中用于验证的节点,用于验证交易密文信息是否能够存储在区块链上,并将通过验证的交易密文信息存储在区块链上。The blockchain verification node refers to the node used for verification in the blockchain, which is used to verify whether the transaction ciphertext information can be stored on the blockchain, and store the verified transaction ciphertext information on the blockchain.
一个或多个关联监管方节点为用于监管上述交易的监管方节点。由于监管方节点的监管对象是预先设置的,因此,根据上述交易涉及的付款方客户端节点、收款方客户端节点和交易金额对应的数字货币类型,在监管方节点中查找监管上述交易的一个或多个关联监管方节点。一个或多个关联监管方节点从区块链上获取上述交易的多个交易监管密文信息,一个或多个关联监管方节点对应的监管私钥能够解密交易监管密文信息。One or more associated supervisor nodes are supervisor nodes for supervising the above-mentioned transactions. Since the supervision object of the supervisor node is pre-set, according to the payer client node, the payee client node and the digital currency type corresponding to the transaction amount involved in the above transaction, search the supervisor node for the supervision of the above transaction. One or more associated supervisor nodes. One or more associated regulator nodes obtain multiple transaction regulatory ciphertext information of the above transaction from the blockchain, and the regulatory private key corresponding to one or more associated regulator nodes can decrypt the transaction regulatory ciphertext information.
为了关联监管方节点在保证数据隐私的情况下,能够监管交易信息的合规性和合法性,如图2所示,本申请提出了一种基于区块链的交易监管方法包括步骤201至步骤205。In order to supervise the compliance and legitimacy of the transaction information while ensuring data privacy, the associated regulator node, as shown in Figure 2, proposes a blockchain-based transaction supervision method, including
步骤201、付款方客户端节点获取交易的交易明文信息,并基于交易明文信息构造交易密文信息。
在本申请实施例中,交易涉及一个或多个关联监管方节点。示例性的,一个或关联监管节点可以包括用于监控收款方的监管方节点、用于监控付款方的监管方节点和用于监控数字货币类型的数字货币管理节点的监管方节点。In this embodiment of the application, the transaction involves one or more associated regulator nodes. Exemplarily, one or associated supervisory nodes may include supervisory nodes for monitoring payees, supervisory nodes for monitoring payers, and supervisory nodes for monitoring digital currency management nodes of digital currency types.
在本申请实施例中,依托区块链底层技术,利用数字资产账户能够直接进行交易,并将交易密文信息记录在区块链上。将交易密文信息上传至区块链后,在对交易密文信息被确认的情况下,完成本次交易。In the embodiment of this application, relying on the underlying technology of the blockchain, the digital asset account can be used to conduct transactions directly, and the transaction ciphertext information is recorded on the blockchain. After uploading the transaction ciphertext information to the blockchain, the transaction is completed when the transaction ciphertext information is confirmed.
在本申请实施例中,交易明文信息包括收款方身份信息、交易金额和付款方身份信息。交易密文信息包括加密的付款地址、收款方加密的交易金额、加密的收款地址以及付款方加密的交易金额。In the embodiment of the present application, the clear text information of the transaction includes the identity information of the payee, the transaction amount, and the identity information of the payer. The transaction ciphertext information includes the encrypted payment address, the encrypted transaction amount of the payee, the encrypted receiving address, and the encrypted transaction amount of the payer.
如此,在区块链上保存交易密文信息是根据交易明文信息得到的,对交易用户(付款方用户和收款方用户)而言,交易金额、用户账户信息、收款地址和付款地址都被保护,无法被监管方以外的用户账户得知,能够提高对用户隐私的保护程度。In this way, the transaction ciphertext information saved on the blockchain is obtained based on the transaction plaintext information. For transaction users (payer users and payee users), the transaction amount, user account information, payment address and payment address are all It is protected and cannot be known by user accounts other than the regulator, which can improve the protection of user privacy.
具体的,付款方客户端节点能够获取交易中的加密的收款地址和交易金额。交易金额为交易过程中的实际金额。在构造交易密文信息过程中,首先获取收款方客户端节点提供的收款方加密的交易金额和加密的收款地址,然后根据佩德森承诺对交易金额进行加密,得到付款方加密的交易金额,最后根据非对称密钥假名算法对付款地址进行加密得到加密的付款地址。Specifically, the payer client node can obtain the encrypted receiving address and transaction amount in the transaction. The transaction amount is the actual amount during the transaction. In the process of constructing transaction ciphertext information, first obtain the payee’s encrypted transaction amount and encrypted payment address provided by the payee’s client node, and then encrypt the transaction amount according to Pedersen’s commitment to obtain the payer’s encrypted The transaction amount, and finally encrypt the payment address according to the asymmetric key pseudonym algorithm to obtain the encrypted payment address.
需要说明的是,在交易过程中,付款方客户端节点获取的加密的收款地址,是根据非对称密钥假名算法对收款地址加密得到的。同样的,加密的付款地址也是根据上述非对称密钥假名算法对付款地址加密得到的。It should be noted that during the transaction process, the encrypted receiving address obtained by the payer client node is obtained by encrypting the receiving address according to the asymmetric key pseudonym algorithm. Similarly, the encrypted payment address is also obtained by encrypting the payment address according to the above-mentioned asymmetric key pseudonym algorithm.
还需要说明的是,收款方客户端节点可以采用上述非对称密钥假名算法对收款地址进行加密得到加密的收款地址,对于付款方客户端节点而言通过向加密的收款地址转移数字货币以完成交易。以此,切断付款方和收款方之间真实身份信息的联系,有利于保护收款方客户端节点的隐私消息。It should also be noted that the payee client node can use the above-mentioned asymmetric key pseudonym algorithm to encrypt the payment address to obtain an encrypted payment address. For the payer client node, by transferring to the encrypted payment address digital currency to complete transactions. In this way, cutting off the connection of the real identity information between the payer and the payee is conducive to protecting the private information of the payee's client node.
在本申请实施例中,非对称密钥假名算法包括两个密钥(公钥和私钥),如果用公钥对数据进行加密,只有对应的私钥才能解密。因为加密和解密使用的是两个不同的密钥,所以这种算法叫作非对称加密算法。非对称加密算法无需加密和解密的双方户交换密钥,避免密钥泄露的方向,保密性较好。非对称密钥假名算法是指通过生成新的字符替代原标识符的数据处理方式,通过哈希函数和令牌化技术生成假名的情况下,通常会额外生成一张假名与原始标识的映射表单用来还原标识符。In the embodiment of this application, the asymmetric key pseudonym algorithm includes two keys (public key and private key). If the public key is used to encrypt data, only the corresponding private key can decrypt it. Because encryption and decryption use two different keys, this algorithm is called an asymmetric encryption algorithm. The asymmetric encryption algorithm does not need to exchange keys between the two parties for encryption and decryption, avoiding the direction of key leakage, and has better confidentiality. The asymmetric key pseudonym algorithm refers to the data processing method that replaces the original identifier by generating new characters. When a pseudonym is generated through a hash function and tokenization technology, an additional mapping form between the pseudonym and the original identifier is usually generated Used to restore identifiers.
可以理解的是,非对称密钥假名算法是对一类算法的统称,具体可以采用两种哈希函数分别作为公钥和私钥,通过公钥对付款地址或收款地址进行加密,加密的付款地址或加密的收款地址,在实现交易时利用私钥进行解密,根据交易金额更新付款方用户账户或收款方用户账户的账户余额,以及更新账户交易流水等信息。非对称密钥假名算法可以为确保共享KEY安全穿越不安全网络Diffie-He l lman、迪菲-赫尔曼密钥交换的非对称加密算法E lgama l、背包算法、椭圆曲线加密算法等等,在本申请实施例中对非对称密钥假名算法采用的具体方法不做限定。It can be understood that the asymmetric key pseudonym algorithm is a general term for a class of algorithms. Specifically, two hash functions can be used as the public key and the private key respectively, and the payment address or receiving address is encrypted by the public key. The encrypted The payment address or the encrypted receiving address is decrypted with the private key when the transaction is realized, and the account balance of the payer's user account or the payee's user account is updated according to the transaction amount, and the account transaction flow and other information are updated. The asymmetric key pseudonym algorithm can ensure the security of the shared KEY through the insecure network Diffie-Hellman, the asymmetric encryption algorithm Elgamal of Diffie-Hellman key exchange, the knapsack algorithm, the elliptic curve encryption algorithm, etc., In the embodiment of this application, the specific method adopted for the asymmetric key pseudonym algorithm is not limited.
如此,对于收款地址和付款地址而言,都采用非对称密钥假名算法进行加密,即,对于区块链上的任一客户端节点无论作为付款方客户端节点,还是收款方客户端节点,只部署一套地址加密方法即可,能够提高非对称密码假名算法的利用率,还能够节约任一客户端节点的系统资源。此外,非对称密钥假名算法只有一种密钥是公开的,无需向解密方发送密钥,能够提高加密的收款地址或加密的付款地址的安全性。In this way, both the receiving address and the payment address are encrypted using an asymmetric key pseudonym algorithm, that is, for any client node on the blockchain, whether it is the payer client node or the payee client node Nodes only need to deploy a set of address encryption methods, which can improve the utilization rate of the asymmetric password pseudonym algorithm, and can also save the system resources of any client node. In addition, only one key is public in the asymmetric key pseudonymity algorithm, and there is no need to send the key to the decryption party, which can improve the security of the encrypted receiving address or encrypted payment address.
在本申请实施例中,加密的付款金额是根据佩德森承诺,以第一金额加密参数为混淆因子,对交易金额加密得到的;加密的收款金额是根据佩德森承诺,以第二金额加密参数为混淆因子,对交易金额加密得到的。其中,交易金额包括金额数量和数字货币类型,例如,100枚类型P的数字货币,20枚数字类型Q的数字货币。In the embodiment of this application, the encrypted payment amount is obtained by encrypting the transaction amount according to the Pedersen commitment with the first amount encryption parameter as the confusion factor; the encrypted collection amount is obtained according to the Pedersen commitment with the second The amount encryption parameter is an obfuscation factor obtained by encrypting the transaction amount. Among them, the transaction amount includes the amount and type of digital currency, for example, 100 digital currencies of type P, and 20 digital currencies of digital type Q.
需要说明的是,佩德森承诺是一种密码算法,它允许验证者在不暴露或无法更改某个值的情况下提交该值。在交易过程中,处理交易金额的收款方客户端节点,对于交易过程中涉及的区块链验证节点和关联监管方节点而言,交易金额是加密且不透明的。To clarify, a Pedersen Commitment is a cryptographic algorithm that allows a verifier to commit a value without exposing or being able to change it. During the transaction process, the payee client node that handles the transaction amount is encrypted and opaque to the blockchain verification nodes and associated supervisor nodes involved in the transaction process.
如此,在付款方客户端节点和收款方客户端节点,都采用佩德森承诺,以及不同的混淆因子对交易金额加密,即实现对交易金额的加密,又防止因为加密的交易金额相同导致付款方客户端节点和收款方客户端节点产生的关联关系,能够提高交易密文信息的保密程度。In this way, both the payer client node and the payee client node adopt the Pedersen commitment and different confusion factors to encrypt the transaction amount, which realizes the encryption of the transaction amount and prevents the transaction amount from being encrypted due to the same encrypted transaction amount. The association between the payer client node and the payee client node can improve the confidentiality of transaction ciphertext information.
示例性的,假设付款方客户端节点A从加密的付款地址address1存储的数字货币T,构造一笔交易至收款方客户端节点B的加密的收款地址address2。假设付款方客户端节点A在address1存储x枚数字货币T,s1为第一金额加密参数,s2为第二金额加密参数,100为交易金额。据此,付款方客户端节点构造交易密文信息为:Exemplarily, assume that the payer client node A constructs a transaction from the digital currency T stored in the encrypted payment address address1 to the encrypted payment address2 of the payee client node B. Assume that the payer client node A stores x pieces of digital currency T at address1 , s1 is the encryption parameter of the first amount, s2 is the encryption parameter of the second amount, and 100 is the transaction amount. Accordingly, the payer client node constructs the transaction ciphertext information as:
上述交易密文信息的含义为:从address1转出数量为g100×hs2(根据佩德森承诺,以s2为混淆因子,对交易金额100加密得到)的数字货币T,转入至address2,使得address1存的数字货币T的当前账户余额为:gx-100×hs1-s2(根据佩德森承诺,以s1-s2为混淆因子,对x-100为加密得到)。The meaning of the above transaction ciphertext information is: transfer the digital currency T of g100 × hs2 (obtained by encrypting the transaction amount of 100 with s2 as the confusion factor according to Pederson’s commitment) from address1 , and transfer it to address2 , so that the current account balance of the digital currency T deposited by address1 is: gx-100 × hs1-s2 (according to Pedersen's commitment, using s1-s2 as the confusion factor and encrypting x-100).
步骤202、付款方客户端节点根据了解客户KYC合约和交易密文信息,得到报送信息,并根据KYC合约中的一个或多个关联监管方节点对应的一个或多个监管公钥对报送信息加密得到一个或多个交易监管密文信息。
在本申请实施例中,了解客户/了解你的客户(Know your customer,KYC)合约是一种智能合约,具有内容公开,不可篡改、永久运行、去中心人为不可控制、去信任,可以在不信任的环境下完成交易的特点。在KYC合约中,包括约束条件和约束条件涉及的元素。In the embodiment of this application, know your customer/know your customer (KYC) contract is a kind of smart contract, which has public content, cannot be tampered with, runs forever, is uncontrollable and trustless, and can be used at any time The characteristics of completing transactions in an environment of trust. In the KYC contract, the constraints and the elements involved in the constraints are included.
可选的,在本申请实施例中,为了实现对交易的监管,KYC合约中的向量矩阵元素包括用户身份向量、监管身份向量和公钥向量;用户身份向量对应存储收款方身份信息和付款方身份信息;监管身份向量对应存储一个或多个关联监管方节点的身份信息;公钥向量对应存储收款方公钥、付款方公钥和一个或多个监管公钥。Optionally, in this embodiment of the application, in order to realize the supervision of the transaction, the vector matrix elements in the KYC contract include the user identity vector, supervision identity vector and public key vector; the user identity vector corresponds to the storage of the payee’s identity information and payment Party identity information; the supervision identity vector corresponds to store the identity information of one or more associated supervisor nodes; the public key vector corresponds to store the public key of the payee, the public key of the payer and one or more supervision public keys.
其中,用户公钥(包括收款方公钥和付款方公钥)用于对发送至收款方客户端节点或付款方客户端节点的信息加密,加密后的信息可以根据用户私钥进行解密。用户私钥可以用于对数据进行签名,并利用用户公钥对签名的数据进行验证。监管公钥与用户公钥类似,用于对发送至关联监管方节点的信息进行加密,加密后的信息可以根据监管私钥进行解密。监管私钥可以用于对数据进行签名,并利用监管公钥对签名的数据进行验证。数字货币合约地址用于记录交易涉及的数字货币所需遵循的智能合约信息,如,交易金额、交易时间等等。Among them, the user's public key (including the payee's public key and the payer's public key) is used to encrypt the information sent to the payee's client node or the payer's client node, and the encrypted information can be decrypted according to the user's private key . The user's private key can be used to sign data, and the user's public key can be used to verify the signed data. The supervision public key is similar to the user public key, and is used to encrypt the information sent to the associated supervisor node, and the encrypted information can be decrypted according to the supervision private key. The supervisory private key can be used to sign data, and the supervisory public key can be used to verify the signed data. The digital currency contract address is used to record the smart contract information that the digital currency involved in the transaction needs to follow, such as transaction amount, transaction time, etc.
在本申请实施例中,一个或多个关联监管方节点中的任一关联监管方节点,具有监管以下至少一个交易相关的监管对象的权限:付款方客户端,收款方客户端,以及交易金额所属的数字货币类型。也就是说,对于交易的任一关联监管方节点而言,可能监管一个监管对象,也可能监管两个监管对象,还可能监管三个监管对象。In the embodiment of this application, any one of the one or more associated supervisor nodes has the authority to supervise at least one of the following transaction-related supervision objects: payer client, payee client, and transaction The digital currency type that the amount belongs to. That is to say, for any associated supervisor node of the transaction, it is possible to supervise one supervision object, two supervision objects, or three supervision objects.
需要说明的是,任一关联监管方节点不是点对点的监管其他监管节点,而是监管一条交易中的全量信息。交易中的全量信息,是指交易涉及的付款方、收款方、数字货币类型和交易金额。It should be noted that any associated supervisor node does not supervise other supervisor nodes peer-to-peer, but supervises the full amount of information in a transaction. The full amount of information in the transaction refers to the payer, payee, digital currency type and transaction amount involved in the transaction.
示例性的,在交易过程中,第一客户向第二客户支付第三数字货币类型的数字货币,那么用于监管第一客户的第一监管方节点可以获取本次交易的全量信息,用于监管第二客户的第二监管节点能够获本次交易的全量信息,用于监管第三数字货币类型的数字货币的第三监管方节点也能够获取本次交易的全量信息。Exemplarily, during the transaction, if the first customer pays the second customer digital currency of the third digital currency type, then the first regulator node used to supervise the first customer can obtain the full amount of information of this transaction for The second regulatory node supervising the second client can obtain the full amount of information on this transaction, and the third regulatory node used to supervise the digital currency of the third digital currency type can also obtain the full amount of information on this transaction.
需要说明的是,关联监管方节点与监管公钥是一一对应的,如果关联监管方节点相同,那么对随机对称密钥加密过程中,采用的监管公钥也相同,即第一监管公钥、第二监管公钥和第三监管公钥,可能都不相同,也可能不都相同,也可能都相同。It should be noted that there is a one-to-one correspondence between the associated supervisor node and the supervisory public key. If the associated supervisor node is the same, then the supervisory public key used in the random symmetric key encryption process is also the same, that is, the first supervisory public key 1. The second supervisory public key and the third supervisory public key may not be the same, or both may be the same, or both may be the same.
在一种情况下,第一监管公钥为数据1,第二监管公钥为数据2,第三监管公钥为数据3。In one case, the first supervisory public key is Data1, the second supervisory public key is Data2, and the third supervisory public key is Data3.
在另一种情况下,第一监管公钥为数据4,第二监管公钥和第三监管公钥都为数据5。In another case, the first supervisory public key is Data4, and both the second supervisory public key and the third supervisory public key are Data5.
在再一种情况下,第一监管公钥、第二监管公钥和第三监管公钥都为数据6。In another case, the first supervision public key, the second supervision public key and the third supervision public key are all data 6 .
如此,通过KYC合约记录交易所需的规则,对交易进行约束,以便于对交易的上链确认和监管,提高交易的可靠性。In this way, through the KYC contract to record the rules required for the transaction, the transaction is constrained, so as to facilitate the confirmation and supervision of the transaction on the chain, and improve the reliability of the transaction.
可选的,在本申请实施例中,如图3所示,上述步骤202中的根据了解客户KYC合约和交易密文信息,得到报送信息可以通过下述步骤301至步骤303实现。Optionally, in this embodiment of the application, as shown in FIG. 3 , obtaining the submission information in the
步骤301、付款方客户端节点根据付款方私钥,对加密的付款地址进行签名,得到签名付款地址。
在本申请实施例中,在传输和解密过程中,通过签名方式得到的签名付款地址,能够保证付款地址的安全性,还能使得区块链验证节点明确该签名付款地址的付款方,使得区块链验证节点对信息进行验证,确认解密过程没有产生错误,即区块链验证节点接收到的加密的付款地址与付款方客户端节点发送的加密的付款地址相同。In the embodiment of this application, in the process of transmission and decryption, the signed payment address obtained through the signature method can ensure the security of the payment address, and also enable the blockchain verification node to clarify the payer of the signed payment address, so that the district The block chain verification node verifies the information and confirms that there is no error in the decryption process, that is, the encrypted payment address received by the block chain verification node is the same as the encrypted payment address sent by the payer client node.
步骤302、付款方客户端节点获取加密的收款地址对应的签名收款地址,签名收款地址是根据收款方私钥对加密的收款地址进行签名得到的。
在本申请实施例中,与上述步骤201类似,在传输和解密过程中,签名收款地址能够保证收款地址的安全性,还能使得区块链验证节点明确该签名收款地址的收款方,使得区块链验证节点对信息进行验证,确认解密过程没有产生错误,即区块链验证节点接收到的加密的收款地址与收款方客户端节点发送的加密的收款地址相同。In the embodiment of this application, similar to the
步骤303、付款方客户端节点合并付款位置信息、收款位置信息、数字货币合约地址位置信息、签名付款地址、签名收款地址、第一金额加密参数,以及交易金额,生成报送信息。
在本申请实施例中,付款位置信息是指KYC合约中付款方客户端节点对应的付款方公钥的位置信息;收款位置信息是指KYC合约中收款方客户端节点对应的收款方公钥的位置信息,收款方客户端节点为与交易的收款方对应的客户端节点;数字货币合约地址位置是指KYC合约中交易金额所属的数字货币类型对应的数字货币合约地址的位置信息;第一金额加密参数用于对交易金额加密得到付款方加密的交易金额。In the embodiment of this application, the payment location information refers to the location information of the payer public key corresponding to the payer client node in the KYC contract; the collection location information refers to the payee corresponding to the payee client node in the KYC contract The location information of the public key, the payee client node is the client node corresponding to the payee of the transaction; the location of the digital currency contract address refers to the location of the digital currency contract address corresponding to the digital currency type of the transaction amount in the KYC contract Information; the first amount encryption parameter is used to encrypt the transaction amount to obtain the encrypted transaction amount of the payer.
在本申请实施例中,报送信息包括涉及交易的部分信息,涉及交易的KYC合约中的部分信息。In the embodiment of this application, the reported information includes part of the information related to the transaction, and part of the information related to the KYC contract of the transaction.
示例性的,假设付款方客户端节点A从加密的付款地址address1存储的数字货币T,构造一笔交易至收款方客户端节点B的加密的收款地址address2。在上述示例的基础上,生成的报送信息为:Exemplarily, assume that the payer client node A constructs a transaction from the digital currency T stored in the encrypted payment address address1 to the encrypted payment address2 of the payee client node B. Based on the above example, the generated reporting information is:
info=[i,j,index,sign skA(address1),sign skB(address2),s1,100]info=[i, j, index, sign skA (address1 ), sign skB (address2 ), s1, 100]
其中,i为付款位置信息,j为收款位置信息,index为数字货币T的数字货币合约地址位置,sign skA(address1)为签名付款地址,sign skB(address2)为签名收款地址,s1为第一金额加密参数,100为交易金额。Among them, i is the payment location information, j is the payment location information, index is the digital currency contract address location of the digital currency T, sign skA (address1 ) is the signature payment address, and sign skB (address2 ) is the signature collection address, s1 is the encrypted parameter of the first amount, and 100 is the transaction amount.
如此,将与交易相关的签名付款地址、签名收款地址、第一金额加密参数和交易金额,与KYC合约相关的付款位置信息、收款位置信息、数字货币合约地址位置信息,进行合并生成报送信息,使得报送信息包括交易涉及的全部信息,并且使得通过报送信息能够确认交易是否正确、完整且合法,以此提高验证和完成交易的速度。In this way, the signature payment address, signature receipt address, first amount encryption parameters and transaction amount related to the transaction, the payment location information related to the KYC contract, the payment location information, and the digital currency contract address location information are combined to generate a report. Send information, so that the submitted information includes all the information involved in the transaction, and make it possible to confirm whether the transaction is correct, complete and legal through the submitted information, so as to improve the speed of verification and completion of the transaction.
进一步可选的,在本申请实施例中,在图3的基础上,如图4所示,上述步骤202中的根据KYC合约中的多个监管公钥对报送信息加密得到多个交易监管密文信息,可以通过下述步骤401实现。Further optionally, in the embodiment of this application, on the basis of Figure 3, as shown in Figure 4, in the
步骤401、付款方客户端节点根据第一监管公钥、第二监管公钥和第三监管公钥,分别对报送信息加密,得到一个或多个交易监管密文信息。
在本申请实施例中,一个或多个监管公钥包括:第一监管公钥、第二监管公钥和第三监管公钥;第一监管公钥对应的关联监管方节点,用于监管付款方客户端节点,第二监管公钥对应的关联监管方节点,用于监管收款方客户端节点,第三监管公钥对应的关联监管方节点,用于监管交易金额所属的数字货币类型的数字货币管理节点。第一监管公钥为KYC合约中付款位置信息对应的监管公钥;第二监管公钥为KYC合约中收款位置信息对应的监管公钥;第三监管公钥为KYC合约中数字货币合约地址位置对应的监管公钥。In this embodiment of the application, one or more regulatory public keys include: the first regulatory public key, the second regulatory public key, and the third regulatory public key; the associated regulatory node corresponding to the first regulatory public key is used to supervise payment Party client node, the associated supervisor node corresponding to the second supervisory public key is used to supervise the payee client node, and the associated supervisor node corresponding to the third supervisory public key is used to supervise the digital currency type to which the transaction amount belongs Digital currency management node. The first supervision public key is the supervision public key corresponding to the payment location information in the KYC contract; the second supervision public key is the supervision public key corresponding to the payment location information in the KYC contract; the third supervision public key is the digital currency contract address in the KYC contract The supervisory public key corresponding to the location.
可以理解的是,交易涉及的交易双方(付款方和收款方)对应的关联监管方,以及交易金额对应的关联监管方,根据上述关联监管对应的监管公钥分别对报送信息加密,得到一个或多个交易监管密文信息。It is understandable that the associated regulatory party corresponding to the transaction parties (payer and payee) involved in the transaction, and the associated regulatory party corresponding to the transaction amount, respectively encrypt the submitted information according to the supervision public key corresponding to the above-mentioned associated supervision, and obtain One or more transaction regulatory ciphertext information.
示例性的,假设付款方客户端节点A从加密的付款地址address1存储的数字货币T,构造一笔交易至收款方客户端节点B的加密的收款地址address2。在上述示例的基础上,多个交易监管密文信息可以记录在同一个向量中,多个交易监管密文信息为:Exemplarily, assume that the payer client node A constructs a transaction from the digital currency T stored in the encrypted payment address address1 to the encrypted payment address2 of the payee client node B. Based on the above example, multiple transaction supervision ciphertext information can be recorded in the same vector, and the multiple transaction supervision ciphertext information is:
metadata=[Enc cbpkM(info),Enc cbpkN(info),Enc cbpkp(info)]metadata=[Enc cbpkM (info), Enc cbpkN (info), Enc cbpkp (info)]
其中,cbpkM为第一监管公钥,Enc cbpkM(info)为根据第一监管公钥对报送信息加密得到的交易监管密文信息,cbpkN为第二监管公钥,Enc cbpkN(info)为根据第二监管公钥对报送信息加密得到的交易监管密文信息,cbpkP为第三监管公钥,Enc cbpkP(info)为根据第三监管公钥对报送信息加密得到的交易监管密文信息。Among them, cbpkM is the first supervision public key, Enc cbpkM (info) is the transaction supervision ciphertext information obtained by encrypting the submitted information according to the first supervision public key, cbpkN is the second supervision public key, Enc cbpkN ( info) is the transaction supervision ciphertext information obtained by encrypting the submitted information according to the second supervisory public key, cbpkP is the third supervisory public key, and Enc cbpkP (info) is obtained by encrypting the submitted information according to the third supervisory public key The transaction supervision ciphertext information.
如此,多个交易监管密文信息中存在一个交易监管密文信息,能够被交易涉及的交易双方(付款方和收款方)对应的关联监管方,以及交易金额对应的关联监管方中的任一关联监管方解密,以此,确保关联监管方节点能够解密发送至区块链的多个交易监管密文信息中的某一个交易监管密文信息,以便于对交易监管密文信息进行监管。In this way, there is one transaction supervision ciphertext information in multiple transaction supervision ciphertext information, which can be used by the associated regulators corresponding to the transaction parties (payer and payee) involved in the transaction, and any of the associated regulators corresponding to the transaction amount. An associated regulator decrypts, thereby ensuring that the associated regulator node can decrypt a certain transaction regulatory ciphertext information among multiple transaction regulatory ciphertext information sent to the blockchain, so as to supervise the transaction regulatory ciphertext information.
步骤203、付款方客户端节点将交易密文信息、一个或多个交易监管密文信息和零知识证明,发送至区块链。
在本申请实施例中,零知识证明用于证明报送信息是否为正确且完整。In the embodiment of this application, zero-knowledge proof is used to prove whether the submitted information is correct and complete.
在本申请实施例中,零知识证明包括以下至少一项:第一金额加密参数、付款方加密的交易金额和佩德森承诺,用于验证报送信息中的交易金额大于或等于0,并且,付款地址中账户余额大于或等于交易金额;付款方公钥和签名付款地址,用于验证付款位置信息是否正确;收款方公钥和签名付款地址,用于验证收款位置信息是否正确;第一监管公钥、第二监管公钥、第三监管公钥和多个交易监管密文信息,用于验证多个交易监管密文信息中的每个交易监管密文对应的报送信息相同,验证每个交易监管密文信息正确。In the embodiment of the present application, the zero-knowledge proof includes at least one of the following: the first amount encryption parameter, the transaction amount encrypted by the payer, and the Pedersen commitment, which are used to verify that the transaction amount in the submitted information is greater than or equal to 0, and , the account balance in the payment address is greater than or equal to the transaction amount; the payer’s public key and signature payment address are used to verify whether the payment location information is correct; the payee’s public key and signature payment address are used to verify whether the payment location information is correct; The first supervision public key, the second supervision public key, the third supervision public key and multiple transaction supervision ciphertext information are used to verify that the reporting information corresponding to each transaction supervision ciphertext in the multiple transaction supervision ciphertext information is the same , to verify that the regulatory ciphertext information for each transaction is correct.
在第一种示例中,佩德森承诺意味着可以验证的和是相等的,即,对交易金额加密,使得区块链验证节点能够验证交易是否违规创造或销毁了资金。基于上述示例,如果并且,info[6]>=0,也就是,收款方加密的交易金额g100×hs2与付款方加密的交易金额g100×hs1是否相等,以及报送信息中的第七个向量是否大于或等于0。其中,收款方加密的交易金额g100×hs2为:根据佩德森承诺,以s2为混淆因子,对交易金额100加密得到的。付款方加密的交易金额g100×hs1为:根据佩德森承诺,以报送信息中的第六个向量(s1)为混淆因子,对报送信息中的第七个向量(100)加密得到的。通过证明上述两个加密的交易金额相同,即可以验证报送信息中的交易金额大于或等于0,并且,付款地址中的账户余额大于获得等于交易金额。In the first example, a Pedersen commitment means that verifiable sums are equal, i.e., the transaction amounts are encrypted such that blockchain validating nodes can verify whether the transaction illegally created or destroyed funds. Based on the above example, if And, info[6]>=0, that is, whether the encrypted transaction amount g100 ×hs2 of the payee is equal to the encrypted transaction amount g100 ×hs1 of the payer, and the seventh vector in the submitted information Is it greater than or equal to 0. Among them, the transaction amount g100 × hs2 encrypted by the payee is obtained by encrypting the transaction amount 100 according to Pedersen's commitment and using s2 as the confusion factor. The transaction amount encrypted by the payer g100 ×hs1 is: According to the Pedersen commitment, the sixth vector (s1) in the submitted information is used as the confusion factor to encrypt the seventh vector (100) in the submitted information owned. By proving that the above two encrypted transaction amounts are the same, it can be verified that the transaction amount in the submitted information is greater than or equal to 0, and the account balance in the payment address is greater than or equal to the transaction amount.
在第二种示例中,在KYC合约中,查找付款位置信息对应的付款方公钥,如果付款位置信息对应的付款方公钥能够解密签名付款地址,那么验证付款位置信息正确。基于上述示例,可以采用的验证公式为:checksig(KYC_info[0][info[0]],address1,info[3])=True,其中,KYC_info[0][info[0]]为KYC合约中付款位置信息对应的付款方公钥,address1为加密的付款地址,info[3]为签名付款地址。上述验证公式可以根据报送信息中的付款位置信息对应的付款方公钥,对签名付款地址进行解密,如果能够得到加密的付款地址,那么验证付款位置信息正确。In the second example, in the KYC contract, look up the payer public key corresponding to the payment location information, and if the payer public key corresponding to the payment location information can decrypt the signed payment address, then verify that the payment location information is correct. Based on the above example, the verification formula that can be used is: checksig(KYC_info[0][info[0]],address1 ,info[3])=True, where KYC_info[0][info[0]] is the KYC contract The public key of the payer corresponding to the payment location information, address1 is the encrypted payment address, and info[3] is the signature payment address. The above verification formula can decrypt the signed payment address according to the payer's public key corresponding to the payment location information in the submitted information. If the encrypted payment address can be obtained, then the payment location information is verified to be correct.
在第三种示例中,在KYC合约中,查找收款位置信息对应的收款方公钥,如果收款位置信息对应的收款方公钥能够解密签名收款地址,那么验证收款位置信息正确。基于上述示例,可以采用的验证公式为:checksig(KYC_info[0][info[1]],address1,info[4])=True,其中,KYC_info[0][info[1]]为KYC合约中收款位置信息对应的收款方公钥,address2为加密的收款地址,info[3]为签名收款地址。上述验证公式可以根据报送信息中的收款位置信息对应的收款方公钥,对签名收款地址进行解密,如果能够得到加密的收款地址,那么验证收款位置信息正确。In the third example, in the KYC contract, find the payee’s public key corresponding to the receiving location information, and if the payee’s public key corresponding to the receiving location information can decrypt the signature receiving address, then verify the receiving location information correct. Based on the above example, the verification formula that can be used is: checksig(KYC_info[0][info[1]],address1 ,info[4])=True, where KYC_info[0][info[1]] is the KYC contract The public key of the payee corresponding to the receiving location information in , address2 is the encrypted receiving address, and info[3] is the signed receiving address. The above verification formula can decrypt the signature receiving address according to the payee's public key corresponding to the receiving location information in the submitted information. If the encrypted receiving address can be obtained, then verify that the receiving location information is correct.
在第四种示例中,在KYC合约中,查找付款位置信息对应的第一监管公钥、收款位置信息对应的第二监管公钥、数字货币合约地址位置信息对应的第三监管公钥,对报送信息加密得到三个交易监管密文信息,以此,验证多个交易监管密文信息中的每个交易监管密文对应的报送信息相同,以及验证每个交易监管密文信息正确。基于上述示例,在多个交易监管密文信息中分别为metadata[0]=Enc(KYC_info[1][KYC_info[0][info[0]]],info),metadata[1]=Enc(KYC_info[1][KYC_info[0][info[1]]],info)和metadata[2]=Enc(KYC_info[3][KYC_info[2][info[2]]],info)。首先,根据报送信息中的付款位置信息、收款位置信息、数字货币合约地址位置信息,查找对应的第一监管公钥、第二监管公钥和第三监管公钥,验证报送信息与各个交易监管密文信息是否一致,每个交易监管密文信息都与报送信息一致,即报送正确的情况下,比较各个交易监管密文信息分别对应的三个报送信息是否相同,在三个报送信息相同的情况下,通过验证。In the fourth example, in the KYC contract, search for the first supervision public key corresponding to the payment location information, the second supervision public key corresponding to the payment location information, and the third supervision public key corresponding to the digital currency contract address location information, Encrypt the submitted information to obtain three transaction supervision ciphertext information, so as to verify that the submission information corresponding to each transaction supervision ciphertext among multiple transaction supervision ciphertext information is the same, and verify that each transaction supervision ciphertext information is correct . Based on the above example, in multiple transaction supervision ciphertext information, metadata[0]=Enc(KYC_info[1][KYC_info[0][info[0]]],info), metadata[1]=Enc(KYC_info [1][KYC_info[0][info[1]]],info) and metadata[2]=Enc(KYC_info[3][KYC_info[2][info[2]]],info). First, according to the payment location information, payment location information, and digital currency contract address location information in the submitted information, find the corresponding first supervision public key, second supervision public key, and third supervision public key, and verify that the submitted information is consistent with Whether the ciphertext information of each transaction supervision is consistent, and the ciphertext information of each transaction supervision is consistent with the submitted information, that is, if the submission is correct, compare whether the three submitted information corresponding to each transaction supervision ciphertext information are the same. If the three submitted information are the same, the verification is passed.
可以理解的是,付款方客户端节点构建的零知识证明,其公共输入包括交易密文信息、KYC合约中与上述报送信息相关联的合约信息、多个交易监管密文信息,私有输入为报送信息,通过比对公共输入和私有输入的信息,证明报送信息是否为正确且完整。It is understandable that the public input of the zero-knowledge proof constructed by the payer client node includes transaction ciphertext information, contract information associated with the above submitted information in the KYC contract, and multiple transaction regulatory ciphertext information. The private input is Submitted information, by comparing the public input and private input information, to prove whether the submitted information is correct and complete.
如此,通过零知识证明和佩德森承诺,无需交易明文区块链验证节点即可验证交易密文信息和多个交易监管密文信息的正确性和完整性。由于区块链上存储的交易相关信息不可篡改,以此确保区块链上存储的交易相关信息的正确性和完整性,同时还能够节约区块链上的存储资源。In this way, through zero-knowledge proof and Pedersen commitment, the correctness and integrity of transaction ciphertext information and multiple transaction supervision ciphertext information can be verified without the need for transaction plaintext blockchain verification nodes. Since the transaction-related information stored on the blockchain cannot be tampered with, this ensures the correctness and integrity of the transaction-related information stored on the blockchain, and at the same time saves storage resources on the blockchain.
步骤204、区块链验证节点在根据交易密文信息,KYC合约和一个或多个交易监管密文信息,验证零知识证明成立的情况下,将交易密文信息和一个或多个交易监管密文信息存储至区块链。
在本申请实施例中,区块链验证节点为区块链上针对上链数据信息进行验证的节点,对于通过验证之后的数据信息,才能够存储在区块链上。In the embodiment of the present application, the blockchain verification node is a node on the blockchain that verifies the data information on the chain, and only the data information that passes the verification can be stored on the blockchain.
在本申请实施例中,区块链验证节点根据零知识证明的验证目标,预先设置的验证程序,将交易密文信息,KYC合约和一个或多个交易监管密文信息输入该验证程序,即可得出零知识证明是否成立的结论。In the embodiment of this application, the blockchain verification node inputs the transaction ciphertext information, KYC contract and one or more transaction regulatory ciphertext information into the verification program according to the verification goal of the zero-knowledge proof and the pre-set verification program, namely It can be concluded whether the zero-knowledge proof is valid.
在本申请实施例中,将一个或多个交易监管密文信息存储至区块链之后,该交易密文信息和一个或多个交易监管密文信息能够被查看,但是,与该交易相关的付款方、收款方式或者关联监管方才能对交易监管密文信息解密,得到交易明文信息。In the embodiment of this application, after one or more transaction supervision ciphertext information is stored in the block chain, the transaction ciphertext information and one or more transaction supervision ciphertext information can be viewed, however, the transactions related Only the payer, payment method or related supervisor can decrypt the transaction supervision ciphertext information and obtain the transaction plaintext information.
步骤205、一个或多个关联监管方节点中的每个关联监管节点从区块链获取一个或多个交易监管密文信息,并根据监管私钥对一个或多个交易监管密文信息进行解密,得到并监管报送信息。
在本申请实施例中,关联监管方节点按照预置周期从区块链上获取一个或多个交易监管密文信息,一个或多个交易监管密文信息对应同一个交易。如果关联监管方节点的监管私钥能够解密一个或多个交易监管密文信息。关联监管节点对应的监管私钥,只能解密根据与监管私钥构成一个密钥对的监管公钥加密的交易监管密文信息,因此,根据监管私钥解密得到的报送信息对应的交易,一定涉及该关联监管方节点。In the embodiment of this application, the associated regulator node obtains one or more transaction supervision ciphertext information from the blockchain according to a preset cycle, and one or more transaction supervision ciphertext information corresponds to the same transaction. If the supervision private key of the associated supervisor node can decrypt one or more transaction supervision ciphertext information. The regulatory private key corresponding to the associated regulatory node can only decrypt the transaction regulatory ciphertext information encrypted by the regulatory public key that forms a key pair with the regulatory private key. Therefore, the transaction corresponding to the reported information obtained by decrypting the regulatory private key, The associated supervisor node must be involved.
在本申请实施例中,如果关联监管方节点用于监管交易密文信息涉及的付款方信息监管报送信息,那么监管报送信息包括:提取报送信息中涉及的付款方信息(付款位置信息和签名付款地址),获取KYC合约中付款位置信息对应的付款方公钥,根据付款方公钥验证签名付款地址是真实有效的,以此,对付款方身份进行确认。In the embodiment of this application, if the associated regulator node is used to supervise the payer information involved in the transaction ciphertext information, then the supervision and reporting information includes: extracting the payer information (payment location information) involved in the reporting information and signature payment address), obtain the payer public key corresponding to the payment location information in the KYC contract, and verify that the signature payment address is true and valid according to the payer public key, so as to confirm the identity of the payer.
在本申请实施例中,如果关联监管方节点用于监管交易密文信息涉及的收款方信息,监管报送信息包括:提取报送信息中涉及的收款方信息(收款位置信息和签名收款地址),获取KYC合约中收款位置信息对应的收款方公钥,根据收款方公钥验证签名收款地址是真实有效的,以此,对收款方身份进行确认。In the embodiment of this application, if the associated supervisor node is used to supervise the payee information involved in the transaction ciphertext information, the supervisory submission information includes: extracting the payee information involved in the submission information (receipt location information and signature Receipt address), obtain the public key of the payee corresponding to the location information of the payee in the KYC contract, and verify that the signature receipt address is true and valid according to the public key of the payee, so as to confirm the identity of the payee.
具体的,如果关联监管方节点用于监管交易密文信息涉及的数字货币信息,监管报送信息包括:提取报送信息中涉及的数字货币信息(数字货币合约地址位置信息、金额加密合约和第一金额加密参数),获取KYC合约中数字货币合约地址位置信息对应的金额加密合约,根据金额加密合约验证交易金额对应的数字货币类型是真实有效的,以此,对数字货币类型进行确认。Specifically, if the associated regulator node is used to supervise the digital currency information involved in the transaction ciphertext information, the regulatory submission information includes: extracting the digital currency information involved in the submitted information (digital currency contract address location information, amount encryption contract and the first Amount encryption parameter), obtain the amount encryption contract corresponding to the location information of the digital currency contract address in the KYC contract, and verify that the digital currency type corresponding to the transaction amount is true and valid according to the amount encryption contract, so as to confirm the digital currency type.
可选的,在本申请实施例中,关联监管方节点在报送信息通过验证的情况下,对报送信息中的交易密文信息进行签名,并将签名交易密文信息发送至区块链。如果接收到一个或多个关联监管节点中的每个关联监管节点发送签名交易密文信息,标识该交易已经通过关联监管方节点的监管。Optionally, in the embodiment of this application, when the submitted information passes the verification, the associated regulator node signs the transaction ciphertext information in the submitted information, and sends the signed transaction ciphertext information to the blockchain . If the signature transaction ciphertext information sent by each of the one or more associated regulatory nodes is received, it is identified that the transaction has passed the supervision of the associated regulatory node.
示例性的,如图5所示,示例性的,假设付款方客户端节点A从加密的付款地址address1存储的数字货币T,构造一笔交易至收款方客户端节点B的加密的收款地址address2。假设付款方客户端节点A在address1存储x枚数字货币T,s1为第一金额加密参数,s2为第二金额加密参数,100为交易金额。将上述交易发送至区块链,在区块链验证节点对交易进行验证后,继续完成本次交易,并将交易相关的交易密文信息和一个或多个签名交易密文信息存储至区块链,关联监管方节点从区块链上获取一个或多个交易密文信息,并根据监管私钥对一个或多个交易监管密文信息进行解密,得到并监管报送信息。Exemplarily, as shown in Figure 5, as an example, assume that the payer client node A constructs a transaction from the digital currency T stored in the encrypted payment address address1 to the payee client node B. Payment address address2 . Assume that the payer client node A stores x pieces of digital currency T at address1 , s1 is the encryption parameter of the first amount, s2 is the encryption parameter of the second amount, and 100 is the transaction amount. Send the above transaction to the blockchain, after the blockchain verification node verifies the transaction, continue to complete the transaction, and store the transaction-related transaction ciphertext information and one or more signature transaction ciphertext information in the block Chain, the associated supervisor node obtains one or more transaction ciphertext information from the blockchain, and decrypts one or more transaction supervision ciphertext information according to the supervisory private key, and obtains and supervises the submission information.
如此,通过付款方客户端节点构建交易密文信息保证交易信息的隐秘性,能够保障区块链上存储的交易信息对隐私信息的保护程度。根据KYC合约和零知识证明,证明加密多个交易监管密文信息所依据的报送信息正确且完整,能够确保关联监管方节点所监管的多个交易监管密文信息正确且完整,以此,避免关联监管方节点监管无效多个交易监管密文信息浪费关联监管方节点的系统资源。另外,由于多个交易监管密文信息是根据交易涉及到的所有关联监管节点对应的监管公钥加密得到的,因此,各个关联监管方节点通过监管私钥能够获取相应的目标交易监管信息,并且,目标交易监管信息属于关联监管方节点能够监管的信息,而无法获取到报送信息中非自身监管的信息,能够提高关联监管节点的监管效率。而且,报送信息中的相关监管信息只会由对应的关联监管节点获取到,其他监管节点则无法获取到,因而提高了交易信息的安全性。In this way, the confidentiality of the transaction information is guaranteed by constructing the transaction ciphertext information through the payer client node, which can guarantee the degree of protection of the transaction information stored on the blockchain to the private information. According to the KYC contract and zero-knowledge proof, it is proved that the submitted information based on the encryption of multiple transaction supervision ciphertext information is correct and complete, which can ensure that the multiple transaction supervision ciphertext information supervised by the associated regulator node is correct and complete. In this way, Avoid the invalid supervision of the associated regulator node. Multiple transaction regulatory ciphertext information wastes the system resources of the associated regulator node. In addition, since multiple transaction supervision ciphertext information is encrypted according to the supervision public key corresponding to all associated supervision nodes involved in the transaction, each associated supervisor node can obtain the corresponding target transaction supervision information through the supervision private key, and , the target transaction supervision information belongs to the information that can be supervised by the associated regulator node, but the information that is not self-supervised in the submitted information cannot be obtained, which can improve the supervision efficiency of the associated supervisory node. Moreover, the relevant regulatory information in the submitted information can only be obtained by the corresponding associated regulatory node, and other regulatory nodes cannot obtain it, thus improving the security of transaction information.
上述主要从系统方法的角度对本公开实施例的方案进行了介绍。从单侧方法的角度来说,如果应用于付款方客户端节点,该方法包括:付款方客户端节点获取交易的交易明文信息,并基于交易明文信息构造交易密文信息,交易涉及一个或多个关联监管方节点;根据了解客户KYC合约和交易密文信息,得到报送信息,并根据KYC合约中一个或多个关联监管方节点对应的一个或多个监管公钥分别对报送信息加密得到一个或多个交易监管密文信息;将交易密文信息、一个或多个交易监管密文信息和零知识证明,发送至区块链,零知识证明用于证明报送信息是否为正确且完整,以使得在零知识证明被验证成立的情况下,一个或多个交易监管密文信息被对应的关联监管方节点解密并监管。The foregoing mainly introduces the solutions of the embodiments of the present disclosure from the perspective of a system method. From the perspective of one-sided method, if it is applied to the payer client node, the method includes: the payer client node obtains the transaction plaintext information of the transaction, and constructs the transaction ciphertext information based on the transaction plaintext information. The transaction involves one or more Associated regulator nodes; get the submission information according to the customer’s KYC contract and transaction ciphertext information, and encrypt the submitted information according to one or more supervisory public keys corresponding to one or more associated regulator nodes in the KYC contract Obtain one or more transaction supervision ciphertext information; send the transaction ciphertext information, one or more transaction supervision ciphertext information and zero-knowledge proof to the blockchain, and the zero-knowledge proof is used to prove whether the submitted information is correct and Integrity, so that when the zero-knowledge proof is verified, one or more transaction supervision ciphertext information is decrypted and supervised by the corresponding associated supervisor node.
如此,通过付款方客户端节点构建交易密文信息保证交易信息的隐秘性,能够保障区块链上存储的交易信息对隐私信息的保护程度。根据KYC合约和零知识证明,证明加密一个或多个交易监管密文信息所依据的报送信息正确且完整,能够确保关联监管方节点所监管的报送信息正确且完整,以此,在数据传输过程中增加对加密的报送信息(一个或多个交易监管密文信息)的隐私信息的保护程度,同时,能够确保关联监管方节点解密得到的报送信息的准确性。In this way, the confidentiality of the transaction information is guaranteed by constructing the transaction ciphertext information through the payer client node, which can guarantee the degree of protection of the transaction information stored on the blockchain to the private information. According to the KYC contract and zero-knowledge proof, it is proved that the submitted information based on the encryption of one or more transaction regulatory ciphertext information is correct and complete, which can ensure that the submitted information supervised by the associated regulator node is correct and complete. In this way, in the data During the transmission process, the degree of protection of the privacy information of the encrypted reporting information (one or more transaction supervision ciphertext information) is increased, and at the same time, the accuracy of the reporting information obtained by decrypting the associated regulatory node can be ensured.
从单侧方法的角度来说,如果应用于一个或多个关联监管方节点中的每个关联监管方节点,该方法包括:从区块链获取一个或多个交易监管密文信息,一个或多个交易监管密文信息是付款方客户节点根据了解客户KYC合约中的一个或多个关联监管方节点对应的一个或多个监管公钥对报送信息加密得到,报送信息是根据KYC合约和交易密文信息得到的,交易密文信息是基于交易明文构造的,交易涉及多个关联监管方节点;根据监管私钥对一个或多个交易监管密文信息进行解密,得到并监管报送信息。From the perspective of a one-sided approach, if applied to each of the one or more associated supervisor nodes, the method includes: obtaining one or more transaction supervision ciphertext information from the blockchain, one or more Multiple transaction regulatory ciphertext information is obtained by the payer client node encrypting the submitted information according to one or more regulatory public keys corresponding to one or more associated regulatory node nodes in the customer KYC contract. The submitted information is based on the KYC contract and the transaction ciphertext information, the transaction ciphertext information is constructed based on the transaction plaintext, and the transaction involves multiple associated regulator nodes; according to the supervision private key, one or more transaction supervision ciphertext information is decrypted, obtained and supervised and submitted information.
如此,由于一个或多个交易监管密文信息是根据交易涉及到的所有关联监管节点对应的监管公钥加密得到的,因此,各个关联监管方节点通过监管私钥能够解密相应的交易监管密文信息,而报送信息中包括关联监管信息中需要监管的信息,能够提高关联监管节点的监管效率。而且,报送信息只会由对应的关联监管节点获取到,其他非关联监管节点则无法获取到,因而提高了交易相关信息的安全性。In this way, since one or more transaction supervision ciphertext information is encrypted according to the supervision public key corresponding to all associated supervision nodes involved in the transaction, each associated supervisor node can decrypt the corresponding transaction supervision ciphertext through the supervision private key information, and the submitted information includes the information that needs to be supervised in the related supervision information, which can improve the supervision efficiency of the related supervision nodes. Moreover, the reporting information can only be obtained by the corresponding associated regulatory nodes, and other non-associated regulatory nodes cannot, thus improving the security of transaction-related information.
可以理解的是,基于区块链的交易监管装置为了实现上述功能,其包含了执行各个功能相应的硬件结构和软件模块中的至少一个。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本公开能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本公开的范围。It can be understood that, in order to realize the above-mentioned functions, the blockchain-based transaction supervision device includes at least one of corresponding hardware structures and software modules for performing various functions. Those skilled in the art should easily realize that the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software in combination with the units and algorithm steps of the examples described in the embodiments disclosed herein. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementation should not be considered beyond the scope of the present disclosure.
本公开实施例可以根据上述方法示例对基于区块链的交易监管装置进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本公开实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present disclosure can divide the functional units of the transaction supervision device based on the blockchain according to the above method example, for example, each functional unit can be divided corresponding to each function, or two or more functions can be integrated into one processing in the unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of the units in the embodiment of the present disclosure is schematic, and is only a logical function division, and there may be another division manner in actual implementation.
图6为本申请实施例提供的一种基于区块链的交易监管系统的结构示意图。参照图6所示,本公开实施例提供的基于区块链的交易监管系统,包括:付款方客户端节点601、区块链验证节点602和关联监管方节点603;FIG. 6 is a schematic structural diagram of a blockchain-based transaction supervision system provided by an embodiment of the present application. Referring to Figure 6, the blockchain-based transaction supervision system provided by the embodiment of the present disclosure includes: a
付款方客户端节点601,用于付款方客户端节点获取交易的交易明文信息,并基于交易明文信息构造交易密文信息,交易涉及一个或多个关联监管方节点;根据了解客户KYC合约和交易密文信息,得到报送信息,并根据KYC合约中一个或多个关联监管方节点对应的一个或多个监管公钥分别对报送信息加密得到一个或多个交易监管密文信息;将交易密文信息、一个或多个交易监管密文信息和零知识证明,发送至区块链,零知识证明用于证明报送信息是否为正确且完整;The
区块链验证节点602,用于在根据交易密文信息,KYC合约和一个或多个交易监管密文信息,验证零知识证明成立的情况下,将交易密文信息和一个或多个交易监管密文信息存储至区块链;The
关联监管方节点603,用于从区块链获取一个或多个交易监管密文信息,一个或多个交易监管密文信息是付款方客户节点根据了解客户KYC合约中的一个或多个关联监管方节点对应的一个或多个监管公钥对报送信息加密得到,报送信息是根据KYC合约和交易密文信息得到的,交易密文信息是基于交易明文构造的,交易涉及多个关联监管方节点;根据监管私钥对一个或多个交易监管密文信息进行解密,得到并监管报送信息。The associated
图7为本申请实施例提供的一种基于区块链的交易监管装置的结构示意图之一。参照图7所示,本公开实施例提供的基于区块链的交易监管装置,应用于付款方客户端节点,包括:构造单元701、得到单元702和发送单元703;FIG. 7 is one of the structural schematic diagrams of a blockchain-based transaction supervision device provided by the embodiment of the present application. Referring to Figure 7, the block chain-based transaction supervision device provided by the embodiment of the present disclosure is applied to the payer client node, including: a
构造单元701,用于付款方客户端节点获取交易的交易明文信息,并基于交易明文信息构造交易密文信息,交易涉及一个或多个关联监管方节点;The
得到单元702,用于根据了解客户KYC合约和交易密文信息,得到报送信息,并根据KYC合约中一个或多个关联监管方节点对应的一个或多个监管公钥分别对报送信息加密得到一个或多个交易监管密文信息;The obtaining
发送单元703,用于将交易密文信息、一个或多个交易监管密文信息和零知识证明,发送至区块链,零知识证明用于证明报送信息是否为正确且完整,以使得在零知识证明被验证成立的情况下,一个或多个交易监管密文信息被对应的关联监管方解密并监管。The sending
可选的,上述基于区块链的交易监管装置中,交易明文信息包括收款方身份信息、交易金额和付款方身份信息,交易密文信息包括加密的付款地址、收款方加密的交易金额、加密的收款地址以及付款方加密的交易金额。Optionally, in the above blockchain-based transaction monitoring device, the transaction plaintext information includes the identity information of the payee, the transaction amount and the identity information of the payer, and the transaction ciphertext information includes the encrypted payment address, the encrypted transaction amount of the payee , the encrypted receiving address and the encrypted transaction amount of the payer.
可选的,上述基于区块链的交易监管装置中,KYC合约中的向量矩阵元素包括用户身份向量、监管身份向量和公钥向量;用户身份向量对应存储收款方身份信息和付款方身份信息;监管身份向量对应存储一个或多个关联监管方节点的身份信息;公钥向量对应存储收款方公钥、付款方公钥和一个或多个监管公钥。Optionally, in the above blockchain-based transaction supervision device, the vector matrix elements in the KYC contract include user identity vector, supervisory identity vector and public key vector; the user identity vector corresponds to storing the identity information of the payee and the identity information of the payer ; The supervision identity vector corresponds to storing the identity information of one or more associated supervisor nodes; the public key vector corresponds to storing the public key of the payee, the public key of the payer and one or more public keys of supervision.
可选的,得到单元702,具体用于:付款方客户端节点根据付款方私钥,对加密的付款地址进行签名,得到签名付款地址;付款方客户端节点获取加密的收款地址对应的签名收款地址,签名收款地址是根据收款方私钥对加密的收款地址进行签名得到的;付款方客户端节点合并付款位置信息、收款位置信息、数字货币合约地址位置信息、签名付款地址、签名收款地址、第一金额加密参数,以及交易金额,生成报送信息;其中,付款位置信息是指KYC合约中付款方客户端节点对应的付款方公钥的位置信息;收款位置信息是指KYC合约中收款方客户端节点对应的收款方公钥的位置信息,收款方客户端节点为交易的收款方对应的客户端节点;数字货币合约地址位置是指KYC合约中交易金额所属的数字货币类型的数字货币管理节点的位置信息;第一金额加密参数用于对交易金额加密得到付款方加密的交易金额。Optionally, the obtaining
可选的,上述基于区块链的交易监管装置中,一个或多个监管公钥包括:第一监管公钥、第二监管公钥和第三监管公钥;第一监管公钥对应的关联监管方节点,用于监管付款方客户端节点,第二监管公钥对应的关联监管方节点,用于监管收款方客户端节点,第三监管公钥对应的关联监管方节点,用于监管交易金额所属的数字货币类型的数字货币管理节点;得到单元702,具体还用于:付款方客户端节点根据第一监管公钥、第二监管公钥和第三监管公钥,分别对报送信息加密,得到多个交易监管密文信息;其中,第一监管公钥为KYC合约中付款位置信息对应的监管公钥;第二监管公钥为KYC合约中收款位置信息对应的监管公钥;第三监管公钥为KYC合约中数字货币合约地址位置对应的监管公钥。Optionally, in the above blockchain-based transaction supervision device, one or more supervision public keys include: a first supervision public key, a second supervision public key, and a third supervision public key; The supervisor node is used to supervise the payer client node, the associated supervisor node corresponding to the second supervisory public key is used to supervise the payee client node, and the associated supervisor node corresponding to the third supervisory public key is used to supervise The digital currency management node of the digital currency type to which the transaction amount belongs; the obtaining
可选的,上述基于区块链的交易监管装置中,零知识证明包括以下至少一项:第一金额加密参数、付款方加密的交易金额和佩德森承诺,用于验证报送信息中的交易金额大于或等于0,并且,付款地址中账户余额大于或等于交易金额;付款方公钥和签名付款地址,用于验证付款位置信息是否正确;收款方公钥和签名付款地址,用于验证收款位置信息是否正确;第一监管公钥、第二监管公钥、第三监管公钥和多个交易监管密文信息,用于验证多个交易监管密文信息中的每个交易监管密文对应的报送信息相同,验证每个交易监管密文信息正确。Optionally, in the above-mentioned blockchain-based transaction supervision device, the zero-knowledge proof includes at least one of the following: the first amount encryption parameter, the transaction amount encrypted by the payer and the Pedersen commitment, used to verify the submitted information The transaction amount is greater than or equal to 0, and the account balance in the payment address is greater than or equal to the transaction amount; the payer’s public key and signature payment address are used to verify whether the payment location information is correct; the payee’s public key and signature payment address are used to Verify whether the payment location information is correct; the first supervision public key, the second supervision public key, the third supervision public key and multiple transaction supervision ciphertext information are used to verify each transaction supervision The submitted information corresponding to the ciphertext is the same, and it is verified that the ciphertext information of each transaction supervision is correct.
可选的,上述基于区块链的交易监管装置中,加密的收款地址是根据非对称密钥假名算法对收款地址加密得到的;加密的付款地址是根据非对称密钥假名算法对付款地址加密得到的。Optionally, in the above blockchain-based transaction supervision device, the encrypted receiving address is obtained by encrypting the receiving address according to the asymmetric key pseudonym algorithm; the encrypted payment address is obtained by encrypting the payment address according to the asymmetric key pseudonym algorithm The address is encrypted.
可选的,上述基于区块链的交易监管装置中,加密的付款金额是根据佩德森承诺,以第一金额加密参数为混淆因子,对交易金额加密得到的;加密的收款金额是根据佩德森承诺,以第二金额加密参数为混淆因子,对交易金额加密得到的。Optionally, in the above blockchain-based transaction monitoring device, the encrypted payment amount is obtained by encrypting the transaction amount according to the Pedersen commitment and using the first amount encryption parameter as the confusion factor; the encrypted payment amount is obtained according to Pedersen promised to encrypt the transaction amount by using the second amount encryption parameter as the confusion factor.
图8为本申请实施例提供的一种基于区块链的交易监管装置的结构示意图之二。参照图8所示,本公开实施例提供的基于区块链的交易监管装置,应用于一个或多个关联监管方节点中的每个关联监管方节点,包括:获取单元801和处理单元802;Fig. 8 is the second structural diagram of a blockchain-based transaction supervision device provided by the embodiment of the present application. Referring to FIG. 8 , the block chain-based transaction supervision device provided by the embodiment of the present disclosure is applied to each associated supervisor node in one or more associated supervisor nodes, including: an
获取单元801,用于从区块链获取一个或多个交易监管密文信息,一个或多个交易监管密文信息是付款方客户节点根据了解客户KYC合约中的一个或多个关联监管方节点对应的一个或多个监管公钥对报送信息加密得到,报送信息是根据KYC合约和交易密文信息得到的,交易密文信息是基于交易明文构造的,交易涉及多个关联监管方节点;The obtaining
处理单元802,用于根据监管私钥对一个或多个交易监管密文信息进行解密,得到并监管报送信息。The
可选的,上述基于区块链的交易监管装置中,KYC合约中的向量矩阵元素包括用户身份向量、监管身份向量和公钥向量;用户身份向量对应存储收款方身份信息和付款方身份信息;监管身份向量对应存储一个或多个关联监管方节点的身份信息;公钥向量对应存储收款方公钥、付款方公钥和一个或多个监管公钥。Optionally, in the above blockchain-based transaction supervision device, the vector matrix elements in the KYC contract include user identity vector, supervisory identity vector and public key vector; the user identity vector corresponds to storing the identity information of the payee and the identity information of the payer ; The supervision identity vector corresponds to storing the identity information of one or more associated supervisor nodes; the public key vector corresponds to storing the public key of the payee, the public key of the payer and one or more public keys of supervision.
可选的,可选的,上述基于区块链的交易监管装置中,交易明文信息包括收款方身份信息、交易金额和付款方身份信息,交易密文信息包括加密的付款地址、收款方加密的交易金额、加密的收款地址以及付款方加密的交易金额。Optional, optional, in the above blockchain-based transaction supervision device, the plaintext information of the transaction includes the identity information of the payee, the transaction amount and the identity information of the payer, and the ciphertext information of the transaction includes the encrypted payment address, the payee Encrypted transaction amount, encrypted receiving address, and encrypted transaction amount of the payer.
可选的,上述基于区块链的交易监管装置中,一个或多个监管公钥包括:第一监管公钥、第二监管公钥和第三监管公钥;第一监管公钥对应的关联监管方节点,用于监管付款方客户端节点,第二监管公钥对应的关联监管方节点,用于监管收款方客户端节点,第三监管公钥对应的关联监管方节点,用于监管交易金额所属的数字货币类型的数字货币管理节点。Optionally, in the above blockchain-based transaction supervision device, one or more supervision public keys include: a first supervision public key, a second supervision public key, and a third supervision public key; The supervisor node is used to supervise the payer client node, the associated supervisor node corresponding to the second supervisory public key is used to supervise the payee client node, and the associated supervisor node corresponding to the third supervisory public key is used to supervise The digital currency management node of the digital currency type to which the transaction amount belongs.
关于上述实施例中的装置,其中各个单元执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the above embodiments, the specific manner in which each unit performs operations has been described in detail in the embodiments related to the method, and will not be described in detail here.
图9是本申请实施例提供的关联监管方节点。如图9所示,该电子设备可以包括处理器901、用于存储处理器901可执行指令的存储器902;其中,上述处理器901被配置为执行上述指令,以实现上述实施例中的基于区块链的交易监管方法。Fig. 9 is an associated supervisor node provided by the embodiment of this application. As shown in FIG. 9 , the electronic device may include a
另外,电子设备还可以包括通信总线903以及至少一个通信接口904。In addition, the electronic device may further include a
处理器901可以是一个中央处理器(central processing units,CPU),微处理单元,专用集成电路(Application Specific Integrated Circuit,ASIC),或一个或多个用于控制本公开方案程序执行的集成电路。The
通信总线903为信号通路,用于在上述组件之间传送信息。The
通信接口904,使用任何收发器一类的装置,用于与其他设备或通信网络通信,如以太网,无线接入网(radio access network,RAN),无线局域网(wireless local areanetworks,WLAN)等。The
存储器902可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electricallyerasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器902可以是独立存在,通过通信总线903与处理器901相连接。存储器902也可以和处理器901集成在一起。
其中,存储器902用于存储执行本公开方案的指令,并由处理器901来控制执行。处理器901用于执行存储器902中存储的程序或指令,从而实现本公开方法中的功能。Wherein, the
作为一个示例,结合图7,基于区块链的交易监管装置应用于付款方客户端节点,包括:构造单元701、得到单元702和发送单元703实现的功能与图9中的处理器901的功能相同。As an example, with reference to Figure 7, the block chain-based transaction monitoring device is applied to the payer client node, including: the functions realized by the
作为另一个示例,结合图8,基于区块链的交易监管装置应用于关联监管方节点,包括:获取单元801和处理单元802实现的功能与图9中的处理器901的功能相同。As another example, referring to FIG. 8 , the block chain-based transaction supervision device is applied to the associated supervisor node, including: the functions realized by the
在具体实现中,作为一种实施例,处理器901可以包括一个或多个CPU,例如图9中的CPU0和CPU1。In a specific implementation, as an embodiment, the
在具体实现中,作为一种实施例,电子设备可以包括多个处理器901,这些处理器901中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器901可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a specific implementation, as an embodiment, the electronic device may include
在具体实现中,作为一种实施例,电子设备还可以包括输出设备905和输入设备906。输出设备905和处理器901通信,可以以多种方式来显示信息。例如,输出设备905可以是液晶显示器(liquid crystal display,LCD),发光二级管(light emitting diode,LED)显示设备,阴极射线管(cathode ray tube,CRT)显示设备,或投影仪(projector)等。输入设备906和处理器901通信,可以以多种方式接受用户的输入。例如,输入设备1206可以是鼠标、键盘、触摸屏设备或传感设备等。In a specific implementation, as an example, the electronic device may further include an
本领域技术人员可以理解,图9中示出的结构并不构成对电子设备的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。图9中的电子设备可以是服务器,也可以是客户端或其他设备。Those skilled in the art can understand that the structure shown in FIG. 9 does not constitute a limitation on the electronic device, and may include more or less components than shown in the figure, or combine certain components, or adopt different component arrangements. The electronic device in FIG. 9 may be a server, or a client or other devices.
另外,本公开还提供一种计算机可读存储介质,计算机可读存储介质上存储程序或指令,当上述可读存储介质中的指令被处理器执行时,使得电子设备能够执行如上述实施例所提供的基于区块链的交易监管方法。可选的,可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In addition, the present disclosure also provides a computer-readable storage medium. Programs or instructions are stored on the computer-readable storage medium. When the instructions in the above-mentioned readable storage medium are executed by a processor, the electronic device can execute the above-mentioned embodiment. The blockchain-based transaction supervision method provided. Optionally, the readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
另外,本公开还提供一种计算机程序产品,包括计算机程序/指令,该计算机程序产品被存储在非易失的可读存储介质中,计算机程序产品被至少一个处理器执行时,使得电子设备执行如上述实施例所提供的基于区块链的交易监管方法。In addition, the present disclosure also provides a computer program product, including a computer program/instruction, the computer program product is stored in a non-volatile readable storage medium, and when the computer program product is executed by at least one processor, the electronic device executes The blockchain-based transaction supervision method provided by the above-mentioned embodiments.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由权利要求指出。Other embodiments of the present disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. The present disclosure is intended to cover any modification, use or adaptation of the present disclosure. These modifications, uses or adaptations follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not disclosed in the present disclosure. . The specification and examples are to be considered exemplary only, with the true scope and spirit of the disclosure indicated by the appended claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It should be understood that the present disclosure is not limited to the precise constructions which have been described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211702772.0ACN115953244A (en) | 2022-12-28 | 2022-12-28 | Block chain-based transaction supervision method, device, electronic equipment and storage medium |
| PCT/CN2023/138883WO2024140259A1 (en) | 2022-12-28 | 2023-12-14 | Blockchain-based transaction supervision method, system and apparatus, and electronic device |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211702772.0ACN115953244A (en) | 2022-12-28 | 2022-12-28 | Block chain-based transaction supervision method, device, electronic equipment and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN115953244Atrue CN115953244A (en) | 2023-04-11 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211702772.0APendingCN115953244A (en) | 2022-12-28 | 2022-12-28 | Block chain-based transaction supervision method, device, electronic equipment and storage medium |
| Country | Link |
|---|---|
| CN (1) | CN115953244A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117372050A (en)* | 2023-12-07 | 2024-01-09 | 成都天府通数字科技有限公司 | Method and system for verifying order verification of multiple platforms |
| WO2024140259A1 (en)* | 2022-12-28 | 2024-07-04 | 中国人民银行数字货币研究所 | Blockchain-based transaction supervision method, system and apparatus, and electronic device |
| CN119762067A (en)* | 2024-12-13 | 2025-04-04 | 北京国家金融科技风险监控中心有限公司 | Payment method and payment device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108764874A (en)* | 2018-05-17 | 2018-11-06 | 深圳前海微众银行股份有限公司 | Anonymous refund method, system and storage medium based on block chain |
| CN110383311A (en)* | 2018-11-07 | 2019-10-25 | 阿里巴巴集团控股有限公司 | Regulatory Blockchain Confidential Transactions |
| WO2019209168A2 (en)* | 2018-04-26 | 2019-10-31 | 华为国际有限公司 | Data processing method, related apparatus, and blockchain system |
| CN111147432A (en)* | 2018-11-06 | 2020-05-12 | 富邦金融控股股份有限公司 | Privacy KYC data sharing system and method |
| CN113159767A (en)* | 2021-04-15 | 2021-07-23 | 中国建设银行股份有限公司 | Transfer processing method, device and system based on block chain |
| CN113988863A (en)* | 2021-12-28 | 2022-01-28 | 浙江大学 | Supervision-capable online payment privacy protection method and device and electronic equipment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2019209168A2 (en)* | 2018-04-26 | 2019-10-31 | 华为国际有限公司 | Data processing method, related apparatus, and blockchain system |
| CN108764874A (en)* | 2018-05-17 | 2018-11-06 | 深圳前海微众银行股份有限公司 | Anonymous refund method, system and storage medium based on block chain |
| CN111147432A (en)* | 2018-11-06 | 2020-05-12 | 富邦金融控股股份有限公司 | Privacy KYC data sharing system and method |
| CN110383311A (en)* | 2018-11-07 | 2019-10-25 | 阿里巴巴集团控股有限公司 | Regulatory Blockchain Confidential Transactions |
| CN113159767A (en)* | 2021-04-15 | 2021-07-23 | 中国建设银行股份有限公司 | Transfer processing method, device and system based on block chain |
| CN113988863A (en)* | 2021-12-28 | 2022-01-28 | 浙江大学 | Supervision-capable online payment privacy protection method and device and electronic equipment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2024140259A1 (en)* | 2022-12-28 | 2024-07-04 | 中国人民银行数字货币研究所 | Blockchain-based transaction supervision method, system and apparatus, and electronic device |
| CN117372050A (en)* | 2023-12-07 | 2024-01-09 | 成都天府通数字科技有限公司 | Method and system for verifying order verification of multiple platforms |
| CN117372050B (en)* | 2023-12-07 | 2024-02-20 | 成都天府通数字科技有限公司 | Method and system for verifying order verification of multiple platforms |
| CN119762067A (en)* | 2024-12-13 | 2025-04-04 | 北京国家金融科技风险监控中心有限公司 | Payment method and payment device |
| Publication | Publication Date | Title |
|---|---|---|
| US12273470B2 (en) | Data processing method and apparatus, intelligent device, and storage medium | |
| US11842317B2 (en) | Blockchain-based authentication and authorization | |
| Ullah et al. | Towards blockchain-based secure storage and trusted data sharing scheme for IoT environment | |
| Hewa et al. | Fog computing and blockchain-based security service architecture for 5G industrial IoT-enabled cloud manufacturing | |
| KR102812839B1 (en) | System and method for authenticating off-chain data based on proof verification | |
| CN108833081B (en) | Block chain-based equipment networking authentication method | |
| US20190295069A1 (en) | Systems and methods for integrating cryptocurrency wallet identifiers with digital certificates | |
| JP6942136B2 (en) | How to be implemented by the blockchain for the control and distribution of digital content | |
| JP2025124806A (en) | Cryptographic method and system for secure extraction of data from a blockchain | |
| AU2021370924B2 (en) | Certificate based security using post quantum cryptography | |
| CN108418783A (en) | A method and medium for protecting the privacy of blockchain smart contracts | |
| CN116308776A (en) | Block chain-based transaction supervision method, device, electronic equipment and storage medium | |
| CN115953244A (en) | Block chain-based transaction supervision method, device, electronic equipment and storage medium | |
| CN115908001A (en) | Transaction supervision method and device based on block chain, electronic equipment and storage medium | |
| WO2024140259A1 (en) | Blockchain-based transaction supervision method, system and apparatus, and electronic device | |
| US11676111B1 (en) | Apparatuses and methods for determining and processing dormant user data in a job resume immutable sequential listing | |
| Kalapaaking et al. | Blockchain-enabled and multisignature-powered verifiable model for securing federated learning systems | |
| CN114514550A (en) | Partitioning requests into blockchains | |
| WO2024123889A1 (en) | Systems and methods for conducting and enforcing cryptographically secure actions in public, non-permissioned blockchains using bifurcated self-executing programs comprising shared digital signature requirements | |
| KR101120059B1 (en) | Billing verifying apparatus, billing apparatus and method for cloud computing environment | |
| CN115705601A (en) | Data processing method and device, computer equipment and storage medium | |
| Mohammadzadeh et al. | Invoice factoring registration based on a public blockchain | |
| CN113656492A (en) | Deposit list management method based on block chain and block chain system | |
| Li | Optimized blockchain deployment and application for trusted industrial internet of things | |
| CN112990904B (en) | Block chain-based transfer method and device and electronic equipment |
| 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 |