Transaction data processing method, system, device, electronic device and storage medium

By deploying smart contracts on blockchain nodes, receiving transaction metadata and generating unique transaction hashes, the problem of low data credibility in virtual commodity transactions is solved, and the transaction data is tamper-proof and credible.

CN116257589BActive Publication Date: 2025-10-03BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310185348.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-01
Publication Date
2025-10-03
Estimated Expiration
2043-03-01

AI Technical Summary

Technical Problem

In virtual commodity transactions, third parties or platforms may engage in behaviors such as stealing orders, brushing orders, and changing orders afterwards, resulting in low credibility of transaction data.

Method used

Deploy smart contracts on blockchain nodes, receive transaction metadata and perform hash calculations to generate a unique transaction hash, package it into blocks and broadcast it to the blockchain network. Hash verification is used to ensure the integrity and non-tamperability of transaction data.

Benefits of technology

It improves the credibility of transaction data, makes transaction data generated outside the chain difficult to be tampered with after being put on the chain, and enhances the transparency and reliability of the transaction process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116257589B_ABST
    Figure CN116257589B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention provide a transaction data processing method, system, device, electronic device, and storage medium, which are applied to the field of blockchain technology. The method is applied to a blockchain node in which multiple smart contracts are deployed. The method includes: receiving transaction metadata; the transaction metadata includes transaction data; when the transaction metadata meets the triggering conditions of the evidence storage smart contract, calling the evidence storage smart contract, performing a hash calculation on the transaction data, and obtaining a transaction hash uniquely corresponding to the transaction data; packaging the transaction metadata and the transaction hash into a block for local storage; broadcasting the block to other nodes in the blockchain; and having the other nodes verify the block after receiving it and, if verification is successful, storing the block locally. Application of the technical solutions provided by the embodiments of the present invention can improve the credibility of transaction data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to a transaction data processing method, system, device, electronic device and storage medium. Background Art

[0002] With the rapid development of the digital economy, the scale of virtual goods transactions has further expanded. Virtual goods refer to digital products and services in the e-commerce market. They are not physical objects. Therefore, unlike online or offline physical goods transactions, virtual goods transactions do not involve shipping and inspection. This means that logistics transportation is not an option by default.

[0003] Virtual product providers usually entrust third parties / platforms to sell virtual products on their behalf. This may lead to the third party / platform stealing orders, swiping orders, or changing orders afterwards. There is a high possibility that transaction data will be tampered with, making the credibility of transaction data low. Summary of the Invention

[0004] The purpose of the embodiments of the present invention is to provide a transaction data processing method, system, device, electronic device, and storage medium to improve the credibility of transaction data. The specific technical solution is as follows:

[0005] In a first aspect, an embodiment of the present invention provides a transaction data processing method, which is applied to a blockchain node in which multiple smart contracts are deployed; the method comprises:

[0006] Receiving transaction meta-information; the transaction meta-information includes transaction data; the transaction meta-information is generated outside the blockchain and sent by a user terminal outside the blockchain to the blockchain node;

[0007] When the transaction metadata meets the triggering conditions of the evidence storage smart contract, the evidence storage smart contract is called to perform hash calculation on the transaction data to obtain a transaction hash of the transaction data; the transaction hash uniquely corresponds to the transaction data;

[0008] Packing the transaction metadata and the transaction hash into a block for local storage;

[0009] The block is broadcast to other nodes in the blockchain; after receiving the block, the other nodes are used to perform hash calculation on the transaction data included in the block to obtain a verification hash, and if the verification hash is the same as the transaction hash, the block is stored locally.

[0010] Optionally, after receiving the transaction meta-information, the method further includes:

[0011] If the transaction metadata meets the triggering conditions of the data legitimacy verification smart contract, the data legitimacy verification smart contract is called to determine whether the transaction data meets the legitimacy data conditions preset by the data legitimacy verification smart contract;

[0012] When the transaction meta-information satisfies the triggering condition of the evidence storage smart contract, calling the evidence storage smart contract includes:

[0013] When the transaction data meets the legitimacy data conditions preset by the data legitimacy verification smart contract and the transaction meta-information meets the triggering conditions of the evidence storage smart contract, the evidence storage smart contract is called.

[0014] Optionally, after broadcasting the block to other nodes in the blockchain, the method further includes:

[0015] When the transaction meta-information satisfies the triggering conditions of the profit-sharing accounting smart contract, the profit-sharing accounting smart contract is invoked to transfer the virtual commodity seller's assets to the virtual commodity provider according to the profit-sharing accounting rules preset in the profit-sharing accounting smart contract, thereby obtaining the virtual commodity seller's data and virtual commodity provider's data after the profit-sharing accounting; the virtual commodity seller's data includes the virtual commodity seller's assets; and the virtual commodity provider's data includes the virtual commodity provider's assets.

[0016] Call the evidence storage smart contract to store the virtual goods seller data and virtual goods provider data after the profit sharing calculation.

[0017] Optionally, after broadcasting the block to other nodes in the blockchain, the method further includes:

[0018] Receiving key equity information; the key equity information includes data to be verified; the key equity information is generated outside the blockchain and sent by a user terminal outside the blockchain to the blockchain node;

[0019] When the key equity information meets the triggering conditions of the equity verification smart contract, the equity verification smart contract is called to query whether the data to be verified exists in the transaction data;

[0020] In a case where the data to be verified exists in the transaction data, determining the transaction data including the data to be verified as the first target transaction data;

[0021] Obtaining a transaction hash of the first target transaction data;

[0022] The transaction hash is sent to the user terminal as a return result; the transaction hash is used to be displayed in a first preset scene on the user terminal.

[0023] Optionally, the method further includes:

[0024] In the case that the data to be verified does not exist in the transaction data, an error identifier is sent to the user terminal as a return result; the error identifier is used to display a second preset scene on the user terminal.

[0025] Optionally, after broadcasting the block to other nodes in the blockchain, the method further includes:

[0026] Receiving query key information; the query key information includes the data to be queried; the query key information is generated outside the blockchain and sent to the blockchain node by the virtual goods provider;

[0027] When the query key information meets the query smart contract triggering conditions, the query smart contract is called to query whether there is the data to be queried in the transaction data;

[0028] In a case where the data to be queried exists in the transaction data, determining the transaction data including the data to be queried as the second target transaction data;

[0029] Acquire transaction meta information including the second target transaction data and a transaction hash of the second target transaction data;

[0030] The transaction meta information and the transaction hash are sent as a return result to the virtual commodity provider; the return result is used to be displayed in a third preset scene of the virtual commodity provider.

[0031] In a second aspect, an embodiment of the present invention provides a transaction data processing method, which is applied to a user terminal, wherein the user terminal is located outside a blockchain; the blockchain includes a blockchain node; and multiple smart contracts are deployed in the blockchain node; the method includes:

[0032] Sending transaction metadata to the blockchain node;

[0033] In which, the transaction meta-information is generated outside the blockchain, including transaction data; the blockchain node that receives the transaction meta-information is used to call the evidence smart contract after receiving the transaction meta-information, and perform hash calculation on the transaction data to obtain the transaction hash of the transaction data when the transaction meta-information meets the triggering condition of the evidence smart contract; the transaction hash uniquely corresponds to the transaction data; and after packaging the transaction meta-information and the transaction hash into a block and storing it locally, the block is broadcast to other nodes in the blockchain; the other nodes in the blockchain are used to perform hash calculation on the transaction data included in the block after receiving the block to obtain a verification hash; and when the verification hash is the same as the transaction hash, the block is stored locally.

[0034] Optionally, after sending the transaction meta-information to the blockchain node, the method further includes:

[0035] Sending key equity information to the blockchain node; the key equity information includes data to be verified; the key equity information is generated outside the blockchain;

[0036] Receive the return result of the blockchain node;

[0037] When the return result includes a transaction hash, the transaction hash is displayed in a first preset scenario; the transaction hash is the transaction hash of the first target transaction data; the first target transaction data includes the data to be verified; the first target transaction data is determined when the blockchain node receives the key equity information and, when the key equity information meets the triggering condition of the equity verification smart contract, calls the equity verification smart contract and finds the data to be verified in the transaction data.

[0038] Optionally, the method further includes:

[0039] When the returned result includes an error identifier, the error identifier is displayed in a second preset scenario; the error identifier is sent by the blockchain node when the data to be verified is not found in the transaction data.

[0040] In a third aspect, an embodiment of the present invention provides a transaction data processing system, comprising a blockchain node, a user terminal, and a virtual goods provider; the user terminal is located outside the blockchain, and multiple smart contracts are deployed in the blockchain node;

[0041] The user terminal is configured to send transaction meta-information to the blockchain node; the transaction meta-information is generated outside the blockchain and includes transaction data;

[0042] The blockchain node is configured to receive transaction meta-information sent by the user terminal; if the transaction meta-information satisfies a triggering condition of the evidence storage smart contract, invoke the evidence storage smart contract, perform hash calculation on the transaction data, and obtain a transaction hash of the transaction data; the transaction hash uniquely corresponds to the transaction data; package the transaction meta-information and the transaction hash into a block, and store the block locally; and broadcast the block to other nodes in the blockchain; so that after receiving the block, the other nodes in the blockchain perform hash calculation on the transaction data included in the block to obtain a verification hash, and if the verification hash is identical to the transaction hash, store the block locally;

[0043] The virtual goods provider is configured to send query key information to a blockchain node; the query key information is generated outside the blockchain and includes the data to be queried; receive a return result sent by the blockchain node; and, if the return result includes transaction meta-information and a transaction hash, display the return result in a third preset scenario; the transaction meta-information includes second target transaction data; the transaction hash is the transaction hash of the second target transaction data; and the second target transaction data is the transaction data including the data to be queried;

[0044] The blockchain node is further configured to receive query key information sent by the virtual commodity provider; if the query key information satisfies the query smart contract triggering condition, call the query smart contract to query whether there is data to be queried in the transaction data; and if there is data to be queried in the transaction data, determine the transaction data including the data to be queried as the second target transaction data; obtain transaction meta information including the second target transaction data and the transaction hash of the second target transaction data; and send the transaction meta information and the transaction hash as return results to the virtual commodity provider.

[0045] In a fourth aspect, an embodiment of the present invention provides a transaction data processing device, which is applied to a blockchain node, wherein multiple smart contracts are deployed in the blockchain node; the device includes:

[0046] a first receiving module, configured to receive transaction meta-information; the transaction meta-information including transaction data; the transaction meta-information being generated outside the blockchain and sent by a user terminal outside the blockchain to the blockchain node;

[0047] a calculation module, configured to call the evidence storage smart contract and perform hash calculation on the transaction data to obtain a transaction hash of the transaction data when the transaction metadata satisfies a triggering condition of the evidence storage smart contract; the transaction hash uniquely corresponds to the transaction data;

[0048] A first storage module, configured to package the transaction metadata and the transaction hash into a block for local storage;

[0049] A broadcast module is configured to broadcast the block to other nodes in the blockchain; the other nodes are configured to perform hash calculation on the transaction data included in the block after receiving the block to obtain a verification hash, and if the verification hash is identical to the transaction hash, locally store the block.

[0050] Optionally, the device further comprises:

[0051] a judgment module, configured to, after receiving the transaction meta-information, call the data legitimacy verification smart contract if the transaction meta-information satisfies a triggering condition of the data legitimacy verification smart contract, and determine whether the transaction data satisfies a legitimacy data condition preset by the data legitimacy verification smart contract;

