WO2024087470A1 - Blockchain transaction data supervision method and apparatus, and device and nonvolatile readable storage medium - Google Patents

Blockchain transaction data supervision method and apparatus, and device and nonvolatile readable storage medium Download PDF

Info

Publication number
WO2024087470A1
WO2024087470A1 PCT/CN2023/082300 CN2023082300W WO2024087470A1 WO 2024087470 A1 WO2024087470 A1 WO 2024087470A1 CN 2023082300 W CN2023082300 W CN 2023082300W WO 2024087470 A1 WO2024087470 A1 WO 2024087470A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction data
blockchain
ciphertext
random
private key
Prior art date
Application number
PCT/CN2023/082300
Other languages
French (fr)
Chinese (zh)
Inventor
林群阳
张闯
谢志勇
李雪雷
Original Assignee
广东浪潮智慧计算技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 广东浪潮智慧计算技术有限公司 filed Critical 广东浪潮智慧计算技术有限公司
Publication of WO2024087470A1 publication Critical patent/WO2024087470A1/en

Links

Definitions

  • the present application relates to the field of blockchain technology, and in particular to a method, device, equipment and non-volatile readable storage medium for supervising blockchain transaction data.
  • the blockchain system has a distributed architecture that is different from the traditional information system. Its distributed nodes jointly maintain a data ledger, and each of them keeps a copy of the same data ledger. It has the characteristics of decentralization, distribution, open and transparent data, non-tamperability, and traceability. Unlike the traditional system that relies on the trust endorsement of a centralized authority. In the blockchain, transaction data relies on cryptographic algorithms and consensus mechanisms to achieve trust endorsement, so the transaction data has a high degree of credibility. At the same time, due to the special storage method of block data, the transaction data on the blockchain is theoretically stored permanently. Based on the above characteristics, blockchain has been increasingly widely used.
  • the regulatory technologies for blockchain transaction data include controlled rollback technology for harmful information, blockchain editable technology, and hierarchical and collaborative regulatory technology.
  • Controlled rollback technology means that when a hacker attack causes serious consequences to the blockchain system or data, the blockchain system administrator can roll back the ledger data to before the harmful transaction event.
  • this treatment also brings some disadvantages, which will cause some normal transaction data to be cleared together, which is easy to cause transaction disagreements.
  • Blockchain editable technology has a variety of methods to modify transaction data, such as the data modification method based on chameleon hash function in single-chain mode, the data modification method in parallel chain mode, etc. These methods have some special requirements or restrictions on how the blockchain system constructs the data structure of the ledger, so their versatility and adaptability are poor.
  • Hierarchical and collaborative supervision technology can be divided into application end, blockchain node and supervision center according to the function and deployment location of the entity; the shielding function of harmful data can be added to each functional entity as needed, and data detection and harmful data shielding can be performed at the corresponding location.
  • This supervision method will introduce a supervision function module into the blockchain system, which requires some customization and modification of the blockchain system. At the same time, the supervision module must be able to adapt to the blockchain data protocol, etc., which brings some additional development work.
  • the purpose of the embodiments of the present application is to provide a blockchain transaction data supervision method, device, equipment and non-volatile readable storage medium, which can realize automated, highly adaptable, efficient and low-cost transaction data supervision.
  • the present application embodiment provides a method for supervising blockchain transaction data, which is applicable to a blockchain platform for deploying smart contracts.
  • the method includes:
  • the transaction data ciphertext is obtained; wherein the transaction data ciphertext is obtained by encrypting the transaction data using a random private key; the transaction data identifier, the transaction data ciphertext, the audit status of the transaction data and the random private key are written into the account; Book;
  • the transaction data ciphertext is transmitted to the regulatory system through the third smart contract interface, so that the regulatory system can decrypt the transaction data ciphertext using the random public key, and perform compliance detection on the decrypted transaction data, and upload the detection results to the blockchain through the fourth smart contract interface;
  • the review status corresponding to the transaction data and the information to be published that are adjusted according to the test results include:
  • test result shows that the transaction data is compliant
  • the audit status corresponding to the transaction data is adjusted to the audit passed status, and the decrypted random public key is written into the account book through the fourth smart contract interface;
  • the audit status corresponding to the above transaction data is adjusted to a failed audit status, and the non-compliance description is written into the above account book through the above fourth smart contract interface.
  • the method further includes:
  • the identifier of the transaction data is fed back to the blockchain application that transmits the transaction data through the first smart contract interface.
  • the method further includes:
  • the target transaction data ciphertext and the decrypted target random public key matching the target identifier are obtained from the account book; the target transaction data ciphertext is decrypted using the target random public key to obtain the target transaction data plaintext; the target transaction data plaintext is fed back to the blockchain application through the fifth smart contract interface;
  • the method further includes:
  • the step of determining whether the audit status corresponding to the target identifier is an audit-approved status is performed;
  • the above-mentioned feeding back the above-mentioned target transaction data in plain text to the above-mentioned blockchain application through the above-mentioned fifth smart contract interface includes:
  • the transaction data plaintext that matches the above-mentioned authority scope is extracted from the above-mentioned target transaction data plaintext, and the transaction data plaintext that matches the above-mentioned authority scope is fed back to the above-mentioned blockchain application through the above-mentioned fifth smart contract interface.
  • the method includes:
  • the randomly generated key pair includes a random private key and a random public key
  • the random public key is encrypted using the regulatory private key fed back by the regulatory system, and the encrypted random public key is written into the above-mentioned account book.
  • the method includes:
  • the above-mentioned randomly generated key pair includes a random private key and a random public key encrypted by the supervised private key; write the above-mentioned encrypted random public key into the above-mentioned account book.
  • the method includes:
  • the method includes:
  • the randomly generated key pair includes a random private key and a random public key
  • the random public key is encrypted using the regulatory private key fed back by the regulatory system, and the encrypted random public key is written into the above-mentioned account book.
  • the encrypting of the transaction data using the random private key to obtain the ciphertext of the transaction data includes:
  • the random private key is used to encrypt the content of the pre-protected field in the transaction data to obtain the transaction data ciphertext.
  • the encrypting the transaction data using the random private keys to obtain the ciphertext of the transaction data includes:
  • the above transaction data is encrypted according to the random private key corresponding to each field to obtain the transaction data ciphertext.
  • the encrypting of the transaction data using the random private key to obtain the ciphertext of the transaction data includes:
  • the random private key is used to encrypt the contents of all fields in the transaction data to obtain the transaction data ciphertext.
  • the obtaining of the ciphertext of transaction data based on the first smart contract interface includes:
  • the embodiment of the present application also provides a blockchain transaction data supervision device, which is applicable to a blockchain platform for deploying smart contracts, and the device includes a first acquisition unit, a writing unit, a second acquisition unit, an encryption unit, a transmission unit, and an adjustment unit;
  • the first acquisition unit is configured to acquire the transaction data ciphertext based on the first smart contract interface; wherein the transaction data ciphertext is obtained by encrypting the transaction data using a random private key;
  • the writing unit is configured to write the identifier of the transaction data, the ciphertext of the transaction data, the review status of the transaction data, and the random private key into the account book;
  • the second acquisition unit is configured to acquire the data to be verified based on the second smart contract interface
  • the encryption unit is configured to encrypt the data to be verified using the random private key to obtain a ciphertext of the data to be verified; compare the ciphertext of the data to be verified with the ciphertext of the transaction data, and return the comparison result to the blockchain application or the user terminal;
  • the transmission unit is configured to transmit the ciphertext of the transaction data to the regulatory system through the third smart contract interface, so that the regulatory system can decrypt the ciphertext of the transaction data using the random public key, perform compliance detection on the decrypted transaction data, and upload the detection result to the blockchain through the fourth smart contract interface;
  • the adjustment unit is configured to adjust the audit status corresponding to the transaction data and the information to be published according to the detection result.
  • the adjustment unit is configured to adjust the review status corresponding to the transaction data to a review passed status when the detection result shows that the transaction data is compliant, and write the decrypted random public key into the account book through the fourth smart contract interface;
  • the audit status corresponding to the above transaction data is adjusted to a failed audit status, and the non-compliance description is written into the above account book through the above fourth smart contract interface.
  • it also includes an identification feedback unit;
  • the identification feedback unit is configured to feedback the identification of the transaction data to the blockchain application that transmits the transaction data through the first smart contract interface.
  • the method further includes a first judgment unit, a third acquisition unit, a decryption unit, a data feedback unit and a prompt feedback unit;
  • the first judgment unit is configured to judge whether the review status corresponding to the target identifier is a review passed status when receiving the target identifier transmitted by the blockchain application through the fifth smart contract interface;
  • the third acquisition unit is configured to obtain from the account book when the audit status corresponding to the target identifier is the audit passed status. Get the target transaction data ciphertext matching the above target identifier and the decrypted target random public key;
  • the decryption unit is configured to use the target random public key to decrypt the target transaction data ciphertext to obtain the target transaction data plaintext;
  • the data feedback unit is configured to feed back the target transaction data in plain text to the blockchain application through the fifth smart contract interface;
  • the prompt feedback unit is configured to feedback prompt information of data acquisition failure to the blockchain application through the fifth smart contract interface when the audit status corresponding to the target identifier is an audit failure status or an unaudited status.
  • it further includes a second judgment unit
  • the second judgment unit is configured to, upon receiving the target identifier transmitted by the blockchain application through the fifth smart contract interface, determine whether the blockchain application has access rights and the corresponding scope of rights; if the blockchain application has access rights, trigger the first judgment unit to execute the step of determining whether the review status corresponding to the target identifier is a review-passed status;
  • the above-mentioned data feedback unit is configured to extract the transaction data plaintext matching the above-mentioned authority scope from the above-mentioned target transaction data plaintext, and feed back the transaction data plaintext matching the above-mentioned authority scope to the above-mentioned blockchain application through the above-mentioned fifth smart contract interface.
  • the above-mentioned device further includes a first key acquisition unit
  • the key acquisition unit is configured to acquire a randomly generated key pair from a storage system of a block node; the randomly generated key pair includes a random private key and a random public key;
  • the above-mentioned writing unit is also configured to encrypt the above-mentioned random public key using the supervision private key fed back by the supervision system, and write the encrypted random public key into the above-mentioned account book.
  • the apparatus further includes a first receiving unit;
  • the first receiving unit is configured to receive a pair of randomly generated key pairs written by the supervision system through the sixth smart contract interface; the randomly generated key pair includes a random private key and a random public key encrypted by the supervised private key;
  • the writing unit is also configured to write the encrypted random public key into the account book.
  • the apparatus further includes a second receiving unit;
  • the above-mentioned second receiving unit is configured to receive a random private key written by the regulatory system through the sixth smart contract interface; wherein the random public key corresponding to the above-mentioned random private key is stored on the above-mentioned regulatory system.
  • the apparatus further includes a second key acquisition unit;
  • the second key acquisition unit is configured to acquire a pair of randomly generated key pairs written by an external program through the seventh smart contract interface; the randomly generated key pair includes a random private key and a random public key;
  • the above-mentioned writing unit is also configured to encrypt the above-mentioned random public key using the supervision private key fed back by the supervision system, and write the encrypted random public key into the above-mentioned account book.
  • the first acquisition unit is configured to use the random private key to encrypt the content of the pre-protected field in the transaction data to obtain a ciphertext of the transaction data.
  • the first acquisition unit is configured to encrypt the transaction data according to a random private key corresponding to each field to obtain a ciphertext of the transaction data.
  • the first acquisition unit is configured to use the random private key to encrypt the contents of all fields in the transaction data to obtain a ciphertext of the transaction data.
  • the first acquisition unit is configured to receive transaction data ciphertext transmitted by the blockchain application through the first smart contract interface; wherein the transaction data ciphertext is obtained by obtaining a random private key by the blockchain application through the initial smart contract interface; and the transaction data is encrypted using the random private key.
  • the embodiment of the present application also provides a supervision system for blockchain transaction data, including a blockchain application, a blockchain platform for deploying smart contracts, and a supervision system;
  • the blockchain application is configured to call the first smart contract interface to transfer the transaction data to the ledger of the blockchain;
  • the blockchain platform is configured to obtain the transaction data; encrypt the transaction data using a random private key to obtain a ciphertext of the transaction data; write the identifier of the transaction data, the ciphertext of the transaction data, the audit status of the transaction data, the random private key, and the random public key encrypted with the supervisory private key into the account book; obtain the data to be verified based on the second smart contract interface; encrypt the data to be verified using the random private key to obtain a ciphertext of the data to be verified, compare the ciphertext of the data to be verified with the ciphertext of the transaction data, and return the comparison result to the blockchain application or user terminal; transmit the ciphertext of the transaction data to the supervisory system through the third smart contract interface;
  • the above-mentioned supervision system is configured to use the supervision public key to decrypt the encrypted random public key, use the random public key to decrypt the above-mentioned transaction data ciphertext, and perform compliance detection on the decrypted transaction data, and upload the detection result to the blockchain through the fourth smart contract interface;
  • the above-mentioned blockchain platform is also configured to adjust the review status corresponding to the above-mentioned transaction data and the information to be published based on the above-mentioned detection results.
  • the embodiment of the present application also provides a supervision system for blockchain transaction data, including a blockchain application, a blockchain platform for deploying smart contracts, and a supervision system;
  • the blockchain application is configured to obtain a random private key through an initial smart contract interface; encrypt transaction data using the random private key to obtain transaction data ciphertext; and call the first smart contract interface to transmit the transaction data ciphertext to the blockchain ledger;
  • the blockchain platform is configured to obtain the ciphertext of the transaction data; write the identifier of the transaction data, the ciphertext of the transaction data, the audit status of the transaction data, the random private key, and the random public key encrypted with the supervisory private key into the account book; obtain the data to be verified based on the second smart contract interface; encrypt the data to be verified using the random private key to obtain the ciphertext of the data to be verified; compare the ciphertext of the data to be verified with the ciphertext of the transaction data, and return the comparison result to the blockchain application or the user terminal; transmit the ciphertext of the transaction data to the supervisory system through the third smart contract interface;
  • the above-mentioned supervision system is configured to use the supervision public key to decrypt the encrypted random public key, use the random public key to decrypt the above-mentioned transaction data ciphertext, and perform compliance detection on the decrypted transaction data, and upload the detection result to the blockchain through the fourth smart contract interface;
  • the above-mentioned blockchain platform is also configured to adjust the review status corresponding to the above-mentioned transaction data and the information to be published based on the above-mentioned detection results.
  • the embodiment of the present application also provides a supervision system for blockchain transaction data, including a blockchain application, a blockchain platform for deploying smart contracts, and a supervision system;
  • the blockchain application is configured to call the first smart contract interface to transfer the transaction data to the ledger of the blockchain;
  • the blockchain platform is configured to obtain a random private key through an initial smart contract interface; encrypt the transaction data using the random private key to obtain a ciphertext of the transaction data; write the identifier of the transaction data, the ciphertext of the transaction data, the review status of the transaction data, and the random private key into the account book, and mark the review status of the ciphertext of the transaction data as unreviewed; obtain the data to be verified based on the second smart contract interface; encrypt the data to be verified using the random private key to obtain a ciphertext of the data to be verified; compare the ciphertext of the data to be verified with the ciphertext of the transaction data, and return the comparison result to the blockchain application or the user terminal; transmit the ciphertext of the transaction data to the supervision system through the third smart contract interface;
  • the above-mentioned supervision system is configured to generate a random private key and a random public key; upload the above-mentioned random private key to the chain, and save the above-mentioned random public key locally; use the random public key to decrypt the above-mentioned transaction data ciphertext, and perform compliance detection on the decrypted above-mentioned transaction data, and upload the detection result to the blockchain through the fourth smart contract interface;
  • the above-mentioned blockchain platform is also configured to adjust the review status corresponding to the above-mentioned transaction data and the information to be published based on the above-mentioned detection results.
  • the embodiment of the present application also provides a supervision system for blockchain transaction data, including a blockchain application, a blockchain platform for deploying smart contracts, and a supervision system;
  • the blockchain application is configured to obtain a random private key through an initial smart contract interface; encrypt transaction data using the random private key to obtain transaction data ciphertext; and call the first smart contract interface to transmit the transaction data ciphertext to the blockchain ledger;
  • the blockchain platform is configured to obtain the ciphertext of the transaction data; write the identifier of the transaction data, the ciphertext of the transaction data, the audit status of the transaction data and the random private key into the account book, and mark the audit status of the ciphertext of the transaction data as unaudited; obtain the data to be verified based on the second smart contract interface; encrypt the data to be verified using the random private key to obtain the ciphertext of the data to be verified; write the The ciphertext of the data to be verified is compared with the ciphertext of the transaction data, and the comparison result is returned to the blockchain application or the user terminal; the ciphertext of the transaction data is transmitted to the supervision system through the third smart contract interface;
  • the above-mentioned supervision system is configured to generate a random private key and a random public key; upload the above-mentioned random private key to the chain, and save the above-mentioned random public key locally; use the random public key to decrypt the above-mentioned transaction data ciphertext, and perform compliance detection on the decrypted above-mentioned transaction data, and upload the detection result to the blockchain through the fourth smart contract interface;
  • the above-mentioned blockchain platform is also configured to adjust the review status corresponding to the above-mentioned transaction data and the information to be published based on the above-mentioned detection results.
  • the present application also provides an electronic device, including:
  • a memory arranged to store a computer program
  • a processor is configured to execute the above-mentioned computer program to implement the steps of the above-mentioned blockchain transaction data supervision method.
  • An embodiment of the present application also provides a non-volatile readable storage medium, on which a computer program is stored.
  • a computer program is stored on which a computer program is stored.
  • the steps of the above-mentioned blockchain transaction data supervision method are implemented.
  • the blockchain platform that deploys smart contracts obtains the transaction data ciphertext based on the first smart contract interface; wherein the transaction data ciphertext is obtained by encrypting the transaction data using a random private key; the transaction data identifier, transaction data ciphertext, the audit status of the transaction data and the random private key are written into the account book; the data to be verified is obtained based on the second smart contract interface; the data to be verified is encrypted using a random private key to obtain the ciphertext of the data to be verified; the ciphertext of the data to be verified is compared with the ciphertext of the transaction data, and the comparison result is returned to the blockchain application or user terminal.
  • the transaction data ciphertext is transmitted to the regulatory system through the third smart contract interface, so that the regulatory system can decrypt the transaction data ciphertext using a random public key, and perform compliance detection on the decrypted transaction data, and upload the detection results to the blockchain through the fourth smart contract interface; the audit status corresponding to the transaction data and the information to be published are adjusted according to the detection results.
  • the automatic supervision of transaction data can be realized through the interface corresponding to the smart contract, and this supervision method is open, transparent and efficient.
  • the smart contract needs to be deployed on the blockchain, so it can be adapted to any blockchain system without additional development costs.
  • the transaction data on the chain is only saved once in the account book, reducing the storage overhead of the on-chain data due to supervision. It realizes automated, highly adaptable, efficient and low-cost transaction data supervision.
  • FIG1 is a flow chart of a method for supervising blockchain transaction data provided by an embodiment of the present application
  • FIG2 is a schematic diagram of the structure of a blockchain transaction data supervision device provided in an embodiment of the present application.
  • FIG3 is a blockchain transaction data supervision system provided by an embodiment of the present application.
  • FIG4 is another blockchain transaction data supervision system provided by an embodiment of the present application.
  • FIG5 is a structural diagram of an electronic device provided in an embodiment of the present application.
  • FIG1 is a flow chart of a method for supervising blockchain transaction data provided by an embodiment of the present application, which is applicable to a blockchain platform for deploying smart contracts, and the method includes:
  • S101 Obtain transaction data ciphertext based on the first smart contract interface.
  • the transaction data is encrypted by asymmetric encryption.
  • a random public key and a random private key can be obtained by random generation.
  • the transaction data ciphertext is obtained by encrypting the transaction data using the random private key.
  • the process of using smart contracts on the blockchain is as follows: multiple users jointly participate in the formulation of a contract and use the contract programming language to write a smart contract code; the smart contract code is compiled and reviewed, and the participating parties use private keys to sign the reviewed contract code to ensure the validity of the contract.
  • the signed smart contract will be transmitted to the blockchain network, and the smart contract will be spread through the peer-to-peer network and stored on the distributed nodes of the blockchain. After the smart contract is published on the blockchain, it will not be automatically executed. It is often necessary for the blockchain application to call the smart contract, execute the contract terms through it, and interact with the ledger data.
  • the blockchain application can be varied according to the functions to be implemented.
  • different smart contract interfaces can be set to implement different blockchain applications.
  • the blockchain application can call the first smart contract interface to transmit transaction data to the blockchain platform.
  • the blockchain platform can encrypt the transaction data based on the obtained random private key to obtain the transaction data ciphertext.
  • the blockchain application can also obtain a random private key from the ledger of the blockchain platform through the initial smart contract interface, use the random private key to encrypt the transaction data, and call the first smart contract interface to transmit the ciphertext of the transaction data to the blockchain platform.
  • the first method is to obtain a randomly generated key pair from the storage system of the block node; the randomly generated key pair includes a random private key and a random public key.
  • the random public key can be encrypted using the regulatory private key fed back by the regulatory system, and the encrypted random public key can be written into the account book.
  • the second method is to receive a pair of randomly generated key pairs written by the regulatory system through the sixth smart contract interface; the randomly generated key pair includes a random private key and a random public key encrypted by the regulated private key; and the encrypted random public key is written into the account book.
  • the third method is to receive the random private key written by the regulatory system through the sixth smart contract interface; wherein the random public key corresponding to the random private key is stored on the regulatory system.
  • the fourth method is to obtain a pair of randomly generated key pairs written by an external program through the seventh smart contract interface; the randomly generated key pair includes a random private key and a random public key.
  • the random public key can be encrypted using the regulatory private key fed back by the regulatory system, and the encrypted random public key can be written into the account book.
  • the transaction data can be encrypted using the random private key.
  • the first way is to use the random private key to encrypt the content of the pre-protected field in the transaction data to obtain the transaction data ciphertext.
  • the pre-protected field can be a field in the transaction data where sensitive information or information that needs to be kept confidential is located.
  • the second way is to set multiple random private keys; encrypt the transaction data according to the random private key corresponding to each field to obtain the transaction data ciphertext.
  • the third way is to encrypt the complete transaction data, that is, to use the random private key to encrypt the content of all fields in the transaction data to obtain the transaction data ciphertext.
  • S102 Write the transaction data identifier, transaction data ciphertext, transaction data review status, and random private key into the account book.
  • a unique identifier can be set for each transaction data.
  • the blockchain platform can write the identifier of the transaction data, the ciphertext of the transaction data, the audit status of the transaction data, and the random private key into the account book. In the initial state, the audit status of the transaction data is unaudited.
  • S103 Obtain the data to be verified based on the second smart contract interface; encrypt the data to be verified using a random private key to obtain a ciphertext of the data to be verified.
  • the blockchain application can call the second smart contract interface to submit the data to be verified and its corresponding identifier to the blockchain for verification.
  • the contract interface processing program first obtains the transaction data ciphertext and its random private key uploaded to the chain through the first smart contract interface from the ledger, then uses the random private key to encrypt the submitted data to be verified, and again compares the ciphertext of the data to be verified with the ciphertext of the transaction data, and returns the comparison result to the blockchain application or user terminal.
  • S104 Transmitting the ciphertext of transaction data to the regulatory system through the third smart contract interface, so that the regulatory system can decrypt the ciphertext of transaction data using a random public key, and perform compliance testing on the decrypted transaction data, and upload the test results to the blockchain through the fourth smart contract interface.
  • the blockchain platform can transmit transaction data ciphertext to the regulatory system through the third smart contract interface, or the regulatory system can call the third smart contract interface to obtain unaudited data from the blockchain.
  • the data may include the transaction data identifier, transaction data ciphertext, random private key, encrypted random public key and audit status.
  • the key pair of the supervision system itself is named as the supervision public key and the supervision private key.
  • the encrypted random public key is decrypted using the regulatory public key of the regulatory system itself to obtain the decrypted random public key; where the regulatory public key and the regulatory private key are a pair of asymmetric encryption key pairs.
  • the decrypted random public key is used to decrypt the transaction data ciphertext to obtain the transaction data plaintext;
  • the data detection algorithm is used to detect the compliance of the transaction data; finally, the detection results are submitted to the blockchain through the fourth smart contract interface.
  • random key pairs can also be generated by the regulatory system
  • the regulatory system can put the random private key on the chain so that the blockchain platform can use the random private key to encrypt the transaction data.
  • the regulatory system can save the random public key locally. After the regulatory system obtains the data to be reviewed, it can directly use the locally saved random public key to decrypt the transaction data ciphertext and obtain the transaction data plaintext; then, use the data detection algorithm to detect the compliance of the transaction data; finally, submit the detection results to the blockchain through the fourth smart contract interface.
  • the types of transaction data to be reviewed are different, and the corresponding data detection algorithms will also be different.
  • the data detection algorithm can be a matching algorithm or an artificial intelligence algorithm, etc.
  • Using data detection algorithms to detect the compliance of transaction data is a relatively common technology, which will not be elaborated here.
  • the blockchain platform can compare the ciphertext of the data to be verified with the ciphertext of the transaction data for consistency.
  • the blockchain application can also call the third smart contract interface to obtain some unaudited data from the blockchain, and the blockchain application itself verifies the consistency of the data, that is, encrypts the data to be verified with a random private key, and then compares it with the ciphertext of the transaction data to check whether the results are consistent.
  • S105 Adjust the audit status corresponding to the transaction data and the information to be published according to the detection results.
  • the detection results may include two situations: transaction data compliance and transaction data non-compliance.
  • the audit status corresponding to the transaction data can be adjusted to the audit passed status.
  • the compliance of the transaction data means that it can be used by the blockchain application. Since the transaction data ciphertext is written in the account book, the blockchain platform can write the decrypted random public key into the account book through the fourth smart contract interface when the transaction data is compliant. When a blockchain application needs to call transaction data, the blockchain platform can decrypt the transaction data ciphertext through the random public key to obtain the plaintext transaction data, and then feed the plaintext transaction data back to the blockchain application.
  • the audit status corresponding to the transaction data is adjusted to the audit failed status, and the non-compliance description is written into the account book through the fourth smart contract interface.
  • the non-compliance description can specify which data is non-compliant or the reasons for the non-compliance, so that blockchain users can more clearly understand the non-compliance of transaction data.
  • the blockchain platform that deploys smart contracts obtains the transaction data ciphertext based on the first smart contract interface; wherein the transaction data ciphertext is obtained by encrypting the transaction data using a random private key; the transaction data identifier, transaction data ciphertext, transaction data review status and random private key are written into the account book; the data to be verified is obtained based on the second smart contract interface; the data to be verified is encrypted using a random private key to obtain the data ciphertext to be verified; the data ciphertext to be verified is compared with the transaction data ciphertext, and the comparison result is returned to the blockchain application or user terminal.
  • the transaction data ciphertext is transmitted to the regulatory system through the third smart contract interface, so that the regulatory system can decrypt the transaction data ciphertext using a random public key, and perform compliance detection on the decrypted transaction data, and upload the detection results to the blockchain through the fourth smart contract interface; the review status corresponding to the transaction data and the information to be published are adjusted according to the detection results.
  • the automated supervision of transaction data can be achieved through the interface corresponding to the smart contract, and this supervision method is open, transparent and efficient.
  • the transaction data on the chain is only saved once in the account book, reducing the storage overhead of the on-chain data due to supervision. It realizes automated, highly adaptable, efficient and low-cost transaction data supervision.
  • the blockchain platform can set corresponding identifiers for different transaction data. After writing the transaction data identifier, transaction data ciphertext, transaction data review status and random private key into the account book, the blockchain platform can feedback the transaction data identifier to the blockchain application that transmits the transaction data through the first smart contract interface, so that the blockchain application can obtain the corresponding transaction data based on the identifier.
  • the above content is an introduction to the review process of transaction data.
  • blockchain applications can obtain transaction data from the blockchain platform.
  • the blockchain application may transmit the target identifier to the blockchain platform through the fifth smart contract interface.
  • the blockchain platform may determine whether the audit status corresponding to the target identifier is the audit passed status.
  • Each transaction data has its corresponding identifier and random public key.
  • the transaction data ciphertext corresponding to the target identifier is referred to as the target transaction data ciphertext
  • its corresponding random public key is referred to as the target random public key.
  • the target transaction data ciphertext matching the target identifier and the decrypted target random public key are obtained from the account book; the target transaction data ciphertext is decrypted using the target random public key to obtain the target transaction data plaintext; the target transaction data plaintext is fed back to the blockchain application through the fifth smart contract interface.
  • the blockchain platform can feedback a prompt message of data acquisition failure to the blockchain application through the fifth smart contract interface.
  • the blockchain platform can determine whether the blockchain application has access rights and the corresponding permission scope when receiving the target identifier transmitted by the blockchain application through the fifth smart contract interface.
  • a step of determining whether the audit status corresponding to the target identifier is an audit-passed status is performed.
  • the blockchain platform can extract the transaction data plaintext that matches the authority scope from the target transaction data plaintext, and feed the transaction data plaintext that matches the authority scope back to the blockchain application through the fifth smart contract interface.
  • first smart contract interface, the second smart contract interface, the third smart contract interface, the fourth smart contract interface, the fifth smart contract interface, the sixth smart contract interface and the seventh smart contract interface mentioned above can be independent contract interfaces, and each contract interface is configured to perform different functions.
  • the smart contract interfaces mentioned above can also be a unified interface, and different functions are distinguished by setting different identifiers. Among them, “first, second, third, fourth, fifth, sixth and seventh" are only used to distinguish different functions, and do not limit the arrangement order of smart contract interfaces.
  • FIG2 is a schematic diagram of the structure of a blockchain transaction data supervision device provided in an embodiment of the present application, which is applicable to a blockchain platform for deploying smart contracts, and the device includes a first acquisition unit 21, a writing unit 22, a second acquisition unit 23, an encryption unit 24, a transmission unit 25, and an adjustment unit 26;
  • the first acquisition unit 21 is configured to acquire the transaction data ciphertext based on the first smart contract interface; wherein the transaction data ciphertext is obtained by encrypting the transaction data using a random private key;
  • a writing unit 22 configured to write the transaction data identifier, the transaction data ciphertext, the transaction data review status and the random private key into the account book;
  • a second acquisition unit 23 is configured to acquire the data to be verified based on the second smart contract interface
  • the encryption unit 24 is configured to encrypt the data to be verified using a random private key to obtain a ciphertext of the data to be verified; compare the ciphertext of the data to be verified with the ciphertext of the transaction data, and return the comparison result to the blockchain application or the user terminal;
  • the transmission unit 25 is configured to transmit the transaction data ciphertext to the supervision system through the third smart contract interface, so that the supervision system can decrypt the transaction data ciphertext using the random public key, perform compliance detection on the decrypted transaction data, and upload the detection result to the supervision system through the fourth smart contract interface. Transfer to blockchain;
  • the adjustment unit 26 is configured to adjust the audit status corresponding to the transaction data and the information to be published according to the detection result.
  • the adjustment unit is configured to adjust the review status corresponding to the transaction data to a review passed status when the detection result shows that the transaction data is compliant, and write the decrypted random public key into the account book through the fourth smart contract interface;
  • the audit status corresponding to the transaction data is adjusted to the audit failed status, and the non-compliance description is written into the account book through the fourth smart contract interface.
  • it also includes an identification feedback unit;
  • the identification feedback unit is configured to feedback the identification of the transaction data to the blockchain application that transmits the transaction data through the first smart contract interface.
  • the audit status corresponding to the transaction data and the information to be published according to the detection result it also includes a first judgment unit, a third acquisition unit, a decryption unit, a data feedback unit and a prompt feedback unit;
  • the first judgment unit is configured to judge whether the review status corresponding to the target identifier is a review passed status when receiving the target identifier transmitted by the blockchain application through the fifth smart contract interface;
  • the third acquisition unit is configured to acquire, when the audit status corresponding to the target identifier is the audit passed status, the target transaction data ciphertext matching the target identifier and the decrypted target random public key from the account book;
  • a decryption unit is configured to decrypt the target transaction data ciphertext using the target random public key to obtain the target transaction data plaintext;
  • a data feedback unit configured to feed back the target transaction data in plain text to the blockchain application via a fifth smart contract interface
  • the prompt feedback unit is configured to feedback prompt information of data acquisition failure to the blockchain application through the fifth smart contract interface when the audit status corresponding to the target identifier is an audit failure status or an unaudited status.
  • it further includes a second judgment unit
  • the second judgment unit is configured to judge whether the blockchain application has access rights and the corresponding scope of rights when receiving the target identifier transmitted by the blockchain application through the fifth smart contract interface; if the blockchain application has access rights, trigger the first judgment unit to execute the step of judging whether the review status corresponding to the target identifier is a review passed status;
  • the data feedback unit is configured to extract transaction data plaintext that matches the authority scope from the target transaction data plaintext, and feed back the transaction data plaintext that matches the authority scope to the blockchain application through the fifth smart contract interface.
  • the device further includes a first key obtaining unit;
  • a key acquisition unit is configured to acquire a pair of randomly generated key pairs from a storage system of a block node; the randomly generated key pair includes a random private key and a random public key;
  • the writing unit is also configured to encrypt the random public key using the supervisory private key fed back by the supervisory system, and write the encrypted random public key into the account book.
  • the device further includes a first receiving unit;
  • a first receiving unit is configured to receive a pair of randomly generated key pairs written by the supervision system through the sixth smart contract interface; the randomly generated key pair includes a random private key and a random public key encrypted by the supervised private key;
  • the writing unit is also configured to write the encrypted random public key into the ledger.
  • the device further includes a second receiving unit;
  • the second receiving unit is configured to receive a random private key written by the supervision system through the sixth smart contract interface; wherein the random public key corresponding to the random private key is stored on the supervision system.
  • the device further includes a second key obtaining unit;
  • a second key acquisition unit is configured to acquire a pair of randomly generated key pairs written by an external program through a seventh smart contract interface; the randomly generated key pair includes a random private key and a random public key;
  • the writing unit is also configured to encrypt the random public key using the supervisory private key fed back by the supervisory system, and write the encrypted random public key into the account book.
  • the first acquisition unit is configured to use a random private key to encrypt the content of the pre-protected field in the transaction data to obtain a ciphertext of the transaction data.
  • the first acquisition unit is configured to encrypt the transaction data according to a random private key corresponding to each field to obtain a ciphertext of the transaction data.
  • the first acquisition unit is configured to use a random private key to encrypt the contents of all fields in the transaction data to obtain a ciphertext of the transaction data.
  • the first acquisition unit is configured to receive transaction data ciphertext transmitted by the blockchain application through the first smart contract interface; wherein the transaction data ciphertext is obtained by the blockchain application obtaining a random private key through the initial smart contract interface; and the transaction data is encrypted using the random private key.
  • the blockchain platform that deploys smart contracts obtains the transaction data ciphertext based on the first smart contract interface; wherein the transaction data ciphertext is obtained by encrypting the transaction data using a random private key; the transaction data identifier, transaction data ciphertext, the audit status of the transaction data and the random private key are written into the account book; the data to be verified is obtained based on the second smart contract interface; the data to be verified is encrypted using a random private key to obtain the ciphertext of the data to be verified; the ciphertext of the data to be verified is compared with the ciphertext of the transaction data, and the comparison result is returned to the blockchain application or user terminal.
  • the transaction data ciphertext is transmitted to the regulatory system through the third smart contract interface, so that the regulatory system can decrypt the transaction data ciphertext using a random public key, and perform compliance detection on the decrypted transaction data, and upload the detection results to the blockchain through the fourth smart contract interface; the audit status corresponding to the transaction data and the information to be published are adjusted according to the detection results.
  • the automated supervision of transaction data can be realized through the interface corresponding to the smart contract, and this supervision method is open, transparent and efficient.
  • the smart contract needs to be deployed on the blockchain, so it can be adapted to any blockchain system without additional development costs.
  • the transaction data on the chain is only saved once in the account book, reducing the storage overhead of the on-chain data due to supervision. It realizes automated, highly adaptable, efficient and low-cost transaction data supervision.
  • Figure 3 is a blockchain transaction data supervision system provided by an embodiment of the present application, including a blockchain application, a blockchain platform for deploying smart contracts, and a supervision system; in Figure 3, the first smart contract interface to the fifth smart contract interface are represented by contract interface 1 to contract interface 5 respectively.
  • the blockchain application is configured to call the first smart contract interface (contract interface 1) to execute transaction data on-chain, that is, to transfer the transaction data to the ledger of the blockchain.
  • the blockchain platform is configured to obtain transaction data; encrypt the transaction data using a random private key to obtain a ciphertext of the transaction data; and write the identifier of the transaction data, the ciphertext of the transaction data, the audit status of the transaction data, the random private key, and the random public key encrypted with the supervisory private key into the account book.
  • the blockchain application can transmit the data to be verified for verifying the transaction data to the blockchain platform through the second smart contract interface (contract interface 2).
  • contract interface 2 the transaction data recorded in the account book of the blockchain platform is in a ciphertext state.
  • the blockchain platform obtains the data to be verified based on the contract interface 2, it can encrypt the data to be verified using a random private key to obtain the ciphertext of the data to be verified.
  • the blockchain platform compares the ciphertext of the data to be verified with the ciphertext of the transaction data, and returns the comparison result to the blockchain application or the user terminal.
  • the blockchain platform can transmit the ciphertext of the transaction data to the supervisory system through the third smart contract interface (contract interface 3). If the blockchain application needs to obtain the ciphertext of the transaction data, the blockchain platform can also transmit the ciphertext of the transaction data to the blockchain application through the contract interface 3.
  • the supervision system is configured to use the supervision public key to decrypt the encrypted random public key, use the random public key to decrypt the transaction data ciphertext, perform compliance testing on the decrypted transaction data, and upload the test results to the blockchain through the fourth smart contract interface (contract interface 4).
  • the blockchain platform can use the regulatory private key of the regulatory system to encrypt the random public key and write the encrypted random public key into the account book. Therefore, after the regulatory system obtains the transaction data ciphertext, it can use the regulatory public key to decrypt the encrypted random public key, and then use the random public key to decrypt the transaction data ciphertext to obtain the transaction data plaintext.
  • the regulatory system can call the data detection algorithm to perform compliance detection on the transaction data plaintext.
  • the blockchain platform is also configured to adjust the audit status of transaction data and the information that needs to be published based on the test results.
  • the detection result may include whether the transaction data is compliant or not.
  • the random public key may be made public, and for non-compliant transaction data, the non-compliance may be noted and the random public key may not be made public.
  • the corresponding target identifier can be transmitted to the blockchain application through the fifth smart contract interface (contract interface 5), and the blockchain platform can determine the corresponding random public key and transaction data ciphertext based on the target identifier.
  • the transaction data ciphertext is decrypted using the random public key to obtain the transaction data plaintext, and the transaction data plaintext is fed back to the blockchain application through the contract interface 5.
  • the encryption processing of the transaction data in Figure 3 can also be performed by the blockchain application.
  • the blockchain application can obtain the random private key through the initial smart contract interface; and use the random private key to encrypt the transaction data to obtain the transaction data ciphertext; call the first smart contract interface to transmit the transaction data ciphertext to the blockchain ledger.
  • FIG3 shows an example of encrypting and decrypting data using a random private key, a random public key, a regulatory private key, and a regulatory public key.
  • the regulatory private key and the regulatory public key may not be set, and the random key pair (including a random private key and a random public key) may be directly generated by the regulatory system.
  • the implementation method can be seen in FIG4.
  • FIG4 is another blockchain transaction data supervision system provided by an embodiment of the present application, including a blockchain application, a blockchain platform for deploying smart contracts, and a supervision system; in FIG4, the first smart contract interface to the fifth smart contract interface are represented by contract interface 1 to contract interface 5, respectively.
  • the initial smart contract interface is represented by contract interface 0.
  • the blockchain platform is configured to obtain a random private key through the initial smart contract interface (contract interface 0).
  • the regulatory system can actively write a random private key to the blockchain platform through contract interface 0.
  • the blockchain application is configured to call the first smart contract interface (contract interface 1) to execute transaction data on-chain, that is, to transfer the transaction data to the ledger of the blockchain.
  • the blockchain platform uses a random private key to encrypt the transaction data to obtain the transaction data ciphertext; the transaction data identifier, transaction data ciphertext, transaction data review status and random private key are written into the account book through contract interface 1, and the review status of the transaction data ciphertext is marked as unreviewed.
  • the blockchain application can call the second smart contract interface (contract interface 2) to transmit the data to be verified to the blockchain platform for verifying the transaction data.
  • the blockchain platform After the blockchain platform obtains the data to be verified through the contract interface 2, it can use the random private key to encrypt the data to be verified to obtain the ciphertext of the data to be verified; compare the ciphertext of the data to be verified with the ciphertext of the transaction data, and return the comparison result to the blockchain application or user terminal.
  • the ciphertext of the transaction data is transmitted to the supervision system through the third smart contract interface (contract interface 3).
  • the supervision system is configured to generate a random private key and a random public key; upload the random private key to the chain and save the random public key locally; use the random public key to decrypt the ciphertext of the transaction data, perform compliance testing on the decrypted transaction data, and upload the test results to the blockchain through the fourth smart contract interface (contract interface 4).
  • the blockchain platform is also configured to adjust the audit status of transaction data and the information that needs to be published based on the test results.
  • the detection result may include whether the transaction data is compliant or not.
  • the random public key may be made public, and for non-compliant transaction data, the non-compliance may be noted and the random public key may not be made public.
  • the corresponding target identifier can be transmitted to the blockchain application through the fifth smart contract interface (contract interface 5), and the blockchain platform can determine the corresponding random public key and transaction data ciphertext based on the target identifier.
  • the transaction data ciphertext is decrypted using the random public key to obtain the transaction data plaintext, and the transaction data plaintext is fed back to the blockchain application through the contract interface 5.
  • the encryption processing of the transaction data in Figure 4 can also be performed by the blockchain application.
  • the blockchain application can obtain a random private key through the initial smart contract interface; and use the random private key to encrypt the transaction data to obtain the transaction data ciphertext; call the first smart contract interface to transmit the transaction data ciphertext to the blockchain ledger.
  • the blockchain platform that deploys smart contracts obtains the transaction data ciphertext based on the first smart contract interface; the transaction data ciphertext is obtained by encrypting the transaction data using a random private key; the transaction data identifier, transaction data ciphertext, transaction data review status, and random private key are written into the account book; the data to be verified is obtained based on the second smart contract interface; the data to be verified is encrypted using a random private key to obtain the ciphertext of the data to be verified; the ciphertext of the data to be verified is compared with the ciphertext of the transaction data, and the comparison result is returned to the blockchain application or user terminal.
  • the transaction data ciphertext is transmitted to the regulatory system through the third smart contract interface, so that the regulatory system can use the random public key to encrypt the transaction data.
  • the ciphertext is decrypted, and the decrypted transaction data is subjected to compliance testing, and the test results are uploaded to the blockchain through the fourth smart contract interface; the audit status corresponding to the transaction data and the information to be published are adjusted according to the test results.
  • the automated supervision of transaction data can be achieved through the corresponding interface of the smart contract, and this supervision method is open, transparent and efficient.
  • the smart contract needs to be deployed on the blockchain, so it can be adapted to any blockchain system without additional development costs.
  • the on-chain transaction data is only saved once in the account book, reducing the storage overhead of the on-chain data due to supervision. Automated, highly adaptable, efficient and low-cost transaction data supervision is achieved.
  • Figure 5 is a structural diagram of an electronic device provided in an embodiment of the present application.
  • the electronic device includes: a memory 20, which is configured to store computer programs; a processor 21, which is configured to implement the steps of the blockchain transaction data supervision method in the above embodiment when executing the computer program.
  • the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc.
  • the processor 21 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array).
  • the processor 21 may also include a main processor and a coprocessor.
  • the main processor is a processor configured to process data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor configured to process data in a standby state.
  • the processor 21 may be integrated with a GPU (Graphics Processing Unit), and the GPU is configured to be responsible for rendering and drawing the content that needs to be displayed on the display screen.
  • the processor 21 may also include an AI (Artificial Intelligence) processor, which is configured to process computing operations related to machine learning.
  • the memory 20 may include one or more non-volatile readable storage media, which may be non-transitory.
  • the memory 20 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices.
  • the memory 20 is at least configured to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, the relevant steps of the method for supervising blockchain transaction data disclosed in any of the aforementioned embodiments can be implemented.
  • the resources stored in the memory 20 may also include an operating system 202 and data 203, and the storage method may be temporary storage or permanent storage.
  • the operating system 202 may include Windows, Unix, Linux, etc.
  • the data 203 may include, but is not limited to, the identification of transaction data, transaction data ciphertext, the audit status of transaction data, and a random private key.
  • the electronic device may also include a display screen 22, an input and output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
  • FIG. 5 does not limit the electronic device and may include more or fewer components than those shown in the figure.
  • the supervision method of blockchain transaction data in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, magnetic disk or optical disk and other media that can store program code.
  • an embodiment of the present application also provides a non-volatile readable storage medium, on which a computer program is stored.
  • a computer program is stored on which a computer program is stored.

