Transaction data verification method and device
By setting up regulatory equipment and audit contract modules in the blockchain system, combined with the zero-knowledge proof protocol, user transaction data is verified, and the challenges of blockchain technology in data security and privacy protection are solved, effectively supervision and efficient data protection of blockchain transaction data are achieved.
Patent Information
- Application Number
- CN202311286824.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-07
- Publication Date
- 2025-04-08
AI Technical Summary
Due to its decentralized and anonymous nature, blockchain technology faces regulatory and compliance challenges, especially in data security and privacy protection.
By setting up regulatory equipment and audit contract modules in the blockchain system, combined with the zero-knowledge proof protocol, user transaction data is verified to ensure data security and privacy protection.
It realizes effective supervision of blockchain transaction data, improves data security and privacy protection, avoids the risk of data exposure, and ensures the transparency and immutability of transactions.
Smart Images

Figure CN119784379A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of blockchain supervision, and in particular to a transaction data verification method and device. Background Art
[0002] As a distributed decentralized ledger system, blockchain technology has been widely used in many fields. However, due to its decentralized and anonymous characteristics, blockchain currently faces challenges in supervision and compliance. Traditional regulatory measures generally rely on public data, but on blockchain, privacy and data security are the main concerns of users. There are currently two main ways to improve data security on blockchain. One is to add equipment to mobile terminal devices, such as adding edge blocks, and process data according to the added equipment to improve data security, which requires additional equipment resources; the other method is to use blockchain smart contracts (smart contacts) to parse data, but this method currently has the risk of data exposure.
[0003] Therefore, there is currently a lack of effective regulatory configuration for blockchain and a lack of encryption protection for user data. Summary of the invention
[0004] The embodiments of the present application provide a transaction data verification method and device to strengthen the supervision of blockchain and improve the security of transaction data of user devices corresponding to the blockchain.
[0005] In a first aspect, an embodiment of the present application provides a transaction data verification method, comprising:
[0006] The first device obtains a first proof ciphertext, where the first proof ciphertext is a ciphertext determined by the user device by encrypting user transaction data according to a first key, where the first key is determined by the user device according to configuration information of the user device, and the user transaction data is determined according to at least one of the following data: transaction amount, payment address, and random number; the first device determines a second proof ciphertext according to the configuration information of the first device, where the second proof ciphertext is used by the first device to determine a verification result of the first proof ciphertext; the first device determines the first user transaction data according to the verification result of the first proof ciphertext.
[0007] According to the method, the first device can obtain the first proof ciphertext to be verified sent by the user device. The first proof ciphertext is used to prove that the user transaction data is legal transaction data. The user device can generate the first proof ciphertext according to the zero-knowledge proof protocol. The first device can deploy an audit contract module in the blockchain according to the configuration information of the supervisory device, and verify the first proof ciphertext through the audit contract module. Through the verification of the first proof ciphertext by the audit contract module, the first device can avoid obtaining the specific details of the transaction data, and determine that the user transaction data is the first user transaction data according to the verification result of the first proof ciphertext. By setting up a supervisory device and an audit contract module, the supervision of the blockchain system is strengthened, and by introducing a zero-knowledge proof protocol to avoid the blockchain system from obtaining the specific details of the first transaction commitment, the privacy of the user device is protected.
[0008] In one possible design, the first device determines the second proof ciphertext based on the configuration information of the first device, including: the first device determines the legal transaction data and the legal key based on the configuration information of the first device; the first device encrypts the legal transaction data based on the legal key, and the encryption is used to determine the second proof ciphertext.
[0009] According to this design, the first device can determine the second proof ciphertext based on the zero-knowledge proof protocol and legitimate transaction data. The second proof ciphertext is used to verify the first proof ciphertext determined by the user device according to the zero-knowledge proof protocol, which can improve the verification accuracy of the proof ciphertext.
[0010] In a possible design, the first device determines the first user transaction data based on the verification result of the first proof ciphertext, including: the first device determines that the user transaction data is legal transaction data based on the verification result of the first proof ciphertext; the first device determines the first user transaction data based on the user transaction data.
[0011] According to this design, if the proof ciphertext sent by the user device passes the verification, the blockchain can determine the user transaction data as the first user transaction data, thereby improving the accuracy of the blockchain in determining the user transaction data and strengthening the transaction supervision of the blockchain.
[0012] In a possible design, the method also includes: the first device determines that the user transaction data is illegal transaction data based on a verification result of the first proof ciphertext; and the first device deletes the user transaction data.
[0013] According to this design, if the proof ciphertext sent by the user device fails the verification, the blockchain can delete the user's transaction data, thereby improving the accuracy of the blockchain in determining the user's transaction data and strengthening the transaction supervision of the blockchain.
[0014] In a second aspect, the embodiment of the present application further provides a transaction data verification method, including:
[0015] The user device obtains transaction data, and the transaction data is used to determine the user transaction data, and the user transaction data includes at least one of the following data: transaction amount, payment address and random number; the user device determines a first key according to the configuration information of the user device; the user device encrypts the user transaction data according to the first key, and the encryption result is used to determine a first proof ciphertext; the user device sends the first proof ciphertext.
[0016] According to the method, the user device corresponding to the blockchain determines the first proof ciphertext based on the zero-knowledge proof key. The first proof ciphertext is used by the first device to verify the user transaction data without disclosing the transaction details of the user device, thereby improving the security of the transaction data of the user device.
[0017] In a third aspect, the present application also provides a transaction data verification device, including an acquisition module and a processing module.
[0018] an acquisition module, configured to acquire a first certification ciphertext, wherein the first certification ciphertext is a ciphertext determined by a user device encrypting user transaction data according to a first key, wherein the first key is determined by the user device according to configuration information of the user device, and the user transaction data is determined according to at least one of the following data: a transaction amount, a payment address, and a random number;
[0019] a processing module, configured to determine a second certification ciphertext according to the configuration information of the first device, wherein the second certification ciphertext is used by the first device to determine a verification result of the first certification ciphertext;
[0020] The processing module is further used to determine the first user transaction data according to the verification result of the first proof ciphertext.
[0021] In one possible design, the processing module is specifically used to: determine legal transaction data and a legal key according to configuration information of the first device; encrypt the legal transaction data according to the legal key, and the encryption is used to determine the second proof ciphertext.
[0022] In a possible design, the processing module is specifically used to: determine that the user transaction data is legal transaction data according to a verification result of the first proof ciphertext; and determine first user transaction data according to the user transaction data.
[0023] In a possible design, the processing module is further used to: determine that the user transaction data is illegal transaction data based on the verification result of the first proof ciphertext; and delete the user transaction data.
[0024] In a fourth aspect, the embodiment of the present application also provides a transaction data verification device, including an acquisition module and a processing module. Among them: the acquisition module is used to acquire transaction data, and the transaction data is used to determine user transaction data, and the user transaction data includes at least one of the following data: transaction amount, payment address and random number; the processing module is used to determine the first key according to the configuration information of the user device; the processing module is also used to encrypt the user transaction data according to the first key, and the encryption result is used to determine the first proof ciphertext; the processing module is also used to send the first proof ciphertext.
[0025] In a fifth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method of the first aspect and the second aspect and any one of their designs is implemented.
[0026] In the sixth aspect, an embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the computer program is executed by the processor, the processor implements the first aspect and the second aspect and any one of the designed methods thereof.
[0027] The technical effects brought about by the third to sixth aspects and any one of their designs can refer to the technical effects brought about by the corresponding designs in the first and second aspects, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0029] Figure 1 A flowchart of a transaction data verification method provided in an embodiment of the present application;
[0030] Figure 2 A flowchart of another transaction data verification method provided in an embodiment of the present application;
[0031] Figure 3 A schematic diagram of a device structure provided in an embodiment of the present application;
[0032] Figure 4 A schematic diagram of another device structure provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be arbitrarily combined with each other. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.
[0034] The terms "first" and "second" in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive protection. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. "Multiple" in the present application can mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.
[0035] In the technical solution of this application, the collection, dissemination, and use of data are in compliance with the requirements of relevant national laws and regulations.
[0036] Before introducing a transaction data verification method provided by an embodiment of the present application, in order to facilitate understanding, the technical background of the embodiment of the present application is first introduced in detail below.
[0037] Blockchain technology (block chains, or blockchain system) is a distributed decentralized ledger system. Optionally, the blockchain system can also be called a blockchain network, or simply a blockchain. At present, blockchain has been widely used in many fields. A blockchain can correspond to multiple user devices. However, due to its decentralized and anonymous characteristics, blockchain currently faces challenges in supervision and compliance. Traditional regulatory measures generally rely on public data, but on blockchain, privacy and data security are the main concerns of users. At present, there are two main ways to improve data security on the blockchain. One is to install equipment at the mobile terminal device, such as adding edge blocks, and process data according to the installed equipment to improve data security, so it needs to consume additional equipment resources; the other method is to use blockchain smart contracts to parse data, but there is a lack of security verification and data exposure risks. Therefore, there is currently a lack of effective regulatory configuration for blockchains, and a lack of security verification for user data.
[0038] In order to solve the above problems, the present application provides a transaction data verification method to strengthen the supervision of blockchain and improve the security of transaction data of user devices corresponding to the blockchain.
[0039] Exemplarily, the present application supervises the user devices corresponding to the blockchain by setting up a supervision device, and uses the zero-knowledge proof (zk-SNARKs) protocol to verify the user transaction data of the user device, thereby achieving effective supervision of the blockchain and improving the supervision efficiency of user transactions and the security of user transaction data.
[0040] Optionally, the supervisory device may determine the first device in the blockchain through smart contract technology, and the first device may include an audit contract module. The audit contract module may obtain configuration information of the supervisory device through an institutional node corresponding to the supervisory device. The audit contract module may be used to supervise transactions between the user device and the blockchain.
[0041] Exemplarily, the present application may introduce a zero-knowledge proof protocol. Zero-knowledge proof allows the user device to prove to the audit contract module in the blockchain that the user device has legitimate user transaction data without leaking actual data. The zero-knowledge proof protocol means that the user device needs to generate a zero-knowledge proof according to the protocol, and the zero-knowledge proof is a proof ciphertext. For example, the user device can generate a proof ciphertext according to the zero-knowledge proof protocol without revealing the transaction privacy data of the user device. The audit contract module can verify the legitimacy of the proof ciphertext of the user device to determine that the user device has legitimate user transaction data without obtaining specific transaction details or sensitive data. Therefore, the method described in the present application can verify the key user transaction data by verifying the proof ciphertext under the premise of protecting the user's privacy data, which can improve the security of the user's transaction data. By setting up a supervisory device to supervise the transaction data of the blockchain, the transparency and non-tamperability of the transaction are guaranteed. At the same time, the user device determines the non-privacy data in the transaction data as the user transaction data, ensuring the confidentiality of the transaction data, thereby ensuring the security of the transaction data while maintaining transparency.
[0042] Optionally, the zero-knowledge proof protocol can be used for the user device to determine the zero-knowledge proof key, which is the first key. The user device can encrypt the user transaction data of the user device according to the first key to obtain the zero-knowledge proof ciphertext, which is the first proof ciphertext.
[0043] Optionally, the method described in this application is applicable to various blockchain application scenarios, such as finance, digital asset trading, supply chain, etc., and can bring more reliable regulatory means to the blockchain industry.
[0044] Figure 1 The flowchart of a transaction data verification method is shown exemplarily. Exemplarily, the execution subject of the method is a first device.
[0045] Exemplarily, the first device may be an audit contract module formed according to any smart contract technology. The audit contract module may verify the user transaction data and the first proof ciphertext generated by the user device.
[0046] Optionally, the audit contract module may be composed of smart contract technology. Smart contract technology can ensure the automation and efficiency of the verification process of the audit contract module.
[0047] Exemplarily, the present application integrates the audit contract module into the blockchain. The audit contract module of the present application can verify the legitimacy of the signature and ciphertext sent by the user device.
[0048] refer to Figure 1 The process shown in the figure, the method provided in the embodiment of the present application may include the following steps:
[0049] Step 101, obtaining transaction data.
[0050] Step 102: Determine a first key according to configuration information of the user equipment.
[0051] Step 103: encrypt the user transaction data according to the first key, and the encryption result is used to determine the first certification ciphertext.
[0052] Step 104, sending the first proof ciphertext.
[0053] Optionally, steps 101 to 104 may be performed by a user equipment.
[0054] Step 105, obtaining the first proof ciphertext.
[0055] Step 106: Determine a second certification ciphertext according to the configuration information of the first device.
[0056] Step 107, determining the first user transaction data according to the verification result of the first proof ciphertext.
[0057] Optionally, steps 105 to 107 may be performed by the first device.
[0058] Optionally, before step 101, the supervision device may be initialized according to the following S201 to S203.
[0059] Optionally, in S201, the supervisory device may determine configuration information. The configuration information includes supervisory policies and rules. The supervisory device may determine a supervisory system according to the supervisory policies and rules. Through the supervisory policies and rules, the supervisory device may perform compliance supervision on the blockchain system, ensure that it corresponds to the user device, achieve effective supervision and compliance control, and ensure the transparency and immutability of the blockchain system.
[0060] Optionally, the supervisory device of the present application can perform supervisory authority management. The supervisory device can perform authority management on the first device. The supervisory device can correspond to multiple institutional nodes, and the multiple institutional nodes can ensure that the supervisory device obtains sufficient access rights to the first device. The supervisory device can ensure that the first device effectively obtains the user's transaction commitment data by performing authority management on the first device, so as to improve the efficiency of the transaction data of the user device.
[0061] Exemplarily, the supervisory device may determine supervisory policies and rules that the user device and the first device need to comply with, wherein the supervisory policies and rules include zero-knowledge proof protocols and legal transaction data.
[0062] Optionally, the zero-knowledge proof protocol may be a protocol information required for generating proofs defined by the regulatory device. The device may determine the proof key according to the zero-knowledge proof protocol, and may encrypt the legal transaction data according to the proof key to obtain the proof ciphertext, and the proof ciphertext is used to prove the legality of the transaction data. For example, when the second party needs to verify the data of the first party, the first party and the second party may refer to the zero-knowledge proof protocol. The first party may first hide the details of the data, and generate a transaction commitment data according to the data with hidden details. The first party may use the transaction commitment data as the first-party transaction data. The first party generates a proof key according to the rules for determining the proof ciphertext in the proof protocol, and encrypts the first-party transaction data according to the proof key to obtain the first-party proof ciphertext. The first party sends the first-party proof ciphertext to the second party. The second party may generate a legal proof ciphertext according to the legal transaction data and the proof protocol, and verify the first-party proof ciphertext according to the legal proof ciphertext. The second party may use the verification result of the proof to replace the verification result of the transaction data, and may avoid disclosing the hidden details of the transaction data in the process of verifying the transaction data, thereby ensuring the security of the first party's data. It can be understood that the first party mentioned above includes the user device corresponding to the blockchain system, and the second party includes the first device. The first-party transaction data is the user transaction data. The first-party proof ciphertext is the first proof ciphertext. The legal proof ciphertext is the second proof ciphertext.
[0063] Optionally, S202, the supervisory device may establish a supervisory authority node, which is responsible for verifying transactions and enforcing compliance. The supervisory device may determine multiple supervisory authority nodes. The supervisory device may send configuration information to the first device through multiple supervisory authority nodes.
[0064] Optionally, by establishing multiple regulatory agency nodes, it can be ensured that the regulatory device has sufficient access rights to the first device to ensure that the first device can effectively obtain configuration information, ensure that the first device can perform its regulatory duties, and at the same time limit the risk of the first device abusing its authority.
[0065] Optionally, in S203, the supervisory device may determine configuration information. The configuration information may include at least one of the following: a zero-knowledge proof protocol and legal transaction data. The zero-knowledge proof protocol and legal transaction data may be used by the first device to determine that the proof of the user device is a legal proof.
[0066] Optionally, the supervisory device may send configuration information to the first device through the supervisory agency node. The configuration information includes a zero-knowledge proof protocol. The user device may obtain the configuration information sent by the supervisory device and determine the configuration information of the user device. The first device may obtain the configuration information sent by the supervisory device and determine the configuration information of the first device.
[0067] Optionally, before step 101, the user equipment may first perform user registration.
[0068] Optionally, the user device to be registered may determine a key pair according to the user's input data, the key pair including a public key and a private key. The user device to be registered may determine the private key as the user's signature, and may send the public key to the supervision device.
[0069] Optionally, the supervisory device may determine that the user device has completed registration after obtaining the public key sent by the user device to be registered. The supervisory device may determine that the public key sent by the user device is a legitimate signature.
[0070] Optionally, the blockchain system may correspond to multiple user devices. The user devices may include unregistered user devices or user devices with invalid registration. The supervision device may send a registration instruction to the user device through the audit contract module.
[0071] Optionally, an unregistered user device or a user device with invalid registration may perform user registration according to the registration instruction.
[0072] Optionally, steps 101 to 104 may be performed by a user equipment, which is a registered user equipment.
[0073] Step 101, obtaining transaction data.
[0074] Optionally, the user device may determine transaction data based on the user's input data, and the transaction data includes transaction details data and user transaction commitment. The transaction details data may include private data, and the user transaction commitment may include non-private data. The user transaction commitment is the user transaction data sent by the user device. For example, the user device may obtain transaction privacy data, transaction amount, payment address, random number and other data, and the user device may determine the transaction amount as the user transaction commitment, and the user device may send the transaction amount as the user transaction data to the first device.
[0075] Step 102: Determine a first key according to configuration information of the user equipment.
[0076] Optionally, the user device may determine the private data and the non-private data according to the user's input data. The user device may determine the non-private data in the user's input data as the transaction commitment data.
[0077] Optionally, the user device may obtain configuration information sent by the supervisory device to determine the configuration information of the user device. The user device may obtain a zero-knowledge proof protocol according to the configuration information, and generate a first key according to the rules in the zero-knowledge proof protocol. The rules in the zero-knowledge proof protocol are determined by the supervisory device according to supervisory policies and rules.
[0078] For example, the supervisory device may determine any key algorithm as a zero-knowledge proof protocol according to supervisory policies and rules. The user device may use the configuration information sent according to the supervisory policy as the configuration information of the user device. The user device may obtain the key algorithm and determine the first key according to the key algorithm.
[0079] Step 103: encrypt the user transaction data according to the first key, and the encryption result is used to determine the first certification ciphertext.
[0080] Optionally, the user device may determine the non-privacy data in the transaction data as user transaction data.
[0081] Optionally, the user device may encrypt the user transaction data according to the first certification key, and determine the first certification ciphertext according to the encryption result of the user transaction data.
[0082] For example, user device A can obtain transaction privacy and transaction amount. User device A can use the transaction amount as user transaction data 1. User device A can determine key 1 according to the zero-knowledge proof protocol, encrypt user transaction data 1 according to key 1, and obtain proof ciphertext 1. User device A can send user transaction data 1 and proof ciphertext 1. User transaction data 1 is the user transaction commitment, proof ciphertext 1 is the first proof ciphertext, and key 1 is the first key.
[0083] Step 104, sending the first proof ciphertext.
[0084] Optionally, the user device may send the first certification ciphertext. Alternatively, the user device may send the first certification ciphertext and the user transaction data to the first device.
[0085] Optionally, before step 104, before sending the first certification ciphertext and the user transaction data, the user device may perform signature authentication to the supervision device.
[0086] Optionally, the user device may send a private key to the supervisory device, and the supervisory device may authenticate the user device based on the legal signature and the private key sent by the user device.
[0087] Optionally, the supervisory device may verify the private key to be verified sent by the user device based on the legal signature. If the supervisory device determines that the legal signature and the private key to be verified are a pair of public-private keys, the supervisory device may determine that the user device is a registered user device based on the verification result of the private key. If the supervisory device determines that the legal signature and the private key to be verified are not a pair of public-private keys, the supervisory device may determine that the user device is an unregistered user device based on the verification result of the private key.
[0088] Optionally, if the supervisory device determines that the user device is a registered user device, the supervisory device may send an instruction to the first device and the user device. The user device may send the first certification ciphertext and the user transaction data according to the instruction. The first device may obtain the first certification ciphertext and the user transaction commitment according to the instruction.
[0089] Optionally, if the supervisory device determines that the user device is an unregistered user device, the supervisory device may reject the transaction between the user device and the first device.
[0090] Optionally, if the legitimate signature in the supervisory device is tampered with or lost, the supervisory device may instruct the user device to generate a key pair again, and the user device may send a public key according to the key pair. The supervisory device may obtain an updated public key. Therefore, by supervising the signature through the supervisory device, the security of the transaction between the first device and the user device may be improved.
[0091] For example, user device A completes registration, generates public key 1 and private key 1, and sends public key 1 to the supervisory device. The supervisory device obtains public key 1. After the user device generates user transaction data, it obtains the data input by the user and generates private key 2. Private key 2 is the signature to be authenticated. The supervisory device can obtain public key 1 and private key 2, and verify private key 2 according to public key 1. If private key 2 and public key 1 belong to the same public and private key, the supervisory device can determine that user device A is a device that has been registered with the supervisory device, and can determine that user device A is a legitimate user device. The supervisory device can send instructions to the audit contract module and user device A. User device A can obtain the instructions and send transaction data 1 and proof ciphertext 1 to the audit contract module according to the instructions. Transaction data 1 is the user transaction commitment, and proof ciphertext 1 is the first proof ciphertext.
[0092] Step 105, obtaining the first proof ciphertext.
[0093] Optionally, the first device obtains the first certification ciphertext. The first device may obtain the first certification ciphertext sent by the user device.
[0094] Optionally, if the user device sends the first proof ciphertext and the user transaction data to the first device, the audit contract module may obtain the first proof ciphertext and the user transaction data.
[0095] Step 106: Determine a second certification ciphertext according to the configuration information of the first device.
[0096] Optionally, the first device may obtain configuration information sent by the supervisory device, and determine the configuration information of the first device according to the configuration information sent by the supervisory device. The configuration information sent by the supervisory device includes a zero-knowledge proof protocol.
[0097] Optionally, the first device may determine the legitimate key and the legitimate transaction data according to a zero-knowledge proof protocol.
[0098] Optionally, the first device encrypts the legal transaction data according to the legal key, and determines the second proof ciphertext according to the encryption result of the legal transaction data.
[0099] For example, the audit contract module can obtain the ciphertext 1 of user device A and user transaction data 1. The audit contract module can determine key 2 according to the zero-knowledge proof protocol, and encrypt the legal transaction data according to key 2 to determine ciphertext 2. The audit contract module can verify the legitimacy of ciphertext 1 of user device A according to ciphertext 2. Ciphertext 1 is the first proof ciphertext. Ciphertext 2 is the second proof ciphertext. Key 2 is the legal key.
[0100] Step 107, determining the first user transaction data according to the verification result of the first proof ciphertext.
[0101] Optionally, the first device may verify the first proof ciphertext according to the second proof ciphertext to determine a verification result of the first proof ciphertext.
[0102] Optionally, the first device may perform compliance verification on the first proof ciphertext according to the second proof ciphertext. The first device may determine that the second proof ciphertext is equal to the first proof ciphertext, then the first device may determine that the first proof ciphertext is a legal proof ciphertext and the first proof ciphertext passes verification.
[0103] Optionally, if in step 104, the user device sends the first certification ciphertext and the user transaction data to the first device, the first device obtains the user transaction data.
[0104] Optionally, the first device may determine the user transaction data corresponding to the verified first proof ciphertext as the first user transaction data.
[0105] Optionally, the first device may send a verification success indication to the supervisory device through the institution node.
[0106] Optionally, the regulatory authority may approve the transaction. The regulatory device may send a transaction permission instruction to the first device. The transaction permission instruction may be used to instruct the first device to add the first user transaction data to the blockchain.
[0107] Optionally, the first device may determine that the first certification ciphertext of the user device is not equal to the second certification ciphertext according to the second certification ciphertext, and the first device may determine that the first certification ciphertext has not passed the verification. The first device may send a verification failure indication to the supervisory device through the institution node.
[0108] Optionally, the supervision device may send a transaction rejection instruction to the first device. The first device may delete the user transaction data.
[0109] Optionally, if in step 104, the user device sends the first certification ciphertext to the first device, the first device may send an instruction to upload the user transaction data to the user device after determining that the first certification ciphertext passes the verification.
[0110] Optionally, the user device may send the user transaction data to the first device according to the upload instruction.
[0111] Optionally, the first device may determine the user transaction data sent by the user device as the first user transaction data. The first device may send a verification success indication to the supervisory device through the institution node. The supervisory device may send a transaction permission indication to the first device according to the verification success indication. The transaction permission indication may be used to instruct the first device to add the first user transaction data to the blockchain.
[0112] Optionally, the first device may determine that the first certification ciphertext of the user device is not equal to the second certification ciphertext according to the second certification ciphertext, and the first device may determine that the first certification ciphertext has not passed the verification. The first device may send a verification failure indication to the supervisory device through the institution node.
[0113] Optionally, the supervision device may send a transaction rejection instruction to the first device. The first device may delete the user transaction data.
[0114] Optionally, the first device may refuse the user device to upload the user transaction data according to the transaction rejection instruction sent by the supervisory device. The first device may also take other measures. For example, if the first device receives the transaction rejection instruction from the supervisory device, the first device may refuse to receive the user transaction data uploaded by the user device and send a warning to the user device.
[0115] Optional, such as Figure 2 As shown, the method described in the present application may also follow the following process, wherein step 101 may correspond to (1), step 102 may correspond to (2), step 103 may correspond to (3), step 104 may correspond to (4), step 105 may correspond to (5), and step 106 may include (6):
[0116] (1) The user registers with the regulatory agency. The regulatory agency can perform authority management. The regulatory agency is the regulatory device. The regulatory agency includes multiple agency nodes, which can be represented as agency A, agency B, ... agency X.
[0117] (2) The user generates a transaction commitment, which is the user's transaction data. The user determines the first key based on the configuration information of the user device.
[0118] (3) The user generates a first proof ciphertext based on the user transaction data and the first key.
[0119] (4) The user sends the user transaction data and the first proof ciphertext to the audit contract module.
[0120] (5) The audit contract module obtains the user transaction data and the first proof ciphertext. The audit contract module is the first device.
[0121] (6) The audit contract module may generate a second proof ciphertext according to the configuration information. The audit contract module may determine the first user transaction data according to the verification result of the first proof ciphertext.
[0122] Based on the same technical concept, the present application exemplarily provides a transaction data verification device. The device can be used to perform the actions described in the above method embodiment. In this embodiment, the structure of the device can be as follows: Figure 3 shown.
[0123] like Figure 3 As shown, the present application exemplarily provides a transaction data verification device which may include an acquisition module 301 and a processing module 302. Wherein, when implementing the function of the first device in the present application, the acquisition module 301 is used to acquire a first proof ciphertext, the first proof ciphertext is a ciphertext determined by the user device encrypting the user transaction data according to the first key, the first key is determined by the user device according to the configuration information of the user device, and the user transaction data is determined according to at least one of the following data: transaction amount, payment address and random number; the processing module 302 is used to determine a second proof ciphertext according to the configuration information of the first device, the second proof ciphertext is used by the first device to determine the verification result of the first proof ciphertext; the processing module 302 is also used to determine the first user transaction data according to the verification result of the first proof ciphertext.
[0124] Optionally, the processing module 302 is specifically used to: determine the legal transaction data and the legal key according to the configuration information of the first device; encrypt the legal transaction data according to the legal key, and the encryption is used to determine the second proof ciphertext.
[0125] Optionally, the processing module 302 is specifically used to: determine that the user transaction data is legal transaction data according to the verification result of the first proof ciphertext; and determine first user transaction data according to the user transaction data.
[0126] Optionally, the processing module 302 is further used to: determine that the user transaction data is illegal transaction data according to the verification result of the first proof ciphertext; and delete the user transaction data.
[0127] When implementing the functions of the user device in the present application, the acquisition module 301 is used to acquire transaction data, and the transaction data is used to determine the user transaction data, and the user transaction data includes at least one of the following data: transaction amount, payment address and random number; the processing module 302 is used to determine the first key according to the configuration information of the user device; the processing module 302 is also used to encrypt the user transaction data according to the first key, and the encryption result is used to determine the first proof ciphertext; the processing module 302 is also used to send the first proof ciphertext.
[0128] Based on the same inventive concept as the above method embodiment, an electronic device is also provided in the embodiment of the present application. The electronic device can be used to perform the actions described in the above method embodiment. In this embodiment, the structure of the electronic device can be as follows: Figure 4 As shown, it includes a memory 401 and one or more processors 402 .
[0129] The memory 401 is used to store computer programs executed by the processor 402. The memory 401 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and programs required for running the instant messaging function, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.
[0130] The memory 401 may be a volatile memory, such as a random-access memory (RAM); the memory 401 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or the memory 401 may be any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 401 may be a combination of the above memories.
[0131] The processor 402 may include one or more central processing units (CPU) or a digital processing unit, etc. The processor 402 is used to implement the above method when calling the computer program stored in the memory 401.
[0132] The specific connection medium between the memory 401 and the processor 402 is not limited in the embodiment of the present application. Figure 4 In the embodiment, the memory 401 and the processor 402 are connected via a bus 403. The bus 403 is connected to the processor 402 via a bus 403. Figure 4 The connections between other components are shown in bold lines, which are only for illustration and are not intended to be limiting. Bus 403 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0133] Optionally, the processor 402 may be configured to execute any one or more of the above actions executed by the acquisition module 301 and the processing module 302 .
[0134] According to one aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method in the above embodiment.
[0135] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0136] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A transaction data verification method, characterized in that: include: The first device obtains a first certification ciphertext, where the first certification ciphertext is a ciphertext determined by the user device encrypting user transaction data according to a first key, where the first key is determined by the user device according to configuration information of the user device, and the user transaction data is determined according to at least one of the following data: a transaction amount, a payment address, and a random number; The first device determines a second certification ciphertext according to the configuration information of the first device, where the second certification ciphertext is used by the first device to determine a verification result of the first certification ciphertext; The first device determines the first user transaction data according to the verification result of the first proof ciphertext.
2. The method according to claim 1, characterized in that The first device determines a second proof ciphertext according to the configuration information of the first device, including: The first device determines the legal transaction data and the legal key according to the configuration information of the first device; The first device encrypts the legal transaction data according to the legal key, and the encryption is used to determine the second proof ciphertext.
3. The method according to claim 1, characterized in that The first device determines the first user transaction data according to the verification result of the first proof ciphertext, including: The first device determines that the user transaction data is legal transaction data according to the verification result of the first proof ciphertext; The first device determines first user transaction data according to the user transaction data.
4. The method according to claim 1, characterized in that The method further comprises: The first device determines that the user transaction data is illegal transaction data according to the verification result of the first proof ciphertext; The first device deletes the user transaction data.
5. A transaction data verification method, characterized in that: include: The user device acquires transaction data, where the transaction data is used to determine user transaction data, where the user transaction data includes at least one of the following data: transaction amount, payment address, and random number; The user equipment determines a first key according to the configuration information of the user equipment; The user device encrypts the user transaction data according to the first key, and the encryption result is used to determine a first certification ciphertext; The user equipment sends the first certification ciphertext.
6. A transaction data verification device, characterized in that: include: an acquisition module, configured to acquire a first certification ciphertext, wherein the first certification ciphertext is a ciphertext determined by a user device encrypting user transaction data according to a first key, wherein the first key is determined by the user device according to configuration information of the user device, and the user transaction data is determined according to at least one of the following data: a transaction amount, a payment address, and a random number; a processing module, configured to determine a second certification ciphertext according to the configuration information of the first device, wherein the second certification ciphertext is used by the first device to determine a verification result of the first certification ciphertext; The processing module is further used to determine the first user transaction data according to the verification result of the first proof ciphertext.
7. The device according to claim 6, characterized in that The processing module is specifically used for: Determining legal transaction data and legal keys according to the configuration information of the first device; The legal transaction data is encrypted according to the legal key, and the encryption is used to determine the second proof ciphertext.
8. The device according to claim 6, characterized in that The processing module is specifically used for: Determining that the user transaction data is legal transaction data according to a verification result of the first proof ciphertext; First user transaction data is determined according to the user transaction data.
9. The device according to claim 6, characterized in that The processing module is also used for: Determining that the user transaction data is illegal transaction data according to the verification result of the first proof ciphertext; Delete the user transaction data.
10. A transaction data verification device, characterized in that: include: An acquisition module, used to acquire transaction data, wherein the transaction data is used to determine user transaction data, and the user transaction data includes at least one of the following data: transaction amount, payment address, and random number; A processing module, configured to determine a first key according to configuration information of a user device; The processing module is further used to encrypt the user transaction data according to the first key, and the encryption result is used to determine the first certification ciphertext; The processing module is further used to send the first proof ciphertext.
11. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor executes the steps of any one of the methods in claims 1 to 5.
12. A computer-readable storage medium, characterized in that: The method comprises a program code. When the program code is run on an electronic device, the program code is used to enable the electronic device to execute the steps of any method described in claims 1 to 5.