[0052] The calculation module is specifically used to:

[0053] When the transaction data meets the legitimacy data conditions preset by the data legitimacy verification smart contract and the transaction meta-information meets the triggering conditions of the evidence storage smart contract, the evidence storage smart contract is called.

[0054] Optionally, the device further comprises:

[0055] a profit-sharing accounting module, configured to, after broadcasting the block to other nodes in the blockchain, invoke the profit-sharing accounting smart contract if the transaction metadata satisfies a triggering condition of the profit-sharing accounting smart contract, transfer the virtual commodity seller's assets to the virtual commodity provider in accordance with the profit-sharing accounting rules preset in the profit-sharing accounting smart contract, and obtain virtual commodity seller data and virtual commodity provider data after profit-sharing accounting; the virtual commodity seller data includes the virtual commodity seller's assets; and the virtual commodity provider data includes the virtual commodity provider's assets;

[0056] The second storage module is used to call the evidence storage smart contract to store the virtual commodity seller data and virtual commodity provider data after the profit sharing calculation.

[0057] Optionally, the device further comprises:

[0058] a second receiving module configured to receive key equity information after broadcasting the block to other nodes in the blockchain; the key equity information including data to be verified; the key equity information being generated outside the blockchain and sent to the blockchain node by a user terminal outside the blockchain;

[0059] A first query module is configured to call the equity verification smart contract to query whether the data to be verified exists in the transaction data when the key equity information satisfies the triggering conditions of the equity verification smart contract;

[0060] a first determining module, configured to, if the data to be verified exists in the transaction data, determine the transaction data including the data to be verified as first target transaction data;

[0061] A first acquisition module, configured to acquire a transaction hash of the first target transaction data;

[0062] The first return module is configured to send the transaction hash as a return result to the user terminal; the transaction hash is used to be displayed in a first preset scene on the user terminal.

[0063] Optionally, the device further comprises:

[0064] The second return module is used to send an error identifier as a return result to the user terminal when the data to be verified does not exist in the transaction data; the error identifier is used to be displayed in a second preset scene on the user terminal.

[0065] Optionally, the device further comprises:

[0066] a third receiving module, configured to receive query key information after broadcasting the block to other nodes in the blockchain; the query key information including the data to be queried; the query key information being generated outside the blockchain and sent to the blockchain node by the virtual goods provider;

[0067] A second query module is configured to call the query smart contract to query whether the transaction data contains the data to be queried when the query key information satisfies the query smart contract triggering condition;

[0068] a second determining module, configured to, if the data to be queried exists in the transaction data, determine the transaction data including the data to be queried as second target transaction data;

[0069] a second acquisition module, configured to acquire transaction meta information including the second target transaction data and a transaction hash of the second target transaction data;

[0070] The third returning module is configured to send the transaction metadata and the transaction hash as a return result to the virtual commodity provider; the return result is used to be displayed in a third preset scene of the virtual commodity provider.

[0071] In a fifth aspect, an embodiment of the present invention provides a transaction data processing device, applied to a user terminal, wherein the user terminal is located outside a blockchain; the blockchain includes a blockchain node; multiple smart contracts are deployed in the blockchain node; the device includes:

[0072] A first sending module, configured to send transaction metadata to the blockchain node;

[0073] In which, the transaction meta-information is generated outside the blockchain, including transaction data; the blockchain node that receives the transaction meta-information is used to call the evidence smart contract after receiving the transaction meta-information, and perform hash calculation on the transaction data to obtain the transaction hash of the transaction data when the transaction meta-information meets the triggering condition of the evidence smart contract; the transaction hash uniquely corresponds to the transaction data; and after packaging the transaction meta-information and the transaction hash into a block and storing it locally, the block is broadcast to other nodes in the blockchain; the other nodes in the blockchain are used to perform hash calculation on the transaction data included in the block after receiving the block to obtain a verification hash; and when the verification hash is the same as the transaction hash, the block is stored locally.

[0074] Optionally, the device further comprises:

[0075] A second sending module is configured to send key equity information to the blockchain node after sending the transaction meta-information to the blockchain node; the key equity information includes data to be verified; and the key equity information is generated outside the blockchain;

[0076] A fourth receiving module, configured to receive a return result from the blockchain node;

[0077] The first display module is used to display the transaction hash in a first preset scenario when the return result includes the transaction hash; the transaction hash is the transaction hash of first target transaction data; the first target transaction data includes the data to be verified; the first target transaction data is determined when the blockchain node calls the equity verification smart contract after receiving the key equity information and when the key equity information meets the triggering condition of the equity verification smart contract, and the data to be verified is found in the transaction data.

[0078] Optionally, the device further comprises:

[0079] The second display module is used to display the error identifier in a second preset scenario when the returned result includes the error identifier; the error identifier is sent by the blockchain node when the data to be verified is not found in the transaction data.

[0080] In a sixth aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;

[0081] Memory for storing computer programs;

[0082] The processor is configured to implement the method steps of the transaction data processing method described in any one of the first aspect or the second aspect when executing the program stored in the memory.

[0083] In the seventh aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method steps of the transaction data processing method described in any one of the first aspect or the second aspect above.

[0084] In another aspect of the present invention, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the transaction data processing method described in any one of the first or second aspects above.

[0085] In an embodiment of the present invention, when a transaction occurs, the blockchain node receives the transaction meta-information sent by the off-chain user terminal, and uses the evidence storage smart contract to obtain the transaction hash that uniquely corresponds to the transaction data. After each blockchain node receives the broadcast block, it uses the transaction hash to verify whether the received transaction data has been tampered with. If the verification is passed, the transaction meta-information and transaction hash in the block are uploaded to the chain for evidence storage, thereby making the transaction data generated off-chain difficult to be tampered with after being uploaded to the chain, thereby improving the credibility of the transaction data. BRIEF DESCRIPTION OF THE DRAWINGS

[0086] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for describing the embodiments or the prior art.

[0087] Figure 1 This is a first flow chart of a transaction data processing method applied to a blockchain node in an embodiment of the present invention;

[0088] Figure 2 This is a second flow chart of the transaction data processing method applied to a blockchain node in an embodiment of the present invention;

[0089] Figure 3 This is a third flow chart of the transaction data processing method applied to a blockchain node in an embodiment of the present invention;

[0090] Figure 4 This is a fourth flow chart of a transaction data processing method applied to a blockchain node in an embodiment of the present invention;

[0091] Figure 5 This is a fifth flow chart of the transaction data processing method applied to a blockchain node in an embodiment of the present invention;

[0092] Figure 6 Flowchart of a transaction data processing method applied to a user terminal in an embodiment of the present invention;

[0093] Figure 7 This is a schematic diagram of the first structure of the transaction data processing system in an embodiment of the present invention;

[0094] Figure 8 This is a schematic diagram of a second structure of a transaction data processing system according to an embodiment of the present invention;

[0095] Figure 9 Schematic diagram of the structure of a transaction data processing device applied to a blockchain node in an embodiment of the present invention;

[0096] Figure 10 Schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0097] The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.

[0098] A blockchain is a chain of blocks. Each block contains information and is linked together in chronological order. This chain is stored across all nodes. As long as at least one node in the system is functioning, the entire blockchain is secure. These nodes, specifically the computers within the blockchain network, provide storage and computing power for the entire blockchain system.

[0099] Some core services related to virtual goods transactions, such as payment and content playback, can be deployed on blockchain nodes. That is, these core services for virtual goods transactions are in-chain core services. If the data generated by these in-chain core services is called in-chain data, then the credibility of the in-chain data can be guaranteed by digital content or digital certificates associated with the blockchain. At the same time, for some customized virtual goods, such as insurance policy transactions, the blockchain can also provide transaction evidence and verification services.

[0100] In contrast to on-chain data, there is also off-chain data. As the scale of virtual goods transactions expands, the core services deployed on-chain are increasingly limited by the performance of the blockchain. For example, transactions generated on the blockchain require the participation of all nodes on the chain, meaning that each transaction must be processed by all nodes in the blockchain. When the number of nodes in the blockchain is large, transaction processing speeds are slow and concurrency is low. As a result, some service providers will move core services outside the blockchain. When virtual goods providers hope to obtain data and information generated by these off-chain core services (i.e., off-chain data), due to the possibility of tampering with off-chain data by third parties or platforms, the credibility of the off-chain transaction data obtained by virtual goods providers is low.

[0101] In order to improve the credibility of transaction data, such as Figure 1 As shown, an embodiment of the present invention provides a transaction data processing method, which is applied to a node in a blockchain, wherein multiple smart contracts are deployed in the node, and the node includes a first node and a second node; the method includes:

[0102] Step S101, receiving transaction metadata;

[0103] Among them, transaction meta-information includes transaction data; transaction meta-information is generated outside the blockchain and sent by the user terminal outside the blockchain to the blockchain node.

[0104] Step S102: When the transaction metadata meets the triggering conditions of the evidence storage smart contract, the evidence storage smart contract is called to perform hash calculation on the transaction data to obtain the transaction hash of the transaction data;

[0105] Among them, the transaction hash uniquely corresponds to the transaction data.

[0106] Step S103: Pack the transaction metadata and transaction hash into a block for local storage.

[0107] Step S104, broadcasting the block to other nodes in the blockchain;

[0108] Among them, other nodes are used to perform hash calculation on the transaction data included in the block after receiving the block to obtain a verification hash, and store the block locally if the verification hash is the same as the transaction hash.

[0109] The transaction data processing method provided by the embodiment of the present invention is as follows: when a transaction occurs, the blockchain node receives the transaction meta-information sent by the off-chain user terminal, and uses the evidence storage smart contract to obtain the transaction hash that uniquely corresponds to the transaction data. After each blockchain node receives the broadcast block, it uses the transaction hash to verify whether the received transaction data has been tampered with. If the verification is passed, the transaction meta-information and transaction hash in the block are uploaded to the chain for evidence storage, thereby making the transaction data generated off-chain difficult to be tampered with after being uploaded to the chain, thereby improving the credibility of the transaction data.

[0110] Reference Figure 1 , a detailed description is given of the transaction data processing method applied to a blockchain node provided by an embodiment of the present invention.

[0111] Step S101, receiving transaction metadata;

[0112] Among them, transaction meta-information includes transaction data; transaction meta-information is generated outside the blockchain and sent by the user terminal outside the blockchain to the blockchain node.

[0113] The transaction metadata received by blockchain nodes undergoes a preliminary check. This preliminary check is performed outside the blockchain and includes, but is not limited to, checking the type, range, and validity of the fields of the information being sent. For example, if the required field type is an integer, entering floating-point data will fail the preliminary check. A range can refer to a time range. For example, when querying by time, the query time range includes the current time and the time range before the current time. If the user chooses to query data for a specific day in the future, the query will obviously not be possible. For certain data with special specifications, such as mobile phone numbers, which typically consist of 11 digits, if the number of digits entered is not 11, it can be considered that the input number is not a mobile phone number and is invalid data. Other preliminary checks will not be given in detail here.

[0114] When a transaction occurs, the information related to the transaction can be understood as transaction meta-information. The transaction may include the user's purchase, cancellation or transfer of virtual goods. The transaction meta-information may include transaction data, such as the name of the virtual goods involved in the transaction, the virtual goods ID (identification number), the virtual goods type, key parameters, etc.