Abstract

The present application relates to the technical field of blockchains. Disclosed are a blockchain transaction data supervision method and apparatus, and a device and a medium. The method comprises: a blockchain platform for deploying a smart contract acquiring transaction data ciphertext on the basis of a first smart contract interface; writing an identifier of transaction data, the transaction data ciphertext, an auditing state of the transaction data and a random private key into an account book; on the basis of a second smart contract interface, acquiring data to be verified; using the random private key to perform encryption processing on the data to be verified; returning a comparison result of ciphertext of data to be verified and the transaction data ciphertext to a user or a blockchain application; transmitting the transaction data ciphertext to a supervision system by means of a third smart contract interface, such that the supervision system performs compliance detection on decrypted transaction data, and uploads a detection result to a blockchain by means of a fourth smart contract interface; and according to the detection result, adjusting the auditing state corresponding to the transaction data, and information needing to be published. By deploying a smart contract, automatic, high-adaptability, efficient and low-cost transaction data supervision is realized.

Description

一种区块链交易数据的监管方法、装置、设备和非易失性可读存储介质A method, device, equipment and non-volatile readable storage medium for supervising blockchain transaction data
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求于2022年10月28日提交中国专利局,申请号为202211340599.4,申请名称为“一种区块链交易数据的监管方法、装置、设备和介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to a Chinese patent application filed with the China Patent Office on October 28, 2022, with application number 202211340599.4 and application name “A method, device, equipment and medium for supervising blockchain transaction data”, the entire contents of which are incorporated by reference in this application.
技术领域Technical Field
本申请涉及区块链技术领域,特别是涉及一种区块链交易数据的监管方法、装置、设备和非易失性可读存储介质。The present application relates to the field of blockchain technology, and in particular to a method, device, equipment and non-volatile readable storage medium for supervising blockchain transaction data.
背景技术Background technique
区块链系统具有不同于传统信息系统的分布式架构,它的分布式节点共同维护一个数据账本,且各自保存着同一份数据账本的副本,具有去中心化、分布式、数据公开透明、不可篡改、可追溯等特点。与传统系统依靠中心化的权威机构信任背书不同。在区块链中,交易数据依靠密码学算法和共识机制来实现信任背书,因此交易数据具有很高的可信度。同时由于区块数据特殊的存储方式,区块链上的交易数据理论上也是永久存储的。基于以上这些特点,区块链得到了越来越广泛的应用。The blockchain system has a distributed architecture that is different from the traditional information system. Its distributed nodes jointly maintain a data ledger, and each of them keeps a copy of the same data ledger. It has the characteristics of decentralization, distribution, open and transparent data, non-tamperability, and traceability. Unlike the traditional system that relies on the trust endorsement of a centralized authority. In the blockchain, transaction data relies on cryptographic algorithms and consensus mechanisms to achieve trust endorsement, so the transaction data has a high degree of credibility. At the same time, due to the special storage method of block data, the transaction data on the blockchain is theoretically stored permanently. Based on the above characteristics, blockchain has been increasingly widely used.
然而正如事物具有两面性,区块链交易数据的永久存储和不可篡改的特点,也容易被有作恶意图的攻击者利用,成为发布和传播有害信息的媒介。就像道路交通一样,要想道路交通通畅,除了要有交通规则,还需要有好的监管。同样的,对区块链交易数据的有序监管有利于区块链业务的健康发展。However, just as everything has two sides, the permanent storage and non-tamperability of blockchain transaction data can also be easily exploited by malicious attackers to become a medium for publishing and spreading harmful information. Just like road traffic, in order to ensure smooth road traffic, in addition to traffic rules, good supervision is also required. Similarly, orderly supervision of blockchain transaction data is conducive to the healthy development of blockchain business.
目前针对区块链交易数据的监管技术包括有害信息的受控回滚技术,区块链可编辑技术,分级、协作联动的监管技术。受控回滚技术是当受到黑客攻击,对区块链系统或数据造成严重后果时,区块链系统管理者,可以把账本数据回滚到有害交易事件之前。但是这种处理也带来了一些弊端,会导致一些正常的交易数据被一并清理掉,容易引发交易分歧。At present, the regulatory technologies for blockchain transaction data include controlled rollback technology for harmful information, blockchain editable technology, and hierarchical and collaborative regulatory technology. Controlled rollback technology means that when a hacker attack causes serious consequences to the blockchain system or data, the blockchain system administrator can roll back the ledger data to before the harmful transaction event. However, this treatment also brings some disadvantages, which will cause some normal transaction data to be cleared together, which is easy to cause transaction disagreements.
区块链可编辑技术有多种修改交易数据的方法,如单链模式下的基于变色龙哈希函数的数据修改方法、平行链模式的数据修改方法等,这些方法对区块链系统如何构建账本的数据结构有一些特殊的要求或限制,因此通用性和适配性较差。Blockchain editable technology has a variety of methods to modify transaction data, such as the data modification method based on chameleon hash function in single-chain mode, the data modification method in parallel chain mode, etc. These methods have some special requirements or restrictions on how the blockchain system constructs the data structure of the ledger, so their versatility and adaptability are poor.
分级、协作联动的监管技术在区块链系统中,根据实体的功能和部署位置,可以分为应用程序端、区块链节点及监管中心;可以根据需要把有害数据的屏蔽功能添加到各个功能实体,在对应位置做数据检测和有害数据屏蔽等处理。这种监管方式会在区块链系统中引入监管功能模块,需要对区块链系统做一些定制和修改,同时监管模块要能适配区块链数据协议等,因此带来一些额外的开发工作。In the blockchain system, hierarchical and collaborative supervision technology can be divided into application end, blockchain node and supervision center according to the function and deployment location of the entity; the shielding function of harmful data can be added to each functional entity as needed, and data detection and harmful data shielding can be performed at the corresponding location. This supervision method will introduce a supervision function module into the blockchain system, which requires some customization and modification of the blockchain system. At the same time, the supervision module must be able to adapt to the blockchain data protocol, etc., which brings some additional development work.
可见,如何实现自动化、高可适配性、高效、低成本的交易数据监管,是本领域技术人员需要解决的问题。It can be seen that how to achieve automated, highly adaptable, efficient and low-cost transaction data supervision is a problem that technical personnel in this field need to solve.
发明内容Summary of the invention
本申请实施例的目的是提供一种区块链交易数据的监管方法、装置、设备和非易失性可读存储介质,可以实现自动化、高可适配性、高效、低成本的交易数据监管。The purpose of the embodiments of the present application is to provide a blockchain transaction data supervision method, device, equipment and non-volatile readable storage medium, which can realize automated, highly adaptable, efficient and low-cost transaction data supervision.
为解决上述技术问题,本申请实施例提供一种区块链交易数据的监管方法,适用于部署智能合约的区块链平台,上述方法包括:In order to solve the above technical problems, the present application embodiment provides a method for supervising blockchain transaction data, which is applicable to a blockchain platform for deploying smart contracts. The method includes:
基于第一智能合约接口获取交易数据密文;其中,上述交易数据密文为利用随机私钥对交易数据进行加密处理得到;将上述交易数据的标识、上述交易数据密文、上述交易数据的审核状态以及上述随机私钥写入账 本;Based on the first smart contract interface, the transaction data ciphertext is obtained; wherein the transaction data ciphertext is obtained by encrypting the transaction data using a random private key; the transaction data identifier, the transaction data ciphertext, the audit status of the transaction data and the random private key are written into the account; Book;
基于第二智能合约接口获取待校验数据;利用上述随机私钥对上述待校验数据进行加密处理,得到待校验数据密文;将上述待校验数据密文和上述交易数据密文进行比较,并将比较结果返回给区块链应用或用户终端;Acquire the data to be verified based on the second smart contract interface; encrypt the data to be verified using the random private key to obtain the ciphertext of the data to be verified; compare the ciphertext of the data to be verified with the ciphertext of the transaction data, and return the comparison result to the blockchain application or the user terminal;
通过第三智能合约接口向监管系统传输上述交易数据密文,以便于上述监管系统利用随机公钥对上述交易数据密文进行解密处理,并对解密后的上述交易数据进行合规检测,通过第四智能合约接口将检测结果上传至区块链;The transaction data ciphertext is transmitted to the regulatory system through the third smart contract interface, so that the regulatory system can decrypt the transaction data ciphertext using the random public key, and perform compliance detection on the decrypted transaction data, and upload the detection results to the blockchain through the fourth smart contract interface;
依据上述检测结果调整上述交易数据对应的审核状态以及所需公布的信息。Adjust the review status corresponding to the above transaction data and the information to be published based on the above test results.
可选地,上述依据上述检测结果调整上述交易数据对应的审核状态以及所需公布的信息包括:Optionally, the review status corresponding to the transaction data and the information to be published that are adjusted according to the test results include:
在上述检测结果为上述交易数据合规的情况下,调整上述交易数据对应的审核状态为审核通过状态,并通过上述第四智能合约接口将解密后的随机公钥写入上述账本;If the test result shows that the transaction data is compliant, the audit status corresponding to the transaction data is adjusted to the audit passed status, and the decrypted random public key is written into the account book through the fourth smart contract interface;
在上述检测结果为上述交易数据不合规的情况下,调整上述交易数据对应的审核状态为审核未通过状态,并通过上述第四智能合约接口将不合规说明写入上述账本。In the event that the above detection result shows that the above transaction data is non-compliant, the audit status corresponding to the above transaction data is adjusted to a failed audit status, and the non-compliance description is written into the above account book through the above fourth smart contract interface.
可选地,在上述将上述交易数据的标识、上述交易数据密文、上述交易数据的审核状态以及上述随机私钥写入账本之后还包括:Optionally, after writing the transaction data identifier, the transaction data ciphertext, the transaction data review status and the random private key into the account book, the method further includes:
通过上述第一智能合约接口向传输上述交易数据的区块链应用反馈上述交易数据的标识。The identifier of the transaction data is fed back to the blockchain application that transmits the transaction data through the first smart contract interface.
可选地,在上述依据上述检测结果调整上述交易数据对应的审核状态以及所需公布的信息之后还包括:Optionally, after adjusting the audit status corresponding to the transaction data and the information to be published according to the detection result, the method further includes:
在接收到上述区块链应用通过第五智能合约接口传输的目标标识的情况下,判断上述目标标识对应的审核状态是否为审核通过状态;Upon receiving the target identifier transmitted by the blockchain application through the fifth smart contract interface, determining whether the review status corresponding to the target identifier is a review-passed status;
在上述目标标识对应的审核状态为审核通过状态的情况下,从上述账本中获取与上述目标标识匹配的目标交易数据密文以及解密后的目标随机公钥;利用上述目标随机公钥对上述目标交易数据密文进行解密处理,得到目标交易数据明文;将上述目标交易数据明文通过上述第五智能合约接口反馈至上述区块链应用;When the audit status corresponding to the target identifier is the audit passed status, the target transaction data ciphertext and the decrypted target random public key matching the target identifier are obtained from the account book; the target transaction data ciphertext is decrypted using the target random public key to obtain the target transaction data plaintext; the target transaction data plaintext is fed back to the blockchain application through the fifth smart contract interface;
在上述目标标识对应的审核状态为审核未通过状态或者为未审核状态的情况下,通过上述第五智能合约接口向上述区块链应用反馈数据获取失败的提示信息。When the audit status corresponding to the target identifier is an audit failure status or an unaudited status, a prompt message indicating that data acquisition failed is fed back to the blockchain application through the fifth smart contract interface.
可选地,在上述依据上述检测结果调整上述交易数据对应的审核状态以及所需公布的信息之后还包括:Optionally, after adjusting the audit status corresponding to the transaction data and the information to be published according to the detection result, the method further includes:
在接收到上述区块链应用通过第五智能合约接口传输的目标标识的情况下,判断上述区块链应用是否具有访问权限以及对应的权限范围;Upon receiving the target identifier transmitted by the blockchain application through the fifth smart contract interface, determining whether the blockchain application has access rights and the corresponding scope of rights;
在上述区块链应用具有访问权限的情况下,执行上述判断上述目标标识对应的审核状态是否为审核通过状态的步骤;In the case where the blockchain application has access rights, the step of determining whether the audit status corresponding to the target identifier is an audit-approved status is performed;
相应的,上述将上述目标交易数据明文通过上述第五智能合约接口反馈至上述区块链应用包括:Accordingly, the above-mentioned feeding back the above-mentioned target transaction data in plain text to the above-mentioned blockchain application through the above-mentioned fifth smart contract interface includes:
从上述目标交易数据明文中提取与上述权限范围匹配的交易数据明文,将与上述权限范围匹配的交易数据明文通过上述第五智能合约接口反馈至上述区块链应用。The transaction data plaintext that matches the above-mentioned authority scope is extracted from the above-mentioned target transaction data plaintext, and the transaction data plaintext that matches the above-mentioned authority scope is fed back to the above-mentioned blockchain application through the above-mentioned fifth smart contract interface.
可选地,针对于上述随机私钥的获取过程,上述方法包括:Optionally, for the process of obtaining the random private key, the method includes:
从区块节点的存储系统中获取一对随机生成的密钥对;上述随机生成的密钥对包括随机私钥和随机公钥;Obtain a randomly generated key pair from the storage system of the block node; the randomly generated key pair includes a random private key and a random public key;
相应的,在上述利用随机私钥对交易数据进行加密处理得到交易数据密文之后还包括:Correspondingly, after the transaction data is encrypted using the random private key to obtain the ciphertext of the transaction data, the following steps are also included:
利用监管系统反馈的监管私钥对上述随机公钥进行加密处理,并将加密后的随机公钥写入上述账本。The random public key is encrypted using the regulatory private key fed back by the regulatory system, and the encrypted random public key is written into the above-mentioned account book.
可选地,针对于上述随机私钥的获取过程,上述方法包括:Optionally, for the process of obtaining the random private key, the method includes:
接收监管系统通过第六智能合约接口写入的一对随机生成的密钥对;上述随机生成的密钥对包括随机私钥和被监管私钥加密后的随机公钥;将上述加密后的随机公钥写入上述账本。Receive a pair of randomly generated key pairs written by the supervision system through the sixth smart contract interface; the above-mentioned randomly generated key pair includes a random private key and a random public key encrypted by the supervised private key; write the above-mentioned encrypted random public key into the above-mentioned account book.
可选地,针对于上述随机私钥的获取过程,上述方法包括:Optionally, for the process of obtaining the random private key, the method includes:
接收监管系统通过第六智能合约接口写入的随机私钥;其中,上述随机私钥对应的随机公钥保存在上述监 管系统上。Receive the random private key written by the supervision system through the sixth smart contract interface; wherein the random public key corresponding to the above random private key is stored in the above supervision system. On the pipe system.
可选地,针对于上述随机私钥的获取过程,上述方法包括:Optionally, for the process of obtaining the random private key, the method includes:
通过第七智能合约接口获取由外部程序写入的一对随机生成的密钥对;上述随机生成的密钥对包括随机私钥和随机公钥;Obtain a pair of randomly generated key pairs written by an external program through the seventh smart contract interface; the randomly generated key pair includes a random private key and a random public key;
相应的,在上述利用随机私钥对交易数据进行加密处理得到交易数据密文之后还包括:Correspondingly, after the transaction data is encrypted using the random private key to obtain the ciphertext of the transaction data, the following steps are also included:
利用监管系统反馈的监管私钥对上述随机公钥进行加密处理,并将加密后的随机公钥写入上述账本。The random public key is encrypted using the regulatory private key fed back by the regulatory system, and the encrypted random public key is written into the above-mentioned account book.
可选地,上述利用随机私钥对交易数据进行加密处理得到交易数据密文包括:Optionally, the encrypting of the transaction data using the random private key to obtain the ciphertext of the transaction data includes:
利用上述随机私钥对上述交易数据中预保护字段的内容进行加密处理得到交易数据密文。The random private key is used to encrypt the content of the pre-protected field in the transaction data to obtain the transaction data ciphertext.
可选地,上述随机私钥的个数为多个;上述利用随机私钥对交易数据进行加密处理得到交易数据密文包括:Optionally, there are multiple random private keys; the encrypting the transaction data using the random private keys to obtain the ciphertext of the transaction data includes:
将上述交易数据按照各字段对应的随机私钥进行加密处理得到交易数据密文。The above transaction data is encrypted according to the random private key corresponding to each field to obtain the transaction data ciphertext.
可选地,上述利用随机私钥对交易数据进行加密处理得到交易数据密文包括:Optionally, the encrypting of the transaction data using the random private key to obtain the ciphertext of the transaction data includes:
利用上述随机私钥对上述交易数据中所有字段的内容进行加密处理得到交易数据密文。The random private key is used to encrypt the contents of all fields in the transaction data to obtain the transaction data ciphertext.
可选地,上述基于第一智能合约接口获取交易数据密文包括:Optionally, the obtaining of the ciphertext of transaction data based on the first smart contract interface includes:
接收区块链应用通过上述第一智能合约接口传输的交易数据密文;其中,上述交易数据密文由上述区块链应用通过初始智能合约接口获取随机私钥;并利用上述随机私钥对交易数据进行加密得到。Receive the transaction data ciphertext transmitted by the blockchain application through the above-mentioned first smart contract interface; wherein the above-mentioned transaction data ciphertext is obtained by the above-mentioned blockchain application obtaining a random private key through the initial smart contract interface; and use the above-mentioned random private key to encrypt the transaction data.
本申请实施例还提供了一种区块链交易数据的监管装置,适用于部署智能合约的区块链平台,上述装置包括第一获取单元、写入单元、第二获取单元、加密单元、传输单元和调整单元;The embodiment of the present application also provides a blockchain transaction data supervision device, which is applicable to a blockchain platform for deploying smart contracts, and the device includes a first acquisition unit, a writing unit, a second acquisition unit, an encryption unit, a transmission unit, and an adjustment unit;
上述第一获取单元,被设置为基于第一智能合约接口获取交易数据密文;其中,上述交易数据密文为利用随机私钥对交易数据进行加密处理得到;The first acquisition unit is configured to acquire the transaction data ciphertext based on the first smart contract interface; wherein the transaction data ciphertext is obtained by encrypting the transaction data using a random private key;
上述写入单元,被设置为将上述交易数据的标识、上述交易数据密文、上述交易数据的审核状态以及上述随机私钥写入账本;The writing unit is configured to write the identifier of the transaction data, the ciphertext of the transaction data, the review status of the transaction data, and the random private key into the account book;
上述第二获取单元,被设置为基于第二智能合约接口获取待校验数据;The second acquisition unit is configured to acquire the data to be verified based on the second smart contract interface;
上述加密单元,被设置为利用上述随机私钥对上述待校验数据进行加密处理,得到待校验数据密文;将上述待校验数据密文和上述交易数据密文进行比较,并将比较结果返回给区块链应用或用户终端;The encryption unit is configured to encrypt the data to be verified using the random private key to obtain a ciphertext of the data to be verified; compare the ciphertext of the data to be verified with the ciphertext of the transaction data, and return the comparison result to the blockchain application or the user terminal;
上述传输单元,被设置为通过第三智能合约接口向监管系统传输上述交易数据密文,以便于上述监管系统利用随机公钥对上述交易数据密文进行解密处理,并对解密后的上述交易数据进行合规检测,通过第四智能合约接口将检测结果上传至区块链;The transmission unit is configured to transmit the ciphertext of the transaction data to the regulatory system through the third smart contract interface, so that the regulatory system can decrypt the ciphertext of the transaction data using the random public key, perform compliance detection on the decrypted transaction data, and upload the detection result to the blockchain through the fourth smart contract interface;
上述调整单元,被设置为依据上述检测结果调整上述交易数据对应的审核状态以及所需公布的信息。The adjustment unit is configured to adjust the audit status corresponding to the transaction data and the information to be published according to the detection result.
可选地,上述调整单元被设置为在上述检测结果为上述交易数据合规的情况下,调整上述交易数据对应的审核状态为审核通过状态,并通过上述第四智能合约接口将解密后的随机公钥写入上述账本;Optionally, the adjustment unit is configured to adjust the review status corresponding to the transaction data to a review passed status when the detection result shows that the transaction data is compliant, and write the decrypted random public key into the account book through the fourth smart contract interface;
在上述检测结果为上述交易数据不合规的情况下,调整上述交易数据对应的审核状态为审核未通过状态,并通过上述第四智能合约接口将不合规说明写入上述账本。In the event that the above detection result shows that the above transaction data is non-compliant, the audit status corresponding to the above transaction data is adjusted to a failed audit status, and the non-compliance description is written into the above account book through the above fourth smart contract interface.
可选地,还包括标识反馈单元;Optionally, it also includes an identification feedback unit;
上述标识反馈单元,被设置为通过上述第一智能合约接口向传输上述交易数据的区块链应用反馈上述交易数据的标识。The identification feedback unit is configured to feedback the identification of the transaction data to the blockchain application that transmits the transaction data through the first smart contract interface.
可选地,在上述依据上述检测结果调整上述交易数据对应的审核状态以及所需公布的信息之后还包括第一判断单元、第三获取单元、解密单元、数据反馈单元和提示反馈单元;Optionally, after adjusting the audit status corresponding to the transaction data and the information to be published according to the detection result, the method further includes a first judgment unit, a third acquisition unit, a decryption unit, a data feedback unit and a prompt feedback unit;
上述第一判断单元,被设置为在接收到上述区块链应用通过第五智能合约接口传输的目标标识的情况下,判断上述目标标识对应的审核状态是否为审核通过状态;The first judgment unit is configured to judge whether the review status corresponding to the target identifier is a review passed status when receiving the target identifier transmitted by the blockchain application through the fifth smart contract interface;
上述第三获取单元,被设置为在上述目标标识对应的审核状态为审核通过状态的情况下,从上述账本中获 取与上述目标标识匹配的目标交易数据密文以及解密后的目标随机公钥;The third acquisition unit is configured to obtain from the account book when the audit status corresponding to the target identifier is the audit passed status. Get the target transaction data ciphertext matching the above target identifier and the decrypted target random public key;
上述解密单元,被设置为利用上述目标随机公钥对上述目标交易数据密文进行解密处理,得到目标交易数据明文;The decryption unit is configured to use the target random public key to decrypt the target transaction data ciphertext to obtain the target transaction data plaintext;
上述数据反馈单元,被设置为将上述目标交易数据明文通过上述第五智能合约接口反馈至上述区块链应用;The data feedback unit is configured to feed back the target transaction data in plain text to the blockchain application through the fifth smart contract interface;
上述提示反馈单元,被设置为在上述目标标识对应的审核状态为审核未通过状态或者为未审核状态的情况下,通过上述第五智能合约接口向上述区块链应用反馈数据获取失败的提示信息。The prompt feedback unit is configured to feedback prompt information of data acquisition failure to the blockchain application through the fifth smart contract interface when the audit status corresponding to the target identifier is an audit failure status or an unaudited status.
可选地,还包括第二判断单元;Optionally, it further includes a second judgment unit;
上述第二判断单元,被设置为在接收到上述区块链应用通过第五智能合约接口传输的目标标识的情况下,判断上述区块链应用是否具有访问权限以及对应的权限范围;在上述区块链应用具有访问权限的情况下,触发上述第一判断单元执行上述判断上述目标标识对应的审核状态是否为审核通过状态的步骤;The second judgment unit is configured to, upon receiving the target identifier transmitted by the blockchain application through the fifth smart contract interface, determine whether the blockchain application has access rights and the corresponding scope of rights; if the blockchain application has access rights, trigger the first judgment unit to execute the step of determining whether the review status corresponding to the target identifier is a review-passed status;
相应的,上述数据反馈单元被设置为从上述目标交易数据明文中提取与上述权限范围匹配的交易数据明文,将与上述权限范围匹配的交易数据明文通过上述第五智能合约接口反馈至上述区块链应用。Correspondingly, the above-mentioned data feedback unit is configured to extract the transaction data plaintext matching the above-mentioned authority scope from the above-mentioned target transaction data plaintext, and feed back the transaction data plaintext matching the above-mentioned authority scope to the above-mentioned blockchain application through the above-mentioned fifth smart contract interface.
可选地,针对于上述随机私钥的获取过程,上述装置还包括第一密钥获取单元;Optionally, for the above-mentioned random private key acquisition process, the above-mentioned device further includes a first key acquisition unit;
上述密钥获取单元,被设置为从区块节点的存储系统中获取一对随机生成的密钥对;上述随机生成的密钥对包括随机私钥和随机公钥;The key acquisition unit is configured to acquire a randomly generated key pair from a storage system of a block node; the randomly generated key pair includes a random private key and a random public key;
相应的,上述写入单元还被设置为利用监管系统反馈的监管私钥对上述随机公钥进行加密处理,并将加密后的随机公钥写入上述账本。Correspondingly, the above-mentioned writing unit is also configured to encrypt the above-mentioned random public key using the supervision private key fed back by the supervision system, and write the encrypted random public key into the above-mentioned account book.
可选地,针对于上述随机私钥的获取过程,上述装置还包括第一接收单元;Optionally, with respect to the process of obtaining the random private key, the apparatus further includes a first receiving unit;
上述第一接收单元,被设置为接收监管系统通过第六智能合约接口写入的一对随机生成的密钥对;上述随机生成的密钥对包括随机私钥和被监管私钥加密后的随机公钥;The first receiving unit is configured to receive a pair of randomly generated key pairs written by the supervision system through the sixth smart contract interface; the randomly generated key pair includes a random private key and a random public key encrypted by the supervised private key;
相应的,上述写入单元还被设置为将上述加密后的随机公钥写入上述账本。Correspondingly, the writing unit is also configured to write the encrypted random public key into the account book.
可选地,针对于上述随机私钥的获取过程,上述装置还包括第二接收单元;Optionally, with respect to the process of obtaining the random private key, the apparatus further includes a second receiving unit;
上述第二接收单元,被设置为接收监管系统通过第六智能合约接口写入的随机私钥;其中,上述随机私钥对应的随机公钥保存在上述监管系统上。The above-mentioned second receiving unit is configured to receive a random private key written by the regulatory system through the sixth smart contract interface; wherein the random public key corresponding to the above-mentioned random private key is stored on the above-mentioned regulatory system.
可选地,针对于上述随机私钥的获取过程,上述装置还包括第二密钥获取单元;Optionally, for the random private key acquisition process, the apparatus further includes a second key acquisition unit;
上述第二密钥获取单元,被设置为通过第七智能合约接口获取由外部程序写入的一对随机生成的密钥对;上述随机生成的密钥对包括随机私钥和随机公钥;The second key acquisition unit is configured to acquire a pair of randomly generated key pairs written by an external program through the seventh smart contract interface; the randomly generated key pair includes a random private key and a random public key;
相应的,上述写入单元还被设置为利用监管系统反馈的监管私钥对上述随机公钥进行加密处理,并将加密后的随机公钥写入上述账本。Correspondingly, the above-mentioned writing unit is also configured to encrypt the above-mentioned random public key using the supervision private key fed back by the supervision system, and write the encrypted random public key into the above-mentioned account book.
可选地,上述第一获取单元被设置为利用上述随机私钥对上述交易数据中预保护字段的内容进行加密处理得到交易数据密文。Optionally, the first acquisition unit is configured to use the random private key to encrypt the content of the pre-protected field in the transaction data to obtain a ciphertext of the transaction data.
可选地,上述第一获取单元被设置为将上述交易数据按照各字段对应的随机私钥进行加密处理得到交易数据密文。Optionally, the first acquisition unit is configured to encrypt the transaction data according to a random private key corresponding to each field to obtain a ciphertext of the transaction data.
可选地,上述第一获取单元被设置为利用上述随机私钥对上述交易数据中所有字段的内容进行加密处理得到交易数据密文。Optionally, the first acquisition unit is configured to use the random private key to encrypt the contents of all fields in the transaction data to obtain a ciphertext of the transaction data.
可选地,上述第一获取单元被设置为接收区块链应用通过上述第一智能合约接口传输的交易数据密文;其中,上述交易数据密文由上述区块链应用通过初始智能合约接口获取随机私钥;并利用上述随机私钥对交易数据进行加密得到。Optionally, the first acquisition unit is configured to receive transaction data ciphertext transmitted by the blockchain application through the first smart contract interface; wherein the transaction data ciphertext is obtained by obtaining a random private key by the blockchain application through the initial smart contract interface; and the transaction data is encrypted using the random private key.
本申请实施例还提供了一种区块链交易数据的监管系统,包括区块链应用、部署智能合约的区块链平台和监管系统; The embodiment of the present application also provides a supervision system for blockchain transaction data, including a blockchain application, a blockchain platform for deploying smart contracts, and a supervision system;
上述区块链应用,被设置为调用第一智能合约接口将交易数据传输到区块链的账本中;The blockchain application is configured to call the first smart contract interface to transfer the transaction data to the ledger of the blockchain;
上述区块链平台,被设置为获取上述交易数据;利用随机私钥对交易数据进行加密处理得到交易数据密文;将上述交易数据的标识、上述交易数据密文、上述交易数据的审核状态、上述随机私钥以及用监管私钥加密的随机公钥写入账本;基于第二智能合约接口获取待校验数据;利用上述随机私钥对上述待校验数据进行加密处理,得到待校验数据密文,将上述待校验数据密文和上述交易数据密文进行比较,并将比较结果返回给区块链应用或用户终端;通过第三智能合约接口向监管系统传输上述交易数据密文;The blockchain platform is configured to obtain the transaction data; encrypt the transaction data using a random private key to obtain a ciphertext of the transaction data; write the identifier of the transaction data, the ciphertext of the transaction data, the audit status of the transaction data, the random private key, and the random public key encrypted with the supervisory private key into the account book; obtain the data to be verified based on the second smart contract interface; encrypt the data to be verified using the random private key to obtain a ciphertext of the data to be verified, compare the ciphertext of the data to be verified with the ciphertext of the transaction data, and return the comparison result to the blockchain application or user terminal; transmit the ciphertext of the transaction data to the supervisory system through the third smart contract interface;
上述监管系统,被设置为利用监管公钥解密被加密的随机公钥,利用随机公钥对上述交易数据密文进行解密处理,并对解密后的上述交易数据进行合规检测,通过第四智能合约接口将检测结果上传至区块链;The above-mentioned supervision system is configured to use the supervision public key to decrypt the encrypted random public key, use the random public key to decrypt the above-mentioned transaction data ciphertext, and perform compliance detection on the decrypted transaction data, and upload the detection result to the blockchain through the fourth smart contract interface;
上述区块链平台还被设置为依据上述检测结果调整上述交易数据对应的审核状态以及所需公布的信息。The above-mentioned blockchain platform is also configured to adjust the review status corresponding to the above-mentioned transaction data and the information to be published based on the above-mentioned detection results.
本申请实施例还提供了一种区块链交易数据的监管系统,包括区块链应用、部署智能合约的区块链平台和监管系统;The embodiment of the present application also provides a supervision system for blockchain transaction data, including a blockchain application, a blockchain platform for deploying smart contracts, and a supervision system;
上述区块链应用,被设置为通过初始智能合约接口获取随机私钥;并利用上述随机私钥对交易数据进行加密得到交易数据密文;调用第一智能合约接口将交易数据密文传输到区块链的账本中;The blockchain application is configured to obtain a random private key through an initial smart contract interface; encrypt transaction data using the random private key to obtain transaction data ciphertext; and call the first smart contract interface to transmit the transaction data ciphertext to the blockchain ledger;
上述区块链平台,被设置为获取上述交易数据密文;将上述交易数据的标识、上述交易数据密文、上述交易数据的审核状态、上述随机私钥以及用监管私钥加密的随机公钥写入账本;基于第二智能合约接口获取待校验数据;利用上述随机私钥对上述待校验数据进行加密处理,得到待校验数据密文;将上述待校验数据密文和上述交易数据密文进行比较,并将比较结果返回给区块链应用或用户终端;通过第三智能合约接口向监管系统传输上述交易数据密文;The blockchain platform is configured to obtain the ciphertext of the transaction data; write the identifier of the transaction data, the ciphertext of the transaction data, the audit status of the transaction data, the random private key, and the random public key encrypted with the supervisory private key into the account book; obtain the data to be verified based on the second smart contract interface; encrypt the data to be verified using the random private key to obtain the ciphertext of the data to be verified; compare the ciphertext of the data to be verified with the ciphertext of the transaction data, and return the comparison result to the blockchain application or the user terminal; transmit the ciphertext of the transaction data to the supervisory system through the third smart contract interface;
上述监管系统,被设置为利用监管公钥解密被加密的随机公钥,利用随机公钥对上述交易数据密文进行解密处理,并对解密后的上述交易数据进行合规检测,通过第四智能合约接口将检测结果上传至区块链;The above-mentioned supervision system is configured to use the supervision public key to decrypt the encrypted random public key, use the random public key to decrypt the above-mentioned transaction data ciphertext, and perform compliance detection on the decrypted transaction data, and upload the detection result to the blockchain through the fourth smart contract interface;
上述区块链平台还被设置为依据上述检测结果调整上述交易数据对应的审核状态以及所需公布的信息。The above-mentioned blockchain platform is also configured to adjust the review status corresponding to the above-mentioned transaction data and the information to be published based on the above-mentioned detection results.
本申请实施例还提供了一种区块链交易数据的监管系统,包括区块链应用、部署智能合约的区块链平台和监管系统;The embodiment of the present application also provides a supervision system for blockchain transaction data, including a blockchain application, a blockchain platform for deploying smart contracts, and a supervision system;
上述区块链应用,被设置为调用第一智能合约接口将交易数据传输到区块链的账本中;The blockchain application is configured to call the first smart contract interface to transfer the transaction data to the ledger of the blockchain;
上述区块链平台,被设置为通过初始智能合约接口获取随机私钥;利用上述随机私钥对交易数据进行加密处理得到交易数据密文;将上述交易数据的标识、上述交易数据密文、上述交易数据的审核状态以及上述随机私钥写入账本,并标记上述交易数据密文的审核状态为未审核;基于第二智能合约接口获取待校验数据;利用上述随机私钥对上述待校验数据进行加密处理,得到待校验数据密文;将上述待校验数据密文和上述交易数据密文进行比较,并将比较结果返回给区块链应用或用户终端;通过第三智能合约接口向监管系统传输上述交易数据密文;The blockchain platform is configured to obtain a random private key through an initial smart contract interface; encrypt the transaction data using the random private key to obtain a ciphertext of the transaction data; write the identifier of the transaction data, the ciphertext of the transaction data, the review status of the transaction data, and the random private key into the account book, and mark the review status of the ciphertext of the transaction data as unreviewed; obtain the data to be verified based on the second smart contract interface; encrypt the data to be verified using the random private key to obtain a ciphertext of the data to be verified; compare the ciphertext of the data to be verified with the ciphertext of the transaction data, and return the comparison result to the blockchain application or the user terminal; transmit the ciphertext of the transaction data to the supervision system through the third smart contract interface;
上述监管系统,被设置为生成随机私钥和随机公钥;将上述随机私钥上链,并将上述随机公钥本地保存;利用随机公钥对上述交易数据密文进行解密处理,并对解密后的上述交易数据进行合规检测,通过第四智能合约接口将检测结果上传至区块链;The above-mentioned supervision system is configured to generate a random private key and a random public key; upload the above-mentioned random private key to the chain, and save the above-mentioned random public key locally; use the random public key to decrypt the above-mentioned transaction data ciphertext, and perform compliance detection on the decrypted above-mentioned transaction data, and upload the detection result to the blockchain through the fourth smart contract interface;
上述区块链平台还被设置为依据上述检测结果调整上述交易数据对应的审核状态以及所需公布的信息。The above-mentioned blockchain platform is also configured to adjust the review status corresponding to the above-mentioned transaction data and the information to be published based on the above-mentioned detection results.
本申请实施例还提供了一种区块链交易数据的监管系统,包括区块链应用、部署智能合约的区块链平台和监管系统;The embodiment of the present application also provides a supervision system for blockchain transaction data, including a blockchain application, a blockchain platform for deploying smart contracts, and a supervision system;
上述区块链应用,被设置为通过初始智能合约接口获取随机私钥;并利用上述随机私钥对交易数据进行加密得到交易数据密文;调用第一智能合约接口将交易数据密文传输到区块链的账本中;The blockchain application is configured to obtain a random private key through an initial smart contract interface; encrypt transaction data using the random private key to obtain transaction data ciphertext; and call the first smart contract interface to transmit the transaction data ciphertext to the blockchain ledger;
上述区块链平台,被设置为获取上述交易数据密文;将上述交易数据的标识、上述交易数据密文、上述交易数据的审核状态以及上述随机私钥写入账本,并标记上述交易数据密文的审核状态为未审核;基于第二智能合约接口获取待校验数据;利用上述随机私钥对上述待校验数据进行加密处理,得到待校验数据密文;将上述 待校验数据密文和上述交易数据密文进行比较,并将比较结果返回给区块链应用或用户终端;通过第三智能合约接口向监管系统传输上述交易数据密文;The blockchain platform is configured to obtain the ciphertext of the transaction data; write the identifier of the transaction data, the ciphertext of the transaction data, the audit status of the transaction data and the random private key into the account book, and mark the audit status of the ciphertext of the transaction data as unaudited; obtain the data to be verified based on the second smart contract interface; encrypt the data to be verified using the random private key to obtain the ciphertext of the data to be verified; write the The ciphertext of the data to be verified is compared with the ciphertext of the transaction data, and the comparison result is returned to the blockchain application or the user terminal; the ciphertext of the transaction data is transmitted to the supervision system through the third smart contract interface;
上述监管系统,被设置为生成随机私钥和随机公钥;将上述随机私钥上链,并将上述随机公钥本地保存;利用随机公钥对上述交易数据密文进行解密处理,并对解密后的上述交易数据进行合规检测,通过第四智能合约接口将检测结果上传至区块链;The above-mentioned supervision system is configured to generate a random private key and a random public key; upload the above-mentioned random private key to the chain, and save the above-mentioned random public key locally; use the random public key to decrypt the above-mentioned transaction data ciphertext, and perform compliance detection on the decrypted above-mentioned transaction data, and upload the detection result to the blockchain through the fourth smart contract interface;
上述区块链平台还被设置为依据上述检测结果调整上述交易数据对应的审核状态以及所需公布的信息。The above-mentioned blockchain platform is also configured to adjust the review status corresponding to the above-mentioned transaction data and the information to be published based on the above-mentioned detection results.
本申请实施例还提供了一种电子设备,包括:The present application also provides an electronic device, including:
存储器,被设置为存储计算机程序;a memory arranged to store a computer program;
处理器,被设置为执行上述计算机程序以实现如上述区块链交易数据的监管方法的步骤。A processor is configured to execute the above-mentioned computer program to implement the steps of the above-mentioned blockchain transaction data supervision method.
本申请实施例还提供了一种非易失性可读存储介质,上述非易失性可读存储介质上存储有计算机程序,上述计算机程序被处理器执行时实现如上述区块链交易数据的监管方法的步骤。An embodiment of the present application also provides a non-volatile readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned blockchain transaction data supervision method are implemented.
由上述技术方案可以看出,部署智能合约的区块链平台基于第一智能合约接口获取交易数据密文;其中,交易数据密文为利用随机私钥对交易数据进行加密处理得到;将交易数据的标识、交易数据密文、交易数据的审核状态以及随机私钥写入账本;基于第二智能合约接口获取待校验数据;利用随机私钥对待校验数据进行加密处理,得到待校验数据密文;将待校验数据密文和交易数据密文进行比较,并将比较结果返回给区块链应用或用户终端。通过第三智能合约接口向监管系统传输交易数据密文,以便于监管系统利用随机公钥对交易数据密文进行解密处理,并对解密后的交易数据进行合规检测,通过第四智能合约接口将检测结果上传至区块链;依据检测结果调整交易数据对应的审核状态以及所需公布的信息。在该技术方案中,通过部署智能合约,通过智能合约对应的接口可以实现对交易数据的自动化监管,该监管方式公开透明且高效。无需对区块链实现做任何修改,只需要在区块链上部署该智能合约,因此可适配任何区块链系统,无额外开发成本。同时上链交易数据在账本中只保存一次,减少了由于监管带来的上链数据的存储开销。实现了自动化、高可适配性、高效、低成本的交易数据监管。It can be seen from the above technical scheme that the blockchain platform that deploys smart contracts obtains the transaction data ciphertext based on the first smart contract interface; wherein the transaction data ciphertext is obtained by encrypting the transaction data using a random private key; the transaction data identifier, transaction data ciphertext, the audit status of the transaction data and the random private key are written into the account book; the data to be verified is obtained based on the second smart contract interface; the data to be verified is encrypted using a random private key to obtain the ciphertext of the data to be verified; the ciphertext of the data to be verified is compared with the ciphertext of the transaction data, and the comparison result is returned to the blockchain application or user terminal. The transaction data ciphertext is transmitted to the regulatory system through the third smart contract interface, so that the regulatory system can decrypt the transaction data ciphertext using a random public key, and perform compliance detection on the decrypted transaction data, and upload the detection results to the blockchain through the fourth smart contract interface; the audit status corresponding to the transaction data and the information to be published are adjusted according to the detection results. In this technical scheme, by deploying smart contracts, the automatic supervision of transaction data can be realized through the interface corresponding to the smart contract, and this supervision method is open, transparent and efficient. There is no need to make any modifications to the blockchain implementation, only the smart contract needs to be deployed on the blockchain, so it can be adapted to any blockchain system without additional development costs. At the same time, the transaction data on the chain is only saved once in the account book, reducing the storage overhead of the on-chain data due to supervision. It realizes automated, highly adaptable, efficient and low-cost transaction data supervision.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例,下面将对实施例中所需要使用的附图做简单的介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. 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 paying any creative work.
图1为本申请实施例提供的一种区块链交易数据的监管方法的流程图;FIG1 is a flow chart of a method for supervising blockchain transaction data provided by an embodiment of the present application;
图2为本申请实施例提供的一种区块链交易数据的监管装置的结构示意图;FIG2 is a schematic diagram of the structure of a blockchain transaction data supervision device provided in an embodiment of the present application;
图3为本申请实施例提供的一种区块链交易数据的监管系统;FIG3 is a blockchain transaction data supervision system provided by an embodiment of the present application;
图4为本申请实施例提供的另一种区块链交易数据的监管系统;FIG4 is another blockchain transaction data supervision system provided by an embodiment of the present application;
图5为本申请实施例提供的一种电子设备的结构图。FIG5 is a structural diagram of an electronic device provided in an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下,所获得的所有其他实施例,都属于本申请保护范围。The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
本申请的说明书和权利要求书及上述附图中的术语“包括”和“具有”,以及与“包括”和“具有”相关的任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可包括没有列出的步骤或单元。The terms "including" and "having" in the specification and claims of this application and the above-mentioned drawings, as well as any variations thereof, are intended to cover non-exclusive inclusions. 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 may include steps or units that are not listed.
为了使本技术领域的人员更好地理解本申请方案,下面结合附图和可选实施方式对本申请作进一步的详细 说明。In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and optional implementation methods. illustrate.
接下来,详细介绍本申请实施例所提供的一种区块链交易数据的监管方法。图1为本申请实施例提供的一种区块链交易数据的监管方法的流程图,适用于部署智能合约的区块链平台,该方法包括:Next, a method for supervising blockchain transaction data provided by an embodiment of the present application is described in detail. FIG1 is a flow chart of a method for supervising blockchain transaction data provided by an embodiment of the present application, which is applicable to a blockchain platform for deploying smart contracts, and the method includes:
S101:基于第一智能合约接口获取交易数据密文。S101: Obtain transaction data ciphertext based on the first smart contract interface.
在本申请实施例中,采用非对称加密的方式对交易数据进行加密处理。为了提升非对称加密方式的安全性,可以采用随机生成的方式得到随机公钥和随机私钥。其中,交易数据密文为利用随机私钥对交易数据进行加密处理得到。In the embodiment of the present application, the transaction data is encrypted by asymmetric encryption. In order to improve the security of the asymmetric encryption method, a random public key and a random private key can be obtained by random generation. Among them, the transaction data ciphertext is obtained by encrypting the transaction data using the random private key.
智能合约在区块链上使用的过程如下:多方用户共同参与制定一份合约,并使用合约编程语言编写成一段智能合约代码;智能合约代码通过编译审查,参与各方使用私钥对通过审查后的合约代码进行签名,以确保合约的有效性。签名后的智能合约,将传入区块链网络中,智能合约通过点对点网络扩散并存入到区块链的分布式节点上。智能合约发布到区块链上之后,并不会自动执行,往往需要区块链应用程序调取智能合约,通过它执行合约条款并与账本数据交互。The process of using smart contracts on the blockchain is as follows: multiple users jointly participate in the formulation of a contract and use the contract programming language to write a smart contract code; the smart contract code is compiled and reviewed, and the participating parties use private keys to sign the reviewed contract code to ensure the validity of the contract. The signed smart contract will be transmitted to the blockchain network, and the smart contract will be spread through the peer-to-peer network and stored on the distributed nodes of the blockchain. After the smart contract is published on the blockchain, it will not be automatically executed. It is often necessary for the blockchain application to call the smart contract, execute the contract terms through it, and interact with the ledger data.
针对于所需实现的功能,区块链应用程序可以多种多样。在本申请实施例中,可以设置不同的智能合约接口被设置为实现不同的区块链应用程序。The blockchain application can be varied according to the functions to be implemented. In the embodiment of the present application, different smart contract interfaces can be set to implement different blockchain applications.
在本申请实施例中,区块链应用可以调用第一智能合约接口向区块链平台传输交易数据。区块链平台可以依据获取的随机私钥,对交易数据进行加密处理,得到交易数据密文。In the embodiment of the present application, the blockchain application can call the first smart contract interface to transmit transaction data to the blockchain platform. The blockchain platform can encrypt the transaction data based on the obtained random private key to obtain the transaction data ciphertext.
除此之外,区块链应用也可以通过初始智能合约接口从区块链平台的账本中获取随机私钥,利用随机私钥对交易数据进行加密,调用第一智能合约接口向区块链平台传输交易数据密文。In addition, the blockchain application can also obtain a random private key from the ledger of the blockchain platform through the initial smart contract interface, use the random private key to encrypt the transaction data, and call the first smart contract interface to transmit the ciphertext of the transaction data to the blockchain platform.
在本申请实施例中,随机私钥的获取可以有多种方式。In the embodiments of the present application, there are multiple ways to obtain the random private key.
第一种方式可以从区块节点的存储系统中获取一对随机生成的密钥对;随机生成的密钥对包括随机私钥和随机公钥。为了保证随机公钥的安全性,可以利用监管系统反馈的监管私钥对随机公钥进行加密处理,并将加密后的随机公钥写入账本。The first method is to obtain a randomly generated key pair from the storage system of the block node; the randomly generated key pair includes a random private key and a random public key. In order to ensure the security of the random public key, the random public key can be encrypted using the regulatory private key fed back by the regulatory system, and the encrypted random public key can be written into the account book.
第二种方式可以接收监管系统通过第六智能合约接口写入的一对随机生成的密钥对;随机生成的密钥对包括随机私钥和被监管私钥加密后的随机公钥;将加密后的随机公钥写入账本。The second method is to receive a pair of randomly generated key pairs written by the regulatory system through the sixth smart contract interface; the randomly generated key pair includes a random private key and a random public key encrypted by the regulated private key; and the encrypted random public key is written into the account book.
第三种方式可以接收监管系统通过第六智能合约接口写入的随机私钥;其中,随机私钥对应的随机公钥保存在监管系统上。The third method is to receive the random private key written by the regulatory system through the sixth smart contract interface; wherein the random public key corresponding to the random private key is stored on the regulatory system.
第四种方式可以通过第七智能合约接口获取由外部程序写入的一对随机生成的密钥对;随机生成的密钥对包括随机私钥和随机公钥。为了保证随机公钥的安全性,可以利用监管系统反馈的监管私钥对随机公钥进行加密处理,并将加密后的随机公钥写入账本。The fourth method is to obtain a pair of randomly generated key pairs written by an external program through the seventh smart contract interface; the randomly generated key pair includes a random private key and a random public key. In order to ensure the security of the random public key, the random public key can be encrypted using the regulatory private key fed back by the regulatory system, and the encrypted random public key can be written into the account book.
在获取到随机私钥之后,可以利用随机私钥对交易数据进行加密处理。交易数据的加密方式可以有多种,第一种方式可以利用随机私钥对交易数据中预保护字段的内容进行加密处理得到交易数据密文。预保护字段可以是交易数据中敏感信息或所需保密的信息所在的字段。第二种方式,可以设置多个随机私钥;将交易数据按照各字段对应的随机私钥进行加密处理得到交易数据密文。第三种方式可以对完整的交易数据进行加密,即利用随机私钥对交易数据中所有字段的内容进行加密处理得到交易数据密文。After obtaining the random private key, the transaction data can be encrypted using the random private key. There are many ways to encrypt transaction data. The first way is to use the random private key to encrypt the content of the pre-protected field in the transaction data to obtain the transaction data ciphertext. The pre-protected field can be a field in the transaction data where sensitive information or information that needs to be kept confidential is located. The second way is to set multiple random private keys; encrypt the transaction data according to the random private key corresponding to each field to obtain the transaction data ciphertext. The third way is to encrypt the complete transaction data, that is, to use the random private key to encrypt the content of all fields in the transaction data to obtain the transaction data ciphertext.
S102:将交易数据的标识、交易数据密文、交易数据的审核状态以及随机私钥写入账本。S102: Write the transaction data identifier, transaction data ciphertext, transaction data review status, and random private key into the account book.
为了区分不同的交易数据,可以针对于每个交易数据设置具有唯一性的标识。区块链平台在获取到交易数据密文之后,可以将交易数据的标识、交易数据密文、交易数据的审核状态以及随机私钥写入账本。初始状态下,交易数据的审核状态为未审核。In order to distinguish different transaction data, a unique identifier can be set for each transaction data. After obtaining the ciphertext of the transaction data, the blockchain platform can write the identifier of the transaction data, the ciphertext of the transaction data, the audit status of the transaction data, and the random private key into the account book. In the initial state, the audit status of the transaction data is unaudited.
S103:基于第二智能合约接口获取待校验数据;利用随机私钥对待校验数据进行加密处理,得到待校验数据密文。S103: Obtain the data to be verified based on the second smart contract interface; encrypt the data to be verified using a random private key to obtain a ciphertext of the data to be verified.
区块链应用可以调用第二智能合约接口把待校验数据及其对应的标识提交到区块链上进行验证。第二智能 合约接口的处理程序首先从账本中获取通过第一智能合约接口上链的交易数据密文及其随机私钥,其次使用随机私钥加密提交的待校验数据,再次把待校验数据密文与交易数据密文进行比较,并将比较结果返回给区块链应用或用户终端。The blockchain application can call the second smart contract interface to submit the data to be verified and its corresponding identifier to the blockchain for verification. The contract interface processing program first obtains the transaction data ciphertext and its random private key uploaded to the chain through the first smart contract interface from the ledger, then uses the random private key to encrypt the submitted data to be verified, and again compares the ciphertext of the data to be verified with the ciphertext of the transaction data, and returns the comparison result to the blockchain application or user terminal.
S104:通过第三智能合约接口向监管系统传输交易数据密文,以便于监管系统利用随机公钥对交易数据密文进行解密处理,并对解密后的交易数据进行合规检测,通过第四智能合约接口将检测结果上传至区块链。S104: Transmitting the ciphertext of transaction data to the regulatory system through the third smart contract interface, so that the regulatory system can decrypt the ciphertext of transaction data using a random public key, and perform compliance testing on the decrypted transaction data, and upload the test results to the blockchain through the fourth smart contract interface.
在实际应用中,区块链平台可以通过第三智能合约接口向监管系统传输交易数据密文,或者监管系统可以调用第三智能合约接口从区块链上获取处于未审核状态的数据,数据可以包括交易数据的标识、交易数据密文、随机私钥、加密的随机公钥及审核状态。In actual applications, the blockchain platform can transmit transaction data ciphertext to the regulatory system through the third smart contract interface, or the regulatory system can call the third smart contract interface to obtain unaudited data from the blockchain. The data may include the transaction data identifier, transaction data ciphertext, random private key, encrypted random public key and audit status.
为了区别其它密钥对,在本申请实施例中,将监管系统本身的密钥对命名为监管公钥和监管私钥。In order to distinguish it from other key pairs, in the embodiment of the present application, the key pair of the supervision system itself is named as the supervision public key and the supervision private key.
以利用监管私钥对随机公钥进行加密处理为例,监管系统获取到待审核的数据后,首先,利用监管系统本身的监管公钥对加密的随机公钥进行解密,以获得解密后的随机公钥;其中,监管公钥与监管私钥是一对非对称加密密钥对。其次,利用解密后的随机公钥解密交易数据密文,获得交易数据明文;再次,利用数据检测算法检测交易数据的合规性;最后,把检测结果通过第四智能合约接口提交到区块链中。Taking the example of using the regulatory private key to encrypt the random public key, after the regulatory system obtains the data to be reviewed, first, the encrypted random public key is decrypted using the regulatory public key of the regulatory system itself to obtain the decrypted random public key; where the regulatory public key and the regulatory private key are a pair of asymmetric encryption key pairs. Secondly, the decrypted random public key is used to decrypt the transaction data ciphertext to obtain the transaction data plaintext; thirdly, the data detection algorithm is used to detect the compliance of the transaction data; finally, the detection results are submitted to the blockchain through the fourth smart contract interface.
考虑到实际应用中,随机密钥对也可以由监管系统生成,相应的,监管系统可以将随机私钥上链,以供区块链平台利用随机私钥对交易数据进行加密处理。监管系统可以在本地保存随机公钥。监管系统获取到待审核的数据后,可以直接利用本地保存的随机公钥解密交易数据密文,获得交易数据明文;然后,利用数据检测算法检测交易数据的合规性;最后,把检测结果通过第四智能合约接口提交到区块链中。Considering that in practical applications, random key pairs can also be generated by the regulatory system, the regulatory system can put the random private key on the chain so that the blockchain platform can use the random private key to encrypt the transaction data. The regulatory system can save the random public key locally. After the regulatory system obtains the data to be reviewed, it can directly use the locally saved random public key to decrypt the transaction data ciphertext and obtain the transaction data plaintext; then, use the data detection algorithm to detect the compliance of the transaction data; finally, submit the detection results to the blockchain through the fourth smart contract interface.
所需审核的交易数据的类型不同,其对应的数据检测算法也会有所不同。数据检测算法可以为匹配算法或者人工智能算法等。利用数据检测算法检测交易数据的合规性属于现有较为常规的技术,在此不再赘述。The types of transaction data to be reviewed are different, and the corresponding data detection algorithms will also be different. The data detection algorithm can be a matching algorithm or an artificial intelligence algorithm, etc. Using data detection algorithms to detect the compliance of transaction data is a relatively common technology, which will not be elaborated here.
在S103中介绍了区块链平台可以将待校验数据密文与交易数据密文进行一致性比较,除此之外,区块链应用也可以调用第三智能合约接口从区块链上获取某个未审核的数据,并由区块链应用自己验证数据的一致性,即把待校验数据通过随机私钥加密,然后与交易数据密文进行比对,查看结果是否一致。In S103, it is introduced that the blockchain platform can compare the ciphertext of the data to be verified with the ciphertext of the transaction data for consistency. In addition, the blockchain application can also call the third smart contract interface to obtain some unaudited data from the blockchain, and the blockchain application itself verifies the consistency of the data, that is, encrypts the data to be verified with a random private key, and then compares it with the ciphertext of the transaction data to check whether the results are consistent.
S105:依据检测结果调整交易数据对应的审核状态以及所需公布的信息。S105: Adjust the audit status corresponding to the transaction data and the information to be published according to the detection results.
检测结果可以包括交易数据合规和交易数据不合规两种情况。The detection results may include two situations: transaction data compliance and transaction data non-compliance.
在检测结果为交易数据合规的情况下,可以调整交易数据对应的审核状态为审核通过状态。交易数据合规,说明其可以被区块链应用所使用,由于账本中写入的是交易数据密文,因此区块链平台可以在交易数据合规的情况下,通过第四智能合约接口将解密后的随机公钥写入账本。当某个区块链应用需要调用交易数据时,区块链平台可以通过随机公钥对交易数据密文进行解密处理,从而得到明文的交易数据,然后将明文的交易数据反馈给区块链应用。If the test result shows that the transaction data is compliant, the audit status corresponding to the transaction data can be adjusted to the audit passed status. The compliance of the transaction data means that it can be used by the blockchain application. Since the transaction data ciphertext is written in the account book, the blockchain platform can write the decrypted random public key into the account book through the fourth smart contract interface when the transaction data is compliant. When a blockchain application needs to call transaction data, the blockchain platform can decrypt the transaction data ciphertext through the random public key to obtain the plaintext transaction data, and then feed the plaintext transaction data back to the blockchain application.
在检测结果为交易数据不合规的情况下,调整交易数据对应的审核状态为审核未通过状态,并通过第四智能合约接口将不合规说明写入账本。When the detection result shows that the transaction data is non-compliant, the audit status corresponding to the transaction data is adjusted to the audit failed status, and the non-compliance description is written into the account book through the fourth smart contract interface.
不合规说明中可以写明哪些数据不合规,或者造成不合规的原因等,以便于区块链的用户更加清楚的了解交易数据不合规的情况。The non-compliance description can specify which data is non-compliant or the reasons for the non-compliance, so that blockchain users can more clearly understand the non-compliance of transaction data.
由上述技术方案可以看出,部署智能合约的区块链平台基于第一智能合约接口获取交易数据密文;其中,交易数据密文为利用随机私钥对交易数据进行加密处理得到;将交易数据的标识、交易数据密文、交易数据的审核状态以及随机私钥写入账本;基于第二智能合约接口获取待校验数据;利用随机私钥对待校验数据进行加密处理,得到待校验数据密文;将待校验数据密文和交易数据密文进行比较,并将比较结果返回给区块链应用或用户终端。通过第三智能合约接口向监管系统传输交易数据密文,以便于监管系统利用随机公钥对交易数据密文进行解密处理,并对解密后的交易数据进行合规检测,通过第四智能合约接口将检测结果上传至区块链;依据检测结果调整交易数据对应的审核状态以及所需公布的信息。在该技术方案中,通过部署智能合约,通过智能合约对应的接口可以实现对交易数据的自动化监管,该监管方式公开透明且高效。无需对区块链实现做任 何修改,只需要在区块链上部署该智能合约,因此可适配任何区块链系统,无额外开发成本。同时上链交易数据在账本中只保存一次,减少了由于监管带来的上链数据的存储开销。实现了自动化、高可适配性、高效、低成本的交易数据监管。It can be seen from the above technical solution that the blockchain platform that deploys smart contracts obtains the transaction data ciphertext based on the first smart contract interface; wherein the transaction data ciphertext is obtained by encrypting the transaction data using a random private key; the transaction data identifier, transaction data ciphertext, transaction data review status and random private key are written into the account book; the data to be verified is obtained based on the second smart contract interface; the data to be verified is encrypted using a random private key to obtain the data ciphertext to be verified; the data ciphertext to be verified is compared with the transaction data ciphertext, and the comparison result is returned to the blockchain application or user terminal. The transaction data ciphertext is transmitted to the regulatory system through the third smart contract interface, so that the regulatory system can decrypt the transaction data ciphertext using a random public key, and perform compliance detection on the decrypted transaction data, and upload the detection results to the blockchain through the fourth smart contract interface; the review status corresponding to the transaction data and the information to be published are adjusted according to the detection results. In this technical solution, by deploying smart contracts, the automated supervision of transaction data can be achieved through the interface corresponding to the smart contract, and this supervision method is open, transparent and efficient. There is no need to make any changes to the blockchain implementation. No modification is required, only the smart contract needs to be deployed on the blockchain, so it can be adapted to any blockchain system without additional development costs. At the same time, the transaction data on the chain is only saved once in the account book, reducing the storage overhead of the on-chain data due to supervision. It realizes automated, highly adaptable, efficient and low-cost transaction data supervision.
区块链平台可以为不同的交易数据设置各自对应的标识,区块链平台在将交易数据的标识、交易数据密文、交易数据的审核状态以及随机私钥写入账本之后,可以通过第一智能合约接口向传输交易数据的区块链应用反馈交易数据的标识,以便于区块链应用可以基于该标识获取对应的交易数据。The blockchain platform can set corresponding identifiers for different transaction data. After writing the transaction data identifier, transaction data ciphertext, transaction data review status and random private key into the account book, the blockchain platform can feedback the transaction data identifier to the blockchain application that transmits the transaction data through the first smart contract interface, so that the blockchain application can obtain the corresponding transaction data based on the identifier.
上述内容围绕交易数据的审核流程展开的介绍,在完成交易数据的审核之后,区块链应用可以从区块链平台上获取交易数据。The above content is an introduction to the review process of transaction data. After completing the review of transaction data, blockchain applications can obtain transaction data from the blockchain platform.
在实现中,区块链应用可以通过第五智能合约接口向区块链平台传输目标标识。区块链平台在接收到区块链应用通过第五智能合约接口传输的目标标识的情况下,可以判断目标标识对应的审核状态是否为审核通过状态。In implementation, the blockchain application may transmit the target identifier to the blockchain platform through the fifth smart contract interface. When the blockchain platform receives the target identifier transmitted by the blockchain application through the fifth smart contract interface, it may determine whether the audit status corresponding to the target identifier is the audit passed status.
每个交易数据有其对应的标识和随机公钥,为了便于区分,在本申请实施例中,将目标标识对应的交易数据密文称作目标交易数据密文,其对应的随机公钥称作目标随机公钥。Each transaction data has its corresponding identifier and random public key. For the sake of distinction, in the embodiment of the present application, the transaction data ciphertext corresponding to the target identifier is referred to as the target transaction data ciphertext, and its corresponding random public key is referred to as the target random public key.
在目标标识对应的审核状态为审核通过状态的情况下,从账本中获取与目标标识匹配的目标交易数据密文以及解密后的目标随机公钥;利用目标随机公钥对目标交易数据密文进行解密处理,得到目标交易数据明文;将目标交易数据明文通过第五智能合约接口反馈至区块链应用。When the audit status corresponding to the target identifier is the audit passed status, the target transaction data ciphertext matching the target identifier and the decrypted target random public key are obtained from the account book; the target transaction data ciphertext is decrypted using the target random public key to obtain the target transaction data plaintext; the target transaction data plaintext is fed back to the blockchain application through the fifth smart contract interface.
在目标标识对应的审核状态为审核未通过状态或者为未审核状态的情况下,此时无法获取到目标交易数据明文,区块链平台可以通过第五智能合约接口向区块链应用反馈数据获取失败的提示信息。When the audit status corresponding to the target identifier is a failed audit status or an unaudited status, the target transaction data plain text cannot be obtained at this time. The blockchain platform can feedback a prompt message of data acquisition failure to the blockchain application through the fifth smart contract interface.
考虑到实际应用中,不同的区块链应用的权限有所差异。区块链平台在接收到区块链应用通过第五智能合约接口传输的目标标识的情况下,可以判断区块链应用是否具有访问权限以及对应的权限范围。Considering that different blockchain applications have different permissions in actual applications, the blockchain platform can determine whether the blockchain application has access rights and the corresponding permission scope when receiving the target identifier transmitted by the blockchain application through the fifth smart contract interface.
在区块链应用具有访问权限的情况下,执行判断目标标识对应的审核状态是否为审核通过状态的步骤。在目标标识对应的审核状态为审核通过状态的情况下,区块链平台可以从目标交易数据明文中提取与权限范围匹配的交易数据明文,将与权限范围匹配的交易数据明文通过第五智能合约接口反馈至区块链应用。In the case where the blockchain application has access rights, a step of determining whether the audit status corresponding to the target identifier is an audit-passed status is performed. In the case where the audit status corresponding to the target identifier is an audit-passed status, the blockchain platform can extract the transaction data plaintext that matches the authority scope from the target transaction data plaintext, and feed the transaction data plaintext that matches the authority scope back to the blockchain application through the fifth smart contract interface.
通过设置权限,可以提升交易数据的安全性,避免了交易数据被泄露的风险。By setting permissions, you can improve the security of transaction data and avoid the risk of transaction data being leaked.
需要说明的是,上述提及的第一智能合约接口、第二智能合约接口、第三智能合约接口、第四智能合约接口、第五智能合约接口、第六智能合约接口和第七智能合约接口可以为相互独立的合约接口,每个合约接口被设置为执行不同的功能。上述提及的各智能合约接口也可以为统一的一个接口,通过设置不同的标识来区分不同的功能。其中,“第一、第二、第三、第四、第五、第六和第七”仅是为了区分不同的功能,并不对智能合约接口的排布顺序进行限定。It should be noted that the first smart contract interface, the second smart contract interface, the third smart contract interface, the fourth smart contract interface, the fifth smart contract interface, the sixth smart contract interface and the seventh smart contract interface mentioned above can be independent contract interfaces, and each contract interface is configured to perform different functions. The smart contract interfaces mentioned above can also be a unified interface, and different functions are distinguished by setting different identifiers. Among them, "first, second, third, fourth, fifth, sixth and seventh" are only used to distinguish different functions, and do not limit the arrangement order of smart contract interfaces.
图2为本申请实施例提供的一种区块链交易数据的监管装置的结构示意图,适用于部署智能合约的区块链平台,装置包括第一获取单元21、写入单元22、第二获取单元23、加密单元24、传输单元25和调整单元26;FIG2 is a schematic diagram of the structure of a blockchain transaction data supervision device provided in an embodiment of the present application, which is applicable to a blockchain platform for deploying smart contracts, and the device includes a first acquisition unit 21, a writing unit 22, a second acquisition unit 23, an encryption unit 24, a transmission unit 25, and an adjustment unit 26;
第一获取单元21,被设置为基于第一智能合约接口获取交易数据密文;其中,交易数据密文为利用随机私钥对交易数据进行加密处理得到;The first acquisition unit 21 is configured to acquire the transaction data ciphertext based on the first smart contract interface; wherein the transaction data ciphertext is obtained by encrypting the transaction data using a random private key;
写入单元22,被设置为将交易数据的标识、交易数据密文、交易数据的审核状态以及随机私钥写入账本;A writing unit 22, configured to write the transaction data identifier, the transaction data ciphertext, the transaction data review status and the random private key into the account book;
第二获取单元23,被设置为基于第二智能合约接口获取待校验数据;A second acquisition unit 23 is configured to acquire the data to be verified based on the second smart contract interface;
加密单元24,被设置为利用随机私钥对待校验数据进行加密处理,得到待校验数据密文;将待校验数据密文和交易数据密文进行比较,并将比较结果返回给区块链应用或用户终端;The encryption unit 24 is configured to encrypt the data to be verified using a random private key to obtain a ciphertext of the data to be verified; compare the ciphertext of the data to be verified with the ciphertext of the transaction data, and return the comparison result to the blockchain application or the user terminal;
传输单元25,被设置为通过第三智能合约接口向监管系统传输交易数据密文,以便于监管系统利用随机公钥对交易数据密文进行解密处理,并对解密后的交易数据进行合规检测,通过第四智能合约接口将检测结果上 传至区块链;The transmission unit 25 is configured to transmit the transaction data ciphertext to the supervision system through the third smart contract interface, so that the supervision system can decrypt the transaction data ciphertext using the random public key, perform compliance detection on the decrypted transaction data, and upload the detection result to the supervision system through the fourth smart contract interface. Transfer to blockchain;
调整单元26,被设置为依据检测结果调整交易数据对应的审核状态以及所需公布的信息。The adjustment unit 26 is configured to adjust the audit status corresponding to the transaction data and the information to be published according to the detection result.
可选地,调整单元被设置为在检测结果为交易数据合规的情况下,调整交易数据对应的审核状态为审核通过状态,并通过第四智能合约接口将解密后的随机公钥写入账本;Optionally, the adjustment unit is configured to adjust the review status corresponding to the transaction data to a review passed status when the detection result shows that the transaction data is compliant, and write the decrypted random public key into the account book through the fourth smart contract interface;
在检测结果为交易数据不合规的情况下,调整交易数据对应的审核状态为审核未通过状态,并通过第四智能合约接口将不合规说明写入账本。When the detection result shows that the transaction data is non-compliant, the audit status corresponding to the transaction data is adjusted to the audit failed status, and the non-compliance description is written into the account book through the fourth smart contract interface.
可选地,还包括标识反馈单元;Optionally, it also includes an identification feedback unit;
标识反馈单元,被设置为通过第一智能合约接口向传输交易数据的区块链应用反馈交易数据的标识。The identification feedback unit is configured to feedback the identification of the transaction data to the blockchain application that transmits the transaction data through the first smart contract interface.
可选地,在依据检测结果调整交易数据对应的审核状态以及所需公布的信息之后还包括第一判断单元、第三获取单元、解密单元、数据反馈单元和提示反馈单元;Optionally, after adjusting the audit status corresponding to the transaction data and the information to be published according to the detection result, it also includes a first judgment unit, a third acquisition unit, a decryption unit, a data feedback unit and a prompt feedback unit;
第一判断单元,被设置为在接收到区块链应用通过第五智能合约接口传输的目标标识的情况下,判断目标标识对应的审核状态是否为审核通过状态;The first judgment unit is configured to judge whether the review status corresponding to the target identifier is a review passed status when receiving the target identifier transmitted by the blockchain application through the fifth smart contract interface;
第三获取单元,被设置为在目标标识对应的审核状态为审核通过状态的情况下,从账本中获取与目标标识匹配的目标交易数据密文以及解密后的目标随机公钥;The third acquisition unit is configured to acquire, when the audit status corresponding to the target identifier is the audit passed status, the target transaction data ciphertext matching the target identifier and the decrypted target random public key from the account book;
解密单元,被设置为利用目标随机公钥对目标交易数据密文进行解密处理,得到目标交易数据明文;A decryption unit is configured to decrypt the target transaction data ciphertext using the target random public key to obtain the target transaction data plaintext;
数据反馈单元,被设置为将目标交易数据明文通过第五智能合约接口反馈至区块链应用;A data feedback unit, configured to feed back the target transaction data in plain text to the blockchain application via a fifth smart contract interface;
提示反馈单元,被设置为在目标标识对应的审核状态为审核未通过状态或者为未审核状态的情况下,通过第五智能合约接口向区块链应用反馈数据获取失败的提示信息。The prompt feedback unit is configured to feedback prompt information of data acquisition failure to the blockchain application through the fifth smart contract interface when the audit status corresponding to the target identifier is an audit failure status or an unaudited status.
可选地,还包括第二判断单元;Optionally, it further includes a second judgment unit;
第二判断单元,被设置为在接收到区块链应用通过第五智能合约接口传输的目标标识的情况下,判断区块链应用是否具有访问权限以及对应的权限范围;在区块链应用具有访问权限的情况下,触发第一判断单元执行判断目标标识对应的审核状态是否为审核通过状态的步骤;The second judgment unit is configured to judge whether the blockchain application has access rights and the corresponding scope of rights when receiving the target identifier transmitted by the blockchain application through the fifth smart contract interface; if the blockchain application has access rights, trigger the first judgment unit to execute the step of judging whether the review status corresponding to the target identifier is a review passed status;
相应的,数据反馈单元被设置为从目标交易数据明文中提取与权限范围匹配的交易数据明文,将与权限范围匹配的交易数据明文通过第五智能合约接口反馈至区块链应用。Correspondingly, the data feedback unit is configured to extract transaction data plaintext that matches the authority scope from the target transaction data plaintext, and feed back the transaction data plaintext that matches the authority scope to the blockchain application through the fifth smart contract interface.
可选地,针对于随机私钥的获取过程,装置还包括第一密钥获取单元;Optionally, for the process of obtaining the random private key, the device further includes a first key obtaining unit;
密钥获取单元,被设置为从区块节点的存储系统中获取一对随机生成的密钥对;随机生成的密钥对包括随机私钥和随机公钥;A key acquisition unit is configured to acquire a pair of randomly generated key pairs from a storage system of a block node; the randomly generated key pair includes a random private key and a random public key;
相应的,写入单元还被设置为利用监管系统反馈的监管私钥对随机公钥进行加密处理,并将加密后的随机公钥写入账本。Correspondingly, the writing unit is also configured to encrypt the random public key using the supervisory private key fed back by the supervisory system, and write the encrypted random public key into the account book.
可选地,针对于随机私钥的获取过程,装置还包括第一接收单元;Optionally, for the process of obtaining the random private key, the device further includes a first receiving unit;
第一接收单元,被设置为接收监管系统通过第六智能合约接口写入的一对随机生成的密钥对;随机生成的密钥对包括随机私钥和被监管私钥加密后的随机公钥;A first receiving unit is configured to receive a pair of randomly generated key pairs written by the supervision system through the sixth smart contract interface; the randomly generated key pair includes a random private key and a random public key encrypted by the supervised private key;
相应的,写入单元还被设置为将加密后的随机公钥写入账本。Correspondingly, the writing unit is also configured to write the encrypted random public key into the ledger.
可选地,针对于随机私钥的获取过程,装置还包括第二接收单元;Optionally, for the process of obtaining the random private key, the device further includes a second receiving unit;
第二接收单元,被设置为接收监管系统通过第六智能合约接口写入的随机私钥;其中,随机私钥对应的随机公钥保存在监管系统上。The second receiving unit is configured to receive a random private key written by the supervision system through the sixth smart contract interface; wherein the random public key corresponding to the random private key is stored on the supervision system.
可选地,针对于随机私钥的获取过程,装置还包括第二密钥获取单元;Optionally, for the process of obtaining the random private key, the device further includes a second key obtaining unit;
第二密钥获取单元,被设置为通过第七智能合约接口获取由外部程序写入的一对随机生成的密钥对;随机生成的密钥对包括随机私钥和随机公钥;A second key acquisition unit is configured to acquire a pair of randomly generated key pairs written by an external program through a seventh smart contract interface; the randomly generated key pair includes a random private key and a random public key;
相应的,写入单元还被设置为利用监管系统反馈的监管私钥对随机公钥进行加密处理,并将加密后的随机公钥写入账本。 Correspondingly, the writing unit is also configured to encrypt the random public key using the supervisory private key fed back by the supervisory system, and write the encrypted random public key into the account book.
可选地,第一获取单元被设置为利用随机私钥对交易数据中预保护字段的内容进行加密处理得到交易数据密文。Optionally, the first acquisition unit is configured to use a random private key to encrypt the content of the pre-protected field in the transaction data to obtain a ciphertext of the transaction data.
可选地,第一获取单元被设置为将交易数据按照各字段对应的随机私钥进行加密处理得到交易数据密文。Optionally, the first acquisition unit is configured to encrypt the transaction data according to a random private key corresponding to each field to obtain a ciphertext of the transaction data.
可选地,第一获取单元被设置为利用随机私钥对交易数据中所有字段的内容进行加密处理得到交易数据密文。Optionally, the first acquisition unit is configured to use a random private key to encrypt the contents of all fields in the transaction data to obtain a ciphertext of the transaction data.
可选地,第一获取单元被设置为接收区块链应用通过第一智能合约接口传输的交易数据密文;其中,交易数据密文由区块链应用通过初始智能合约接口获取随机私钥;并利用随机私钥对交易数据进行加密得到。Optionally, the first acquisition unit is configured to receive transaction data ciphertext transmitted by the blockchain application through the first smart contract interface; wherein the transaction data ciphertext is obtained by the blockchain application obtaining a random private key through the initial smart contract interface; and the transaction data is encrypted using the random private key.
图2所对应实施例中特征的说明可以参见图1所对应实施例的相关说明,这里不再一一赘述。For the description of the features in the embodiment corresponding to FIG. 2 , reference can be made to the relevant description of the embodiment corresponding to FIG. 1 , and they will not be described one by one here.
由上述技术方案可以看出,部署智能合约的区块链平台基于第一智能合约接口获取交易数据密文;其中,交易数据密文为利用随机私钥对交易数据进行加密处理得到;将交易数据的标识、交易数据密文、交易数据的审核状态以及随机私钥写入账本;基于第二智能合约接口获取待校验数据;利用随机私钥对待校验数据进行加密处理,得到待校验数据密文;将待校验数据密文和交易数据密文进行比较,并将比较结果返回给区块链应用或用户终端。通过第三智能合约接口向监管系统传输交易数据密文,以便于监管系统利用随机公钥对交易数据密文进行解密处理,并对解密后的交易数据进行合规检测,通过第四智能合约接口将检测结果上传至区块链;依据检测结果调整交易数据对应的审核状态以及所需公布的信息。在该技术方案中,通过部署智能合约,通过智能合约对应的接口可以实现对交易数据的自动化监管,该监管方式公开透明且高效。无需对区块链实现做任何修改,只需要在区块链上部署该智能合约,因此可适配任何区块链系统,无额外开发成本。同时上链交易数据在账本中只保存一次,减少了由于监管带来的上链数据的存储开销。实现了自动化、高可适配性、高效、低成本的交易数据监管。It can be seen from the above technical scheme that the blockchain platform that deploys smart contracts obtains the transaction data ciphertext based on the first smart contract interface; wherein the transaction data ciphertext is obtained by encrypting the transaction data using a random private key; the transaction data identifier, transaction data ciphertext, the audit status of the transaction data and the random private key are written into the account book; the data to be verified is obtained based on the second smart contract interface; the data to be verified is encrypted using a random private key to obtain the ciphertext of the data to be verified; the ciphertext of the data to be verified is compared with the ciphertext of the transaction data, and the comparison result is returned to the blockchain application or user terminal. The transaction data ciphertext is transmitted to the regulatory system through the third smart contract interface, so that the regulatory system can decrypt the transaction data ciphertext using a random public key, and perform compliance detection on the decrypted transaction data, and upload the detection results to the blockchain through the fourth smart contract interface; the audit status corresponding to the transaction data and the information to be published are adjusted according to the detection results. In this technical scheme, by deploying smart contracts, the automated supervision of transaction data can be realized through the interface corresponding to the smart contract, and this supervision method is open, transparent and efficient. There is no need to make any modifications to the blockchain implementation, only the smart contract needs to be deployed on the blockchain, so it can be adapted to any blockchain system without additional development costs. At the same time, the transaction data on the chain is only saved once in the account book, reducing the storage overhead of the on-chain data due to supervision. It realizes automated, highly adaptable, efficient and low-cost transaction data supervision.
图3为本申请实施例提供的一种区块链交易数据的监管系统,包括区块链应用、部署智能合约的区块链平台和监管系统;图3中将第一智能合约接口至第五智能合约接口分别用合约接口1至合约接口5表示。Figure 3 is a blockchain transaction data supervision system provided by an embodiment of the present application, including a blockchain application, a blockchain platform for deploying smart contracts, and a supervision system; in Figure 3, the first smart contract interface to the fifth smart contract interface are represented by contract interface 1 to contract interface 5 respectively.
区块链应用,被设置为调用第一智能合约接口(合约接口1)执行交易数据上链,即将交易数据传输到区块链的账本中。The blockchain application is configured to call the first smart contract interface (contract interface 1) to execute transaction data on-chain, that is, to transfer the transaction data to the ledger of the blockchain.
区块链平台,被设置为获取交易数据;利用随机私钥对交易数据进行加密处理得到交易数据密文;将交易数据的标识、交易数据密文、交易数据的审核状态、随机私钥以及用监管私钥加密的随机公钥写入账本。区块链应用可以通过第二智能合约接口(合约接口2)向区块链平台传输用于验证交易数据的待校验数据。此时,区块链平台的账本中记录的交易数据是密文状态,区块链平台基于合约接口2获取到待校验数据之后,可以利用随机私钥对待校验数据进行加密处理,得到待校验数据密文。区块链平台将待校验数据密文和交易数据密文进行比较,并将比较结果返回给区块链应用或用户终端。区块链平台可以通过第三智能合约接口(合约接口3)向监管系统传输交易数据密文。如果区块链应用需要获取交易数据密文,区块链平台也可以通过合约接口3向区块链应用传输交易数据密文。The blockchain platform is configured to obtain transaction data; encrypt the transaction data using a random private key to obtain a ciphertext of the transaction data; and write the identifier of the transaction data, the ciphertext of the transaction data, the audit status of the transaction data, the random private key, and the random public key encrypted with the supervisory private key into the account book. The blockchain application can transmit the data to be verified for verifying the transaction data to the blockchain platform through the second smart contract interface (contract interface 2). At this time, the transaction data recorded in the account book of the blockchain platform is in a ciphertext state. After the blockchain platform obtains the data to be verified based on the contract interface 2, it can encrypt the data to be verified using a random private key to obtain the ciphertext of the data to be verified. The blockchain platform compares the ciphertext of the data to be verified with the ciphertext of the transaction data, and returns the comparison result to the blockchain application or the user terminal. The blockchain platform can transmit the ciphertext of the transaction data to the supervisory system through the third smart contract interface (contract interface 3). If the blockchain application needs to obtain the ciphertext of the transaction data, the blockchain platform can also transmit the ciphertext of the transaction data to the blockchain application through the contract interface 3.
监管系统,被设置为利用监管公钥解密被加密的随机公钥,利用随机公钥对交易数据密文进行解密处理,并对解密后的交易数据进行合规检测,通过第四智能合约接口(合约接口4)将检测结果上传至区块链。The supervision system is configured to use the supervision public key to decrypt the encrypted random public key, use the random public key to decrypt the transaction data ciphertext, perform compliance testing on the decrypted transaction data, and upload the test results to the blockchain through the fourth smart contract interface (contract interface 4).
在实现中,区块链平台可以利用监管系统的监管私钥对随机公钥进行加密处理,将加密后的随机公钥一并写入账本。因此,在监管系统获取到交易数据密文后,可以利用监管公钥解密被加密的随机公钥,从而利用随机公钥解密交易数据密文,得到交易数据明文。监管系统可以调用数据检测算法对交易数据明文进行合规性检测。In the implementation, the blockchain platform can use the regulatory private key of the regulatory system to encrypt the random public key and write the encrypted random public key into the account book. Therefore, after the regulatory system obtains the transaction data ciphertext, it can use the regulatory public key to decrypt the encrypted random public key, and then use the random public key to decrypt the transaction data ciphertext to obtain the transaction data plaintext. The regulatory system can call the data detection algorithm to perform compliance detection on the transaction data plaintext.
区块链平台还被设置为依据检测结果调整交易数据对应的审核状态以及所需公布的信息。The blockchain platform is also configured to adjust the audit status of transaction data and the information that needs to be published based on the test results.
检测结果可以包括交易数据合规或者交易数据不合规。对于合规交易数据可以公开随机公钥,对于不合规交易数据可以注明不合规情况,并且不公开随机公钥。 The detection result may include whether the transaction data is compliant or not. For compliant transaction data, the random public key may be made public, and for non-compliant transaction data, the non-compliance may be noted and the random public key may not be made public.
当区块链应用需要获取交易数据明文时,可以通过第五智能合约接口(合约接口5)向区块链应用传输对应的目标标识,区块链平台可以基于该目标标识,确定出对应的随机公钥以及交易数据密文。利用随机公钥对交易数据密文进行解密处理,得到交易数据明文,从而将交易数据明文通过合约接口5反馈给区块链应用。When the blockchain application needs to obtain the transaction data plaintext, the corresponding target identifier can be transmitted to the blockchain application through the fifth smart contract interface (contract interface 5), and the blockchain platform can determine the corresponding random public key and transaction data ciphertext based on the target identifier. The transaction data ciphertext is decrypted using the random public key to obtain the transaction data plaintext, and the transaction data plaintext is fed back to the blockchain application through the contract interface 5.
图3中交易数据的加密处理也可以由区块链应用执行,区块链应用可以通过初始智能合约接口获取随机私钥;并利用随机私钥对交易数据进行加密得到交易数据密文;调用第一智能合约接口将交易数据密文传输到区块链的账本中。The encryption processing of the transaction data in Figure 3 can also be performed by the blockchain application. The blockchain application can obtain the random private key through the initial smart contract interface; and use the random private key to encrypt the transaction data to obtain the transaction data ciphertext; call the first smart contract interface to transmit the transaction data ciphertext to the blockchain ledger.
图3中是以随机私钥、随机公钥、监管私钥和监管公钥对数据进行加解密处理为例,在实际应用中,也可以不设置监管私钥和监管公钥,直接由监管系统生成随机密钥对(包括随机私钥和随机公钥),该实现方式可以参见图4。FIG3 shows an example of encrypting and decrypting data using a random private key, a random public key, a regulatory private key, and a regulatory public key. In actual applications, the regulatory private key and the regulatory public key may not be set, and the random key pair (including a random private key and a random public key) may be directly generated by the regulatory system. The implementation method can be seen in FIG4.
图4为本申请实施例提供的另一种区块链交易数据的监管系统,包括区块链应用、部署智能合约的区块链平台和监管系统;图4中将第一智能合约接口至第五智能合约接口分别用合约接口1至合约接口5表示。将初始智能合约接口用合约接口0表示。FIG4 is another blockchain transaction data supervision system provided by an embodiment of the present application, including a blockchain application, a blockchain platform for deploying smart contracts, and a supervision system; in FIG4, the first smart contract interface to the fifth smart contract interface are represented by contract interface 1 to contract interface 5, respectively. The initial smart contract interface is represented by contract interface 0.
区块链平台,被设置为可以通过初始智能合约接口(合约接口0)获取随机私钥。或者由监管系统通过合约接口0主动向区块链平台写入随机私钥。The blockchain platform is configured to obtain a random private key through the initial smart contract interface (contract interface 0). Alternatively, the regulatory system can actively write a random private key to the blockchain platform through contract interface 0.
区块链应用,被设置为调用第一智能合约接口(合约接口1)执行交易数据上链,即将交易数据传输到区块链的账本中。The blockchain application is configured to call the first smart contract interface (contract interface 1) to execute transaction data on-chain, that is, to transfer the transaction data to the ledger of the blockchain.
区块链平台利用随机私钥对交易数据进行加密处理得到交易数据密文;通过合约接口1将交易数据的标识、交易数据密文、交易数据的审核状态以及随机私钥写入账本中,并标记交易数据密文的审核状态为未审核。The blockchain platform uses a random private key to encrypt the transaction data to obtain the transaction data ciphertext; the transaction data identifier, transaction data ciphertext, transaction data review status and random private key are written into the account book through contract interface 1, and the review status of the transaction data ciphertext is marked as unreviewed.
区块链应用可以调用第二智能合约接口(合约接口2)向区块链平台传输用于验证交易数据的待校验数据。The blockchain application can call the second smart contract interface (contract interface 2) to transmit the data to be verified to the blockchain platform for verifying the transaction data.
区块链平台通过合约接口2获取到待校验数据之后,可以利用随机私钥对待校验数据进行加密处理,得到待校验数据密文;将待校验数据密文和交易数据密文进行比较,并将比较结果返回给区块链应用或用户终端。通过第三智能合约接口(合约接口3)向监管系统传输交易数据密文。After the blockchain platform obtains the data to be verified through the contract interface 2, it can use the random private key to encrypt the data to be verified to obtain the ciphertext of the data to be verified; compare the ciphertext of the data to be verified with the ciphertext of the transaction data, and return the comparison result to the blockchain application or user terminal. The ciphertext of the transaction data is transmitted to the supervision system through the third smart contract interface (contract interface 3).
监管系统,被设置为生成随机私钥和随机公钥;将随机私钥上链,并将随机公钥本地保存;利用随机公钥对交易数据密文进行解密处理,并对解密后的交易数据进行合规检测,通过第四智能合约接口(合约接口4)将检测结果上传至区块链。The supervision system is configured to generate a random private key and a random public key; upload the random private key to the chain and save the random public key locally; use the random public key to decrypt the ciphertext of the transaction data, perform compliance testing on the decrypted transaction data, and upload the test results to the blockchain through the fourth smart contract interface (contract interface 4).
区块链平台还被设置为依据检测结果调整交易数据对应的审核状态以及所需公布的信息。The blockchain platform is also configured to adjust the audit status of transaction data and the information that needs to be published based on the test results.
检测结果可以包括交易数据合规或者交易数据不合规。对于合规交易数据可以公开随机公钥,对于不合规交易数据可以注明不合规情况,并且不公开随机公钥。The detection result may include whether the transaction data is compliant or not. For compliant transaction data, the random public key may be made public, and for non-compliant transaction data, the non-compliance may be noted and the random public key may not be made public.
当区块链应用需要获取交易数据明文时,可以通过第五智能合约接口(合约接口5)向区块链应用传输对应的目标标识,区块链平台可以基于该目标标识,确定出对应的随机公钥以及交易数据密文。利用随机公钥对交易数据密文进行解密处理,得到交易数据明文,从而将交易数据明文通过合约接口5反馈给区块链应用。When the blockchain application needs to obtain the transaction data plaintext, the corresponding target identifier can be transmitted to the blockchain application through the fifth smart contract interface (contract interface 5), and the blockchain platform can determine the corresponding random public key and transaction data ciphertext based on the target identifier. The transaction data ciphertext is decrypted using the random public key to obtain the transaction data plaintext, and the transaction data plaintext is fed back to the blockchain application through the contract interface 5.
图4中交易数据的加密处理也可以由区块链应用执行,区块链应用可以通过初始智能合约接口获取随机私钥;并利用随机私钥对交易数据进行加密得到交易数据密文;调用第一智能合约接口将交易数据密文传输到区块链的账本中。The encryption processing of the transaction data in Figure 4 can also be performed by the blockchain application. The blockchain application can obtain a random private key through the initial smart contract interface; and use the random private key to encrypt the transaction data to obtain the transaction data ciphertext; call the first smart contract interface to transmit the transaction data ciphertext to the blockchain ledger.
由上述技术方案可以看出,部署智能合约的区块链平台基于第一智能合约接口获取交易数据密文;其中,交易数据密文为利用随机私钥对交易数据进行加密处理得到;将交易数据的标识、交易数据密文、交易数据的审核状态以及随机私钥写入账本;基于第二智能合约接口获取待校验数据;利用随机私钥对待校验数据进行加密处理,得到待校验数据密文;将待校验数据密文和交易数据密文进行比较,并将比较结果返回给区块链应用或用户终端。通过第三智能合约接口向监管系统传输交易数据密文,以便于监管系统利用随机公钥对交易数据 密文进行解密处理,并对解密后的交易数据进行合规检测,通过第四智能合约接口将检测结果上传至区块链;依据检测结果调整交易数据对应的审核状态以及所需公布的信息。在该技术方案中,通过部署智能合约,通过智能合约对应的接口可以实现对交易数据的自动化监管,该监管方式公开透明且高效。无需对区块链实现做任何修改,只需要在区块链上部署该智能合约,因此可适配任何区块链系统,无额外开发成本。同时上链交易数据在账本中只保存一次,减少了由于监管带来的上链数据的存储开销。实现了自动化、高可适配性、高效、低成本的交易数据监管。It can be seen from the above technical solution that the blockchain platform that deploys smart contracts obtains the transaction data ciphertext based on the first smart contract interface; the transaction data ciphertext is obtained by encrypting the transaction data using a random private key; the transaction data identifier, transaction data ciphertext, transaction data review status, and random private key are written into the account book; the data to be verified is obtained based on the second smart contract interface; the data to be verified is encrypted using a random private key to obtain the ciphertext of the data to be verified; the ciphertext of the data to be verified is compared with the ciphertext of the transaction data, and the comparison result is returned to the blockchain application or user terminal. The transaction data ciphertext is transmitted to the regulatory system through the third smart contract interface, so that the regulatory system can use the random public key to encrypt the transaction data. The ciphertext is decrypted, and the decrypted transaction data is subjected to compliance testing, and the test results are uploaded to the blockchain through the fourth smart contract interface; the audit status corresponding to the transaction data and the information to be published are adjusted according to the test results. In this technical solution, by deploying smart contracts, the automated supervision of transaction data can be achieved through the corresponding interface of the smart contract, and this supervision method is open, transparent and efficient. There is no need to make any changes to the blockchain implementation, only the smart contract needs to be deployed on the blockchain, so it can be adapted to any blockchain system without additional development costs. At the same time, the on-chain transaction data is only saved once in the account book, reducing the storage overhead of the on-chain data due to supervision. Automated, highly adaptable, efficient and low-cost transaction data supervision is achieved.
图5为本申请实施例提供的一种电子设备的结构图,如图5所示,电子设备包括:存储器20,被设置为存储计算机程序;处理器21,被设置为执行计算机程序时实现如上述实施例区块链交易数据的监管方法的步骤。Figure 5 is a structural diagram of an electronic device provided in an embodiment of the present application. As shown in Figure 5, the electronic device includes: a memory 20, which is configured to store computer programs; a processor 21, which is configured to implement the steps of the blockchain transaction data supervision method in the above embodiment when executing the computer program.
其中,处理器21可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器21可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器21也可以包括主处理器和协处理器,主处理器是被设置为对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是被设置为对在待机状态下的数据进行处理的低功耗处理器。The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor configured to process data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor configured to process data in a standby state.
在一些实施例中,处理器21可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU被设置为负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器21还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器被设置为处理有关机器学习的计算操作。存储器20可以包括一个或多个非易失性可读存储介质,该非易失性可读存储介质可以是非暂态的。存储器20还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。本实施例中,存储器20至少被设置为存储以下计算机程序201,其中,该计算机程序被处理器21加载并执行之后,能够实现前述任一实施例公开的区块链交易数据的监管方法的相关步骤。In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), and the GPU is configured to be responsible for rendering and drawing the content that needs to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is configured to process computing operations related to machine learning. The memory 20 may include one or more non-volatile readable storage media, which may be non-transitory. The memory 20 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least configured to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, the relevant steps of the method for supervising blockchain transaction data disclosed in any of the aforementioned embodiments can be implemented.
另外,存储器20所存储的资源还可以包括操作系统202和数据203等,存储方式可以是短暂存储或者永久存储。其中,操作系统202可以包括Windows、Unix、Linux等。数据203可以包括但不限于交易数据的标识、交易数据密文、交易数据的审核状态以及随机私钥等。在一些实施例中,电子设备还可包括有显示屏22、输入输出接口23、通信接口24、电源25以及通信总线26。In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, and the storage method may be temporary storage or permanent storage. The operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, the identification of transaction data, transaction data ciphertext, the audit status of transaction data, and a random private key. In some embodiments, the electronic device may also include a display screen 22, an input and output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
本领域技术人员可以理解,图5中示出的结构并不构成对电子设备的限定,可以包括比图示更多或更少的组件。Those skilled in the art will appreciate that the structure shown in FIG. 5 does not limit the electronic device and may include more or fewer components than those shown in the figure.
可以理解的是,如果上述实施例中的区块链交易数据的监管方法以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、磁碟或者光盘等各种可以存储程序代码的介质。It is understandable that if the supervision method of blockchain transaction data in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, magnetic disk or optical disk and other media that can store program code.
基于此,本申请实施例还提供了一种非易失性可读存储介质,非易失性可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现如上述区块链交易数据的监管方法的步骤。Based on this, an embodiment of the present application also provides a non-volatile readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned blockchain transaction data supervision method are implemented.
以上对本申请实施例所提供的一种区块链交易数据的监管方法、装置、设备和非易失性可读存储介质进行了详细介绍。说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。The above is a detailed introduction to a method, device, equipment and non-volatile readable storage medium for supervising blockchain transaction data provided by the embodiments of the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应 用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Professionals may further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are executed in hardware or software depends on the specific application of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
以上对本申请所提供的一种区块链交易数据的监管方法、装置、设备和非易失性可读存储介质进行了详细介绍。本文中应用了可选个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围内。 The above is a detailed introduction to the supervision method, device, equipment and non-volatile readable storage medium for blockchain transaction data provided by this application. Optional examples are used in this article to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core idea of this application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the scope of protection of the claims of this application.

