Data processing method, device and storage medium based on blockchain
Verifying user ownership through blockchain technology solves the problem of low reliability caused by forged bills during the transfer of items, and achieves higher reliability and security of the transfer process.
Patent Information
- Application Number
- CN201911128300.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-18
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2040-08-23
AI Technical Summary
During the transfer process of items, since the bills may be forged, the reliability of the transfer process is low and the risk is high.
Using a data processing method based on the blockchain, by receiving the transfer request submitted by the user, querying the associated information in the blockchain, and verifying that the user holds the item, the bill is transferred from the transferor's account to the recipient's account, improving transfer Process reliability.
Verifying user ownership through blockchain technology reduces the risk of bill forgery and improves the reliability and security of the item transfer process.
Smart Images

Figure CN110910136B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a blockchain-based data processing method, device and storage medium. Background Art
[0002] With the development of Internet technology, some traditional bills in the bill business have gradually changed from paper bills to electronic bills. The emergence of electronic bills makes the process of transferring items more convenient.
[0003] At present, during the transfer of an item, the transferor can present an electronic receipt to the recipient to prove the transferor's ownership of the item. After presenting the electronic receipt, the recipient can trust the transferor and obtain the item and the electronic receipt. However, in this process, due to many factors such as the possibility of the receipt being forged, the risk of the item transfer process is high, which in turn leads to low reliability of the item transfer process. Summary of the invention
[0004] The present invention provides a data processing method, device and storage medium based on blockchain, which can improve the reliability of the item transfer process based on blockchain technology.
[0005] On the one hand, an embodiment of the present invention provides a data processing method based on blockchain, comprising:
[0006] receiving a transfer request for a target item submitted by a first user through a terminal device, wherein the transfer request carries the ticket information of the first ticket and the identification information of a second user who receives the target item;
[0007] Querying the blockchain for associated information of the target item, wherein the associated information includes bill information of the second bill;
[0008] If it is determined that the first user holds the target item based on the ticket information of the first ticket and the association information, the second ticket is transferred from the account of the first user to the account of the second user based on the identification information of the second user.
[0009] In another aspect, an embodiment of the present invention provides a data processing device based on blockchain, comprising:
[0010] A communication unit, configured to receive a transfer request for a target item submitted by a first user through a terminal device, wherein the transfer request carries the bill information of the first bill and the identification information of a second user who receives the target item;
[0011] A query unit, configured to query the associated information of the target item in the blockchain, wherein the associated information includes the bill information of the second bill;
[0012] A processing unit is configured to transfer the second ticket from the account of the first user to the account of the second user according to the identification information of the second user if it is determined that the first user holds the target item according to the ticket information of the first ticket and the association information.
[0013] On the other hand, an embodiment of the present invention provides an electronic device, including: a processor, an input device, an output device and a memory; the memory is used to store program instructions; the processor calls the program instructions to implement the above-mentioned blockchain data processing method.
[0014] On the other hand, an embodiment of the present invention provides a computer storage medium, in which program instructions are stored. When the program instructions are executed, they are used to implement the above-mentioned blockchain-based data processing method.
[0015] In summary, the electronic device can receive a transfer request for a target item submitted by a first user through a terminal device, the transfer request carrying the ticket information of the first ticket and the identification information of the second user who receives the target item; the electronic device queries the associated information of the target item in the blockchain, the associated information includes the ticket information of the second ticket, and when it is determined that the first user holds the target item based on the ticket information of the first ticket and the associated information, the second ticket is transferred from the account of the first user to the account of the second user based on the identification information of the second user, thereby making the item transfer process more reliable. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1A It is a structural diagram of a blockchain-based data processing system provided by an embodiment of the present invention;
[0018] Figure 1B is a schematic diagram of a blockchain provided by an embodiment of the present invention;
[0019] Figure 1C is a schematic diagram of a block generation process provided by an embodiment of the present invention;
[0020] Figure 1D is a schematic diagram of an item transfer interface provided by an embodiment of the present invention;
[0021] Figure 2 It is a flowchart of a data processing method based on blockchain provided by an embodiment of the present invention;
[0022] Figure 3 It is a flowchart of another data processing method based on blockchain provided by an embodiment of the present invention;
[0023] Figure 4 It is a structural schematic diagram of a blockchain-based data processing device provided by an embodiment of the present invention;
[0024] Figure 5 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0026] See also Figure 1A The blockchain-based data processing system shown may include a blockchain network 100 and a terminal device 102. Among them:
[0027] The blockchain network 100 refers to a network for sharing data between nodes. The blockchain network may include multiple nodes 101, and the multiple nodes 101 may refer to various clients in the blockchain network. Each node 101 can receive input information during normal operation and maintain the shared data in the blockchain network based on the received input information. In order to ensure the intercommunication of information in the blockchain network, there may be an information connection between each node in the blockchain network, and information can be transmitted between nodes through the above information connection. For example, when any node in the blockchain network receives input information, other nodes in the blockchain network obtain the input information according to the consensus algorithm, and store the input information as data in the shared data, so that the data stored on all nodes in the blockchain network are consistent.
[0028] The terminal device 102 can access the blockchain network and communicate with nodes in the blockchain network, for example, initiate a transfer request for a target item to a node, etc. The terminal device 102 can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., which is not limited in the embodiment of the present invention. It should be noted that Figure 1A The number of nodes shown in the figure is only for illustration, and any number of nodes may be deployed according to actual needs.
[0029] Each node in the blockchain network has a corresponding node identifier, and each node in the blockchain network can store the node identifiers of other nodes in the blockchain network, so that the generated blocks can be broadcast to other nodes in the blockchain network according to the node identifiers of other nodes. Each node can maintain a node identifier list as shown in the following table, and store the node name and node identifier in the node identifier list accordingly. Among them, the node identifier can be an IP (Internet Protocol, a protocol for interconnecting networks) address and any other information that can be used to identify the node. Table 1 only uses the IP address as an example for illustration.
[0030]
[0031] Each node in the blockchain network stores the same blockchain. The blockchain consists of multiple blocks, see Figure 1B The blockchain consists of multiple blocks. The genesis block includes a block header and a block body. The block header stores the input information characteristic value, version number, timestamp and difficulty value, and the block body stores the input information; the next block of the genesis block takes the genesis block as the parent block, and the next block also includes a block header and a block body. The block header stores the input information characteristic value of the current block, the block header characteristic value, version number, timestamp and difficulty value of the parent block, and so on, so that the block data stored in each block in the blockchain is associated with the block data stored in the parent block, ensuring the security of the input information in the block.
[0032] When generating each block in the blockchain, see Figure 1C When the node where the blockchain is located receives the input information, it verifies the input information. After the verification is completed, the input information is stored in the memory pool and the hash tree used to record the input information is updated. After that, the update timestamp is updated to the time when the input information is received, and different random numbers are tried to calculate the eigenvalue multiple times so that the calculated eigenvalue can satisfy the following formula:
[0033] SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x)) <TARGET
[0034] Among them, SHA256 is the eigenvalue algorithm used to calculate the eigenvalue; version (version number) is the version information of the relevant block protocol in the blockchain; prev_hash is the block header eigenvalue of the parent block of the current block; merkle_root is the eigenvalue of the input information; ntime is the update time of the update timestamp; nbits is the current difficulty, which is a fixed value within a period of time and is determined again after exceeding the fixed time period; x is a random number; TARGET is the eigenvalue threshold, which can be determined based on nbits.
[0035] In this way, when the random number that satisfies the above formula is calculated, the information can be stored accordingly, the block header and block body can be generated, and the current block can be obtained. Subsequently, the node where the blockchain is located sends the newly generated block to other nodes in the blockchain network according to the node identification of other nodes in the blockchain network. Other nodes verify the newly generated block and add the newly generated block to the blockchain stored in them after the verification is completed.
[0036] Among them, smart contracts can be run on the nodes of the blockchain network. Smart contracts are code implementations that are executed when certain conditions are met. Developers can define the contract logic through programming languages and publish it to the blockchain (smart contract registration). According to the logic of the contract terms, they call keys or other events to trigger execution and complete the contract logic. At the same time, it also provides the function of upgrading and canceling smart contracts.
[0037] In some feasible implementations, a node 101 in the blockchain network may receive a transfer request for a target item submitted by a first user through a terminal device 102, the transfer request carrying the bill information of the first bill and the identification information of the second user who receives the target item; the node 101 may query the association information of the target item in the blockchain, the association information including the bill information of the second bill; if it is determined that the first user holds the target item based on the bill information of the first bill and the association information, the node 101 may transfer the second bill from the account of the first user to the account of the second user based on the identification information of the second user. By adopting this process, the transfer process of items can be made more reliable based on the blockchain.
[0038] In an application scenario, a first user can open the terminal device 102 Figure 1D The item transfer interface shown in the figure can be used by the first user to input the bill information of the first bill and the identification information of the second user who receives the target item in the item transfer interface. Figure 1DThe item transfer interface shown is only exemplary, and the item transfer interface can also be other item transfer interfaces, which are not limited in the embodiment of the present invention. After the first user inputs the bill information of the first bill and the identification information of the second user who receives the target item, he can submit a transfer request for the target item to the blockchain node 101 by clicking the confirmation button. The terminal device 102 can respond to the first user's click operation on the confirmation button, obtain the bill information of the first bill and the identification information of the second user who receives the target item, and generate a transfer request for the target item, which carries the bill information of the first bill and the identification information of the second user who receives the target item. The terminal device 102 can submit a transfer request for the target item to the node 101, and the node 101 can receive the transfer request for the target item submitted by the terminal device 102, and query the association information of the target item in the blockchain, and the association information includes the bill information of the second bill; if it is determined that the first user holds the target item according to the bill information of the first bill and the association information, the node 101 transfers the second bill from the account of the first user to the account of the second user according to the identification information of the second user.
[0039] In some optional implementations, the data processing system may include not only the blockchain network 100 and the terminal device 102, but also a second-hand goods trading platform (not shown). The second-hand goods trading platform may receive a transfer request for a target item submitted by a first user through the terminal device 102, the transfer request carrying the bill information of the first bill and the identification information of the second user who receives the target item; the second-hand goods trading platform may query the association information of the target item in the blockchain, the association information including the bill information of the second bill; if it is determined that the first user holds the target item based on the bill information of the first bill and the association information, the second-hand goods trading platform may request the node 101 to transfer the second bill from the account of the first user to the account of the second user based on the identification information of the second user.
[0040] In some optional implementations, the data processing system may further include a bill management server, such as a tax bureau server. Node 101 may transfer the second bill from the first user's account to the second user's account through the bill management server according to the identification information of the second user.
[0041] In some optional implementations, the node 101 may modify the owner information of the second ticket from the first user to the second user. Alternatively, the node 101 may modify the owner information of the second ticket from the first user to the second user through the ticket management server.
[0042] Based on the above description, the embodiment of the present invention provides a data processing method based on blockchain, which can be applied to electronic devices, and the electronic devices can be nodes in the blockchain network or second-hand goods trading platform. Figure 2 , the method may specifically include the following steps:
[0043] S201. Receive a transfer request for a target item submitted by a first user through a terminal device, wherein the transfer request carries bill information of a first bill and identification information of a second user who receives the target item.
[0044] In an embodiment of the present invention, a first user may submit a transfer request for a target item to an electronic device through a terminal device, and the electronic device may receive a transfer request for a target item submitted by the first user through the terminal device. The first user refers to a user who wants to transfer a target item. The target item includes, but is not limited to, items that can be transferred, such as daily necessities, electronic products, or real estate. The bill information may include a bill identifier, such as a bill number. In one embodiment, the bill information may also include information about the target item, and the information about the target item may include at least one of the following: identification information of the target item (information that can be used to uniquely identify the target item, such as the name of the item, the item code, or the item anti-counterfeiting number), information about the merchant corresponding to the target item, the transaction location of the target item, and the transaction time of the target item. The identification information of the second user includes, but is not limited to, the name, ID number, account name, account number, and other information of the second user that is used to uniquely identify the second user. In one embodiment, the identification information of the second user can be used to query the account of the second user.
[0045] S202: Query the associated information of the target item in the blockchain, where the associated information includes bill information of the second bill.
[0046] In order to verify whether the first user holds the target item, the electronic device can query the associated information of the target item in the blockchain, and the associated information may include the ticket information of the second ticket.
[0047] In one embodiment, the electronic device can query the associated information of the target item based on the ticket information of the first ticket.
[0048] In one embodiment, the transfer request may also carry the identification information of the first user, and the electronic device may query the associated information of the target item corresponding to the identification information of the first user based on the correspondence between the identification information of the user and the associated information of the item.
[0049] S203: If it is determined that the first user holds the target item based on the ticket information of the first ticket and the associated information, transfer the second ticket from the account of the first user to the account of the second user based on the identification information of the second user.
[0050] In an embodiment of the present invention, the electronic device can determine whether the first user holds the target item based on the ticket information of the first ticket and the associated information, and when it is determined that the first user holds the target item based on the ticket information of the first ticket and the associated information, the second ticket is transferred from the account of the first user to the account of the second user based on the identification information of the second user.
[0051] In one embodiment, the electronic device determines whether the first user holds the target item based on the ticket information of the first ticket and the associated information by comparing the ticket information of the first ticket with the ticket information of the second ticket to see if they match, and if so, determining that the first user holds the target item. This matching method can improve the efficiency of the process of verifying whether the first user holds the target item.
[0052] In one embodiment, the process of comparing whether the ticket information of the first ticket matches the ticket information of the second ticket by the electronic device may be that the electronic device compares whether the ticket information of the first ticket is consistent with the ticket information of the second ticket, and if they are consistent, they match; or, the electronic device obtains the summary information of the ticket information of the first ticket and the summary information of the ticket information of the second ticket, and compares whether the summary information of the ticket information of the first ticket is consistent with the summary information of the ticket information of the second ticket, and if they are consistent, they match. The summary information of the ticket information of the first ticket may be obtained by performing a digest calculation on the ticket information of the first ticket through a message digest algorithm. The summary information of the ticket information of the second ticket may also be obtained by performing a digest calculation on the ticket information of the second ticket through a message digest algorithm. The message digest algorithm mentioned above includes, but is not limited to, any of the following: MD2, MD4, MD5, SHA-1, SHA-2 (specifically SHA-224, SHA-256, SHA-384 or SHA-512).
[0053] In one embodiment, in addition to verifying whether the first user holds the target item by comparing whether the ticket information of the first ticket matches the ticket information of the second ticket, it is also possible to verify whether the first user holds the target item by combining the identification information of the first user with the identification information of the target user. Specifically, the electronic device can compare whether the ticket information of the first ticket matches the ticket information of the second ticket, and whether the identification information of the first user matches the identification information of the target user. If the ticket information of the first ticket matches the matching information of the second ticket, and the identification information of the first user matches the identification information of the target user, it is determined that the first user holds the target item. Among them, the above-mentioned method of comparing whether the ticket information of the first ticket matches the ticket information of the second ticket can be referred to the two methods mentioned above, and the embodiment of the present invention will not be repeated here. The target user refers to the user who currently holds the target item. The identification information of the target user includes but is not limited to the name, ID number, account number or account name of the target user, etc., which is used to uniquely identify the target user. The electronic device compares whether the identification information of the first user matches the identification information of the target user, and if they are consistent, they match. Verification is performed in combination with the document information of the document and the identification information of the user, so that the process of verifying whether the first user holds the target item can be more reliable.
[0054] visible, Figure 2 In the illustrated embodiment, the electronic device may receive a transfer request for a target item submitted by a first user through a terminal device, the transfer request carrying the ticket information of a first ticket and identification information of a second user who receives the target item; the electronic device queries the blockchain for associated information of the target item, the associated information including the ticket information of a second ticket; if it is determined based on the ticket information of the first ticket and the associated information that the first user holds the target item, the electronic device transfers the second ticket from the account of the first user to the account of the second user based on the identification information of the second user, thereby making the item transfer process more reliable.
[0055] In one embodiment, the present invention also provides another data processing method based on blockchain, which can be applied to electronic devices, and the electronic devices can be nodes in the blockchain network or second-hand goods trading platform. Figure 2 Example, Figure 3 In the embodiment, when it is determined that the first user holds the target item, the reimbursement status of the second ticket is also introduced to ensure the reliability of the item transfer process. Figure 3 , the method may specifically include the following steps:
[0056] S301. Receive a transfer request for a target item submitted by a first user through a terminal device, wherein the transfer request carries bill information of a first bill and identification information of a second user who receives the target item.
[0057] S302: Query the associated information of the target item in the blockchain, where the associated information includes bill information of the second bill.
[0058] Among them, steps S301-S302 can be found in Figure 2 The steps S201-S202 in the embodiment are not described in detail in the embodiment of the present invention.
[0059] S303: If it is determined that the first user holds the target item based on the ticket information of the first ticket and the associated information, query the reimbursement status of the second ticket from the blockchain.
[0060] The blockchain may record the reimbursement status of each bill in at least one bill. The at least one bill includes a second bill. The reimbursement status may be divided into reimbursed and unreimbursed according to the actual reimbursement status of the bill.
[0061] In one embodiment, the electronic device may query the reimbursement status of the second bill from the blockchain based on the bill information of the second bill.
[0062] S304: If the reimbursement status of the second bill is reimbursed, a signature confirmation request is sent to the enterprise server, where the signature confirmation request carries the bill information of the second bill.
[0063] S305: When signature confirmation information of the ticket information of the second ticket is received from the enterprise server, the second ticket is transferred from the account of the first user to the account of the second user according to the identification information of the second user.
[0064] If the reimbursement status of the second bill is reimbursed, it means that there may be transfer risks in this transfer (such as the possibility of buying and selling items of other people or enterprises). In order to reduce the transfer risk, a signature confirmation request can be sent to the enterprise server, and the signature confirmation request carries the bill information of the second bill. The enterprise server can sign and confirm the bill information of the second bill to obtain the signature confirmation information of the second bill, and send the signature confirmation information to the electronic device. When the electronic device receives the signature confirmation information of the bill information of the second bill returned by the enterprise server, it can transfer the second bill from the account of the first user to the account of the second user according to the identification information of the second user.
[0065] In one embodiment, the electronic device can also verify the signature confirmation information of the second bill when receiving the signature confirmation information of the second bill returned by the enterprise server; after the verification is passed, the electronic device transfers the second bill from the account of the first user to the account of the second user according to the identification information of the second user. By verifying the signature confirmation information, the situation of forged signature confirmation information can be accurately identified, thereby reducing the loss of the relevant enterprise. In one embodiment, the signature confirmation information can include a digital signature.
[0066] In one embodiment, if the reimbursement status of the second bill is unreimbursed, the electronic device may transfer the second bill from the account of the first user to the account of the second user according to the identification information of the second user.
[0067] In one embodiment, the items corresponding to the second bill can be divided into the following two situations: First, the items corresponding to the second bill only include the target item; Second, the items corresponding to the second bill include the target item and other items except the target item.
[0068] For the second case, the electronic device can also split the second note in the process of transferring the second note from the account of the first user to the account of the second user according to the identification information of the second user, so as to obtain the third note corresponding to the target item. Specifically, the electronic device can transfer the second note from the account of the first user to the account of the second user according to the identification information of the second user in such a way that if the items corresponding to the second note include other items besides the target item, the electronic device can split the second note into the third note corresponding to the target item and the notes corresponding to the other items, and associate the third note and the notes corresponding to the other items to the account of the first user; the electronic device transfers the third note from the account of the first user to the account of the second user according to the identification information of the second user. The third note can be used as a certificate that the second user holds the target item.
[0069] For example, the first user is user A, and the second user is user B. If the items corresponding to the second note include the target item, item 1, and item 2, the electronic device can split the second note into a third note corresponding to the target item, and notes corresponding to item 1 and item 2, and can associate the third note corresponding to the target item, and the notes corresponding to item 1 and item 2 to the account of user A, and the electronic device can transfer the third note from the account of user A to the account of user B.
[0070] In one embodiment, when there is one other item, the bill corresponding to the other item may also be one. When there are multiple other items, the bill corresponding to the other item may be one. In one embodiment, when there are multiple other items, the bill corresponding to the other item may be the bill corresponding to each of the multiple other items.
[0071] In one embodiment, the electronic device may also split the second bill before receiving the transfer request for the target item submitted by the first user through the terminal device, and obtain the bill corresponding to each of the multiple items corresponding to the second bill. Specifically, the electronic device may receive a bill splitting request submitted by the first user through the terminal device before receiving the transfer request for the target item submitted by the first user through the terminal device, and the bill splitting request carries the bill information of the second bill; the electronic device queries the blockchain for multiple items corresponding to the second bill according to the bill information of the second bill, and the multiple items include the target item, and splits the second bill into bills corresponding to each of the multiple items, and associates the split bills to the account of the first user, wherein the bill corresponding to the target item is the third bill. The embodiment of the present invention performs bill splitting before the transfer, which can facilitate the transfer management of multiple items corresponding to the second bill.
[0072] For example, the first user is user A and the second user is user B. Before the electronic device receives the transfer request for the target item submitted by user A through the terminal device, user A can submit a bill splitting request to the electronic device through the terminal device, and the bill splitting request can carry the bill information of the second bill. The electronic device can receive the bill splitting request submitted by user A through the terminal device, and when it is found out that the items corresponding to the second bill in the blockchain include the target item, item 1, and item 2 according to the bill information of the second bill, the electronic device splits the second bill into a third bill corresponding to the target item, and bills corresponding to item 1 and item 2, and can associate the third bill corresponding to the target item, and bills corresponding to item 1 and item 2 to the account of user A.
[0073] In one embodiment, if the electronic device has split the second bill before receiving the transfer request for the target item submitted by the first user through the terminal device, the electronic device can also find the bill information of the third bill corresponding to the target item based on the bill information of the second bill, so that the electronic device can determine whether the first user holds the target item based on the bill information of the first bill and the bill information of the third bill. In one embodiment, if it is determined that the first user holds the target item, the electronic device can transfer the third bill from the account of the first user to the account of the second user based on the identification information of the second user.
[0074] In one embodiment, if the second bill has been split before receiving the transfer request for the target item submitted by the first user through the terminal device, the queried association information may also include the bill information of the third bill corresponding to the target item, so that the electronic device can determine whether the first user holds the target item based on the bill information of the first bill and the bill information of the third bill included in the association information. In one embodiment, if it is determined that the first user holds the target item, the electronic device can transfer the third bill from the account of the first user to the account of the second user based on the identification information of the second user.
[0075] In one embodiment, after the second bill is split, the electronic device may add a cancellation mark to the second bill in the blockchain, and the cancellation mark is used to indicate that the second bill has been cancelled. By adding the cancellation mark, the occurrence of duplicate invoices can be effectively avoided.
[0076] In one embodiment, the querying party may submit a transfer record query request for the target item to the electronic device. When the electronic device receives the transfer record query request for the target item submitted by the querying party, it obtains the transfer path of the second bill corresponding to the target item, and counts the number of transfers of the target item according to the transfer path, and generates a transfer record including the number of transfers, thereby returning the transfer record to the querying party. The querying party may correspond to the user who queries the transfer record of the target item. The transfer path may include information of each user who participates in the transfer process. Through the transfer record query, the process of the third bill corresponding to the target item can be effectively traced, and the source of the target item can be traced.
[0077] visible, Figure 3 In the illustrated embodiment, the electronic device can determine the reimbursement status of the second bill when it is determined that the first user holds the target item based on the bill information of the first bill and the associated information, and send signature confirmation information to the relevant enterprise server when the reimbursement status is reimbursed; the electronic device can transfer the second bill from the account of the first user to the account of the second user based on the identification information of the second user when it receives the signature confirmation information of the bill information of the second bill returned by the enterprise server, thereby reducing the risk of illegal transfer and making the transfer process of the target item more reliable.
[0078] Based on the description of the above method embodiment, in one embodiment, the present invention also provides a method as follows: Figure 4 The structural diagram of the data processing device based on blockchain is shown in FIG. The data processing device can be applied to the electronic devices mentioned above. Figure 4 As shown, the data processing device in the embodiment of the present invention may include:
[0079] The communication unit 401 is used to receive a transfer request for a target item submitted by a first user through a terminal device, wherein the transfer request carries the ticket information of the first ticket and the identification information of a second user who receives the target item.
[0080] The query unit 402 is used to query the associated information of the target item in the blockchain, where the associated information includes the bill information of the second bill.
[0081] The processing unit 403 is configured to transfer the second ticket from the account of the first user to the account of the second user according to the identification information of the second user if it is determined that the first user holds the target item according to the ticket information of the first ticket and the association information.
[0082] In some optional embodiments, the processing unit 403 is further used to compare whether the ticket information of the first ticket matches the ticket information of the second ticket before transferring the second ticket from the account of the first user to the account of the second user according to the identification information of the second user, if it is determined that the first user holds the target item based on the ticket information of the first ticket and the associated information; if they match, it is determined that the first user holds the target item.
[0083] In some optional implementations, the transfer request also carries the identification information of the first user, and the association information also includes the identification information of the target user. The processing unit 403 is further configured to compare whether the ticket information of the first ticket matches the ticket information of the second ticket, and whether the identification information of the first user matches the identification information of the target user before transferring the second ticket from the account of the first user to the account of the second user according to the identification information of the second user, if it is determined that the first user holds the target item based on the ticket information of the first ticket and the association information; if the ticket information of the first ticket matches the ticket information of the second ticket, and the identification information of the first user matches the identification information of the target user, then it is determined that the first user holds the target item.
[0084] In some optional embodiments, the processing unit 403 transfers the second bill from the account of the first user to the account of the second user according to the identification information of the second user. Specifically, when it is determined that the first user holds the target item, the reimbursement status of the second bill is queried from the blockchain through the query unit 402; if the reimbursement status of the second bill is reimbursed, a signature confirmation request is sent to the enterprise server through the communication unit 401, and the signature confirmation request carries the bill information of the second bill; when the signature confirmation information of the bill information of the second bill returned by the enterprise server is received through the communication unit 401, the second bill is transferred from the account of the first user to the account of the second user according to the identification information of the second user.
[0085] In some optional embodiments, the processing unit 403 transfers the second note from the account of the first user to the account of the second user according to the identification information of the second user. Specifically, if the items corresponding to the second note include items other than the target item, the second note is split into a third note corresponding to the target item and notes corresponding to the other items, and the third note and the notes corresponding to the other items are associated with the account of the first user; the third note is transferred from the account of the first user to the account of the second user according to the identification information of the second user.
[0086] In some optional embodiments, the processing unit 403 is also used to receive a bill splitting request submitted by the first user through the terminal device through the communication unit 401 before receiving a transfer request for the target item submitted by the first user through the terminal device through the communication unit 401, and the bill splitting request carries the bill information of the second bill; query the blockchain for multiple items corresponding to the second bill according to the bill information of the second bill, and the multiple items include the target item; split the second bill into bills corresponding to each of the multiple items, and associate the split bills to the account of the first user, wherein the bill corresponding to the target item is a third bill.
[0087] In some optional implementations, the processing unit 403 is further used to add a cancellation mark to the second bill in the blockchain, and the cancellation mark is used to indicate that the second bill has been cancelled.
[0088] In some optional embodiments, the processing unit 403 is further used to obtain the transfer path of the second bill corresponding to the target item when receiving a transfer record query request for the target item submitted by the querying party through the communication unit 401; count the number of transfers of the target item according to the transfer path, and generate a transfer record including the number of transfers; and return the transfer record to the querying party through the communication unit 401.
[0089] visible, Figure 4 In the illustrated embodiment, the data processing device may receive a transfer request for a target item submitted by a first user through a terminal device, the transfer request carrying the ticket information of a first ticket and identification information of a second user who receives the target item; the data processing device queries the associated information of the target item in the blockchain, the associated information including the ticket information of a second ticket; if it is determined based on the ticket information of the first ticket and the associated information that the first user holds the target item, the data processing device transfers the second ticket from the account of the first user to the account of the second user based on the identification information of the second user, thereby making the item transfer process more reliable.
[0090] See also Figure 5 , is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 5 The electronic device in the embodiment shown may include: one or more processors 501; one or more input devices 502, one or more output devices 503 and a memory 504. The processor 501, the input device 502, the output device 503 and the memory 504 are connected via a bus or other means. The memory 504 is used to store a computer program, the computer program includes program instructions, and the processor 501 is used to execute the program instructions stored in the memory 504 to implement the various methods involved above.
[0091] The memory 504 may include a volatile memory, such as a random-access memory (RAM); the memory 504 may also include a non-volatile memory, such as a flash memory, a solid-state drive (SSD), etc.; the memory 504 may also include a combination of the above-mentioned types of memory.
[0092] In one embodiment, the processor 501 may be a central processing unit (CPU), or other general-purpose processors, i.e., a microprocessor or any conventional processor. The memory 504 may include a read-only memory and a random access memory. Therefore, the processor 501 and the memory 504 are not limited here.
[0093] In one embodiment, the processor 501 calls the program instructions stored in the memory 504 to receive a transfer request for a target item submitted by a first user through a terminal device through an input device 502, wherein the transfer request carries the ticket information of a first ticket and the identification information of a second user who receives the target item; queries the associated information of the target item in the blockchain, wherein the associated information includes the ticket information of a second ticket; if it is determined that the first user holds the target item based on the ticket information of the first ticket and the associated information, then transfers the second ticket from the account of the first user to the account of the second user based on the identification information of the second user.
[0094] In one embodiment, the processor 501 calls the program instructions stored in the memory 504, and is also used to compare whether the ticket information of the first ticket matches the ticket information of the second ticket before transferring the second ticket from the account of the first user to the account of the second user according to the identification information of the second user, if it is determined that the first user holds the target item based on the ticket information of the first ticket and the associated information; if they match, it is determined that the first user holds the target item.
[0095] In one embodiment, the transfer request also carries identification information of the first user, and the association information also includes identification information of the target user.
[0096] In one embodiment, the processor 501 calls the program instructions stored in the memory 504, and is also used to compare whether the ticket information of the first ticket matches the ticket information of the second ticket, and whether the identification information of the first user matches the identification information of the target user before transferring the second ticket from the account of the first user to the account of the second user according to the identification information of the second user, if it is determined that the first user holds the target item based on the ticket information of the first ticket and the associated information; if the ticket information of the first ticket matches the ticket information of the second ticket, and the identification information of the first user matches the identification information of the target user, it is determined that the first user holds the target item.
[0097] In one embodiment, when the second bill is transferred from the account of the first user to the account of the second user according to the identification information of the second user, the processor 501 calls the program instructions stored in the memory 504, specifically for querying the reimbursement status of the second bill from the blockchain when it is determined that the first user holds the target item; if the reimbursement status of the second bill is reimbursed, a signature confirmation request is sent to the enterprise server through the output device 503, and the signature confirmation request carries the bill information of the second bill; when the signature confirmation information of the bill information of the second bill returned by the enterprise server is received through the input device 502, the second bill is transferred from the account of the first user to the account of the second user according to the identification information of the second user.
[0098] In one embodiment, when the second note is transferred from the account of the first user to the account of the second user according to the identification information of the second user, the processor 501 calls the program instructions stored in the memory 504, specifically for splitting the second note into a third note corresponding to the target item and notes corresponding to the other items if the items corresponding to the second note include items other than the target item, and associating the third note and the notes corresponding to the other items to the account of the first user; transferring the third note from the account of the first user to the account of the second user according to the identification information of the second user.
[0099] In one embodiment, the processor 501 calls the program instructions stored in the memory 504, and is also used to receive a bill splitting request submitted by the first user through the terminal device through the input device 502 before receiving a transfer request for the target item submitted by the first user through the terminal device through the input device 502, and the bill splitting request carries the bill information of the second bill; query the blockchain for multiple items corresponding to the second bill according to the bill information of the second bill, and the multiple items include the target item; split the second bill into bills corresponding to each of the multiple items, and associate the split bills to the account of the first user, wherein the bill corresponding to the target item is a third bill.
[0100] In one embodiment, the processor 501 calls the program instructions stored in the memory 504, and is also used to add a cancellation mark to the second bill in the blockchain, and the cancellation mark is used to indicate that the second bill has been cancelled.
[0101] In one embodiment, the processor 501 calls the program instructions stored in the memory 504, and is also used to obtain the transfer path of the second bill corresponding to the target item when receiving a transfer record query request for the target item submitted by the inquiring party through the input device 502; count the number of transfers of the target item according to the transfer path, and generate a transfer record including the number of transfers; and return the transfer record to the inquiring party through the output device 503.
[0102] It should be noted that the specific working process of the electronic device and unit described above can refer to the relevant description in the aforementioned embodiments, which will not be repeated here.
[0103] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer storage medium, which can be a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0104] The above disclosure is only part of the embodiments of the present invention, which certainly cannot be used to limit the scope of the rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiments and equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A data processing method based on blockchain, characterized in that: include: receiving a transfer request for a target item submitted by a first user through a terminal device, the transfer request carrying ticket information of a first ticket and identification information of a second user who receives the target item, the ticket information of the first ticket including identification information of the target item; querying the associated information of the target item in the blockchain according to the identification information of the target item, wherein the associated information includes the bill information of the second bill; comparing the bill information of the first bill with the bill information of the second bill to see whether they match; If there is a match, it is determined that the first user holds the target item, and the reimbursement status of the second ticket is queried from the blockchain; If the reimbursement status of the second bill is reimbursed, sending a signature confirmation request to the enterprise server, the signature confirmation request carrying the bill information of the second bill; When receiving signature confirmation information of the ticket information of the second ticket returned by the enterprise server, transferring the second ticket from the account of the first user to the account of the second user according to the identification information of the second user; If the reimbursement status of the second bill is unreimbursed, the second bill is transferred from the account of the first user to the account of the second user according to the identification information of the second user.
2. The method according to claim 1, characterized in that: The transfer request also carries the identification information of the first user, the association information also includes the identification information of the target user, and the determining that the first user holds the target item based on the ticket information of the first ticket and the association information includes: Comparing whether the ticket information of the first ticket matches the ticket information of the second ticket, and whether the identification information of the first user matches the identification information of the target user; If the ticket information of the first ticket matches the ticket information of the second ticket, and the identification information of the first user matches the identification information of the target user, it is determined that the first user holds the target item.
3. The method according to claim 1, characterized in that: The transferring the second ticket from the account of the first user to the account of the second user according to the identification information of the second user includes: If the items corresponding to the second note include other items except the target item, split the second note into a third note corresponding to the target item and notes corresponding to the other items, and associate the third note and the notes corresponding to the other items to the account of the first user; The third note is transferred from the account of the first user to the account of the second user according to the identification information of the second user.
4. The method according to claim 1, characterized in that Before receiving the transfer request for the target item submitted by the first user through the terminal device, the method further includes: receiving a bill splitting request submitted by the first user through the terminal device, wherein the bill splitting request carries the bill information of the second bill; querying the blockchain for multiple items corresponding to the second note according to the note information of the second note, wherein the multiple items include the target item; The second note is split into notes corresponding to each of the multiple items, and the split notes are associated with the account of the first user, wherein the note corresponding to the target item is a third note.
5. The method according to claim 3 or 4, characterized in that: The method further comprises: A cancellation mark is added to the second bill in the blockchain, where the cancellation mark is used to indicate that the second bill has been cancelled.
6. The method according to claim 1, characterized in that The method further comprises: When receiving a transfer record query request for the target item submitted by the querying party, obtaining a transfer path of the second bill corresponding to the target item; Counting the number of transfers of the target item according to the transfer path, and generating a transfer record including the number of transfers; The transfer record is returned to the inquiring party.
7. A data processing device based on blockchain, characterized in that: include: a communication unit, configured to receive a transfer request for a target item submitted by a first user through a terminal device, wherein the transfer request carries ticket information of a first ticket and identification information of a second user who receives the target item, wherein the ticket information of the first ticket includes identification information of the target item; a query unit, configured to query the associated information of the target item in the blockchain according to the identification information of the target item, wherein the associated information includes the bill information of the second bill; a processing unit, configured to compare whether the ticket information of the first ticket matches the ticket information of the second ticket; if they match, determining that the first user holds the target item, and querying the reimbursement status of the second ticket from the blockchain through the query unit; if the reimbursement status of the second ticket is reimbursed, sending a signature confirmation request to the enterprise server through the communication unit, the signature confirmation request carrying the ticket information of the second ticket; When signature confirmation information of the ticket information of the second ticket returned by the enterprise server is received through the communication unit, the second ticket is transferred from the account of the first user to the account of the second user according to the identification information of the second user; If the reimbursement status of the second bill is unreimbursed, the second bill is transferred from the account of the first user to the account of the second user according to the identification information of the second user.
8. A computer storage medium, characterized in that: The computer storage medium stores program instructions, which, when executed, are used to implement the method according to any one of claims 1 to 6.