[0115] In one achievable approach, the transaction meta-information received by a blockchain node is transaction meta-information that has undergone an off-chain legitimacy verification. This process occurs outside the blockchain, specifically by a user outside the blockchain. The off-chain legitimacy verification verifies the legitimacy of the transaction, including but not limited to verifying whether the item is saleable, whether the user account is normal, and whether the current order is a refundable order. For example, when a user initiates a cancellation request for virtual item A, the corresponding order information can be determined from the order number included in the cancellation request. Based on the order information, it can be determined whether the current order supports cancellation. Understandably, if cancellation is supported, the cancellation request can be determined to be legal, i.e., the transaction meta-information including the cancellation request can be sent to the blockchain node.

[0116] Depending on the specific circumstances in actual applications, the content of off-chain legitimacy verification includes but is not limited to the above content, and other off-chain legitimacy verification contents will not be given in detail.

[0117] A smart contract is a computer protocol designed to communicate, verify, or execute contracts in an information-based manner. Smart contracts allow for trusted transactions without a third party, and these transactions are traceable and irreversible. Code can be pre-programmed into nodes on a blockchain network to implement specific logic and stored in a computer-readable format for execution. Therefore, it's no surprise that smart contracts also have unique addresses within the blockchain. When certain conditions are met, nodes within the blockchain can trigger the smart contract's code by sending a call request to the smart contract's address. Once triggered, the smart contract automatically executes on the nodes within the blockchain network in a pre-defined manner.

[0118] The transaction meta-information may also include content for triggering a smart contract, that is, it may include content that satisfies the triggering conditions of the smart contract, so that after the blockchain node receives the transaction meta-information, it can trigger the corresponding smart contract.

[0119] The triggering condition of a smart contract may include identification information. For example, the triggering condition of smart contract A may be identification information a. That is, it can be understood that when identification information a is included in the transaction meta-information, the triggering condition of smart contract A is met and smart contract A will be called.

[0120] In one feasible manner, if the content used to trigger a smart contract is regarded as a smart contract triggering condition, the triggering condition may be determined when the transaction is generated, that is, when the transaction is generated, it will be determined which specific smart contract or smart contracts to be called. It can be understood that the smart contract triggering conditions included in the transaction meta-information may be the same or different. For example, both transaction meta-information A and transaction meta-information B may include the triggering conditions of smart contract A; at the same time, transaction meta-information A may also include the triggering conditions of smart contract B, and transaction meta-information B may also include the triggering conditions of smart contract C.

[0121] In another feasible manner, the smart contract triggering condition in the transaction meta-information can also be turned on or off by setting a switch. For example, a switch parameter can be added to the smart contract triggering condition, where 01 can be used to represent on and 10 can be used to represent off; when the switch parameter of the smart contract triggering condition included in the transaction meta-information is 01, it means that the smart contract triggering condition is turned on, and the blockchain node can read the content included in the transaction meta-information that meets the smart contract triggering condition, and call the corresponding smart contract to execute the preset logic.

[0122] Because smart contracts are code pre-installed in blockchain nodes, the data type of the data input to a smart contract must correspond to the smart contract. This means that different data or information can only be input and read by the smart contract after being converted into the smart contract's input data type. This conversion of data types into smart contract input data types is also completed outside of the blockchain, a process also known as data preprocessing.

[0123] Step S102: When the transaction metadata meets the triggering conditions of the evidence storage smart contract, the evidence storage smart contract is called to perform hash calculation on the transaction data to obtain the transaction hash of the transaction data;

[0124] Among them, the transaction hash uniquely corresponds to the transaction data.

[0125] When the transaction meta-information includes content that meets the triggering conditions of the evidence smart contract, that is, the triggering conditions for calling the evidence smart contract are met, the blockchain node automatically calls the evidence smart contract after receiving the transaction meta-information.

[0126] In one feasible manner, different smart contracts can be configured with different service interfaces. When calling a smart contract, the data information to be input into the smart contract is received through the service interface corresponding to the called smart contract. For example, the data information to be input into the smart contract may include transaction meta-information, and the transaction meta-information is received using the service interface corresponding to the evidence storage smart contract.

[0127] Hash calculations utilize a hash algorithm, also known as a hashing algorithm. If x represents the input data and y represents the output data, the hash algorithm can generally be represented by H(x) = y, where H() represents the hash function. The input data x can be of any length, but after processing it with the hash algorithm, the output data y is of a fixed length. In other words, hash calculations can convert data of any length into data of a fixed length. Therefore, for different transaction metadata containing different transaction data, regardless of whether the input transaction data is of equal length, after hashing, the resulting output data is of the same fixed length.

[0128] Hash calculations are collision-resistant, meaning that the probability of any two different inputs producing the same output after hash calculation is virtually zero. For example, the hash of the string 123 is a8fdc205a9f19cc1c7507a60c4f01b13d11d7fd0 (hexadecimal), which translates to 256 bits in binary, and only 123 can produce this hash. Furthermore, a third party cannot modify the transaction data without preserving the corresponding transaction hash. Therefore, the resulting transaction hash is considered uniquely associated with the transaction data. Furthermore, hash functions are one-way, and the corresponding hash calculation is also one-way. This means that the hash calculation process is irreversible; the output y cannot be used to deduce the input x.

[0129] After hash calculation, the transaction hash obtained, which uniquely corresponds to the transaction data, can also be regarded as the transaction hash uniquely corresponding to the transaction meta-information.

[0130] Step S103: Pack the transaction metadata and transaction hash into a block for local storage.

[0131] A block can include a block header and a block body. The block header is used to record the characteristic values ​​of the current block, which may include the block hash of the parent block, block height, random number, timestamp, and Merkle root hash value.

[0132] The block body includes actual data, which can be one or more.

[0133] Based on the hash of the data included in the block header and block body, the block hash of the current block can be obtained. The blocks in the blockchain are connected to form a chain through the block hash of their parent block and their own hash, forming the blockchain in which they are located.

[0134] Step S104, broadcasting the block to other nodes in the blockchain;

[0135] Among them, other nodes are used to perform hash calculation on the transaction data included in the block after receiving the block to obtain a verification hash, and store the block locally if the verification hash is the same as the transaction hash.

[0136] Broadcasting a block to other nodes is a preparation for block consensus. The purpose of consensus is to ensure that the block is recognized by the majority of nodes, so that the same block is generated on different nodes, thereby ensuring data consistency across all nodes in the blockchain.

[0137] Due to the anti-collision property of hash calculations, different transaction data can be considered to have different hash results. Therefore, if transaction data is tampered with during the block broadcast process, the hash value obtained by other nodes after hash calculation of the tampered transaction data, i.e., the verification hash, will inevitably be different from the transaction hash of the original transaction data. Therefore, if the transaction hash and verification hash are the same, it can be assumed that the transaction data has not been tampered with during the broadcast process, and the block received by each node is trustworthy.

[0138] The process of each node verifying the block and storing it locally after the verification is passed is the process of blockchain nodes reaching consensus on the block. Once the consensus is completed, it can be considered that the data included in the block has been uploaded to the chain for evidence storage. This process is decentralized. After the data is uploaded to the chain, if you want to modify the information in the blockchain, you must obtain the consent of more than half of the nodes and modify the information in all nodes. However, since these nodes are usually in the hands of different entities, it is extremely difficult to tamper with the information in the blockchain. Therefore, it can be considered that after the transaction meta-information generated outside the chain is uploaded to the chain for evidence storage, the transaction meta-information cannot be tampered with by a third party / platform, thereby improving the credibility of the transaction data.

[0139] exist Figure 1 Based on the transaction data processing method shown, Figure 2 As shown, after step S101, the transaction data processing method provided by the embodiment of the present invention further includes:

[0140] Step S201: When the transaction metadata meets the triggering conditions of the data legitimacy verification smart contract, the data legitimacy verification smart contract is called to determine whether the transaction data meets the legitimacy data conditions preset by the data legitimacy verification smart contract.

[0141] In one feasible approach, the occurrence of a transaction can be considered conditional, that is, the transaction data needs to meet certain conditions before the transaction can continue. For example, for some time-sensitive products, such as limited-time promotional products, only transactions initiated within a specific time period will be considered legal transactions. Therefore, transaction data can be limited by pre-setting legality data conditions to ensure that the transaction data meets the legality requirements.

[0142] Therefore, it is understandable that in the process of virtual commodity transactions, the legitimacy of the transaction data can be verified using the legitimacy verification smart contract, which can also be called on-chain transaction legitimacy verification. The legitimacy data conditions preset in the legitimacy verification smart contract are used to determine whether the transaction data is legal, that is, whether the transaction can continue to be executed. It is understandable that only after the transaction data is determined to be legal data will other subsequent operations be executed.

[0143] In one practicable implementation, the data validity verification of transaction data may include verification of the validity of user data, virtual product data, and other data. Specifically, the validity of transaction data may be verified by invoking a data validity smart contract. It is understood that the data validity verification smart contract may include preset user data conditions for determining the validity of user data and virtual product data conditions for verifying the validity of virtual product data. The preset conditions may include one or more conditions.

[0144] In one achievable manner, the user data condition may include:

[0145] Whether the user falls within the scope of this sale. For example, if a virtual product can only be purchased by member users, when a non-member user initiates a transaction for the virtual product, the user data of the non-member user will be judged as illegal data.

[0146] Whether the user's points are within a certain range. For example, a virtual product requires the user's points to reach 1000 before it can be purchased. If a user with less than 1000 points initiates a transaction for the virtual product, the user's user data will be judged as illegal data.

[0147] Whether the user has participated in a certain event. For example, a virtual product is a peripheral product for a certain event. Only if the user has participated in the corresponding event can the corresponding peripheral product be purchased. Otherwise, the user data will be judged as illegal data.

[0148] Whether the user owns or has purchased a certain prerequisite product. For example, a virtual product is divided into three levels: level one, level two, and level three. The purchase rules for the three different levels of virtual products are that you can only purchase level two products after owning level one products, and you can only purchase level three products after owning level two products. Therefore, before the user owns or purchases level two products, when the user purchases level three products, the user data in the transaction data will be judged as illegal data.

[0149] The specific user data conditions will be adjusted in actual applications and will not be given as examples here. It is understandable that the user data conditions may include one condition or multiple conditions. In the case of multiple conditions, if any one of the conditions is not met, the user data is determined to be illegal data.

[0150] In one conceivable implementation, the data verified by the data validity verification smart contract includes, but is not limited to, user data. When verifying user data, a pre-written valid user smart contract can be used, which includes the aforementioned preset user data conditions. Since one smart contract can call another smart contract, it is understandable that when the data validity verification smart contract verifies the validity of user data, it can be implemented by calling the valid user smart contract. In other words, it can be considered that the pre-set logic of the data validity verification smart contract can include calling the valid user smart contract to verify the validity of user data.

[0151] The virtual commodity data conditions preset by the data legitimacy verification smart contract may include:

[0152] Whether the virtual product is within the agreed sales period. For example, if the virtual product is sold by a third party, the third party's sales rights are usually time-limited. If the third party's sales rights for the virtual product have expired when the user initiates a transaction for the virtual product, that is, the virtual product is not within the agreed sales period, then in this case, the virtual product data does not meet the preset virtual product data conditions and is illegal data.

[0153] Whether the number of virtual goods exceeds the sales quantity. For example, for a special-price product, the maximum purchase quantity is 3. Therefore, if the purchase quantity is greater than 3, the virtual product data is illegal.