Claims (20)

  1. 一种区块链交易数据的监管方法,其特征在于,适用于部署智能合约的区块链平台,所述方法包括:A method for supervising blockchain transaction data, characterized in that it is applicable to a blockchain platform for deploying smart contracts, and the method comprises:
    基于第一智能合约接口获取交易数据密文;其中,所述交易数据密文为利用随机私钥对交易数据进行加密处理得到;将所述交易数据的标识、所述交易数据密文、所述交易数据的审核状态以及所述随机私钥写入账本;Obtaining a ciphertext of transaction data based on the first smart contract interface; wherein the ciphertext of transaction data is obtained by encrypting the transaction data using a random private key; writing the identifier of the transaction data, the ciphertext of transaction data, the review status of the transaction data, and the random private key into the account book;
    基于第二智能合约接口获取待校验数据;利用所述随机私钥对所述待校验数据进行加密处理,得到待校验数据密文;将所述待校验数据密文和所述交易数据密文进行比较,并将比较结果返回给区块链应用或用户终端;Acquire the data to be verified based on the second smart contract interface; encrypt the data to be verified using the random private key to obtain a ciphertext of the data to be verified; compare the ciphertext of the data to be verified with the ciphertext of the transaction data, and return the comparison result to the blockchain application or the user terminal;
    通过第三智能合约接口向监管系统传输所述交易数据密文,以便于所述监管系统利用随机公钥对所述交易数据密文进行解密处理,并对解密后的所述交易数据进行合规检测,通过第四智能合约接口将检测结果上传至区块链;The transaction data ciphertext is transmitted to the regulatory system through the third smart contract interface, so that the regulatory system can decrypt the transaction data ciphertext using a random public key, perform compliance detection on the decrypted transaction data, and upload the detection result to the blockchain through the fourth smart contract interface;
    依据所述检测结果调整所述交易数据对应的审核状态以及所需公布的信息。The audit status corresponding to the transaction data and the information to be published are adjusted according to the detection results.
  2. 根据权利要求1所述的区块链交易数据的监管方法,其特征在于,所述依据所述检测结果调整所述交易数据对应的审核状态以及所需公布的信息包括:The method for supervising blockchain transaction data according to claim 1 is characterized in that the step of adjusting the audit status corresponding to the transaction data and the information to be published according to the detection result includes:
    在所述检测结果为所述交易数据合规的情况下,调整所述交易数据对应的审核状态为审核通过状态,并通过所述第四智能合约接口将解密后的随机公钥写入所述账本;If the detection result shows that the transaction data is compliant, adjusting the audit status corresponding to the transaction data to an audit passed status, and writing the decrypted random public key into the account book through the fourth smart contract interface;
    在所述检测结果为所述交易数据不合规的情况下,调整所述交易数据对应的审核状态为审核未通过状态,并通过所述第四智能合约接口将不合规说明写入所述账本。When the detection result shows that the transaction data is non-compliant, the audit status corresponding to the transaction data is adjusted to an audit failure status, and the non-compliance description is written into the account book through the fourth smart contract interface.
  3. 根据权利要求1所述的区块链交易数据的监管方法,其特征在于,在所述将所述交易数据的标识、所述交易数据密文、所述交易数据的审核状态以及所述随机私钥写入账本之后还包括:The method for supervising blockchain transaction data according to claim 1 is characterized in that after writing the identifier of the transaction data, the ciphertext of the transaction data, the review status of the transaction data and the random private key into the account book, it also includes:
    通过所述第一智能合约接口向传输所述交易数据的区块链应用反馈所述交易数据的标识。The identifier of the transaction data is fed back to the blockchain application that transmits the transaction data through the first smart contract interface.
  4. 根据权利要求3所述的区块链交易数据的监管方法,其特征在于,在所述依据所述检测结果调整所述交易数据对应的审核状态以及所需公布的信息之后还包括:The method for supervising blockchain transaction data according to claim 3 is characterized in that after adjusting the review status corresponding to the transaction data and the information to be published according to the detection result, it also includes:
    在接收到所述区块链应用通过第五智能合约接口传输的目标标识的情况下,判断所述目标标识对应的审核状态是否为审核通过状态;Upon receiving the target identifier transmitted by the blockchain application through the fifth smart contract interface, determining whether the review status corresponding to the target identifier is a review passed status;
    在所述目标标识对应的审核状态为审核通过状态的情况下,从所述账本中获取与所述目标标识匹配的目标交易数据密文以及解密后的目标随机公钥;利用所述目标随机公钥对所述目标交易数据密文进行解密处理,得到目标交易数据明文;将所述目标交易数据明文通过所述第五智能合约接口反馈至所述区块链应用;When the audit status corresponding to the target identifier is the audit passed status, obtaining the target transaction data ciphertext and the decrypted target random public key matching the target identifier from the account book; decrypting the target transaction data ciphertext using the target random public key to obtain the target transaction data plaintext; and feeding back the target transaction data plaintext to the blockchain application through the fifth smart contract interface;
    在所述目标标识对应的审核状态为审核未通过状态或者为未审核状态的情况下,通过所述第五智能合约接口向所述区块链应用反馈数据获取失败的提示信息。When the audit status corresponding to the target identifier is an audit failure status or an unaudited status, a prompt message indicating that data acquisition failed is fed back to the blockchain application through the fifth smart contract interface.
  5. 根据权利要求4所述的区块链交易数据的监管方法,其特征在于,在所述依据所述检测结果调整所述交易数据对应的审核状态以及所需公布的信息之后还包括:The method for supervising blockchain transaction data according to claim 4 is characterized in that after adjusting the audit status corresponding to the transaction data and the information to be published according to the detection result, it also includes:
    在接收到所述区块链应用通过第五智能合约接口传输的目标标识的情况下,判断所述区块链应用是否具有访问权限以及对应的权限范围;Upon receiving the target identifier transmitted by the blockchain application through the fifth smart contract interface, determining whether the blockchain application has access rights and the corresponding scope of rights;
    在所述区块链应用具有访问权限的情况下,执行所述判断所述目标标识对应的审核状态是否为审核通过状态的步骤;In the case where the blockchain application has access rights, executing the step of determining whether the audit status corresponding to the target identifier is an audit-passed status;
    相应的,所述将所述目标交易数据明文通过所述第五智能合约接口反馈至所述区块链应用包括:Accordingly, the step of feeding back the target transaction data in plain text to the blockchain application through the fifth smart contract interface includes:
    从所述目标交易数据明文中提取与所述权限范围匹配的交易数据明文,将与所述权限范围匹配的交易数据明文通过所述第五智能合约接口反馈至所述区块链应用。Transaction data plaintext that matches the authority scope is extracted from the target transaction data plaintext, and the transaction data plaintext that matches the authority scope is fed back to the blockchain application through the fifth smart contract interface.
  6. 根据权利要求1所述的区块链交易数据的监管方法,其特征在于,针对于所述随机私钥的获取过 程,所述方法包括:The method for supervising blockchain transaction data according to claim 1 is characterized in that, for the acquisition process of the random private key The method comprises:
    从区块节点的存储系统中获取一对随机生成的密钥对;所述随机生成的密钥对包括随机私钥和随机公钥;Obtain a randomly generated key pair from the storage system of the block node; the randomly generated key pair includes a random private key and a random public key;
    相应的,在所述利用随机私钥对交易数据进行加密处理得到交易数据密文之后还包括:Correspondingly, after the transaction data is encrypted using the random private key to obtain the transaction data ciphertext, the following further comprises:
    利用监管系统反馈的监管私钥对所述随机公钥进行加密处理,并将加密后的随机公钥写入所述账本。The random public key is encrypted using the supervision private key fed back by the supervision system, and the encrypted random public key is written into the account book.
  7. 根据权利要求1所述的区块链交易数据的监管方法,其特征在于,针对于所述随机私钥的获取过程,所述方法包括:The method for supervising blockchain transaction data according to claim 1 is characterized in that, with respect to the process of obtaining the random private key, the method comprises:
    接收监管系统通过第六智能合约接口写入的一对随机生成的密钥对;所述随机生成的密钥对包括随机私钥和被监管私钥加密后的随机公钥;将所述加密后的随机公钥写入所述账本。Receive a pair of randomly generated key pairs written by the supervision system through the sixth smart contract interface; the randomly generated key pair includes a random private key and a random public key encrypted by the supervised private key; write the encrypted random public key into the account book.
  8. 根据权利要求1所述的区块链交易数据的监管方法,其特征在于,针对于所述随机私钥的获取过程,所述方法包括:The method for supervising blockchain transaction data according to claim 1 is characterized in that, with respect to the process of obtaining the random private key, the method comprises:
    接收监管系统通过第六智能合约接口写入的随机私钥;其中,所述随机私钥对应的随机公钥保存在所述监管系统上。Receive the random private key written by the supervision system through the sixth smart contract interface; wherein the random public key corresponding to the random private key is stored on the supervision system.
  9. 根据权利要求1所述的区块链交易数据的监管方法,其特征在于,针对于所述随机私钥的获取过程,所述方法包括:The method for supervising blockchain transaction data according to claim 1 is characterized in that, with respect to the process of obtaining the random private key, the method comprises:
    通过第七智能合约接口获取由外部程序写入的一对随机生成的密钥对;所述随机生成的密钥对包括随机私钥和随机公钥;Obtaining a pair of randomly generated key pairs written by an external program through the seventh smart contract interface; the randomly generated key pair includes a random private key and a random public key;
    相应的,在所述利用随机私钥对交易数据进行加密处理得到交易数据密文之后还包括:Correspondingly, after the transaction data is encrypted using the random private key to obtain the transaction data ciphertext, the following further comprises:
    利用监管系统反馈的监管私钥对所述随机公钥进行加密处理,并将加密后的随机公钥写入所述账本。The random public key is encrypted using the supervision private key fed back by the supervision system, and the encrypted random public key is written into the account book.
  10. 根据权利要求1所述的区块链交易数据的监管方法,其特征在于,所述利用随机私钥对交易数据进行加密处理得到交易数据密文包括:The method for supervising blockchain transaction data according to claim 1 is characterized in that the step of encrypting the transaction data using a random private key to obtain a ciphertext of the transaction data comprises:
    利用所述随机私钥对所述交易数据中预保护字段的内容进行加密处理得到交易数据密文。The random private key is used to encrypt the content of the pre-protected field in the transaction data to obtain the transaction data ciphertext.
  11. 根据权利要求1所述的区块链交易数据的监管方法,其特征在于,所述随机私钥的个数为多个;所述利用随机私钥对交易数据进行加密处理得到交易数据密文包括:The method for supervising blockchain transaction data according to claim 1 is characterized in that the number of the random private keys is multiple; and the step of encrypting the transaction data using the random private key to obtain the ciphertext of the transaction data comprises:
    将所述交易数据按照各字段对应的随机私钥进行加密处理得到交易数据密文。The transaction data is encrypted according to the random private key corresponding to each field to obtain the transaction data ciphertext.
  12. 根据权利要求1所述的区块链交易数据的监管方法,其特征在于,所述利用随机私钥对交易数据进行加密处理得到交易数据密文包括:The method for supervising blockchain transaction data according to claim 1 is characterized in that the step of encrypting the transaction data using a random private key to obtain a ciphertext of the transaction data comprises:
    利用所述随机私钥对所述交易数据中所有字段的内容进行加密处理得到交易数据密文。The random private key is used to encrypt the contents of all fields in the transaction data to obtain the transaction data ciphertext.
  13. 根据权利要求1所述的区块链交易数据的监管方法,其特征在于,所述基于第一智能合约接口获取交易数据密文包括:The method for supervising blockchain transaction data according to claim 1, characterized in that the step of obtaining the ciphertext of transaction data based on the first smart contract interface comprises:
    接收区块链应用通过所述第一智能合约接口传输的交易数据密文;其中,所述交易数据密文由所述区块链应用通过初始智能合约接口获取随机私钥;并利用所述随机私钥对交易数据进行加密得到。Receive the transaction data ciphertext transmitted by the blockchain application through the first smart contract interface; wherein the transaction data ciphertext is obtained by the blockchain application obtaining a random private key through the initial smart contract interface; and the transaction data is encrypted using the random private key.
  14. 一种区块链交易数据的监管装置,其特征在于,适用于部署智能合约的区块链平台,所述装置包括第一获取单元、写入单元、第二获取单元、加密单元、传输单元和调整单元;A supervision device for blockchain transaction data, characterized in that it is suitable for a blockchain platform for deploying smart contracts, and the device includes a first acquisition unit, a writing unit, a second acquisition unit, an encryption unit, a transmission unit, and an adjustment unit;
    所述第一获取单元,被设置为基于第一智能合约接口获取交易数据密文;其中,所述交易数据密文为利用随机私钥对交易数据进行加密处理得到;The first acquisition unit is configured to acquire transaction data ciphertext based on the first smart contract interface; wherein the transaction data ciphertext is obtained by encrypting the transaction data using a random private key;
    所述写入单元,被设置为将所述交易数据的标识、所述交易数据密文、所述交易数据的审核状态以及所述随机私钥写入账本;The writing unit is configured to write the identifier of the transaction data, the ciphertext of the transaction data, the review status of the transaction data, and the random private key into the account book;
    所述第二获取单元,被设置为基于第二智能合约接口获取待校验数据;The second acquisition unit is configured to acquire the data to be verified based on the second smart contract interface;
    所述加密单元,被设置为利用所述随机私钥对所述待校验数据进行加密处理,得到待校验数据密文;将所述待校验数据密文和所述交易数据密文进行比较,并将比较结果返回给区块链应用或用户终端;The encryption unit is configured to encrypt the data to be verified using the random private key to obtain a ciphertext of the data to be verified; compare the ciphertext of the data to be verified with the ciphertext of the transaction data, and return the comparison result to the blockchain application or the user terminal;
    所述传输单元,通过第三智能合约接口向监管系统传输所述交易数据密文,以便于所述监管系统利用 随机公钥对所述交易数据密文进行解密处理,并对解密后的所述交易数据进行合规检测,通过第四智能合约接口将检测结果上传至区块链;The transmission unit transmits the transaction data ciphertext to the supervision system through the third smart contract interface, so that the supervision system can use Decrypting the transaction data ciphertext with a random public key, performing compliance detection on the decrypted transaction data, and uploading the detection result to the blockchain through the fourth smart contract interface;
    所述调整单元,被设置为依据所述检测结果调整所述交易数据对应的审核状态以及所需公布的信息。The adjustment unit is configured to adjust the audit status corresponding to the transaction data and the information to be published according to the detection result.
  15. 一种区块链交易数据的监管系统,其特征在于,包括区块链应用、部署智能合约的区块链平台和监管系统;A supervision system for blockchain transaction data, characterized in that it includes a blockchain application, a blockchain platform for deploying smart contracts, and a supervision system;
    所述区块链应用,被设置为调用第一智能合约接口将交易数据传输到区块链的账本中;The blockchain application is configured to call the first smart contract interface to transmit the transaction data to the ledger of the blockchain;
    所述区块链平台,被设置为获取所述交易数据;利用随机私钥对交易数据进行加密处理得到交易数据密文;将所述交易数据的标识、所述交易数据密文、所述交易数据的审核状态、所述随机私钥以及用监管私钥加密的随机公钥写入账本;基于第二智能合约接口获取待校验数据;利用所述随机私钥对所述待校验数据进行加密处理,得到待校验数据密文;将所述待校验数据密文和所述交易数据密文进行比较,并将比较结果返回给区块链应用或用户终端;通过第三智能合约接口向监管系统传输所述交易数据密文;The blockchain platform is configured to obtain the transaction data; encrypt the transaction data using a random private key to obtain a ciphertext of the transaction data; write the identifier of the transaction data, the ciphertext of the transaction data, the audit status of the transaction data, the random private key, and the random public key encrypted with the supervisory private key into the account book; obtain the data to be verified based on the second smart contract interface; encrypt the data to be verified using the random private key to obtain a ciphertext of the data to be verified; compare the ciphertext of the data to be verified with the ciphertext of the transaction data, and return the comparison result to the blockchain application or the user terminal; transmit the ciphertext of the transaction data to the supervisory system through the third smart contract interface;
    所述监管系统,被设置为利用监管公钥解密被加密的随机公钥,利用随机公钥对所述交易数据密文进行解密处理,并对解密后的所述交易数据进行合规检测,通过第四智能合约接口将检测结果上传至区块链;The supervision system is configured to use the supervision public key to decrypt the encrypted random public key, use the random public key to decrypt the transaction data ciphertext, perform compliance detection on the decrypted transaction data, and upload the detection result to the blockchain through the fourth smart contract interface;
    所述区块链平台还被设置为依据所述检测结果调整所述交易数据对应的审核状态以及所需公布的信息。The blockchain platform is also configured to adjust the review status corresponding to the transaction data and the information to be published according to the detection results.
  16. 一种区块链交易数据的监管系统,其特征在于,包括区块链应用、部署智能合约的区块链平台和监管系统;A supervision system for blockchain transaction data, characterized in that it includes a blockchain application, a blockchain platform for deploying smart contracts, and a supervision system;
    所述区块链应用,被设置为通过初始智能合约接口获取随机私钥;并利用所述随机私钥对交易数据进行加密得到交易数据密文;调用第一智能合约接口将交易数据密文传输到区块链的账本中;The blockchain application is configured to obtain a random private key through an initial smart contract interface; encrypt transaction data using the random private key to obtain transaction data ciphertext; and call the first smart contract interface to transmit the transaction data ciphertext to the blockchain ledger;
    所述区块链平台,被设置为获取所述交易数据密文;将所述交易数据的标识、所述交易数据密文、所述交易数据的审核状态、所述随机私钥以及用监管私钥加密的随机公钥写入账本;基于第二智能合约接口获取待校验数据;利用所述随机私钥对所述待校验数据进行加密处理,得到待校验数据密文;将所述待校验数据密文和所述交易数据密文进行比较,并将比较结果返回给区块链应用或用户终端;通过第三智能合约接口向监管系统传输所述交易数据密文;The blockchain platform is configured to obtain the transaction data ciphertext; write the transaction data identifier, the transaction data ciphertext, the transaction data review status, the random private key, and the random public key encrypted with the supervision private key into the account book; obtain the data to be verified based on the second smart contract interface; encrypt the data to be verified using the random private key to obtain the data ciphertext to be verified; compare the data ciphertext to be verified with the transaction data ciphertext, and return the comparison result to the blockchain application or user terminal; transmit the transaction data ciphertext to the supervision system through the third smart contract interface;
    所述监管系统,被设置为利用监管公钥解密被加密的随机公钥,利用随机公钥对所述交易数据密文进行解密处理,并对解密后的所述交易数据进行合规检测,通过第四智能合约接口将检测结果上传至区块链;The supervision system is configured to use the supervision public key to decrypt the encrypted random public key, use the random public key to decrypt the transaction data ciphertext, perform compliance detection on the decrypted transaction data, and upload the detection result to the blockchain through the fourth smart contract interface;
    所述区块链平台还被设置为依据所述检测结果调整所述交易数据对应的审核状态以及所需公布的信息。The blockchain platform is also configured to adjust the review status corresponding to the transaction data and the information to be published according to the detection results.
  17. 一种区块链交易数据的监管系统,其特征在于,包括区块链应用、部署智能合约的区块链平台和监管系统;A supervision system for blockchain transaction data, characterized in that it includes a blockchain application, a blockchain platform for deploying smart contracts, and a supervision system;
    所述区块链应用,被设置为调用第一智能合约接口将交易数据传输到区块链的账本中;The blockchain application is configured to call the first smart contract interface to transmit the transaction data to the ledger of the blockchain;
    所述区块链平台,被设置为通过初始智能合约接口获取随机私钥;利用所述随机私钥对交易数据进行加密处理得到交易数据密文;将所述交易数据的标识、所述交易数据密文、所述交易数据的审核状态以及所述随机私钥写入账本,并标记所述交易数据密文的审核状态为未审核;基于第二智能合约接口获取待校验数据;利用所述随机私钥对所述待校验数据进行加密处理,得到待校验数据密文;将所述待校验数据密文和所述交易数据密文进行比较,并将比较结果返回给区块链应用或用户终端;通过第三智能合约接口向监管系统传输所述交易数据密文;The blockchain platform is configured to obtain a random private key through an initial smart contract interface; encrypt the transaction data using the random private key to obtain a ciphertext of the transaction data; write the identifier of the transaction data, the ciphertext of the transaction data, the review status of the transaction data, and the random private key into the account book, and mark the review status of the ciphertext of the transaction data as unreviewed; obtain the data to be verified based on the second smart contract interface; encrypt the data to be verified using the random private key to obtain a ciphertext of the data to be verified; compare the ciphertext of the data to be verified with the ciphertext of the transaction data, and return the comparison result to the blockchain application or the user terminal; transmit the ciphertext of the transaction data to the supervision system through the third smart contract interface;
    所述监管系统,被设置为生成随机私钥和随机公钥;将所述随机私钥上链,并将所述随机公钥本地保存;利用随机公钥对所述交易数据密文进行解密处理,并对解密后的所述交易数据进行合规检测,通过第四智能合约接口将检测结果上传至区块链; The regulatory system is configured to generate a random private key and a random public key; upload the random private key to the blockchain and save the random public key locally; decrypt the transaction data ciphertext using the random public key, perform compliance testing on the decrypted transaction data, and upload the test results to the blockchain through the fourth smart contract interface;
    所述区块链平台还被设置为依据所述检测结果调整所述交易数据对应的审核状态以及所需公布的信息。The blockchain platform is also configured to adjust the review status corresponding to the transaction data and the information to be published according to the detection results.
  18. 一种区块链交易数据的监管系统,其特征在于,包括区块链应用、部署智能合约的区块链平台和监管系统;A supervision system for blockchain transaction data, characterized in that it includes a blockchain application, a blockchain platform for deploying smart contracts, and a supervision system;
    所述区块链应用,被设置为通过初始智能合约接口获取随机私钥;并利用所述随机私钥对交易数据进行加密得到交易数据密文;调用第一智能合约接口将交易数据密文传输到区块链的账本中;The blockchain application is configured to obtain a random private key through an initial smart contract interface; encrypt transaction data using the random private key to obtain transaction data ciphertext; and call the first smart contract interface to transmit the transaction data ciphertext to the blockchain ledger;
    所述区块链平台,被设置为获取所述交易数据密文;将所述交易数据的标识、所述交易数据密文、所述交易数据的审核状态以及所述随机私钥写入账本,并标记所述交易数据密文的审核状态为未审核;基于第二智能合约接口获取待校验数据;利用所述随机私钥对所述待校验数据进行加密处理,得到待校验数据密文;将所述待校验数据密文和所述交易数据密文进行比较,并将比较结果返回给区块链应用或用户终端;通过第三智能合约接口向监管系统传输所述交易数据密文;The blockchain platform is configured to obtain the transaction data ciphertext; write the transaction data identifier, the transaction data ciphertext, the audit status of the transaction data and the random private key into the account book, and mark the audit status of the transaction data ciphertext as unaudited; obtain the data to be verified based on the second smart contract interface; encrypt the data to be verified using the random private key to obtain the data ciphertext to be verified; compare the data ciphertext to be verified with the transaction data ciphertext, and return the comparison result to the blockchain application or the user terminal; transmit the transaction data ciphertext to the supervision system through the third smart contract interface;
    所述监管系统,被设置为生成随机私钥和随机公钥;将所述随机私钥上链,并将所述随机公钥本地保存;利用随机公钥对所述交易数据密文进行解密处理,并对解密后的所述交易数据进行合规检测,通过第四智能合约接口将检测结果上传至区块链;The regulatory system is configured to generate a random private key and a random public key; upload the random private key to the blockchain and save the random public key locally; decrypt the transaction data ciphertext using the random public key, perform compliance testing on the decrypted transaction data, and upload the test results to the blockchain through the fourth smart contract interface;
    所述区块链平台还被设置为依据所述检测结果调整所述交易数据对应的审核状态以及所需公布的信息。The blockchain platform is also configured to adjust the review status corresponding to the transaction data and the information to be published according to the detection results.
  19. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    存储器,被设置为存储计算机程序;a memory arranged to store a computer program;
    处理器,被设置为执行所述计算机程序以实现如权利要求1至13任意一项所述区块链交易数据的监管方法的步骤。A processor is configured to execute the computer program to implement the steps of the blockchain transaction data supervision method as described in any one of claims 1 to 13.
  20. 一种非易失性可读存储介质,其特征在于,所述非易失性可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至13任意一项所述区块链交易数据的监管方法的步骤。 A non-volatile readable storage medium, characterized in that a computer program is stored on the non-volatile readable storage medium, and when the computer program is executed by a processor, the steps of the blockchain transaction data supervision method as described in any one of claims 1 to 13 are implemented.
