CN110009494B - Method and device for monitoring transaction content in block chain - Google Patents

Method and device for monitoring transaction content in block chain Download PDF

Info

Publication number
CN110009494B
CN110009494B CN201910204192.0A CN201910204192A CN110009494B CN 110009494 B CN110009494 B CN 110009494B CN 201910204192 A CN201910204192 A CN 201910204192A CN 110009494 B CN110009494 B CN 110009494B
Authority
CN
China
Prior art keywords
transaction
content data
node
examination
content
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910204192.0A
Other languages
Chinese (zh)
Other versions
CN110009494A (en
Inventor
彭玉军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ant Chain Technology Co ltd
Original Assignee
Advanced New Technologies Co Ltd
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 Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Priority to CN201910204192.0A priority Critical patent/CN110009494B/en
Publication of CN110009494A publication Critical patent/CN110009494A/en
Application granted granted Critical
Publication of CN110009494B publication Critical patent/CN110009494B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/405Establishing or using transaction specific rules
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Theoretical Computer Science (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the specification provides a method and a device for monitoring transaction content in a blockchain. In the method, any first node in the blockchain network responds to the initiation of a first transaction through the first node, and content data of the first transaction is acquired; a message generated based on the content data is then sent to an audit platform outside the blockchain network via a trusted channel. The examination platform acquires the content data based on the message, conducts content examination on the first transaction, and then returns a corresponding examination result to the blockchain network. When the block packing is carried out, the accounting node in the block chain network only adds the approved transaction to the block for uplink.

Description

Method and device for monitoring transaction content in block chain
Technical Field
One or more embodiments of the present disclosure relate to the field of blockchain technologies, and in particular, to a method and an apparatus for monitoring transaction contents in a blockchain.
Background
The Blockchain (Blockchain) technology is a bottom layer technology and a basic framework for constructing a bitcoin network and encrypting and transmitting transaction information, and is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. The distributed data store is characterized in that the blockchain can be regarded as a distributed book, and a reliable database is maintained collectively in an decentralized and distrust mode. The "distributed" here is embodied not only as a distributed storage of data but also as a distributed record of data, so that the distributed database of the blockchain is almost impossible to tamper with. The de-centralization and de-trust are characterized in that a blockchain is formed by a plurality of nodes together to form an end-to-end network, and no centralized equipment or management mechanism exists. Data exchange between nodes is verified through technologies such as an encryption algorithm, and other nodes cannot be deceived as long as the data exchange is performed according to the established rule of the system. This allows any agreed upon parties to pay directly without the participation of third party intermediaries.
Further, many blockchain platforms support intelligent contracts to perform richer transactions. The smart contract is a transaction contract which can be automatically executed, is written into a block chain in a digital form, and ensures that the whole processes of storage, reading and execution are transparent, traceable and not easy to grasp by the characteristics of the block chain technology. Meanwhile, a set of state machine system is constructed by the block chain self-contained consensus algorithm, so that the intelligent contract can run efficiently. For example, the etherhouse provides an open-source blockchain underlying system, and by providing a plurality of interfaces, developers are allowed to develop various blockchain applications on the basis of the open-source blockchain underlying system and write intelligent contracts.
In this way, the blockchain platform allows users to conduct richer transactions, thereby providing richer functionality. Accordingly, more and more data storage, program applications (e.g., distributed applications Dapp), are implemented through blockchains.
However, this also presents greater difficulties for the supervision of the blockchain content. According to the regulations of items 9 and 10 of the "Block chain information service management Specification" of the Commission No. 3 of the State Commission, the content on the Block chain needs to be examined and supervised as required.
Therefore, there is a need for an efficient solution for monitoring and reviewing transaction content in increasingly complex and rich blockchains.
Disclosure of Invention
One or more embodiments of the present specification describe a method and apparatus for monitoring transaction content in a blockchain, by which content review of transactions generated in the blockchain network can be performed using a review platform outside of the blockchain network.
According to a first aspect, there is provided a method of monitoring transaction content in a blockchain, the method being performed by any first node in a blockchain network, comprising:
in response to initiating a first transaction by a first node, obtaining content data for the first transaction;
and sending a first message generated based on the content data to a review platform outside the blockchain network through a trusted channel, so that the review platform reviews the content of the first transaction and returns a review result corresponding to the first transaction to the blockchain network.
In one embodiment, the first transaction is a transaction that invokes a smart contract, and the obtaining content data of the first transaction includes: reading parameters passed into the smart contract as the content data from a particular field of the first transaction.
According to one embodiment, a Oracle contract of a language prediction machine is pre-deployed in the first node, and the Oracle contract comprises a transaction reading function; in this way, the first node executes the transaction read function in the Oracle contract, and the content data of the first transaction is read through the transaction read function.
According to one embodiment, the Oracle contract further comprises a review event, and the sending of the first message generated based on the content data to a review platform outside the blockchain network comprises: and generating a first message based on the content data by triggering a checking event in the Oracle contract, and sending the first message to the checking platform.
In one embodiment, the first message comprises said content data.
In another embodiment, the first message comprises a storage address of the content data.
In yet another embodiment, the first message includes log information recording the content data.
According to a second aspect, there is provided a method of uploading transaction data in a blockchain, the method being performed by a second node in a blockchain network, the second node being a billing node, the method comprising:
for a first transaction in a local transaction pool, acquiring an examination result returned after an examination platform outside the block chain network conducts content examination on the first transaction;
and if the examination result is examination passing, adding the first transaction into a block body for generating a new block.
In one embodiment, the review result returned by the review platform is obtained by:
reading the examination result by executing a language predictive machine Oracle contract which is pre-deployed in the second node; the Oracle contract comprises a result transfer function, and the examination result is returned to the Oracle contract by the examination platform by calling back the result transfer function.
According to a third aspect, there is provided a method of monitoring transaction content in a blockchain, the method being performed by an audit platform outside of a blockchain network, comprising:
receiving a first message sent by a first node in the blockchain network, the first message relating to content data of a first transaction initiated in the first node;
acquiring the content data based on the first message;
performing content compliance review on the first transaction based on the content data to generate review result data;
returning the review result data to a plurality of second nodes in the blockchain network.
In one embodiment, a Oracle contract is pre-deployed in the first node, the Oracle contract includes a transaction reading function, and the content data is obtained by the first node by executing the transaction reading function in the Oracle contract.
In one embodiment, the first message includes a storage address of the content data; in such a case, the content data may be read based on the storage address; or
In another embodiment, the first message includes log information recording the content data; in such a case, the content data may be read based on the log information.
According to one embodiment, a prologue Oracle contract is pre-deployed in each of the plurality of second nodes, the Oracle contract comprising a result transfer function;
returning the review result data to a plurality of second nodes in the blockchain network comprises:
and calling the result transfer function, and returning the inspection result data to the Oracle contract, so that the second node acquires the inspection result data by executing the Oracle contract.
According to a fourth aspect, there is provided an apparatus for monitoring transaction content in a blockchain, the apparatus being deployed in any first node in a blockchain network, comprising:
the content acquisition unit is configured to respond to the first transaction initiated by the first node and acquire the content data of the first transaction;
and the message sending unit is configured to send a first message generated based on the content data to an examination platform outside the blockchain network through a trusted channel, so that the examination platform conducts content examination on the first transaction, and returns an examination result corresponding to the first transaction to the blockchain network.
According to a fifth aspect, there is provided an apparatus for uploading transaction data in a blockchain, the apparatus being deployed in a second node in a blockchain network, the second node being a billing node, the apparatus comprising:
the result acquisition unit is configured to acquire an examination result returned after an examination platform outside the block chain network conducts content examination on a first transaction in a local transaction pool;
and the block generating unit is configured to add the first transaction to a block body for generating a new block if the examination result is that the examination is passed.
According to a sixth aspect, there is provided an apparatus for monitoring transaction content in a blockchain, the apparatus being deployed in an audit platform outside a blockchain network, comprising:
a receiving unit configured to receive a first message sent by a first node in the blockchain network, the first message relating to content data of a first transaction initiated in the first node;
an acquisition unit configured to acquire the content data based on the first message;
the examination unit is configured to conduct content compliance examination on the first transaction based on the content data and generate examination result data;
a returning unit configured to return the inspection result data to a plurality of second nodes in the blockchain network.
According to a seventh aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of the first to third aspects.
According to an eighth aspect, there is provided a computing device comprising a memory and a processor, wherein the memory has stored therein executable code, and the processor, when executing the executable code, implements the method of the first to third aspects.
According to the method and the device provided by the embodiment of the specification, the transaction generated in the blockchain network is captured by the content data and is sent to a review platform outside the blockchain network for content review. When the accounting node packs and enters each transaction, the examination result of the transaction is considered, and only the examined and checked transaction is linked in blocks, so that only the examined and checked transaction can be uploaded to the block chain to be effective. In the process, the content is inspected by using an inspection platform outside the blockchain network, the network structure and the consensus mechanism of the blockchain network do not need to be modified, and the inspection requirement is met safely and efficiently.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a process for performing a transfer transaction in a blockchain network;
FIG. 2 is a schematic diagram of a process for creating an intelligent contract in a blockchain network;
FIG. 3 is a schematic diagram of a process for invoking the intelligent contract created in FIG. 2 in a blockchain network;
FIG. 4 illustrates a schematic diagram of a method of monitoring transaction content in a blockchain, according to one embodiment;
FIG. 5 illustrates a schematic diagram of a method of monitoring transaction content in a blockchain, according to one embodiment;
FIG. 6 illustrates a schematic diagram of a method of monitoring transaction content in a blockchain, according to one embodiment;
fig. 7 shows a schematic block diagram of a monitoring device in a first node according to an embodiment;
fig. 8 shows a schematic block diagram of a transaction data uploading arrangement in a second node according to an embodiment;
FIG. 9 illustrates a schematic block diagram of a monitoring device in an audit platform according to one embodiment.
Detailed Description
The scheme provided by the specification is described below with reference to the accompanying drawings.
FIG. 1 is a schematic diagram of a process for performing a transfer transaction in a blockchain network. First, the blockchain network includes a plurality of nodes, and each node can communicate with each other. Assuming that a certain node in the network, Bob wants to transfer money to another node, Alice, he can initiate a transfer transaction, i.e., create a transaction, the contents of which include, the transfer initiator Bob (from field), the receiver Alice (to field), the transfer amount 10(amount field), etc. Bob then adds his own digital signature to this transaction, which is published into the blockchain network. The transaction is verified by the accounting node in the blockchain network, packaged into a block, broadcast in the blockchain network, and added to the blockchain after consensus, at which time the transaction can be considered to be valid.
The above transfer transaction may also be referred to as a normal transaction. In a platform supporting intelligent contracts, transactions can also be implemented by invoking intelligent contracts.
FIG. 2 is a schematic diagram of a process for creating an intelligent contract in a blockchain network. More specifically, FIG. 2 is described in connection with an Etherhouse. Assuming a certain node, Bob wants to publish such a piece of smart contract:
Figure BDA0001998437920000071
according to the above contract, a piece of character string s is acquired as data postData to be posted.
Bob may also issue the contract in the form of a transaction. Specifically, Bob can initiate a transaction, the from field of the initiator in the transaction content is Bob (more specifically, the address of Bob), and the to field of the receiver is set to null; the transaction content also includes a Data field containing a code after compiling the intelligent contract into byte codes. After Bob has issued such a transaction to the blockchain network, the accounting node also validates, packages, etc. the transaction, records it in the blockchain, and adds it to the blockchain through a consensus mechanism. In this process, a contract address, such as 0x6f …, is also assigned to the smart contract according to an algorithm, such as hashing based on the publisher address. Thus, an intelligent contract corresponds to a contract address, which is not formally different from the user's account address.
After the above intelligent contract is packed and linked, any user in the block chain network can call the intelligent contract. Fig. 3 is a schematic diagram of a process for invoking the intelligent contract created in fig. 2 in a blockchain network. Assuming that Alice in the blockchain network wants to invoke the above intelligent contract, the node can initiate a transaction to make the contract invocation.
Specifically, in the transaction content, the from field may be the address of the caller Alice, and the to field is the contract address 0x6f … of the aforementioned PostingData contract, which represents the intelligent contract invoked by the transaction. In the Data field, the method or function name (set) in the contract to be called and the incoming parameters ("ant forest, green commons") are contained.
After receiving the transaction, other nodes execute the operation corresponding to the contract logic through the Ethernet virtual machine EVM, and realize the change of the contract state on the network through a consensus mechanism. Then, when any node in the network looks at the variable of the contract, it will find that the value of postData in the contract becomes "ant forest, green public welfare".
The above fig. 1, fig. 2, and fig. 3 depict a transfer transaction, a transaction to create a smart contract, and a transaction to invoke a smart contract, respectively. Generally, a transaction in a blockchain network includes the above three transactions.
As mentioned above, for the security, legitimacy and compliance of network contents, the transaction contents of various transaction transactions in the blockchain network need to be monitored, supervised and examined. In one approach, special nodes are provided in the blockchain network for content review and administration. In such a scheme, additional nodes need to be added, and the nodes are enabled by characterization, so that the node management cost and the post-maintenance cost are increased, and the original consensus mechanism is changed.
According to one or more embodiments of the present description, when new transactions are generated in the blockchain, including ordinary transfer transactions and transactions involving smart contracts, the transaction contents are examined by using an examination platform outside the blockchain network, so that no special node needs to be added in the blockchain network, and no existing network structure or consensus mechanism needs to be changed. The implementation of the above scheme is described below.
FIG. 4 illustrates a schematic diagram of a method of monitoring transaction content in a blockchain according to one embodiment. The method may be applied to public chains, private chains, and federation chains, without limitation. The following description is exemplified in connection with an ethernet blockchain platform, but is equally applicable to other blockchain platforms having similar functionality.
As shown in fig. 4, first, in step 401, a user in the blockchain network initiates a transaction, referred to as a first transaction, through its corresponding node, referred to as a first node. The first transaction may be a transfer transaction or a transaction involving a smart contract.
At step 402, the first node, in response to initiation of a first transaction, obtains content data for the first transaction. Depending on the transaction type of the first transaction, the content data may include, for example, the recipient account, parameters that are passed into the smart contract through specific fields (e.g., data fields) in the transaction content, and so on.
It will be appreciated that the first node will also broadcast the first transaction in the blockchain network to other nodes as is conventional. The embodiments of the present description do not modify this process. Therefore, this process is also not shown in fig. 4.
Next, at step 403, the first node sends a first message generated based on the content data of the first transaction to an audit platform outside the blockchain network via a trusted channel. The first message may contain the content data, may contain an address pointing to the content data, or take other forms.
After receiving the first message, in step 404, the auditing platform obtains the content data of the first transaction based on the first message. For example, the content data is directly extracted from the first message, or the content data is read based on the address in the first message, and so on.
Then, in step 405, the review platform performs content compliance review on the first transaction based on the above content data, and generates review result data. The specific examination rules of the examination platform are set according to laws and regulations and regulatory requirements, and include, for example, sensitive word examination, account blacklist examination, and the like, which are not limited herein.
After review, the review platform returns review result data, e.g., review pass/fail, to the second node in the blockchain network, as shown at step 406. It should be understood that the second node here may be any accounting node in the blockchain network. In the aforementioned case where the first node has the accounting function, the second node may also include the first node.
As previously described, the first node broadcasts the first transaction in the network after generating the first transaction, and each accounting node then places the first transaction in the local transaction pool after receiving it. The local transaction pool is used for storing various transactions to be linked.
When a second node, that is, a certain accounting node, prepares to generate a new block based on transaction packaging in the local transaction pool, as shown in step 407, for a first transaction in the local transaction pool, the second node obtains an examination result returned after the examination platform performs content examination on the first transaction.
In step 408, block packing is performed according to the review result. Specifically, if the examination result corresponding to the first transaction is an examination pass, the first transaction is added to the block body for generating a new block. Otherwise, if the examination result is failed, the uplink is abandoned for the first transaction inbound block. In other words, when pending uplink transactions are selected from the local transaction pool to be added to a new block, only approved transactions are selected to be added to the block, and transactions with failed reviews are discarded or skipped.
Thus, if the first transaction passes the content review of the review platform, the first transaction can be normally added into the blockchain, so that the transaction is effective; if the examination result of the first transaction is that the examination is not passed, although the first transaction can be propagated to some nodes in the blockchain network, the accounting node only accounts the examined transactions into the blocks, so that the transactions cannot be recorded in the blocks, cannot be added into the blockchain, and cannot be validated. Thus, review and supervision of transactional content in a blockchain network is achieved.
The capture of the content data of the transaction, and the communication between the node and the review platform in fig. 4, may be accomplished in a variety of ways.
In one embodiment, capture of the above transaction data and data interaction with the review platform are achieved by way of an Oracle contract.
It can be understood that, generally speaking, transaction data in the blockchain network is blockchain internal data, so as to better satisfy the requirement of consensus and avoid network instability caused by inconsistent states of each node due to external data. However, this greatly limits the usage scenarios of the blockchain, and cannot meet the data requirements of the intelligent contracts, which are particularly rich in functionality.
To compensate for access limitations, an Oracle mechanism has been proposed as a link between the blockchain and the external environment. In simple terms, Oracle can be thought of as a program or a piece of software that provides a contract based on blockchains that can access external information. Thus, Oracle can be considered a special type of intelligent contract that interacts with requests from ordinary intelligent contracts and operates according to strict algorithms. On the other hand, Oracle itself does not make any changes to the blockchain contents, it simply sends a request to an external data source and retransmits the response to the smart contract.
For example, Oraclize, an example of Oracle, a Oracle, may assist various blockchains to effectively access internet APIs, protecting the security and robustness of its Dapp. At present, four block chains of Ether, Biguo, Rootstock and Eris can be supported. In the example of the etherhouse, the identity is currently used to write smart contracts, such smart contracts can only access information in the access chain, and Oraclize as a data transmitter can provide a reliable connection between the DApps of the etherhouse and the Web APIs, so that the Dapp application based on the smart contracts can reliably obtain external information and data. More specifically, Oraclize deploys a special intelligent contract on the etherhouse named singoraclize. If the data access service of Oraclize needs to be used, the intelligent contract only needs to be referred in a common intelligent contract, and then related calling is carried out according to the method described in the API document.
Based on the characteristics of the Oracle contract of the prediction machine, data interaction with an examination platform outside the block chain network can be realized in an Oracle contract mode. Unlike the common intelligent contract created by the user in a transaction manner shown in fig. 2, an Oracle contract needs to be deployed in each node of the blockchain network in advance, and the Oracle contract is used for capturing transaction data and performing data interaction with an external examination platform.
In a specific example, the structure of the Oracle contract described above may be as follows:
Figure BDA0001998437920000111
among them, there are audit event contentCheck, transaction read function TransactionHandle, result transfer function TransactionCheckResult, etc.
The Oracle contract thus deployed having the above structure is hereinafter referred to as an Oracle audit contract.
The following describes the process of performing the method shown in fig. 4 via an Oracle audit contract.
FIG. 5 illustrates a schematic diagram of a method of monitoring transaction content in a blockchain, according to one embodiment. As schematically shown in fig. 5, the Oracle audit contract described above is pre-deployed in each node of the blockchain network for capturing transaction data and data interaction with an external audit platform.
Assume that a user Bob in the blockchain network initiates a transaction, i.e., a first transaction, through its corresponding first node (corresponding to step 401 in fig. 4). Initiation of the transaction triggers execution of the transaction read function TransactionHandle by an Oracle audit contract deployed in the first node. The transaction read function reads the content data of the initiated transaction.
In one specific example, the Oracle audit contract is configured to be triggered to read the content data of the first transaction through the transaction read function when the first transaction is a transaction that invokes the smart contract. Since the transaction that invokes the smart contract may involve richer content, it is a primary concern for transaction content review.
As shown in fig. 3, in the transaction of calling the smart contract, the to field includes the address of the smart contract to be called, and the data field includes the function name set in the smart contract to be called and the incoming parameter "ant forest, green public service". For such a first transaction, the transaction read function may read the content of the data field as the content data of the transaction. For example, for the transaction of fig. 3, "ant forest, green public welfare" may be read as the content data.
In another specific example, the Oracle audit contract is set to be triggered to read the content data of the transaction through the transaction read function once the transaction is initiated in the node, that is, to perform extraction of the content data for each type of transaction. Specifically, for ordinary transactions of the transfer class, the information of a receiver of the to field can be read as content data; for transactions that create smart contracts, the code or the like of the smart contract in the data field may be read as content data.
As previously mentioned, an audit event contentCheck is also included in the deployed Oracle audit contract.
In a typical intelligent contract, event events are used to record various events and state changes that occur during the execution of the contract. In the Ethernet intelligent contract, the event uses the built-in log function of the EVM of the Ethernet virtual machine, and the Ethernet client can monitor the event by using a callback function of JavaScript. When an event is triggered, the event and its parameters are stored in the ether house log.
Similarly, an audit event contentCheck in an Oracle audit contract may be used to record state data during contract execution. More specifically, the execution of the transaction read function TransactionHandle triggers the audit event contentCheck to record transaction content data captured during execution, and based on the content data, a message, i.e. the first message, is sent to the audit platform outside the blockchain network.
As previously mentioned, the first message may contain the content data itself of the first transaction. Or, because the event in the Oracle contract records the execution state by a log, the first message may also be log information for recording the content data; alternatively, the first message may be a storage address pointing to the content data, so that the review platform may obtain the content data according to the storage address.
When the first message is sent to the auditing platform for data interaction, data transmission needs to be carried out through a trusted secure channel so as to ensure data security and data privacy.
In the Oracle contract mechanism, such as Oraclize, transport layer security protocol TLS attestation (tlsnoopy) technology is relied upon to enable secure communication of blockchain data with external data sources. The tlsnoopy certification is based primarily on the secure transport layer protocol TLS, which is used to provide confidentiality and data integrity between two communicating applications, and it contains three basic phases: 1. a key algorithm supported by peer negotiation, 2, exchanging a public key based on private key encryption and identity authentication based on a PKI certificate, and 3, transmitting secret data based on public key encryption.
The Oracle audit contract deployed above may send messages to the audit platform based on a similar secure communication mechanism.
And the examination platform acquires the content data of the first transaction through the first message and examines the content data. For example, sensitive word review is performed on the content data "ant forest, green commonweal" extracted for the exchange shown in fig. 3; account blacklist review, based on recipient address, for ordinary transfer transactions, etc.
After review, the review platform calls back the result transfer function TransactionCheckResult () in the Oracle review contract, thereby passing the review result back to the Oracle review contract. Thus, any node deployed with the Oracle examination contract can obtain the examination result for the first transaction by executing the Oracle contract.
Alice is assumed to be an arbitrary accounting node in the blockchain network, on which the Oracle audit contract described above is also deployed. When Alice generates a new block based on the transaction package in the local transaction pool, she acquires the examination result of the first transaction which is received by broadcasting and put into the local transaction pool by executing the Oracle examination contract, and decides whether to put the first transaction into the block uplink according to the examination result.
It should be noted that, the transaction that fails the examination may be saved in the examination platform for subsequent query or other processing.
Through the process, transaction contents are captured in an Oracle contract mode, data interaction is carried out between the transaction contents and an external examination platform, and monitoring and examination of the transaction contents are achieved.
In addition, the capture of the transaction content data and the communication between the node and the examination platform in fig. 4 can be realized by embedding a software tool in the node client. It will be appreciated that users typically join a blockchain network through a node client to become a node in the network. According to the functions which can be realized by the client, the nodes can be correspondingly divided into transaction nodes which only can perform transactions, and not only can perform transactions, but also can generate accounting nodes of blocks. The client of the trading node comprises a publishing module for publishing the trade, and the client of the accounting node comprises not only the publishing module but also an accounting module, sometimes referred to as a consensus module, for generating and adding a new block into the block chain (because the addition of a new block into the block chain requires consensus in the block chain network).
According to one embodiment, a transaction data capture tool can be added or deployed in a publishing module of a node client, and a review result acquisition tool is deployed in a consensus module, wherein the review result acquisition tool is realized by codes embedded in the client.
FIG. 6 illustrates a schematic diagram of a method of monitoring transaction content in a blockchain, according to one embodiment. As schematically shown in fig. 6, in each node client of the blockchain network, a corresponding tool is deployed. Specifically, for the trading node, a trading data capture tool is deployed in the issuing module, and for the accounting node, in addition to the trading data capture tool, a review result acquisition tool is deployed in the consensus module.
Assume that a user Bob in the blockchain network initiates a first transaction through its corresponding first node, where the first node may be a transaction node or an accounting node. A data capture tool is deployed in the publishing module of the first node and can capture and record content data in a transaction issued by a user.
For example, when the first transaction is a transaction that invokes a smart contract, the data capture tool may read a data field in the transaction content from which to capture parameters to be passed into the smart contract as transaction content data. In another example, for other transactions, the recipient information of the to field, or the content of the data field, may also be read as transaction content data.
After obtaining the content data for the first transaction issued by the first node, the data capture tool also sends a first message to an audit platform outside of the blockchain network based on the content data. Specifically, the data capture tool may send a message to the audit platform for data interaction via the trusted channel in an encrypted manner and protocol.
And then, the examination platform acquires the content data of the first transaction through the first message and examines the content data. The examination content is as described above and will not be described in detail.
After review, the review platform generates review results. In one embodiment, the review platform pushes the review result to the review result acquiring tool in a pushing manner, so that the consensus modules in the accounting nodes can synchronously acquire the review result generated by the review platform. In another embodiment, the review platform stores the generated review results for querying by a review result acquisition tool in the consensus module. In such a case, the execution logic of the consensus module in the node client may be modified such that the consensus module invokes the review result acquisition tool, sends a query request for the transaction to be packaged to the review platform, and receives the review result fed back by the review platform before the transaction packaging is performed.
For example, assume that Alice is an arbitrary accounting node in the blockchain network, and a review result acquisition tool is deployed in the consensus module thereof. When Alice generates a new block based on transaction packaging in the local transaction pool, the examination result acquisition tool in the consensus module acquires the examination result of the first transaction from the examination platform in a pushed or queried mode. And according to the examination result, the Alice determines whether to carry out block uplink on the first transaction.
In the above process, the review platform may be regarded as a server, the transaction data capture tool and the review result acquisition tool may be regarded as a client, and interaction is performed in a server-client interaction manner to transfer the transaction content data and the review result, thereby implementing review and monitoring of the transaction content.
Reviewing the above, whether by way of an Oracle contract or by way of a client embedded tool, the transaction content in the blockchain network can be reviewed by a review platform outside the blockchain network. Therefore, the transaction content in the blockchain network can be examined and monitored without setting a special node in the blockchain network or modifying the network structure and the consensus mode of the blockchain network, so as to meet the requirements of laws, regulations and supervision.
According to another aspect, an apparatus for monitoring transaction content in a blockchain is provided, where the apparatus is deployed in any first node in a blockchain network, and the first node may be embodied as any device, platform, or device cluster having computing and processing capabilities. Fig. 7 shows a schematic block diagram of a monitoring device in a first node according to an embodiment. As shown in fig. 7, the monitoring apparatus 700 includes:
a content obtaining unit 71, configured to, in response to initiating a first transaction by a first node, obtain content data of the first transaction;
a message sending unit 72, configured to send, through a trusted channel, a first message generated based on the content data to an examination platform outside the blockchain network, so that the examination platform performs content examination on the first transaction, and returns an examination result corresponding to the first transaction to the blockchain network.
In one embodiment, the first transaction is a transaction that invokes a smart contract; the content acquisition unit 71 is configured to: reading parameters passed into the smart contract as the content data from a particular field of the first transaction.
According to one embodiment, a Oracle contract is pre-deployed in a first node, wherein the Oracle contract comprises a transaction reading function;
accordingly, the content acquisition unit 71 is configured to: and executing a transaction reading function in the Oracle contract, and reading the content data of the first transaction through the transaction reading function.
Further, in an embodiment, the Oracle contract further includes an audit event, and the message sending unit 72 is configured to: and generating a first message based on the content data by triggering a checking event in the Oracle contract, and sending the first message to the checking platform.
In one embodiment, the first message includes the content data;
in another embodiment, the first message includes a storage address of the content data;
in yet another embodiment, the first message includes log information recording the content data.
According to an embodiment of another aspect, an apparatus for uploading transaction data in a blockchain is provided, and the apparatus is deployed in a second node in a blockchain network, where the second node is an accounting node, and the second node may be embodied as any device, platform or device cluster having computing and processing capabilities. Fig. 8 shows a schematic block diagram of a transaction data uploading arrangement in a second node according to an embodiment. As shown in fig. 8, the apparatus 800 includes:
the result obtaining unit 81 is configured to obtain, for a first transaction in the local transaction pool, an examination result returned after an examination platform outside the blockchain network performs content examination on the first transaction;
a block generating unit 82, configured to add the first transaction to a block for generating a new block if the examination result is an examination pass.
In one embodiment, the result obtaining unit 81 is configured to: reading the examination result by executing a language prediction machine Oracle contract which is pre-deployed in a second node; the Oracle contract comprises a result transfer function, and the examination result is returned to the Oracle contract by the examination platform by calling back the result transfer function.
According to another aspect of the embodiments, an apparatus for monitoring transaction content in a blockchain is provided, and the apparatus is deployed in an inspection platform outside a blockchain network, and the inspection platform may employ any device, platform or device cluster having computing and processing capabilities. FIG. 9 illustrates a schematic block diagram of a monitoring device in an audit platform according to one embodiment. As shown in fig. 9, the apparatus 900 includes:
a receiving unit 91 configured to receive a first message sent by a first node in the blockchain network, the first message relating to content data of a first transaction initiated in the first node;
an obtaining unit 92 configured to obtain the content data based on the first message;
a review unit 93 configured to perform content compliance review on the first transaction based on the content data, and generate review result data;
a returning unit 94 configured to return the inspection result data to a plurality of second nodes in the blockchain network.
According to one embodiment, a Oracle contract is pre-deployed in the first node, the Oracle contract includes a transaction read function, and the content data is obtained by the first node through execution of the transaction read function in the Oracle contract.
In one embodiment, the first message includes a storage address of the content data; the obtaining unit 92 is configured to: reading the content data according to the storage address;
in another embodiment, the first message includes log information for recording the content data; the obtaining unit 92 is configured to: and reading the content data according to the log information.
According to one embodiment, a prologue Oracle contract is pre-deployed in each of the plurality of second nodes, the Oracle contract comprising a result transfer function;
the return unit 94 is configured to: and calling the result transfer function, and returning the inspection result data to the Oracle contract, so that the second node acquires the inspection result data by executing the Oracle contract.
Through the devices in the aspects, the examination platform outside the blockchain network can be used for examining the transaction content, and the requirements of examination and supervision are met.
According to an embodiment of another aspect, there is also provided a computer-readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method described in connection with fig. 4.
According to an embodiment of yet another aspect, there is also provided a computing device comprising a memory and a processor, the memory having stored therein executable code, the processor, when executing the executable code, implementing the method described in connection with fig. 4.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in this invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
The above-mentioned embodiments, objects, technical solutions and advantages of the present invention are further described in detail, it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made on the basis of the technical solutions of the present invention should be included in the scope of the present invention.

Claims (26)

1. A method of monitoring transaction content in a blockchain, the method performed by a first node of any of a blockchain network, comprising:
in response to initiating a first transaction by a first node, obtaining content data for the first transaction;
sending a first message generated based on the content data to an examination platform outside the blockchain network through a trusted channel, so that the examination platform conducts content examination on the content data of the first transaction, and returning an examination result corresponding to the first transaction to the blockchain network, wherein the examination result is used for judging whether to add the first transaction to a blockbody to generate a new blockbody.
2. The method of claim 1, wherein the first transaction is a transaction that invokes a smart contract, and the obtaining content data for the first transaction comprises: reading parameters passed into the smart contract as the content data from a particular field of the first transaction.
3. The method of claim 1, wherein a Oracle contract is pre-deployed in the first node, the Oracle contract comprising a transaction read function;
the acquiring the content data of the first transaction comprises: and executing a transaction reading function in the Oracle contract, and reading the content data of the first transaction through the transaction reading function.
4. The method of claim 3, wherein the Oracle contract further comprises a review event, and wherein sending a first message generated based on the content data to a review platform outside of the blockchain network comprises: and generating a first message based on the content data by triggering a checking event in the Oracle contract, and sending the first message to the checking platform.
5. The method of claim 1, wherein the first message comprises the content data.
6. The method of claim 1, wherein the first message includes a storage address of the content data or log information of the content data is recorded.
7. A method of uploading transaction data in a blockchain, the method performed by a second node in a blockchain network, the second node being a billing node, the method comprising:
for a first transaction in a local transaction pool, acquiring an examination result returned after an examination platform outside the block chain network conducts content examination on content data of the first transaction;
and if the examination result is examination passing, adding the first transaction into a block body for generating a new block.
8. The method of claim 7, wherein obtaining review results returned after content review of the content data of the first transaction by a review platform outside the blockchain network comprises:
reading the examination result by executing a language predictive machine Oracle contract which is pre-deployed in the second node; the Oracle contract comprises a result transfer function, and the examination result is returned to the Oracle contract by the examination platform by calling back the result transfer function.
9. A method of monitoring transaction content in a blockchain, the method performed by an audit platform outside of a blockchain network, comprising:
receiving a first message sent by a first node in the blockchain network, the first message relating to content data of a first transaction initiated in the first node;
acquiring the content data based on the first message;
performing content compliance review on the first transaction based on the content data to generate review result data;
and returning the examination result data to a plurality of second nodes in the block chain network, so that any second node judges whether to add the first transaction to the block body according to the examination result data to generate a new block.
10. The method of claim 9, wherein a Oracle contract is pre-deployed in the first node, the Oracle contract comprising a transaction read function, and the content data is obtained by the first node by executing the transaction read function in the Oracle contract.
11. The method of claim 9, wherein,
the first message comprises a storage address of the content data; the acquiring of the content data includes: reading the content data according to the storage address; or
The first message comprises log information for recording the content data; the acquiring of the content data includes: and reading the content data according to the log information.
12. The method of claim 9, wherein each of the plurality of second nodes has a prepended Oracle contract disposed therein, the Oracle contract comprising a result transfer function;
returning the review result data to a plurality of second nodes in the blockchain network comprises:
and calling the result transfer function, and returning the inspection result data to the Oracle contract, so that the second node acquires the inspection result data by executing the Oracle contract.
13. An apparatus for monitoring transaction content in a blockchain, the apparatus being deployed in a first node of any of a blockchain network, comprising:
the content acquisition unit is configured to respond to the first transaction initiated by the first node and acquire the content data of the first transaction;
a message sending unit, configured to send, through a trusted channel, a first message generated based on the content data to an examination platform outside the blockchain network, so that the examination platform performs content examination on the content data of the first transaction, and returns an examination result corresponding to the first transaction to the blockchain network, where the examination result is used to determine whether to add the first transaction to a blockbody to generate a new blockbody.
14. The apparatus of claim 13, wherein the first transaction is a transaction that invokes a smart contract, the content acquisition unit configured to: reading parameters passed into the smart contract as the content data from a particular field of the first transaction.
15. The apparatus of claim 13, wherein a Oracle contract is pre-deployed in the first node, the Oracle contract comprising a transaction read function;
the content acquisition unit is configured to: and executing a transaction reading function in the Oracle contract, and reading the content data of the first transaction through the transaction reading function.
16. The apparatus of claim 15, wherein the Oracle contract further comprises an audit event, the messaging unit configured to: and generating a first message based on the content data by triggering a checking event in the Oracle contract, and sending the first message to the checking platform.
17. The apparatus of claim 13, wherein the first message comprises the content data.
18. The apparatus of claim 13, wherein the first message includes a storage address of the content data or log information recording the content data.
19. An apparatus for uploading transaction data in a blockchain, the apparatus being deployed in a second node in a blockchain network, the second node being a billing node, the apparatus comprising:
the result acquisition unit is configured to acquire an examination result returned after content examination is performed on the content data of the first transaction by an examination platform outside the blockchain network for the first transaction in the local transaction pool;
and the block generating unit is configured to add the first transaction to a block body for generating a new block if the examination result is that the examination is passed.
20. The apparatus of claim 19, wherein the result acquisition unit is configured to:
reading the examination result by executing a language predictive machine Oracle contract which is pre-deployed in the second node; the Oracle contract comprises a result transfer function, and the examination result is returned to the Oracle contract by the examination platform by calling back the result transfer function.
21. An apparatus for monitoring transaction content in a blockchain, the apparatus being deployed in an audit platform outside of a blockchain network, comprising:
a receiving unit configured to receive a first message sent by a first node in the blockchain network, the first message relating to content data of a first transaction initiated in the first node;
an acquisition unit configured to acquire the content data based on the first message;
the examination unit is configured to conduct content compliance examination on the first transaction based on the content data and generate examination result data;
and the return unit is configured to return the examination result data to a plurality of second nodes in the block chain network, so that any one of the second nodes judges whether to add the first transaction to the block body according to the examination result data to generate a new block.
22. The apparatus of claim 21, wherein a Oracle contract is pre-deployed in the first node, the Oracle contract comprising a transaction read function, and the content data is obtained by the first node by executing the transaction read function in the Oracle contract.
23. The apparatus of claim 21, wherein,
the first message comprises a storage address of the content data; the acquisition unit is configured to: reading the content data according to the storage address; or
The first message comprises log information for recording the content data; the acquisition unit is configured to: and reading the content data according to the log information.
24. The apparatus of claim 21, wherein each of the plurality of second nodes has a prepended Oracle contract disposed therein, the Oracle contract comprising a result transfer function;
the return unit is configured to: and calling the result transfer function, and returning the inspection result data to the Oracle contract, so that the second node acquires the inspection result data by executing the Oracle contract.
25. A computer-readable storage medium, on which a computer program is stored which, when executed in a computer, causes the computer to carry out the method of any one of claims 1-12.
26. A computing device comprising a memory and a processor, wherein the memory has stored therein executable code that, when executed by the processor, performs the method of any of claims 1-12.
CN201910204192.0A 2019-03-18 2019-03-18 Method and device for monitoring transaction content in block chain Active CN110009494B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910204192.0A CN110009494B (en) 2019-03-18 2019-03-18 Method and device for monitoring transaction content in block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910204192.0A CN110009494B (en) 2019-03-18 2019-03-18 Method and device for monitoring transaction content in block chain

Publications (2)

Publication Number Publication Date
CN110009494A CN110009494A (en) 2019-07-12
CN110009494B true CN110009494B (en) 2022-03-04

Family

ID=67167283

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910204192.0A Active CN110009494B (en) 2019-03-18 2019-03-18 Method and device for monitoring transaction content in block chain

Country Status (1)

Country Link
CN (1) CN110009494B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110458631B (en) * 2019-07-31 2020-11-10 创新先进技术有限公司 Bill number distribution method and device based on block chain and electronic equipment
CN112348672B (en) * 2019-08-07 2023-08-08 淘宝(中国)软件有限公司 Cross-chain transaction method and device, multi-block chain system and computing equipment
CN111027099B (en) * 2019-12-09 2022-04-26 京东科技信息技术有限公司 Identity verification method, device, system and computer readable storage medium
CN113495920B (en) * 2020-04-02 2023-06-16 国家广播电视总局广播电视科学研究院 Content auditing system, method and device based on blockchain and storage medium
CN111192146B (en) * 2020-04-10 2020-07-17 支付宝(杭州)信息技术有限公司 Correction method and device for block chain data
CN112102082A (en) * 2020-08-24 2020-12-18 深圳区块大陆科技有限公司 Method for judging block chain transaction execution result
CN112084234B (en) * 2020-09-03 2024-05-17 中国银联股份有限公司 Data acquisition method, device, equipment and medium
CN112800446A (en) * 2021-01-26 2021-05-14 南京纯白矩阵科技有限公司 Safe decentralized application hosting method
CN113034137A (en) * 2021-03-12 2021-06-25 腾讯科技(深圳)有限公司 Data processing method and device based on block chain and related equipment
CN112738280B (en) * 2021-03-30 2021-07-23 支付宝(杭州)信息技术有限公司 Method and device for communication between block chain and equipment under block chain
CN113628052A (en) * 2021-08-18 2021-11-09 杭州云象网络技术有限公司 Block chain asset and contract processing method, system and device based on prediction machine
CN113495927B (en) * 2021-09-06 2022-02-25 支付宝(杭州)信息技术有限公司 Block management method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11107048B2 (en) * 2017-04-17 2021-08-31 International Business Machines Corporation Providing out-of-band verification for blockchain transactions
CN107480987A (en) * 2017-07-25 2017-12-15 浙江大学 Green electric power supply certificate core hair based on block chain technology subscribes method and system
CN108197959B (en) * 2018-01-23 2020-11-27 华南理工大学 Block chain-based rapid verification pool, rapid verification system and operation method
CN108055138B (en) * 2018-02-01 2020-03-17 国家计算机网络与信息安全管理中心 Block chain-based application distribution recording method and system

Also Published As

Publication number Publication date
CN110009494A (en) 2019-07-12

Similar Documents

Publication Publication Date Title
CN110009494B (en) Method and device for monitoring transaction content in block chain
EP3937424B1 (en) Blockchain data processing methods and apparatuses based on cloud computing
CN111090888B (en) Contract verification method and device
CN111090874B (en) Contract calling method and device
US11171789B2 (en) System and method for implementing a resolver service for decentralized identifiers
CN111092727B (en) Method and device for sharing cluster key
CN111092914B (en) Method and device for accessing external data
CN111461723B (en) Data processing system, method and device based on block chain
CN111092726B (en) Method and device for generating shared contract key
CN110580418B (en) Private data query method and device based on block chain account
CN110580413B (en) Private data query method and device based on down-link authorization
WO2019214312A1 (en) Blockchain-based logistics information transmission method, system and device
CN111047450A (en) Method and device for calculating down-link privacy of on-link data
CN111241557B (en) Service request method and device based on block chain
CN111127021B (en) Service request method and device based on block chain
CN111523110A (en) Permission query configuration method and device based on chain codes
CN116980155A (en) Data processing method, device, product, equipment and medium of block chain network
CN116566698B (en) Secret-related data exchange method and system based on multistage cross-network isolation
Chakkaravarthy A NOVEL HYBRID ALGORITHM FOR AN EFFICIENT DATA SECURITY IN HOSPITAL
CN114978681B (en) Service application authorization method and device based on block chain and processor
CN117743455A (en) Block chain-based data processing method, device, equipment, medium and product
CN118784259A (en) Data transmission method, gateway component, device, equipment and storage medium
CN116996226A (en) Virtual asset processing method, device, equipment and medium in blockchain
CN118350031A (en) Block chain-based data processing method, device, equipment and medium
CN117354255A (en) Transaction processing method, apparatus, product, device and medium of block chain network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40010712

Country of ref document: HK

TA01 Transfer of patent application right

Effective date of registration: 20201020

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20201020

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240929

Address after: Guohao Times City # 20-01, 128 Meizhi Road, Singapore

Patentee after: Ant Chain Technology Co.,Ltd.

Country or region after: Singapore

Address before: 27 Hospital Road, George Town, Grand Cayman ky1-9008

Patentee before: Innovative advanced technology Co.,Ltd.

Country or region before: Britain