[0154] The preset virtual commodity data conditions can be adjusted based on actual circumstances, and examples are not provided here. Similarly, a virtual commodity sales smart contract that includes virtual commodity data conditions can be pre-written to verify the validity of the virtual commodity data. It is understood that the data validity verification smart contract can verify the virtual commodity data by calling the virtual commodity sales smart contract.

[0155] It can be understood that there is no difference in order between the legitimacy verification of user data and the legitimacy verification of product data. Here, only one verification order is given as an example. The smart contracts that can be called by the data legitimacy verification smart contract include but are not limited to the above-mentioned legal user smart contract and virtual product sales smart contract. They can be adjusted according to the actual data that needs to be verified. No examples will be given here.

[0156] If the transaction data meets the validity data conditions preset by the data validity verification smart contract, step S102 is executed.

[0157] If the transaction data meets the legality conditions set by the data validity verification smart contract, it can be considered legal data, and it makes sense to store this data on-chain. That is, if the transaction data meets the legality conditions set by the data validity verification smart contract and the transaction metadata meets the trigger conditions of the evidence storage smart contract, the evidence storage smart contract will be called to store the transaction metadata.

[0158] After receiving the block, the above S101 to S104 and other nodes perform hash calculation on the transaction data included in the block to obtain a verification hash. When the verification hash is the same as the transaction hash, the block is stored locally to realize the on-chain storage of transaction data.

[0159] It is understandable that if the transaction data does not meet the legitimacy data conditions preset by the data legitimacy verification smart contract, the transaction data is illegal data and the subsequent on-chain evidence storage steps will no longer be executed.

[0160] Through step S201, it is possible to perform on-chain legitimacy verification before the transaction is stored, that is, to verify the legitimacy of the transaction data before storage, to avoid storing illegal data on the chain, thereby improving the credibility of the stored transaction data.

[0161] exist Figure 1 Based on the transaction data processing method shown, Figure 3 As shown, the transaction meta-information may include content that satisfies the triggering conditions of the profit-sharing accounting smart contract. After step S104, the transaction data processing method of the embodiment of the present invention further includes:

[0162] Step S301: If the transaction metadata meets the triggering conditions of the profit-sharing smart contract, the profit-sharing smart contract is invoked to transfer the virtual commodity seller's assets to the virtual commodity provider according to the profit-sharing smart contract's preset profit-sharing rules, and obtain the virtual commodity seller's data and virtual commodity provider's data after profit-sharing calculation.

[0163] Among them, the virtual commodity seller data includes the virtual commodity seller's assets; the virtual commodity provider data includes the virtual commodity provider's assets.

[0164] Some virtual goods providers sell virtual goods through third-party platforms. Therefore, the virtual goods providers and the virtual goods sellers (third-party platforms) will establish profit-sharing rules to distribute the transaction proceeds.

[0165] The preset profit-sharing calculation rules may include, but are not limited to:

[0166] The profit from the sale of virtual commodity A is divided according to a fixed ratio. For example, the preset profit sharing ratio between the virtual commodity provider and the virtual commodity seller is 5:5, that is, the virtual commodity seller will share 50% of the profit from the sale of virtual commodity A with the virtual commodity provider.

[0167] Adjust the profit sharing ratio in stages. For example, when the quantity of virtual commodity A sold by the virtual commodity seller is in the first interval, the preset profit sharing ratio between the virtual commodity provider and the virtual commodity seller may be 5:5. When the quantity of virtual commodity A sold by the virtual commodity seller is in the second interval, the preset profit sharing ratio between the virtual commodity provider and the virtual commodity seller for the part exceeding the maximum value of the first interval may be 4:6. That is, different profit sharing ratios are formulated according to different sales situations.

[0168] Subsequent transfer sharing, for example, the sales period of virtual commodity A by the virtual commodity seller is 7 days. During the sales period, there is no need to calculate the share for each transaction. After the sales period ends, that is, 7 days later, the share will be calculated for the total transaction amount of virtual commodity A generated during the sales period.

[0169] The specific preset profit-sharing calculation rules are adjusted according to actual conditions and no examples are given here.

[0170] Step S302: Call the evidence storage smart contract, and store the evidence into the calculated virtual commodity seller data and virtual commodity provider data.

[0171] By storing the data of virtual goods sellers and virtual goods providers after the profit sharing is calculated on the chain, their historical information can be traced and queried to avoid denial of rights by both parties.

[0172] Smart contracts are deployed in blockchain nodes, and when the triggering conditions of the smart contracts are met, the smart contracts can be automatically executed. Therefore, it is understandable that the virtual goods provider can be connected as a signatory of the smart contract or a blockchain node. This can avoid denial by the transaction initiator or the virtual goods seller, thereby ensuring the legitimate rights and interests of the virtual goods provider.

[0173] Through steps S301 and S302, after the transaction evidence is stored, the profit sharing calculation is performed using the smart contract, and the profit sharing calculation results are stored after the profit sharing calculation.

[0174] The transaction data processing method provided by the embodiment of the present invention is applied to the nodes in the blockchain. Before storing the transaction meta-information, the transaction data to be stored is verified for data legitimacy to avoid invalid data being stored on the chain, thereby ensuring the legitimacy and validity of the data stored in the blockchain. After the transaction meta-information is stored, the share of the virtual commodity revenue is calculated, and the result of the share calculation is stored through the smart contract for storage, so that changes in the transaction data can be traced. In this way, the credibility of the transaction data can be improved, and at the same time, the security and credibility of the revenue of the virtual commodity provider can be protected.

[0175] exist Figure 1 Based on the examples provided, Figure 4 As shown, after step S104, the transaction data processing method provided by the embodiment of the present invention further includes:

[0176] Step S401, receiving key equity information;

[0177] Among them, the key information of equity includes data to be verified; the key information of equity is generated outside the blockchain and sent to the blockchain node by the user terminal outside the blockchain.

[0178] Different virtual goods can correspond to different virtual goods rights; a single virtual good can include multiple rights. Rights can include display rights, usage rights, and playback rights. For example, after a user purchases a "skin," they gain the right to use that skin. After applying the skin, they also gain the right to display it. After a user purchases playback rights for a video, they can play it. Examples of additional rights are not provided here.

[0179] When a user's operation involves the rights and interests of a virtual commodity, the user's terminal, located outside the blockchain, will generate key rights and interests information. This key rights and interests information includes data to be verified, which can be transaction codes, virtual commodity codes, user codes, etc. The blockchain node performs rights and interests verification on the key rights and interests information based on the data to be verified. Rights and interests verification is also called on-chain authentication.

[0180] Step S402: When the key equity information meets the triggering conditions of the equity verification smart contract, the equity verification smart contract is called to query whether there is data to be verified in the transaction data.

[0181] After a transaction occurs, the transaction data is uploaded to the blockchain for evidence. This means that the blockchain stores the corresponding transaction data for transactions that have occurred. Therefore, if a user holds a certain benefit, the transaction data used to obtain that benefit can be assumed to have already been stored on the blockchain. Based on the received data to be verified, the user can then search the transaction data already stored on the blockchain to see if the data to be verified is included. The inclusion of the data to be verified in the transaction data indicates that the user has obtained the benefit, meaning that the user can proceed with actions related to that benefit.

[0182] Step S403: When there is data to be verified in the transaction data, the transaction data including the data to be verified is determined as the first target transaction data.

[0183] If the transaction data contains data to be verified, it can be considered that the data to be verified has passed the rights verification, and the current user owns the rights to the virtual product. That is, the user can perform rights operations on the virtual product, such as using, displaying, or playing the virtual product. It can be understood that based on the data to be verified, a first target transaction data can be determined from the multiple transaction data stored in the blockchain. This first target transaction data is the transaction data that includes the data to be verified.

[0184] Step S404: Obtain the transaction hash of the first target transaction data.

[0185] While storing the transaction metadata, the transaction hash that uniquely corresponds to the transaction data is also stored. Because the transaction hash uniquely corresponds to the transaction data, the transaction hash of the first target transaction data can be used to represent the first target transaction data.

[0186] Step S405: Send the transaction hash as a return result to the user terminal;

[0187] The transaction hash is used to display the first preset scenario on the user side.

[0188] Due to the unidirectional nature of hash operations, after the transaction data is hashed, it is impossible to reversely infer the transaction data from the obtained transaction hash. Furthermore, even if the transaction hash is displayed in the first preset scenario, it is impossible to reversely infer user-related data information from the displayed transaction hash. In this way, the use of transaction hashes can ensure good confidentiality of the displayed content and better protect user privacy.

[0189] In one implementation, the first preset scenario may include key moments in the use, display, or playback of a virtual good. For example, when playing the virtual good, the transaction hash may be constantly or intermittently displayed at a fixed location on the playback page. Key moments may include the activation and termination of the benefit, or important moments in the use of the benefit, such as the duration of key content in a video. Furthermore, for virtual goods that include special effects when used, such as gaming equipment, the transaction hash may be displayed when the special effects appear.

[0190] In the case that the transaction data does not include the data to be verified, an error identifier is sent to the user end as a return result; the error identifier is used to be displayed in the second preset scene on the user end.

[0191] When the transaction data does not include the data to be verified, it means that the user has not obtained the right, that is, the operation performed by the user on the right is invalid. For example, a member video can only be played by member users (member users have the right to play). Therefore, when a non-member user requests the right to play, the data to be queried in the key information of the rights received by the blockchain node can be the user number. The blockchain node queries based on the user number to check whether the user number is included in the transaction data. In one feasible way, the user number can be found in the transaction data representing the acquisition of membership. It can be understood that if the user number cannot be found in the transaction data, it means that the user is a non-member user, does not have the right to play, and cannot play the member video.

[0192] In this case, a return result may also be sent to the user terminal. The return result may include an error indicator. The specific content and form of the error indicator can be set according to the actual situation. For example, it may be an empty indicator or a prompt message with the content "Sorry, you have not obtained the relevant benefits." After receiving the return result, the user terminal will display the return result in a second preset scenario, such as a prompt window, to prompt the user that the relevant benefits have not been obtained.

[0193] In one possible implementation, for invalid rights, the user terminal can also stop the user from using or displaying the invalid rights; or for playback rights, a trial broadcast can be conducted, and after the trial broadcast, a prompt message indicating that the rights verification failed can be displayed to the user. It is understood that the prompt indicating that the rights verification failed can also explain to the user how to obtain the rights, so that the user can continue the corresponding rights operation after obtaining the rights.

[0194] It is understood that the received key equity information has undergone preliminary checks, which may include checking the type, range, and validity of fields. Furthermore, the data type of the key equity information has also been pre-processed, i.e., the data type of the key equity information is the data type corresponding to the smart contract. This preliminary check and pre-processing of the key equity information can be completed on the user side off-chain.

[0195] The technical solution provided by the embodiment of the present invention is that when a user uses, displays or plays a virtual commodity, the user terminal sends key information of rights and interests to the blockchain for on-chain verification (authentication). That is, when the user performs a rights and interests operation, the rights and interests are verified. For legitimate rights and interests, the transaction hash of the transaction data is returned to enable the transaction hash of the legitimate rights and interests to be displayed on the user terminal, thereby enabling everyone to verify the rights and interests and thus preventing the platform from doing evil. Furthermore, as the party that owns the transaction data, the virtual commodity provider can verify the transaction data based on the displayed transaction hash, determine whether the transaction data is consistent, and then determine whether the platform has done evil, that is, whether the transaction data has been tampered with, thereby protecting its own legitimate income and transaction information security. In this way, on the basis of improving the credibility of the transaction data, the legitimate rights and interests of the virtual commodity provider can be protected.