PCT/CN2023/082300 2022-10-28 2023-03-17 Blockchain transaction data supervision method and apparatus, and device and nonvolatile readable storage medium WO2024087470A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211340599.4A CN115664659A (en) 2022-10-28 2022-10-28 Method, device, equipment and medium for supervising blockchain transaction data
CN202211340599.4 2022-10-28

Publications (1)

Publication Number Publication Date
WO2024087470A1 true WO2024087470A1 (en) 2024-05-02

Family

ID=84992827

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/082300 WO2024087470A1 (en) 2022-10-28 2023-03-17 Blockchain transaction data supervision method and apparatus, and device and nonvolatile readable storage medium

Country Status (2)

Country Link
CN (1) CN115664659A (en)
WO (1) WO2024087470A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115664659A (en) * 2022-10-28 2023-01-31 广东浪潮智慧计算技术有限公司 Method, device, equipment and medium for supervising blockchain transaction data
CN115840683B (en) * 2023-02-24 2023-05-16 浪潮电子信息产业股份有限公司 Heterogeneous alliance chain monitoring method, system, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200226268A1 (en) * 2019-01-16 2020-07-16 EMC IP Holding Company LLC Blockchain technology for regulatory compliance of data management systems
CN112634040A (en) * 2020-12-25 2021-04-09 中国农业银行股份有限公司 Data processing method and device
CN115664659A (en) * 2022-10-28 2023-01-31 广东浪潮智慧计算技术有限公司 Method, device, equipment and medium for supervising blockchain transaction data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200226268A1 (en) * 2019-01-16 2020-07-16 EMC IP Holding Company LLC Blockchain technology for regulatory compliance of data management systems
CN112634040A (en) * 2020-12-25 2021-04-09 中国农业银行股份有限公司 Data processing method and device
CN115664659A (en) * 2022-10-28 2023-01-31 广东浪潮智慧计算技术有限公司 Method, device, equipment and medium for supervising blockchain transaction data