[0196] At the same time, rights verification is performed when users use, display, or play virtual goods, and the transaction hash is displayed in multiple scenarios after the verification is passed. This not only improves the transaction transparency of the virtual goods seller (third-party platform), but also protects the user's privacy, thereby increasing the user's trust in the third-party virtual goods platform. In one achievable method, the transaction data processing method provided in this embodiment can be applied in on-demand scenarios such as cloud cinemas to provide better services for virtual goods providers.

[0197] exist Figure 1 Based on the examples provided, Figure 5 As shown, after step S104, the transaction data processing method provided by the embodiment of the present invention further includes:

[0198] Step S501, receiving query key information;

[0199] Among them, the query key information includes the data to be queried; the query key information is generated outside the blockchain and sent to the blockchain node by the virtual product provider.

[0200] In one possible implementation, a query terminal can be deployed to provide query services to virtual goods providers regarding historical transactions or profit sharing information for virtual goods. It is understood that the query terminal can be deployed within the virtual goods provider or as an independent external module to provide query services to the virtual goods provider.

[0201] Step S502: When the query key information meets the query smart contract triggering conditions, the query smart contract is called to query whether the transaction data contains the data to be queried.

[0202] When a blockchain node performs a query, it can search the transaction data stored on the blockchain based on the data to be queried. In one conceivable implementation, the transaction data may include virtual commodity data, virtual commodity provider data, etc. The virtual commodity data may include the virtual commodity ID, virtual commodity transaction time, etc. It is understood that when performing a query, the blockchain node may perform a query based on one or more of these conditions.

[0203] In one achievable approach, when querying historical transaction information, one can query based on the virtual commodity transaction time. This means determining the time range to be queried and querying virtual commodity transaction data. It is understandable that historical transaction information for a particular virtual commodity can be queried by setting the virtual commodity ID. For example, querying historical information for a virtual commodity with a virtual commodity ID of 001 from the 1st to the 7th of this month would search the transaction data stored on the blockchain for transactions with a virtual commodity ID of 001 and transaction times between the 1st and 7th of this month. The query process for other query conditions is similar, and no further examples will be given. It is understandable that query results may or may not exist.

[0204] Step S503: When there is data to be queried in the transaction data, the transaction data including the data to be queried is determined as the second target transaction data.

[0205] Similar to the equity verification process, based on the data to be queried, the corresponding transaction data can be found in the transaction data stored in the blockchain, and the transaction data can be determined as the second target transaction data.

[0206] Step S504 : Acquire transaction metadata including the second target transaction data and the transaction hash of the second target transaction data.

[0207] The transaction meta information includes transaction data. After the second target transaction data is determined, the transaction meta information corresponding to the second target transaction data and the transaction hash obtained based on the second target transaction data can be determined.

[0208] Step S505: Send the transaction metadata and transaction hash as a return result to the virtual goods provider;

[0209] The returned result is used for display in the third preset scene of the virtual commodity provider.

[0210] The transaction metadata including the second target transaction data and the transaction hash of the second target transaction data are sent as a return result to the virtual goods provider. The virtual goods provider can display the return result in a third preset scenario based on the query type, such as historical transaction information query or profit information query. In one implementation, the third preset scenario can include a form, that is, the return result can be displayed in a form.

[0211] Understandably, virtual goods providers can download the required information from the blockchain and synchronize locally stored data with blockchain data through periodic downloads. Since the information stored on the blockchain is considered trustworthy, virtual goods providers can verify the virtual goods transaction data provided by the third-party platform based on the data obtained from the blockchain. For example, they can verify the integrity and consistency of the data. If the data verification is inconsistent, it can be assumed that the third-party platform has tampered with the transaction data.

[0212] For example, the virtual product provider can obtain a share information A1 about virtual product A from a third-party platform, and the virtual product provider can obtain the share information A2 of virtual product A from the blockchain. Since the share information A2 stored in the blockchain can be considered credible, the share information A2 can be used to verify the share information A1. When A1 and A2 are the same, it can be considered that the share information A1 of virtual product A provided by the third-party platform has not been tampered with and the data is complete and credible. When A1 and A2 are different, it is considered that the share information A1 of virtual product A provided by the third-party platform is tampered with and is not credible.

[0213] It is understood that in this embodiment of the present invention, the received query information undergoes preliminary inspection and preprocessing. Preliminary inspection may include, but is not limited to, checking the type, range, and validity of fields. Preprocessing involves converting the query information's data type into the smart contract's input data type. Both the preliminary inspection and preprocessing of data are performed off-chain.

[0214] The technical solution provided by the embodiment of the present invention is that the data stored in the blockchain can be considered tamper-proof. Therefore, the transaction meta-information generated outside the chain and stored in the blockchain is credible. When the virtual product provider hopes to obtain transaction data from the blockchain, the blockchain node can provide the virtual product provider with credible data information, that is, the virtual product provider can obtain credible transaction meta-information generated outside the chain. Furthermore, using the credible transaction meta-information obtained from the blockchain, the virtual product provider can verify the data integrity and consistency of the transaction information provided by virtual product sellers such as third-party platforms, and determine whether the transaction information has been tampered with. In this way, the reasonable profits of the virtual product provider can be guaranteed.

[0215] At the same time, for companies whose businesses include online transaction sharing, especially those that conduct online transactions for virtual goods or services, such as online video sharing, digital collections, online games, metaverse, etc., they can obtain reliable sharing information from the blockchain to ensure that their own profits are safe and reliable.

[0216] The transaction data processing method provided in an embodiment of the present invention is applied to a user terminal, where the user terminal is located outside a blockchain; the blockchain includes blockchain nodes; and a plurality of smart contracts are deployed in the blockchain nodes. The transaction data processing method provided in an embodiment of the present invention includes:

[0217] Send transaction metadata to blockchain nodes;

[0218] Among them, transaction meta-information is generated outside the blockchain, including transaction data; the blockchain node that receives the transaction meta-information is used to call the evidence smart contract after receiving the transaction meta-information, and perform hash calculation on the transaction data to obtain the transaction hash of the transaction data when the transaction meta-information meets the triggering conditions of the evidence smart contract; the transaction hash uniquely corresponds to the transaction data; and after packaging the transaction meta-information and the transaction hash into a block and storing it locally, the block is broadcast to other nodes in the blockchain; other nodes in the blockchain are used to perform hash calculation on the transaction data included in the block after receiving the block to obtain a verification hash; and when the verification hash is the same as the transaction hash, the block is stored locally.

[0219] The transaction data processing method provided by the embodiment of the present invention is that when a transaction occurs, the user end sends the transaction meta-information generated outside the chain to the blockchain node for on-chain storage, making the transaction meta-information difficult to be tampered with after being on-chain, thereby improving the credibility of the transaction data.

[0220] The embodiment of the present invention provides a detailed description of the transaction data processing method applied to the user end.

[0221] Send transaction metadata to blockchain nodes;

[0222] Among them, transaction meta-information is generated outside the blockchain, including transaction data; the blockchain node that receives the transaction meta-information is used to call the evidence smart contract after receiving the transaction meta-information, and perform hash calculation on the transaction data to obtain the transaction hash of the transaction data when the transaction meta-information meets the triggering conditions of the evidence smart contract; the transaction hash uniquely corresponds to the transaction data; and after packaging the transaction meta-information and the transaction hash into a block and storing it locally, the block is broadcast to other nodes in the blockchain; other nodes in the blockchain are used to perform hash calculation on the transaction data included in the block after receiving the block to obtain a verification hash; and when the verification hash is the same as the transaction hash, the block is stored locally.

[0223] Before sending transaction meta-information to the blockchain node, a preliminary check is required on the transaction meta-information. That is, the preliminary check is performed on the user side outside the blockchain and can be considered to be completed by the sender of the transaction meta-information. The content of the preliminary check includes but is not limited to checking the type, range, validity, etc. of the fields.

[0224] Transactions may include users' purchase, cancellation or transfer of virtual goods. When a transaction occurs, information related to the transaction can be represented by transaction meta-information. Transaction meta-information may include transaction data, such as the name of the user initiating the transaction, the name of the virtual goods traded, the virtual goods ID (identification number), the type of virtual goods, key parameters, etc.

[0225] When a transaction is generated, the operation that needs to be performed on the transaction meta-information is determined, that is, when the transaction is generated, it is determined to call the evidence smart contract to store the transaction meta-information. It can be understood that in order to enable the blockchain node to call the evidence smart contract after receiving the transaction meta-information, the transaction meta-information can include content that meets the triggering conditions of the evidence smart contract, and then after the blockchain node receives the transaction meta-information, it can trigger the evidence smart contract to realize the storage of the transaction meta-information.

[0226] As you can understand, smart contracts are codes pre-installed in blockchain nodes. Data input to smart contracts must be converted to the contract's input data type before it can be read. The process of converting the data type of data to be input to a smart contract can be referred to as data preprocessing. Therefore, transaction meta-information must be preprocessed to convert its data type to the input data type of the evidence-storing smart contract before it can be read. It can be considered that the transaction meta-information sent to blockchain nodes has undergone preliminary inspection and preprocessing.

[0227] Specifically, after the user terminal sends the transaction meta-information to the blockchain node, the process of the blockchain node storing the transaction meta-information has been described in detail in the above embodiment and will not be repeated here.

[0228] The transaction data processing method provided by the embodiment of the present invention is that when a transaction occurs, the user end sends the transaction meta-information generated outside the chain to the blockchain node for on-chain storage, making the transaction meta-information difficult to be tampered with after being on-chain, thereby improving the credibility of the transaction data.

[0229] The embodiment of the present invention provides a transaction data processing method, which is applied to a user terminal, such as Figure 6 As shown, the transaction data processing method of the embodiment of the present invention includes:

[0230] Step S601, sending key equity information to the blockchain node;

[0231] Among them, the key information of equity includes data to be verified; the key information of equity is generated outside the blockchain.

[0232] Different virtual goods correspond to different virtual goods rights; a single virtual good can include multiple rights. Rights can include display rights, usage rights, and playback rights. For example, after a user purchases a "skin," they gain the right to use that skin, and after applying the skin, they also gain the right to display it. After a user purchases playback rights for a video, they can play it. Examples of additional rights are not provided here.

[0233] When a user performs an operation involving a virtual good, the user generates key rights information. Different virtual goods correspond to different rights; a single virtual good can correspond to multiple rights. In one implementation, these rights can include the right to display, use, and play the virtual good. Key rights information includes data to be verified, such as a transaction code, virtual good code, or user code. The key rights information sent by the user to the blockchain node can include content that satisfies the triggering conditions of the rights verification smart contract, so that upon receiving the key rights information, the blockchain node invokes the rights verification smart contract to perform rights verification. In one implementation, the process of verifying the rights of key rights information can be referred to as on-chain authentication. Similar to sending transaction metadata to blockchain nodes, the key rights information sent to the blockchain node requires preliminary inspection and preprocessing.

[0234] Step S602: Receive the return result from the blockchain node.

[0235] Regardless of whether the equity verification is passed, the blockchain node will send a return result to the user end, and the user end will perform corresponding operations based on the received return result.

[0236] Step S603: If the returned result includes a transaction hash, display the transaction hash in a first preset scene;

[0237] Among them, the transaction hash is the transaction hash of the first target transaction data; the first target transaction data includes the data to be verified; the first target transaction data is determined when the blockchain node calls the equity verification smart contract after receiving the key equity information and when the key equity information meets the triggering conditions of the equity verification smart contract, and the data to be verified is queried in the transaction data.

[0238] When the returned result includes the transaction hash, it can be considered that the equity verification has passed, that is, the current user's equity operation is legal. In this case, the received transaction hash can be displayed in the first preset scenario.

[0239] In one implementation, the first preset scenario can include key moments in the use, display, or playback of a virtual good. For example, when playing the virtual good, the transaction hash can be constantly or intermittently displayed at a fixed location on the playback page. Key moments can include the moment of enabling and terminating the benefit, or important periods during the use of the benefit, such as the period of key content in a video. In addition, for virtual goods that include special effects when used, such as gaming equipment, the transaction hash can be displayed when the special effects appear.

[0240] It is understandable that the transaction data cannot be inferred from the transaction hash. Therefore, displaying the transaction hash will not leak the user's privacy and can protect the security of user information.

[0241] Correspondingly, when the received return result includes an error identifier, the error identifier is displayed in the second preset scene.

[0242] When the return result includes an error mark, it means that the rights verification has not passed or the rights are considered invalid, that is, the user cannot operate on the rights. For example, a member video can only be played by member users (member users have the right to play), that is, non-member users do not have the right to play the video. The error mark can include an empty mark or an error mark, such as a prompt message with the content "Sorry, you have not obtained the relevant rights", etc. The specific content and specific form can be set according to the actual situation, and no examples will be given here. The second preset scene may include scenes such as prompt windows.

[0243] In one possible implementation, for benefits that fail to pass the rights verification, the user terminal can stop the user from using, displaying, or playing the benefit. Alternatively, the user can be allowed to try the benefit and, after the trial, display a prompt indicating that the benefits verification failed. It is understood that the user can be informed of the rights verification failure while being prompted with instructions on how to obtain the benefits, so that the user can continue with the corresponding rights operations after obtaining the benefits.

[0244] The transaction data processing method provided by the embodiment of the present invention sends key rights and interests information to the blockchain for on-chain verification (authentication) when a user uses, displays, or plays virtual goods. For legitimate rights and interests, the transaction hash returned by the blockchain node is displayed, so that each right and interest can be verified by everyone when the user performs rights and interests operations. It can be understood that the virtual goods provider can verify the transaction data provided by third parties or other virtual goods sellers based on the displayed transaction hash to determine whether the transaction data has been tampered with, thereby protecting its own legitimate profits and information security. In this way, the rights and interests of the virtual goods provider can be ensured on the basis of improving the credibility of the transaction data.

[0245] At the same time, users use multiple links and multiple scenes to display or play virtual goods to display transaction hashes. While protecting user privacy, it can also improve the transaction transparency of virtual goods sellers (third-party platforms), thereby increasing users' trust in third-party platforms.

[0246] like Figure 7 As shown, the transaction data processing system provided by the embodiment of the present invention may include: a blockchain node 701, a user terminal 702 and a virtual goods provider 703.

[0247] The client 702 is used to send transaction metadata to the blockchain node 701. The transaction metadata is generated outside the blockchain and includes transaction data.

[0248] Blockchain node 701 is configured to receive transaction meta-information sent by client 702; if the transaction meta-information satisfies the triggering conditions of the evidence storage smart contract, invoke the evidence storage smart contract, perform hash calculation on the transaction data, and obtain a transaction hash of the transaction data; the transaction hash uniquely corresponds to the transaction data; package the transaction meta-information and the transaction hash into a block, and store it locally; and broadcast the block to other nodes in the blockchain; so that after receiving the block, the other nodes in the blockchain perform hash calculation on the transaction data included in the block to obtain a verification hash, and if the verification hash is the same as the transaction hash, store the block locally;

[0249] Virtual goods provider 703 is configured to send query key information to blockchain node 701; the query key information is generated outside the blockchain and includes the data to be queried; receive a return result sent by blockchain node 701; and, if the return result includes transaction meta-information and a transaction hash, display the return result in a third preset scenario; the transaction meta-information includes the second target transaction data; the transaction hash is the transaction hash of the second target transaction data; and the second target transaction data is the transaction data including the data to be queried;

[0250] The blockchain node 701 is also used to receive the query key information sent by the virtual product provider 703; when the query key information meets the query smart contract triggering conditions, the query smart contract is called to query whether there is data to be queried in the transaction data; and when the data to be queried exists in the transaction data, the transaction data including the data to be queried is determined as the second target transaction data; the transaction meta information including the second target transaction data and the transaction hash of the second target transaction data are obtained; and the transaction meta information and the transaction hash are sent as return results to the virtual product provider 703.

[0251] The transaction data processing system provided by the embodiment of the present invention includes a blockchain node, a user terminal and a virtual commodity provider. When a transaction occurs, the user terminal sends transaction meta-information to the blockchain node for on-chain storage, so that the transaction data generated outside the chain is difficult to be tampered with after being stored on the chain. When the virtual commodity provider queries the transaction meta-information at the blockchain node, the blockchain node can provide the virtual commodity provider with credible transaction meta-information, thereby improving the credibility of the transaction data.

[0252] Reference Figure 7 , the embodiment of the present invention provides a detailed description of the transaction data processing system.

[0253] The client 702 is used to send transaction metadata to the blockchain node 701. The transaction metadata is generated outside the blockchain and includes transaction data.

[0254] It can be understood that when a transaction occurs, the user terminal 702 will conduct a preliminary check on the transaction meta-information and convert the data type of the transaction meta-information that passes the check into the input data type of the smart contract, that is, pre-process the transaction meta-information, and then send the pre-processed transaction meta-information to the blockchain node 701, so that the transaction meta-information generated outside the chain can be stored in the blockchain.

[0255] The blockchain node 701 is configured to receive transaction meta-information sent by the user terminal 702; when the transaction meta-information satisfies the triggering conditions of the evidence storage smart contract, the evidence storage smart contract is called to perform hash calculation on the transaction data to obtain the transaction hash of the transaction data; the transaction hash uniquely corresponds to the transaction data; the transaction meta-information and the transaction hash are packaged into a block for local storage; and the block is broadcast to other nodes in the blockchain; so that after receiving the block, the other nodes in the blockchain perform hash calculation on the transaction data included in the block to obtain a verification hash, and when the verification hash is the same as the transaction hash, the block is stored locally.

[0256] Based on actual usage requirements, blockchain node 701 can pre-deploy multiple smart contracts to execute corresponding preset logic when conditions are met. It can also adjust and update smart contracts based on different situations. Blockchain node 701 can receive transaction meta-information sent by user terminal 702; if the transaction meta-information meets the triggering conditions of the evidence storage smart contract, it can call the evidence storage smart contract to process the received transaction meta-information. Specifically, this can include: hashing the transaction data to obtain a transaction hash of the transaction data; packaging the transaction meta-information and the transaction hash into a block for local storage; broadcasting the block to other nodes in the blockchain; wherein, after receiving the block, the other nodes are used to hash the transaction data included in the block to obtain a verification hash, and if the verification hash is the same as the transaction hash, the block is stored locally.

[0257] Virtual goods provider 703 is configured to send query key information to blockchain node 701; the query key information is generated outside the blockchain and includes the data to be queried; receive a return result sent by blockchain node 701; and, if the return result includes transaction meta-information and a transaction hash, display the return result in a third preset scenario; the transaction meta-information includes the second target transaction data; the transaction hash is the transaction hash of the second target transaction data; and the second target transaction data is the transaction data including the data to be queried;

[0258] In one feasible manner, the virtual goods provider 703 can send query key information to the blockchain node 701 based on the required information, such as historical transaction information, profit sharing information, etc., and display the queried information based on the query results returned by the blockchain node 701. The process of obtaining the query results can also be understood as the process of the virtual goods provider 703 downloading data and synchronizing data from the blockchain.

[0259] The blockchain node 701 is also used to receive the query key information sent by the virtual product provider 703; when the query key information meets the query smart contract triggering conditions, the query smart contract is called to query whether there is data to be queried in the transaction data; and when the data to be queried exists in the transaction data, the transaction data including the data to be queried is determined as the second target transaction data; the transaction meta information including the second target transaction data and the transaction hash of the second target transaction data are obtained; and the transaction meta information and the transaction hash are sent as return results to the virtual product provider 703.

[0260] The blockchain node 701 queries the transaction data stored in the blockchain. It can be understood that based on the data to be queried included in the received query key information, the query result may exist or not. Based on the data to be queried, the corresponding transaction data found in the transaction data stored in the blockchain is determined as the second target transaction data, and the transaction meta information corresponding to the second target transaction data and the transaction hash obtained based on the second target transaction data are obtained, and the original transaction information and the transaction hash are sent as return results to the virtual product provider 703.

[0261] The transaction data processing system provided by the embodiment of the present invention allows data to be exchanged between the blockchain node, the user terminal, and the virtual commodity provider. When a transaction occurs, the user terminal sends the transaction meta-information generated outside the chain to the blockchain node for on-chain storage, making it difficult to tamper with the transaction meta-information after it is on-chain storage. This allows the blockchain node to provide the virtual commodity provider with secure and reliable transaction data, thereby improving the credibility of the transaction data.

[0262] In one achievable approach, Figure 8 As shown, this system is based on tamper-proof blockchain technology to store virtual commodity transaction metadata, perform on-chain verification in key links such as use, display, or playback, obtain and display unique transaction hashes, and provide query services for virtual commodity providers. The transaction data processing system provided by the embodiment of the present invention may include:

[0263] The blockchain transaction evidence storage module 801 is used for blockchain transaction evidence storage, including blockchain nodes, smart contracts, service interfaces, etc.

[0264] The user virtual commodity transaction chain module 802 is used for user transaction execution and confirmation, including transaction purchase and cancellation, rights confirmation and transfer, etc., and stores transaction metadata on the chain.

[0265] The virtual commodity usage verification and display module 803 is used to verify the user's rights to use virtual commodities, including on-chain authentication of rights such as use, display or playback, and displaying tamper-proof transaction numbers in key scenarios.

[0266] The virtual commodity transaction query module 804 is used to provide the virtual commodity provider with historical transaction or profit sharing information query of the virtual commodity.

[0267] In one feasible method, the blockchain transaction evidence module 801 is used to store evidence of virtual commodity transactions on the chain, supports smart contract deployment and updates, and supports on-chain transaction legitimacy verification. The blockchain transaction evidence module 801 can correspond to a blockchain node.

[0268] Specifically, the blockchain transaction evidence storage module 801 can perform the following steps:

[0269] In step a, the service interface receives the virtual commodity transaction meta-information provided by the user virtual commodity transaction on-chain module 802, calls the evidence storage smart contract, generates an unalterable and unique transaction hash based on the virtual commodity transaction meta-information, and stores the transaction meta-information and transaction hash as evidence.

[0270] That is, step a realizes writing the transaction metadata and transaction hash into the blockchain node.

[0271] As can be understood, the blockchain transaction evidence module 801 supports the deployment and updating of smart contracts. Optionally, it supports on-chain legitimacy verification of the data to be stored before storage. Optionally, it supports profit-sharing calculation after storage and stores the profit-sharing calculation results. Optionally, the virtual goods provider can be connected as a smart contract signatory or blockchain node.