Also Published As

Publication number Publication date
CN115664659A (en) 2023-01-31

Similar Documents

Publication Publication Date Title
Li et al. EduRSS: A blockchain-based educational records secure storage and sharing scheme
Yuan et al. Shadoweth: Private smart contract on public blockchain
CN110546636B (en) Confidentiality in federated blockchain networks
US10496811B2 (en) Counterfeit prevention
CN107231351B (en) Electronic certificate management method and related equipment
JP6840264B2 (en) Field programmable gate array-based reliable execution environment for use within a blockchain network
US8528104B2 (en) Security and ticketing system control and management
WO2024087470A1 (en) Blockchain transaction data supervision method and apparatus, and device and nonvolatile readable storage medium
JP2020528224A (en) Secure execution of smart contract operations in a reliable execution environment
CN110287654B (en) Media client device authentication using hardware trust root
JP4689945B2 (en) Resource access method
US8352741B2 (en) Discovery of secure network enclaves
US20100115260A1 (en) Universal secure token for obfuscation and tamper resistance
CN104283688B (en) A kind of USBKey security certification systems and safety certifying method
CN112507363A (en) Data supervision method, device and equipment based on block chain and storage medium
US10250387B1 (en) Quantum computer resistant algorithm cryptographic key generation, storage, and transfer device
CN110601830B (en) Key management method, device, equipment and storage medium based on block chain
WO2003107153A2 (en) Method for configuring and commissioning csss
CN113014444B (en) Internet of things equipment production test system and safety protection method
WO2021012978A1 (en) Method, apparatus and device for detecting hardware, and storage medium
JP2023545895A (en) Trusted execution environment multi-node authentication method
CN116601912A (en) Post-secret provisioning service providing encryption security
CN111008094B (en) Data recovery method, device and system
WO2023046207A1 (en) Data transmission method and apparatus, and non-volatile computer-readable storage medium
Levshun et al. A technique for design of secure data transfer environment: Application for I2C protocol