[0272] In step b, the service interface receives the virtual commodity rights verification request from the virtual commodity usage verification and display module 803, calls the rights verification smart contract, and verifies the rights based on the rights verification request; for legal rights, the corresponding unique number on the virtual commodity transaction chain can be obtained and returned; for invalid rights, an empty or error mark can be returned.

[0273] It is understandable that the virtual commodity rights verification request may include key rights information, and the unique number on the virtual commodity transaction chain may be a transaction hash.

[0274] In step c, the service interface receives the virtual commodity transaction or profit sharing query request from the virtual commodity transaction query module 804, calls the query smart contract to perform the query, and returns the query result.

[0275] It can be understood that a virtual commodity transaction or profit-sharing query request may include query key information, and the query may include multiple types of queries. Based on the type of query, a list of virtual commodity transactions or profit-sharing that meets the requirements may be returned, and the list may include the transaction metadata, transaction hash, etc.

[0276] In one implementation, the user virtual goods transaction on-chain module 802 can process user transaction requests to purchase, unsubscribe, or transfer virtual goods, perform preliminary inspection and pre-processing of transaction metadata, and send the transaction metadata to the service interface of step a of the blockchain transaction evidence module 801. Optionally, it supports off-chain transaction legitimacy verification.

[0277] It can be understood that the preliminary check includes checking the type, range, validity, etc. of the fields of the transaction meta-information. The pre-processing is to convert the data type of the transaction meta-information into the input data type of the evidence storage smart contract.

[0278] In one feasible manner, the virtual commodity usage verification and display module 803 can execute the user's request to use, display or play the virtual commodity, perform preliminary inspection and preprocessing on the user's request to use, display or play the virtual commodity, and send the user's request to use, display or play the virtual commodity to the service interface of step b of the blockchain transaction evidence module 801; receive the return result of the blockchain transaction evidence module 801, and when the return result includes a transaction hash, display the transaction hash at a key link; when the return result includes an empty or error mark, stop using or displaying, or let the user try it out and prompt that the rights verification failed after the trial.

[0279] It is understandable that a user's request to use, display or play a virtual commodity may include key rights and interests information, and key links may include use, display or play and other links.

[0280] In one achievable manner, the user virtual commodity transaction chain module 802 and the virtual commodity usage verification and display module 803 may be modules deployed in the user terminal 702 to provide the above services for the user terminal.

[0281] In one achievable method, the virtual commodity transaction query module 804 can execute the query request of the virtual commodity provider, perform preliminary inspection and preprocessing on the query request, and send the query request to the service interface of step c of the blockchain transaction evidence module 801; and display the return result of the blockchain transaction evidence module 801.

[0282] It can be understood that the query request may include query key information, and the virtual commodity transaction query module 804 can provide the virtual commodity provider with services such as downloading and synchronizing transaction information from the blockchain transaction evidence module 801, that is, the virtual commodity provider can use the virtual commodity transaction query module 804 to verify the integrity and consistency of the transaction data.

[0283] In one practicable manner, the virtual commodity transaction query module 804 may correspond to the virtual commodity provider, that is, may be a module deployed inside the virtual commodity provider, or may be an independent module that provides query services for the virtual commodity provider.

[0284] To sum up, through the blockchain transaction evidence module 801 and the user virtual commodity transaction on-chain module 802, verification transactions and evidence transactions can be realized; through the blockchain transaction evidence module 801 and the virtual commodity usage verification and display module 803, verification rights and interests can be realized; through the blockchain transaction evidence module 801 and the virtual commodity transaction query module 804, query transactions or profit information can be realized.

[0285] The transaction data processing system provided by the embodiment of the present invention is based on blockchain technology. When a user initiates a virtual commodity transaction, a unique transaction hash is generated on the blockchain and stored together with the transaction metadata on the blockchain. When the user uses, displays or plays the commodity, an on-chain verification is performed to obtain the transaction hash corresponding to the right and the unique, unalterable transaction hash is displayed in multiple scenarios. While protecting user privacy, the transparency and trust of the platform are improved. At the same time, the virtual commodity provider can query historical transaction information on the chain, avoiding possible third-party / platform stealing, brushing, and subsequent order changes, thereby protecting the reasonable income of the virtual commodity provider and ensuring that the income of the virtual commodity provider is safe and reliable.

[0286] like Figure 9 As shown, an embodiment of the present invention provides a transaction data processing device, which is applied to a blockchain node in which multiple smart contracts are deployed; the device includes:

[0287] The first receiving module 901 is configured to receive transaction meta-information; the transaction meta-information includes transaction data; the transaction meta-information is generated outside the blockchain and sent by a user terminal outside the blockchain to a blockchain node;

[0288] The calculation module 902 is used to call the evidence storage smart contract when the transaction metadata meets the triggering conditions of the evidence storage smart contract, perform hash calculation on the transaction data, and obtain the transaction hash of the transaction data; the transaction hash is uniquely associated with the transaction data;

[0289] The first storage module 903 is used to package the transaction metadata and transaction hash into blocks for local storage;

[0290] Broadcast module 904 is used to broadcast the block to other nodes in the blockchain; after receiving the block, other nodes are used to perform hash calculation on the transaction data included in the block to obtain a verification hash, and if the verification hash is the same as the transaction hash, the block is stored locally.

[0291] Optionally, the device further comprises:

[0292] A judgment module is used to, after receiving the transaction meta-information, call the data legitimacy verification smart contract if the transaction meta-information meets the triggering conditions of the data legitimacy verification smart contract to determine whether the transaction data meets the legitimacy data conditions preset by the data legitimacy verification smart contract;

[0293] The calculation module 902 is specifically configured to:

[0294] When the transaction data meets the legitimacy data conditions preset by the data legitimacy verification smart contract and the transaction metadata meets the triggering conditions of the evidence smart contract, the evidence smart contract is called.

[0295] Optionally, the device further comprises:

[0296] The profit-sharing accounting module is used to, after broadcasting the block to other nodes in the blockchain, call the profit-sharing accounting smart contract if the transaction metadata meets the triggering conditions of the profit-sharing accounting smart contract, transfer the virtual commodity seller's assets to the virtual commodity provider in accordance with the profit-sharing accounting rules preset in the profit-sharing accounting smart contract, and obtain the virtual commodity seller's data and virtual commodity provider data after the profit-sharing accounting; the virtual commodity seller's data includes the virtual commodity seller's assets; the virtual commodity provider's data includes the virtual commodity provider's assets;

[0297] The second storage module is used to call the evidence storage smart contract, and the evidence storage is divided into the calculated virtual commodity seller data and virtual commodity provider data.

[0298] Optionally, the device further comprises:

[0299] a second receiving module, configured to receive key equity information after broadcasting the block to other nodes in the blockchain; the key equity information including the data to be verified; the key equity information being generated outside the blockchain and sent to the blockchain node by a user terminal outside the blockchain;

[0300] The first query module is used to call the equity verification smart contract when the equity key information meets the trigger conditions of the equity verification smart contract to query whether there is data to be verified in the transaction data;

[0301] a first determining module, configured to, when the transaction data includes data to be verified, determine the transaction data including the data to be verified as first target transaction data;

[0302] A first acquisition module, configured to acquire a transaction hash of first target transaction data;

[0303] The first return module is used to send the transaction hash as a return result to the user end; the transaction hash is used to be displayed in a first preset scene on the user end.

[0304] Optionally, the device further comprises:

[0305] The second return module is used to send an error identifier as a return result to the user end when there is no data to be verified in the transaction data; the error identifier is used to be displayed in a second preset scene on the user end.

[0306] Optionally, the device further comprises:

[0307] a third receiving module, configured to receive query key information after broadcasting the block to other nodes in the blockchain; the query key information includes the data to be queried; the query key information is generated outside the blockchain and sent to the blockchain node by the virtual goods provider;

[0308] The second query module is used to call the query smart contract when the query key information meets the query smart contract trigger condition to query whether the transaction data contains the data to be queried;

[0309] a second determining module, configured to, when the transaction data includes the data to be queried, determine the transaction data including the data to be queried as the second target transaction data;

[0310] A second acquisition module, configured to acquire transaction metadata including second target transaction data and a transaction hash of the second target transaction data;

[0311] The third return module is used to send the transaction metadata and transaction hash as a return result to the virtual commodity provider; the return result is used to be displayed in a third preset scene of the virtual commodity provider.

[0312] An embodiment of the present invention provides a transaction data processing device, which is applied to a user terminal, and the user terminal is located outside a blockchain; the blockchain includes blockchain nodes; multiple smart contracts are deployed in the blockchain nodes; the device includes:

[0313] A first sending module, configured to send transaction metadata to a blockchain node;

[0314] Among them, transaction meta-information is generated outside the blockchain, including transaction data; the blockchain node that receives the transaction meta-information is used to call the evidence smart contract after receiving the transaction meta-information, and perform hash calculation on the transaction data to obtain the transaction hash of the transaction data when the transaction meta-information meets the triggering conditions of the evidence smart contract; the transaction hash uniquely corresponds to the transaction data; and after packaging the transaction meta-information and the transaction hash into a block and storing it locally, the block is broadcast to other nodes in the blockchain; other nodes in the blockchain are used to perform hash calculation on the transaction data included in the block after receiving the block to obtain a verification hash; and when the verification hash is the same as the transaction hash, the block is stored locally.

[0315] Optionally, the device further comprises:

[0316] A second sending module is configured to send key equity information to the blockchain node after sending the transaction meta-information to the blockchain node; the key equity information includes data to be verified; and the key equity information is generated outside the blockchain;

[0317] The fourth receiving module is used to receive the return result of the blockchain node;

[0318] The first display module is used to display the transaction hash in a first preset scenario when the returned result includes the transaction hash; the transaction hash is the transaction hash of the first target transaction data; the first target transaction data includes the data to be verified; the first target transaction data is determined when the blockchain node calls the equity verification smart contract after receiving the key equity information and when the key equity information meets the triggering conditions of the equity verification smart contract, and the data to be verified is queried in the transaction data.

[0319] Optionally, the device further comprises:

[0320] The second display module is used to display the error identifier in a second preset scenario when the returned result includes an error identifier; the error identifier is sent by the blockchain node when the data to be verified is not found in the transaction data.

[0321] The device of the embodiment of the present invention is a device that applies the above-mentioned transaction data processing method. Therefore, all embodiments of the above-mentioned transaction data processing method are applicable to the device and can achieve the same or similar beneficial effects.

[0322] The embodiment of the present invention further provides an electronic device, such as Figure 10 As shown, it includes a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002, and the memory 1003 communicate with each other through the communication bus 1004.

[0323] Memory 1003, used for storing computer programs;

[0324] The processor 1001 is configured to implement the steps of any of the above transaction data processing methods when executing the program stored in the memory 1003 .

[0325] The communication bus mentioned in the terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.

[0326] The communication interface is used for communication between the above terminal and other devices.

[0327] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.

[0328] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0329] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the transaction data processing method described in any one of the above embodiments is implemented.

[0330] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the transaction data processing method described in any one of the above embodiments.

[0331] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0332] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0333] Each embodiment in this specification is described in a related manner. Similar portions between the various embodiments can be referenced to each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system, device, electronic device, and computer storage medium embodiments are generally similar to the method embodiments, so their descriptions are relatively simple. For related portions, refer to the descriptions of the method embodiments.

[0334] The above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention are included in the scope of protection of the present invention.

Claims

1. A transaction data processing method, characterized in that: Applied to a blockchain node, wherein a plurality of smart contracts are deployed in the blockchain node; the method comprises: Receiving transaction meta-information; the transaction meta-information includes transaction data; the transaction meta-information is generated outside the blockchain and sent by a user terminal outside the blockchain to the blockchain node; When the transaction metadata meets the triggering conditions of the evidence storage smart contract, the evidence storage smart contract is called to perform hash calculation on the transaction data to obtain a transaction hash of the transaction data; the transaction hash uniquely corresponds to the transaction data; Packing the transaction metadata and the transaction hash into a block for local storage; Broadcasting the block to other nodes in the blockchain; after receiving the block, the other nodes are configured to perform hash calculation on the transaction data included in the block to obtain a verification hash, and if the verification hash is the same as the transaction hash, locally store the block; After broadcasting the block to other nodes in the blockchain, the method further includes: Receiving key equity information; the key equity information includes data to be verified; the key equity information is generated outside the blockchain and sent by a user terminal outside the blockchain to the blockchain node; When the key equity information meets the triggering conditions of the equity verification smart contract, the equity verification smart contract is called to query whether the data to be verified exists in the transaction data; In a case where the data to be verified exists in the transaction data, determining the transaction data including the data to be verified as the first target transaction data; Obtaining a transaction hash of the first target transaction data; The transaction hash is sent to the user terminal as a return result; the transaction hash is used to be displayed in a first preset scene on the user terminal.

2. The method according to claim 1, characterized in that After receiving the transaction meta information, the method further includes: If the transaction metadata meets the triggering conditions of the data legitimacy verification smart contract, the data legitimacy verification smart contract is called to determine whether the transaction data meets the legitimacy data conditions preset by the data legitimacy verification smart contract; When the transaction meta-information satisfies the triggering condition of the evidence storage smart contract, calling the evidence storage smart contract includes: When the transaction data meets the legitimacy data conditions preset by the data legitimacy verification smart contract and the transaction meta-information meets the triggering conditions of the evidence storage smart contract, the evidence storage smart contract is called.

3. The method according to claim 1, characterized in that After broadcasting the block to other nodes in the blockchain, the method further includes: When the transaction meta-information satisfies the triggering conditions of the profit-sharing accounting smart contract, the profit-sharing accounting smart contract is invoked to transfer the virtual commodity seller's assets to the virtual commodity provider according to the profit-sharing accounting rules preset in the profit-sharing accounting smart contract, thereby obtaining the virtual commodity seller's data and virtual commodity provider's data after the profit-sharing accounting; the virtual commodity seller's data includes the virtual commodity seller's assets; and the virtual commodity provider's data includes the virtual commodity provider's assets. Call the evidence storage smart contract to store the virtual goods seller data and virtual goods provider data after the profit sharing calculation.

4. The method according to claim 1, wherein The method further comprises: In the case that the data to be verified does not exist in the transaction data, an error identifier is sent to the user terminal as a return result; the error identifier is used to display a second preset scene on the user terminal.

5. The method according to claim 1, wherein After broadcasting the block to other nodes in the blockchain, the method further includes: Receiving query key information; the query key information includes the data to be queried; the query key information is generated outside the blockchain and sent to the blockchain node by the virtual goods provider; When the query key information meets the query smart contract triggering conditions, the query smart contract is called to query whether there is the data to be queried in the transaction data; In a case where the data to be queried exists in the transaction data, determining the transaction data including the data to be queried as the second target transaction data; Acquire transaction meta information including the second target transaction data and a transaction hash of the second target transaction data; The transaction meta information and the transaction hash are sent as a return result to the virtual commodity provider; the return result is used to be displayed in a third preset scene of the virtual commodity provider.

6. A transaction data processing method, characterized in that: Applied to a user terminal, the user terminal is located outside a blockchain; the blockchain includes a blockchain node; multiple smart contracts are deployed in the blockchain node; the method includes: Sending transaction metadata to the blockchain node; The transaction meta-information is generated outside the blockchain and includes transaction data. The blockchain node that receives the transaction meta-information is configured to, after receiving the transaction meta-information, call the evidence smart contract when the transaction meta-information satisfies a triggering condition of the evidence smart contract, perform a hash calculation on the transaction data to obtain a transaction hash of the transaction data. The transaction hash uniquely corresponds to the transaction data. The transaction meta-information and the transaction hash are packaged into a block and stored locally, and then the block is broadcast to other nodes in the blockchain. The other nodes in the blockchain are configured to, after receiving the block, perform a hash calculation on the transaction data included in the block to obtain a verification hash. If the verification hash is identical to the transaction hash, the block is stored locally. After sending the transaction meta-information to the blockchain node, the method further includes: Sending key equity information to the blockchain node; the key equity information includes data to be verified; the key equity information is generated outside the blockchain; Receive the return result of the blockchain node; When the return result includes a transaction hash, the transaction hash is displayed in a first preset scenario; the transaction hash is the transaction hash of the first target transaction data; the first target transaction data includes the data to be verified; the first target transaction data is determined when the blockchain node receives the key equity information and, when the key equity information meets the triggering condition of the equity verification smart contract, calls the equity verification smart contract and finds the data to be verified in the transaction data.

7. The method according to claim 6, characterized in that The method further comprises: When the returned result includes an error identifier, the error identifier is displayed in a second preset scenario; the error identifier is sent by the blockchain node when the data to be verified is not found in the transaction data.

8. A transaction data processing system, characterized in that: The system includes a blockchain node, a user terminal, and a virtual goods provider; the user terminal is located outside the blockchain, and multiple smart contracts are deployed in the blockchain node; The user terminal is configured to send transaction meta-information to the blockchain node; the transaction meta-information is generated outside the blockchain and includes transaction data; The blockchain node is configured to receive transaction meta-information sent by the user terminal; if the transaction meta-information satisfies a triggering condition of the evidence storage smart contract, invoke the evidence storage smart contract, perform hash calculation on the transaction data, and obtain a transaction hash of the transaction data; the transaction hash uniquely corresponds to the transaction data; package the transaction meta-information and the transaction hash into a block, and store the block locally; and broadcast the block to other nodes in the blockchain; so that after receiving the block, the other nodes in the blockchain perform hash calculation on the transaction data included in the block to obtain a verification hash, and if the verification hash is identical to the transaction hash, store the block locally; The virtual commodity provider is used to send query key information to the blockchain node; The query key information is generated outside the blockchain, including the data to be queried; a return result sent by the blockchain node is received; and when the return result includes transaction meta information and a transaction hash, the return result is displayed in a third preset scenario; the transaction meta information includes second target transaction data; the transaction hash is the transaction hash of the second target transaction data; and the second target transaction data is the transaction data including the data to be queried; The blockchain node is further configured to receive query key information sent by the virtual commodity provider; if the query key information satisfies a query smart contract trigger condition, call the query smart contract to query whether the transaction data contains the data to be queried; and if the data to be queried exists in the transaction data, determine the transaction data including the data to be queried as the second target transaction data; obtain transaction meta information including the second target transaction data and a transaction hash of the second target transaction data; and send the transaction meta information and the transaction hash as a return result to the virtual commodity provider; The user terminal is further configured to send key equity information to the blockchain node after sending the transaction meta-information to the blockchain node; the key equity information includes data to be verified; and the key equity information is generated outside the blockchain; The blockchain node is further configured to receive the key equity information; and when the key equity information satisfies the triggering condition of the equity verification smart contract, invoke the equity verification smart contract to query whether the data to be verified exists in the transaction data; If the data to be verified exists in the transaction data, determining the transaction data including the data to be verified as first target transaction data; obtaining a transaction hash of the first target transaction data; sending the transaction hash as a return result to the user terminal; and using the transaction hash to display in a first preset scene on the user terminal; The user terminal is further used to receive a return result from the blockchain node; when the return result includes a transaction hash, the transaction hash is displayed in a first preset scenario; and the first target transaction data includes the data to be verified.

9. A transaction data processing device, characterized in that: Applied to a node in a blockchain, wherein multiple smart contracts are deployed in the blockchain node; the device comprises: a first receiving module, configured to receive transaction meta-information; the transaction meta-information including transaction data; the transaction meta-information being generated outside the blockchain and sent by a user terminal outside the blockchain to the blockchain node; a calculation module, configured to call the evidence storage smart contract and perform hash calculation on the transaction data to obtain a transaction hash of the transaction data when the transaction metadata satisfies a triggering condition of the evidence storage smart contract; the transaction hash uniquely corresponds to the transaction data; A first storage module, configured to package the transaction metadata and the transaction hash into a block for local storage; a broadcast module, configured to broadcast the block to other nodes in the blockchain; the other nodes, upon receiving the block, are configured to perform a hash calculation on the transaction data included in the block to obtain a verification hash, and if the verification hash is identical to the transaction hash, locally store the block; The device further comprises: a second receiving module configured to receive key equity information after broadcasting the block to other nodes in the blockchain; the key equity information including data to be verified; the key equity information being generated outside the blockchain and sent to the blockchain node by a user terminal outside the blockchain; A first query module is configured to call the equity verification smart contract to query whether the data to be verified exists in the transaction data when the key equity information satisfies the triggering conditions of the equity verification smart contract; a first determining module, configured to, if the data to be verified exists in the transaction data, determine the transaction data including the data to be verified as first target transaction data; A first acquisition module, configured to acquire a transaction hash of the first target transaction data; The first return module is configured to send the transaction hash as a return result to the user terminal; the transaction hash is used to be displayed in a first preset scene on the user terminal.

10. A transaction data processing device, characterized in that: Applied to a user terminal, the user terminal is located outside a blockchain; the blockchain includes a blockchain node; multiple smart contracts are deployed in the blockchain node; the device includes: A first sending module, configured to send transaction metadata to the blockchain node; The transaction meta-information is generated outside the blockchain and includes transaction data. The blockchain node that receives the transaction meta-information is configured to, after receiving the transaction meta-information, call the evidence smart contract when the transaction meta-information satisfies a triggering condition of the evidence smart contract, perform a hash calculation on the transaction data to obtain a transaction hash of the transaction data. The transaction hash uniquely corresponds to the transaction data. The transaction meta-information and the transaction hash are packaged into a block and stored locally, and then the block is broadcast to other nodes in the blockchain. The other nodes in the blockchain are configured to, after receiving the block, perform a hash calculation on the transaction data included in the block to obtain a verification hash. If the verification hash is identical to the transaction hash, the block is stored locally. The device further comprises: A second sending module is configured to send key equity information to the blockchain node after sending the transaction meta-information to the blockchain node; the key equity information includes data to be verified; and the key equity information is generated outside the blockchain; A fourth receiving module, configured to receive a return result from the blockchain node; The first display module is used to display the transaction hash in a first preset scenario when the return result includes the transaction hash; the transaction hash is the transaction hash of first target transaction data; the first target transaction data includes the data to be verified; the first target transaction data is determined when the blockchain node calls the equity verification smart contract after receiving the key equity information and when the key equity information meets the triggering condition of the equity verification smart contract, and the data to be verified is found in the transaction data.

11. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory for storing computer programs; A processor, configured to implement the method steps described in any one of claims 1 to 7 when executing a program stored in a memory.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Data accounting method, device and storage medium

    CN109493203A

  • House information storage and application method and device based on block chain

    CN110163753A

  • Transaction verification method and device for block chain system and hardware equipment

    CN111524009A