Blockchain-based information processing method, apparatus, device, and storage medium
By using smart contracts in a blockchain system to determine the value of goods and generate exchange information, the problems of low efficiency and trust in goods exchange are solved, and a fair, reliable and traceable goods exchange process is achieved.
Patent Information
- Application Number
- CN202210946073.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-08
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2042-08-08
AI Technical Summary
Existing technologies are inefficient for exchanging items and cannot solve the trust problem, as they cannot guarantee that the other party will return the items after the exchange.
The value of items is determined by smart contracts in the blockchain system, and exchange information is generated. After the user confirms, the item exchange operation is executed in the blockchain system, ensuring the fairness and credibility of the exchange process.
It improves the efficiency of goods exchange, ensures the fairness and credibility of the exchange process, avoids situations where either party fails to fulfill their exchange responsibilities, and achieves openness and traceability of the exchange process.
Smart Images

Figure CN115393006B_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of blockchain technology, and in particular to a blockchain-based information processing method, apparatus, device, and storage medium. Background Technology
[0002] Currently, people have a need to exchange goods. For example, two owners of goods may negotiate to exchange goods. However, in existing technologies, owners usually exchange goods offline. Offline exchanges not only require both owners to be present, leading to low efficiency, but also fail to address the trust issue among owners, as it cannot guarantee that the other party will return the corresponding goods after the first party hands them over. Summary of the Invention
[0003] The purpose of one or more embodiments of this specification is to provide a blockchain-based information processing method, comprising: obtaining a first item exchange request sent by a first user to a second user. The first item exchange request requests to exchange the first user's first item for a second item of the second user. In response to the first item exchange request, invoking a first smart contract in the blockchain system to determine a first value of the first item and a second value of the second item. Invoking a second smart contract in the blockchain system to generate first item exchange information for the first user and second item exchange information for the second user based on the first and second values. Sending the first item exchange information to the first user. Sending the second item exchange information to the second user. Based on the first user's first confirmation operation data for the first item exchange information and the second user's second confirmation operation data for the second item exchange information, executing the operation of exchanging the first user's first item for the second user's second item in the blockchain system.
[0004] The purpose of one or more embodiments of this specification is to provide a blockchain-based information processing method, comprising: sending a first item exchange request from a first user to a second user to a blockchain node. The first item exchange request requests to exchange the first user's first item for a second item from the second user. Obtaining first item exchange information sent by the blockchain node to the first user based on the first item exchange request. The first item exchange information is generated based on a first value of the first item and a second value of the second item. Responding to a first confirmation operation performed by the first user on the first item exchange information, sending first confirmation operation data to the blockchain node. The first confirmation operation data instructs the blockchain node to perform the operation of exchanging the first user's first item for the second user's second item in the blockchain system.
[0005] The purpose of one or more embodiments of this specification is to provide a blockchain-based information processing method, comprising: initiating an item posting transaction to a blockchain node. The item posting transaction carries user information of a second user and item information of a second item to be exchanged between the second user and the second user. The item posting transaction is used to store the user information of the second user and the item information of the second item on the blockchain. The method involves obtaining second item exchange information sent by the blockchain node to the second user based on a first item exchange request from a first user. The first item exchange request is sent by the first user to the blockchain node. The first item exchange request is used to request the exchange of the first user's first item for a second item. The second item exchange information is generated based on a first value of the first item and a second value of the second item. In response to a second confirmation operation performed by the second user on the second item exchange information, second confirmation operation data is sent to the blockchain node. The second confirmation operation data is used to instruct the blockchain node to perform the operation of exchanging the first user's first item for the second user's second item within the blockchain system.
[0006] The purpose of one or more embodiments of this specification is to provide a blockchain-based information processing apparatus, comprising: a request acquisition unit, which acquires a first item exchange request sent by a first user to a second user. The first item exchange request is used to request the exchange of the first user's first item for a second item of the second user. A value determination unit, which, in response to the first item exchange request, invokes a first smart contract in the blockchain system to determine a first value of the first item and a second value of the second item. An information generation unit, which invokes a second smart contract in the blockchain system to generate first item exchange information for the first user and second item exchange information for the second user based on the first and second values. An information sending unit, which sends the first item exchange information to the first user and the second item exchange information to the second user. An item exchange unit, which, based on first confirmation operation data from the first user regarding the first item exchange information and second confirmation operation data from the second user regarding the second item exchange information, performs the operation of exchanging the first user's first item for the second user's second item in the blockchain system.
[0007] The purpose of one or more embodiments of this specification is to provide a blockchain-based information processing apparatus, comprising: a request sending unit, which sends a first item exchange request from a first user to a second user to a blockchain node. The first item exchange request is used to request the exchange of the first user's first item for a second item from the second user. A first information receiving unit, which acquires first item exchange information sent by the blockchain node to the first user based on the first item exchange request. The first item exchange information is generated based on a first value of the first item and a second value of the second item. A first data sending unit, which, in response to a first confirmation operation performed by the first user regarding the first item exchange information, sends first confirmation operation data to the blockchain node. The first confirmation operation data is used to instruct the blockchain node to perform the operation of exchanging the first user's first item for the second user's second item in the blockchain system.
[0008] The purpose of one or more embodiments of this specification is to provide a blockchain-based information processing device, comprising: a transaction publishing unit, which initiates an item publishing transaction to a blockchain node. The item publishing transaction carries user information of a second user and item information of a second item to be exchanged between the second user and the blockchain. The item publishing transaction is used to store the user information of the second user and the item information of the second item on the blockchain. A second information receiving unit, which acquires second item exchange information sent by the blockchain node to the second user based on a first item exchange request from a first user. The first item exchange request is sent by the first user to the blockchain node. The first item exchange request is used to request the exchange of the first user's first item for a second item. The second item exchange information is generated based on a first value of the first item and a second value of the second item. A second data sending unit, in response to a second confirmation operation performed by the second user on the second item exchange information, sends second confirmation operation data to the blockchain node. The second confirmation operation data is used to instruct the blockchain node to perform the operation of exchanging the first user's first item for the second user's second item in the blockchain system.
[0009] The purpose of one or more embodiments of this specification is to provide an information processing apparatus, including: a processor; and a memory arranged to store computer-executable instructions. When executed by the processor, the computer-executable instructions cause the processor to implement the steps of the information processing method provided in any of the above embodiments.
[0010] The purpose of one or more embodiments of this specification is to provide a storage medium for storing computer-executable instructions. When executed by a processor, the computer-executable instructions cause the processor to implement the steps of the information processing method provided in any of the above embodiments. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in one or more embodiments of this specification or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in one or more of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a schematic diagram illustrating an application scenario of a blockchain-based information processing method provided in one embodiment of this specification.
[0013] Figure 2 A schematic flowchart illustrating a blockchain-based information processing method provided in one embodiment of this specification;
[0014] Figure 3 A flowchart illustrating another embodiment of the information processing method based on blockchain provided in this specification;
[0015] Figure 4 A flowchart illustrating another embodiment of the information processing method based on blockchain provided in this specification;
[0016] Figure 5 A flowchart illustrating another embodiment of the information processing method based on blockchain provided in this specification;
[0017] Figure 6 A flowchart illustrating another embodiment of the information processing method based on blockchain provided in this specification;
[0018] Figure 7 A flowchart illustrating another embodiment of the information processing method based on blockchain provided in this specification;
[0019] Figure 8 A flowchart illustrating another embodiment of the information processing method based on blockchain provided in this specification;
[0020] Figure 9 This is a schematic diagram of the structure of a blockchain-based information processing device provided in one embodiment of this specification;
[0021] Figure 10 A schematic diagram of the structure of a blockchain-based information processing device provided in another embodiment of this specification;
[0022] Figure 11 A schematic diagram of the structure of a blockchain-based information processing device provided in another embodiment of this specification;
[0023] Figure 12 This is a schematic diagram of the structure of a blockchain-based information processing device provided for one implementation of this specification. Detailed Implementation
[0024] To enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of one or more embodiments of this specification, and not all embodiments. Based on the embodiments in one or more embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of this document.
[0025] It should be noted that, unless otherwise specified, one or more embodiments and features described in this specification can be combined with each other. One or more embodiments of this specification will now be described in detail with reference to the accompanying drawings and examples.
[0026] This specification provides one or more embodiments of a blockchain-based information processing method, apparatus, device, and storage medium. Through this embodiment, when exchanging goods in a blockchain system, first item exchange information is generated and sent to a first user based on the first value of the first item to be exchanged and the second value of the second item to be exchanged; similarly, second item exchange information is generated and sent to a second user based on the first value of the first item to be exchanged and the second value of the second item to be exchanged. This enables both the first and second users to be aware of the first and second values, ensuring fairness and impartiality in the item exchange process. Furthermore, performing item exchange operations in a blockchain system not only improves the efficiency of item exchange but also makes the item exchange process traceable, preventing any party from failing to fulfill their exchange responsibilities and ensuring the openness and trustworthiness of the item exchange process.
[0027] Figure 1 This is a schematic diagram illustrating an application scenario of a blockchain-based information processing method provided in one embodiment of this specification. Figure 1As shown, the scenario includes: a first user's user terminal, a second user's user terminal, and a blockchain system. The first user's user terminal can be a mobile phone, tablet, desktop computer, laptop, or other similar device. The second user's user terminal can also be a mobile phone, tablet, desktop computer, laptop, or similar device. The first user's user terminal may or may not have a blockchain system client program installed. This client program can be a standalone application (App) or a mini-program embedded in other applications. The second user's user terminal may or may not have a blockchain system client program installed. This client program can be a standalone application (App) or a mini-program embedded in other applications. The blockchain system includes at least one blockchain node (…). Figure 1 Only one is shown in the image.
[0028] In one embodiment, in Figure 1 In the scenario shown, a second user can initiate an item posting transaction to a blockchain node via a user terminal. This transaction carries the second user's user information and the item information of the second item to be exchanged. The posting transaction uploads and stores this information in the blockchain system. Specifically, the user information and item information can be linked and stored within the blockchain system. This linking can be combined into an item exchange message, which is then stored in the blockchain system and set to public visibility, thus achieving the effect of posting the item exchange message on the blockchain. A first user can obtain the second user's user information and item information by scanning the second user's barcode or triggering the second user's posted item exchange message on the blockchain system, thus learning that the second user wants to exchange the second item. The first user can then send a first item exchange request to the blockchain node via their user terminal. This first item exchange request carries the first user's user information, the second user's user information, and the item information of both the first and second items. The first item exchange request requests to exchange the first user's first item for the second user's second item.
[0029] After receiving a first item exchange request from a first user, and verifying that the second user has indeed published the item information for the second item to be exchanged in the blockchain system, the blockchain node responds to the first item exchange request by invoking the first smart contract in the blockchain system to determine the first value of the first item and the second value of the second item. The first value can be the market transaction price of the first item, and the second value can be the market transaction price of the second item. The blockchain node also invokes the second smart contract in the blockchain system to generate first item exchange information for the first user and second item exchange information for the second user based on the first and second values. The first item exchange information for the first user includes the second user's user information and value notification information, which is used to notify the first and second values. The second item exchange information for the second user also includes the first user's user information and value notification information, which is used to notify the first and second values. The blockchain node also sends the first item exchange information to the first user for confirmation and the second item exchange information to the second user for confirmation.
[0030] The first user, through their user terminal, performs a first confirmation operation on the exchange information for the first item, indicating their awareness of the first and second values, their knowledge of the second user's user information, and their agreement to exchange the first item for the second item. Based on this first confirmation operation, the first user's user terminal sends the first confirmation operation data to the blockchain node. Similarly, the second user, through their user terminal, performs a second confirmation operation on the exchange information for the second item, indicating their awareness of the first and second values, their knowledge of the first user's user information, and their agreement to exchange the first item for the second item. Based on this second confirmation operation, the second user's user terminal sends the second confirmation operation data to the blockchain node.
[0031] Based on the first confirmation operation data of the first user for the exchange of the first item and the second confirmation operation data of the second user for the exchange of the second item, the blockchain node executes the operation of exchanging the first item of the first user for the second item of the second user in the blockchain system.
[0032] As can be seen, in this embodiment, when exchanging goods in the blockchain system, first item exchange information is generated and sent to the first user based on the first value of the first item to be exchanged and the second value of the second item to be exchanged, and second item exchange information is generated and sent to the second user based on the first value of the first item to be exchanged and the second value of the second item to be exchanged. This enables both the first and second users to know the first and second values, ensuring the fairness and impartiality of the item exchange process. Furthermore, performing item exchange operations in the blockchain system not only improves the efficiency of item exchange but also makes the item exchange process traceable, preventing any party from failing to fulfill its exchange responsibilities and ensuring the openness and credibility of the item exchange process.
[0033] In one embodiment, in Figure 1 In the scenario shown, the blockchain node can also calculate the first exchange resource required for the first user to exchange the first item for the second item, and the second exchange resource required for the second user to exchange the second item for the first item. It then calls a second smart contract in the blockchain system to generate a first exchange resource notification message to notify the first user of the first exchange resource, and a second exchange resource notification message to notify the second user of the second exchange resource. After determining that the first user has paid the first exchange resource according to the first exchange resource notification message, and the second user has paid the second exchange resource according to the second exchange resource notification message, the node executes the operation of exchanging the first user's first item for the second user's second item in the blockchain system. This ensures that both the first user and the second user have paid reasonable resources for the item exchange process.
[0034] Figure 2 This is a flowchart illustrating a blockchain-based information processing method provided in one embodiment of this specification. The method can be applied to... Figure 1 In the blockchain nodes, execution is performed by the blockchain nodes, such as Figure 2 As shown, the method includes the following steps:
[0035] Step S202: Obtain the first item exchange request sent by the first user to the second user; the first item exchange request is used to request to exchange the first user's first item for the second user's second item;
[0036] Step S204: In response to the first item exchange request, the first smart contract in the blockchain system is invoked to determine the first value of the first item and the second value of the second item;
[0037] Step S206: Invoke the second smart contract in the blockchain system to generate first item exchange information for the first user and second item exchange information for the second user based on the first value and the second value;
[0038] Step S208: Send the first item exchange information to the first user and the second item exchange information to the second user;
[0039] Step S210: Based on the first confirmation operation data of the first user for the exchange information of the first item and the second confirmation operation data of the second user for the exchange information of the second item, execute the operation of exchanging the first item of the first user for the second item of the second user in the blockchain system.
[0040] As can be seen, in this embodiment, when exchanging goods in the blockchain system, first item exchange information is generated and sent to the first user based on the first value of the first item to be exchanged and the second value of the second item to be exchanged, and second item exchange information is generated and sent to the second user based on the first value of the first item to be exchanged and the second value of the second item to be exchanged. This enables both the first and second users to know the first and second values, ensuring the fairness and impartiality of the item exchange process. Furthermore, performing item exchange operations in the blockchain system not only improves the efficiency of item exchange but also makes the item exchange process traceable, preventing any party from failing to fulfill its exchange responsibilities and ensuring the openness and credibility of the item exchange process.
[0041] In step S202 above, the blockchain node obtains a first item exchange request sent by the first user to the second user. The first item exchange request is used to request the exchange of the first user's first item for the second user's second item.
[0042] Specifically, the first user's terminal generates a first item exchange request and sends it to the blockchain node. This request requests the exchange of the first user's first item for a second user's second item. The first item exchange request carries the user information of the first user, the item information of the first item, the user information of the second user, and the item information of the second item. The first user's information includes, but is not limited to, the first user's real name, job title, salary, and historical item transaction records. The second user's information includes, but is not limited to, the second user's real name, job title, salary, and historical item transaction records. The first item's item information includes, but is not limited to, the item name, item origin, and item description. The second item's item information includes, but is not limited to, the item name, item origin, and item description. Both the first and second items can be digital collectibles. Digital collectibles refer to digital artworks based on NFTs (Non-Fungible Tokens), which are non-fungible on-chain assets with value attributes issued based on the blockchain.
[0043] In one embodiment, obtaining the first item exchange request sent by the first user to the second user specifically involves:
[0044] (a1) Obtain a first item exchange request sent by the first user to the second user by scanning the second user's barcode information; wherein the second user's barcode information carries the user information of the second user and the item information of the second item;
[0045] or,
[0046] (a2) Obtain the first item exchange request sent by the first user to the second user by triggering the second user to publish an item exchange message on the blockchain system. The item exchange message carries the user information of the second user and the item information of the second item.
[0047] In the case shown in action (a1), the second user can initiate an item publishing transaction to the blockchain node through the user terminal. The item publishing transaction carries the user information of the second user and the item information of the second item of the second user. The item publishing transaction is used to upload the user information of the second user and the item information of the second item to the blockchain system and store them. Based on this, the blockchain node responds to the item publishing transaction, associates and combines the user information of the second user and the item information of the second item to form an item exchange message, stores the item exchange message in the blockchain system, and sets the status of the item exchange message to public visibility, so as to achieve the effect of publishing the item exchange message in the blockchain system. After storing the item exchange message in the blockchain system, the blockchain node generates barcode information, such as a QR code, for the second user and sends it to the second user's terminal. This barcode information carries the second user's user information and the item information of the second item. The second user can provide this barcode information to the first user. Based on this, the first user scans the second user's barcode information through their terminal to obtain the second user's user information and the item information of the second item. The first user also enters their own user information and the item information of the first item into their terminal. Thus, the first user's terminal obtains the first user's user information, the second user's user information, the first item information, and the second item information, and generates a first item exchange request for the second user based on these information, and sends it to the blockchain node.
[0048] In the above process, after a blockchain node stores the item exchange message in the blockchain system and sets its status to public visibility, any user in the blockchain system can view the item exchange message through their user terminal. Therefore, the first user can also view the item exchange message through their user terminal. More specifically, the blockchain system can be a kind of item exchange platform. When a blockchain node stores the item exchange message in the blockchain system and sets its status to public visibility, it is equivalent to publishing the item exchange message on the item exchange platform. Then, any user on the item exchange platform can view the item exchange message through their user terminal, and thus, the first user can also view the item exchange message through their user terminal.
[0049] In the above process, after the first user scans the second user's barcode information with any barcode scanner in the user terminal, the user will be automatically redirected to the blockchain system, i.e., the goods exchange platform page. The user terminal obtains the second user's user information and the second item's item information based on the scanning operation and displays them on the goods exchange platform page. The user terminal also displays the first user's user information input box and the first item's item information input box on the goods exchange platform page so that the first user can input the first user's user information and the first item's item information.
[0050] Therefore, through the action (a1) described above, the first user can send a first item exchange request to the blockchain node by scanning the second user's barcode information.
[0051] As described in action (a1), the blockchain node can associate and combine the user information of the second user and the item information of the second item into an item exchange message. This message is stored in the blockchain system and its status is set to public, effectively publishing the message within the blockchain system. The first user can then view the message through their user terminal. Based on this, in action (a2), the first user can also trigger the item exchange message through their user terminal to obtain the user information of the second user and the item information of the second item. After triggering the message, the user terminal is redirected to a specific page displaying the user information of the second user and the item information of the second item. This page also includes input boxes for the user's information and the item's information, allowing the first user to input these information. Thus, the user terminal obtains the user information of the first user, the user information of the second user, the item information of the first item, and the item information of the second item. Based on these information, the first user generates a first item exchange request for the second user and sends it to the blockchain node.
[0052] Therefore, through the action (a2) described above, the first user can send a first item exchange request to the blockchain node by triggering the item exchange message published by the second user in the blockchain system.
[0053] It is important to note that when a blockchain node stores an item exchange message in the blockchain system, if the message is set to be publicly visible, it achieves the effect of publishing the message within the blockchain system, allowing every user in the system to view it. However, if the message is set to be private, it can only be stored on the chain and is not visible to anyone; no user in the blockchain system can view it.
[0054] In step S204 above, in response to the first item exchange request, the blockchain node invokes the first smart contract in the blockchain system to determine the first value of the first item and the second value of the second item. The first value of the first item can be its market transaction price, and the second value of the second item can be its market transaction price. In one implementation, the blockchain node can invoke the first smart contract pre-deployed in the blockchain system to query the database to obtain the first value of the first item and the second value of the second item.
[0055] In one implementation, a blockchain node can invoke a first smart contract pre-deployed in the blockchain system to obtain the value of a first target item that is of the same type as the first item, and evaluate the first value of the first item based on the value of the first target item. Similarly, a blockchain node can invoke a first smart contract pre-deployed in the blockchain system to obtain the value of a second target item that is of the same type as the second item, and evaluate the second value of the second item based on the value of the second target item.
[0056] In one embodiment, before invoking a first smart contract in the blockchain system to determine the first value of the first item and the second value of the second item in response to a first item exchange request, the blockchain node can also perform the following: Receiving a second item exchange request sent by a second user to the first user, the second item exchange request requesting to exchange the first user's first item for the second user's second item. Accordingly, invoking the first smart contract in the blockchain system to determine the first value of the first item and the second value of the second item in response to the first item exchange request specifically involves: after determining that the first item exchange request matches the second item exchange request, invoking the first smart contract in the blockchain system to determine the first value of the first item and the second value of the second item.
[0057] Specifically, before responding to the first item exchange request and invoking the first smart contract in the blockchain system to determine the first value of the first item and the second value of the second item, the blockchain node can also receive a second item exchange request sent by the second user through a user terminal to the first user. The second item exchange request includes the user information of the first user, the user information of the second user, the item information of the first item, and the item information of the second item. The second item exchange request is used to request to exchange the first user's first item using the second user's second item.
[0058] The second user can send a second item exchange request to the blockchain node in the following way: After the second user's user terminal publishes the item exchange message in the blockchain system, it obtains the user information of the first user and the item information of the first item, generates a second item exchange request for the first user based on the user information of the first user, the user information of the second user, the item information of the first item, and the item information of the second item, and sends it to the blockchain node.
[0059] After receiving a first item exchange request and a second item exchange request, the blockchain node compares them. If a match is found, the node invokes the first smart contract in the blockchain system to determine the first value of the first item and the second value of the second item. A match means that the user information of the first user in the first item exchange request and the user information of the first user in the second item exchange request both point to the first user; the user information of the second user in the first item exchange request and the user information of the second user in the second item exchange request both point to the second user; the item information of the first item in the first item exchange request and the item information of the first item in the second item exchange request both point to the first item; and the item information of the second item in the first item exchange request and the item information of the second item in the second item exchange request both point to the second item.
[0060] Since the first item exchange request matches the second item exchange request, it can be determined that both the first user and the second user have requests to exchange items. Therefore, the blockchain node invokes the first smart contract in the blockchain system to determine the first value of the first item and the second value of the second item.
[0061] As can be seen, through this embodiment, after receiving the first item exchange request and the second item exchange request and confirming that they match, subsequent actions are executed, ensuring that both the first user and the second user genuinely want to exchange items. In the event that a hacker unilaterally and maliciously initiates a large number of item exchange requests to attack the blockchain system, since there are no matching item exchange requests, the above process prevents a response to the hacker's actions, thus ensuring the operational security of the blockchain system.
[0062] On the other hand, in the above process, instead of obtaining the second item exchange request sent by the second user, the first smart contract in the blockchain system is directly called based on the first item exchange request to determine the first value of the first item and the second value of the second item. This has the advantages of fast information response speed and improved information processing efficiency.
[0063] Figure 3 This is a flowchart illustrating another embodiment of a blockchain-based information processing method provided in this specification. The method can be applied to... Figure 1 In the blockchain nodes, execution is performed by the blockchain nodes, such as Figure 3 As shown, the method includes the following steps:
[0064] Step S302: Obtain the first item exchange request sent by the first user to the second user; the first item exchange request is used to request to exchange the first user's first item for the second user's second item;
[0065] Step S304: Obtain the second item exchange request sent by the second user to the first user; the second item exchange request is used to request to exchange the second user's second item for the first user's first item;
[0066] Step S306: In response to the first item exchange request and the second item exchange request, after determining that the first item exchange request matches the second item exchange request, the first smart contract in the blockchain system is invoked to determine the first value of the first item and the second value of the second item.
[0067] Step S308: Invoke the second smart contract in the blockchain system to generate first item exchange information for the first user and second item exchange information for the second user based on the first value and the second value;
[0068] Step S310: Send the first item exchange information to the first user and the second item exchange information to the second user;
[0069] Step S312: Based on the first confirmation operation data of the first user for the exchange of the first item and the second confirmation operation data of the second user for the exchange of the second item, execute the operation of exchanging the first user's first item for the second user's second item in the blockchain system.
[0070] Figure 3 The specific processes of steps S304 and S306 can be referred to the description above, and will not be repeated here. Figure 3 Zhongyu Figure 2 For the same actions or steps, you can refer to Figure 2 The specific description will not be repeated here.
[0071] In one embodiment, in Figure 2 and Figure 3 In the process shown, calling the first smart contract in the blockchain system to determine the first value of the first item can be done in two ways: calling the first smart contract in the blockchain system to query the database to obtain the first value of the first item, or calling the first smart contract in the blockchain system to obtain the value of the first target item that belongs to the same category as the first item, and determining the first value of the first item based on the value of the first target item.
[0072] Specifically, the first smart contract in the blockchain system can be invoked to retrieve the first value of the first item from the database. If the database does not store the first value of the first item, the first smart contract in the blockchain system can be invoked to obtain the value of a first target item belonging to the same category as the first item. Based on the value of the first target item, the first value of the first item is determined. When there is only one first target item, its value can be used as the first item's value. When there are multiple first target items, the average value of all the first target items can be used as the first item's value.
[0073] The first target item, belonging to the same category as the first item, can be an item within the same category as the first item. The category can be determined based on at least one factor, such as the creator of the item and the style of the item. For example, the first item and the first target item may be paintings by the same artist, or both may be oil paintings.
[0074] In one embodiment, in Figure 2 and Figure 3 In the process shown, calling the first smart contract in the blockchain system to determine the second value of the second item can be done in two ways: calling the first smart contract in the blockchain system to query the database to obtain the second value of the second item, or calling the first smart contract in the blockchain system to obtain the value of a second target item that belongs to the same category as the second item, and determining the second value of the second item based on the value of the second target item.
[0075] Specifically, the first smart contract in the blockchain system can be invoked to retrieve the second value of the second item from the database. If the database does not store the second value of the second item, the first smart contract in the blockchain system can be invoked to obtain the value of a second target item belonging to the same category as the second item. Based on the value of the second target item, the second value of the second item is determined. When there is only one second target item, its value can be used as the total value of the second item. When there are multiple second target items, the average value of all the second target items can be used as the total value of the second item.
[0076] The second target item, belonging to the same category as the second item, can be an item within the same category as the second item. The category can be determined based on at least one factor, such as the creator of the item and its style. For example, the second item and the second target item could be dance videos from the same dance troupe, or both the first item and the first target item could be drama videos.
[0077] Figure 2 In step S206 above, a second smart contract in the blockchain system is invoked to generate first item exchange information for a first user and second item exchange information for a second user based on the first value and the second value. In one embodiment, step S206 specifically involves:
[0078] (b1) Call the second smart contract in the blockchain system to generate value notification information for notifying the first value and the second value;
[0079] (b2) Call the second smart contract in the blockchain system to generate first item exchange information for the first user based on the value notification information and the user information of the second user, and generate second item exchange information for the second user based on the value notification information and the user information of the first user.
[0080] Specifically, firstly, the second smart contract in the blockchain system is invoked to generate value notification information, which includes both the first and second values, based on the first and second values. Then, the second smart contract in the blockchain system is invoked again to combine the value notification information with the user information of the second user to obtain first item exchange information for the first user, and finally, the value notification information and the first user's user information are combined to obtain second item exchange information for the second user.
[0081] Therefore, by using the first item exchange information, the first user can obtain the first value of the first item, the second value of the second item, and the user information of the second user. This first item exchange information helps the first user fully understand the value of the first and second items, as well as the situation of the second user. Under the principle of ensuring openness and fairness in item exchange, it provides the first user with sufficient relevant information to help the first user decide whether to conduct the item exchange.
[0082] Similarly, through the exchange information of the second item, the second user can learn about the first value of the first item, the second value of the second item, and the user information of the first user. Thus, the exchange information of the second item can help the second user fully understand the value of the first and second items as well as the situation of the first user. Under the principle of ensuring openness and fairness in the exchange of items, the exchange information of the second user can be fully provided to help the second user decide whether to exchange items.
[0083] Of course, in other embodiments, the first item exchange information for the first user may only include value notification information, and the second item exchange information for the second user may also only include value notification information. That is, when the second smart contract in the blockchain system is invoked to generate the first item exchange information for the first user and the second item exchange information for the second user based on the first value and the second value, the second smart contract in the blockchain system is invoked to generate value notification information for notifying the first value and the second value; the second smart contract in the blockchain system is invoked to generate the first item exchange information for the first user based on the value notification information, and the second item exchange information for the second user is generated based on the value notification information.
[0084] In one embodiment, considering that the blockchain system needs to expend corresponding computing power to perform item exchange operations, when the first user and the second user exchange items, they need to pay corresponding resources to the blockchain system. Based on this, in one embodiment, before calling the second smart contract in the blockchain system to generate the first item exchange information for the first user and the second item exchange information for the second user based on the first value and the second value, the blockchain node can also execute: calling the third smart contract in the blockchain system to calculate the first exchange resources required for the first user to exchange the first item for the second item and the second exchange resources required for the second user to exchange the second item for the first item.
[0085] Accordingly, the second smart contract in the blockchain system is invoked to generate first item exchange information for the first user and second item exchange information for the second user based on the first value and the second value. Specifically, the second smart contract in the blockchain system is invoked to generate first item exchange information for the first user based on the first value, the second value and the first exchange resource, and to generate second item exchange information for the second user based on the first value, the second value and the second exchange resource.
[0086] In one embodiment, a third smart contract in the blockchain system is invoked to calculate the first exchange resource required for a first user to exchange a first item for a second item and the second exchange resource required for a second user to exchange a second item for a first item. Specifically, the third smart contract in the blockchain system is invoked to determine the first exchange resource required for a first user to exchange a first item for a second item and the second exchange resource required for a second user to exchange a second item for a first item, based on the current computing power of the blockchain system.
[0087] The first and second exchange resources can be currencies, and their quantities can be the same or different. When determining the first exchange resource based on the current computing power, a preset formula can be used to calculate it. Similarly, when determining the second exchange resource based on the current computing power, a preset formula can be used to calculate it. Alternatively, default correspondences between the first and second exchange resources and computing power can be pre-configured. Based on these correspondences, the first exchange resource required for a first user to exchange a first item for a second item, and the second exchange resource required for a second user to exchange a second item for a first item, can be found. The current computing power of the blockchain system can be represented by its processing speed.
[0088] Based on this, in one embodiment, a second smart contract in the blockchain system is invoked to generate first item exchange information for a first user based on the first value, the second value, and the first exchange resource, and to generate second item exchange information for a second user based on the first value, the second value, and the second exchange resource, specifically as follows:
[0089] (c1) Call the second smart contract in the blockchain system to generate value notification information for notifying the first value and the second value;
[0090] (c2) Call the second smart contract in the blockchain system to generate first exchange resource notification information for notifying the first exchange resource and generate second exchange resource notification information for notifying the second exchange resource.
[0091] (c3) Call the second smart contract in the blockchain system to generate first item exchange information for the first user based on value notification information, first exchange resource notification information and user information of the second user, and generate second item exchange information for the second user based on value notification information, second exchange resource notification information and user information of the first user.
[0092] Specifically, first, the second smart contract in the blockchain system is invoked to generate value notification information, which includes both the first and second values, to inform users of these values. Then, the second smart contract in the blockchain system is invoked to generate first exchange resource notification information, which includes the quantity of the first exchange resource. The second smart contract in the blockchain system is then invoked to generate second exchange resource notification information, which includes the quantity of the second exchange resource. Finally, the second smart contract in the blockchain system is invoked to combine the value notification information, the first exchange resource notification information, and the user information of the second user to obtain first item exchange information for the first user. Finally, the value notification information, the second exchange resource notification information, and the user information of the first user are combined to obtain second item exchange information for the second user.
[0093] Therefore, by using the first item exchange information, the first user can obtain the first value of the first item, the second value of the second item, the amount of the first exchange resource required for the exchange, and the user information of the second user. Thus, the first item exchange information helps the first user fully understand the value of the first and second items, the exchange cost, and the situation of the second user. Under the principle of ensuring openness and fairness in the exchange, it provides the first user with sufficient relevant information to help the first user decide whether to conduct the exchange.
[0094] Similarly, through the exchange information of the second item, the second user can learn about the first value of the first item, the second value of the second item, the amount of second exchange resources required for the exchange, and the user information of the first user. Thus, the exchange information of the second item helps the second user fully understand the value of the first and second items, the exchange costs, and the situation of the first user. Under the principle of ensuring openness and fairness in the exchange of items, the exchange information of the second user is provided with sufficient relevant information to help the second user decide whether to conduct the exchange.
[0095] Of course, in other embodiments, the first item exchange information for the first user may only include value notification information and first exchange resource notification information, and the second item exchange information for the second user may only include value notification information and second exchange resource notification information. That is, when the second smart contract in the blockchain system is invoked to generate the first item exchange information for the first user based on the first value, the second value, and the first exchange resource, the second smart contract in the blockchain system is invoked to generate value notification information for notifying the first value and the second value, and first exchange resource notification information for notifying the first exchange resource. Based on the value notification information and the first exchange resource notification information, the first item exchange information for the first user is generated. Correspondingly, when the second smart contract in the blockchain system is invoked to generate the second item exchange information for the second user based on the first value, the second value, and the second exchange resource, the second smart contract in the blockchain system is invoked to generate value notification information for notifying the first value and the second value, and second exchange resource notification information for notifying the second exchange resource. Based on the value notification information and the second exchange resource notification information, the second item exchange information for the second user is generated.
[0096] Figure 4 This is a flowchart illustrating another embodiment of a blockchain-based information processing method provided in this specification. The method can be applied to... Figure 1 In the blockchain nodes, execution is performed by the blockchain nodes, such as Figure 4 As shown, the method includes the following steps:
[0097] Step S402: Obtain the first item exchange request sent by the first user to the second user; the first item exchange request is used to request to exchange the first user's first item for the second user's second item;
[0098] Step S404: Obtain the second item exchange request sent by the second user to the first user; the second item exchange request is used to request to exchange the second user's second item for the first user's first item;
[0099] Step S406: In response to the first item exchange request and the second item exchange request, after determining that the first item exchange request matches the second item exchange request, the first smart contract in the blockchain system is invoked to determine the first value of the first item and the second value of the second item.
[0100] Step S408: Call the third smart contract in the blockchain system to calculate the first exchange resource required for the first user to exchange the first item for the second item and the second exchange resource required for the second user to exchange the second item for the first item.
[0101] Step S410: Invoke the second smart contract in the blockchain system to generate first item exchange information for the first user based on the first value, the second value, and the first exchange resource; and generate second item exchange information for the second user based on the first value, the second value, and the second exchange resource.
[0102] Step S412: Send the first item exchange information to the first user and the second item exchange information to the second user;
[0103] Step S414: Based on the first confirmation operation data of the first user for the exchange information of the first item and the second confirmation operation data of the second user for the exchange information of the second item, execute the operation of exchanging the first item of the first user for the second item of the second user in the blockchain system.
[0104] Figure 4 The specific processes of steps S408 and S410 can be found in the description above, and will not be repeated here. Figure 4 Zhongyu Figure 2 or Figure 3 For the same actions or steps, you can refer to Figure 2 or Figure 3 The specific description will not be repeated here.
[0105] Figure 2 In step S208 above, the first item exchange information is sent to the first user's user terminal, and the second item exchange information is sent to the second user's user terminal. The first user can confirm the first item exchange information through their user terminal, indicating that they understand the first value of the first item, the second value of the second item, the first exchange resources required, and the situation of the second user, and agree to the item exchange. The second user can confirm the second item exchange information through their user terminal, indicating that they understand the first value of the first item, the second value of the second item, the second exchange resources required, and the situation of the first user, and agree to the item exchange.
[0106] In practice, the user terminal of the first user displays the first item exchange information and provides a confirmation control. The first user confirms the item exchange by triggering the confirmation control. Based on the first user's confirmation, the user terminal provides a payment control to the first user. The first user pays for the first exchange resource through the control. After the payment is successful, the user terminal generates first confirmation operation data based on the first user's confirmation operation on the first item exchange information, carries the user's payment success data in the first confirmation operation data, and sends the first confirmation operation data to the blockchain node.
[0107] Similarly, while displaying the second item exchange information, the second user's terminal provides a confirmation control. The second user confirms the item exchange by triggering the confirmation control. Based on the second user's confirmation, the terminal provides a payment control. The second user pays for the second exchange resource through the control. After successful payment, the terminal generates second confirmation operation data based on the second user's confirmation operation on the second item exchange information, carries the user's successful payment data in the second confirmation operation data, and sends the second confirmation operation data to the blockchain node.
[0108] In the above process, if the user terminal determines that the first user has not confirmed the first item exchange information, or has not successfully paid the first exchange resource after confirmation, the user terminal generates first rejection operation data and sends it to the blockchain node to notify the blockchain node that the first user has rejected the item exchange. Similarly, if the second user has not confirmed the second item exchange information, or has not successfully paid the second exchange resource after confirmation, the user terminal generates second rejection operation data and sends it to the blockchain node to notify the blockchain node that the second user has rejected the item exchange.
[0109] Based on this, in step S210 above, the blockchain node, according to the first confirmation operation data of the first user regarding the exchange of the first item and the second confirmation operation data of the second user regarding the exchange of the second item, executes the operation of exchanging the first user's first item for the second user's second item in the blockchain system, specifically as follows:
[0110] After determining that the first user has paid the first exchange resource based on the first user's first confirmation operation data for the first item exchange information, and determining that the second user has paid the second exchange resource based on the second user's second confirmation operation data for the second item exchange information, the operation of exchanging the first user's first item for the second user's second item is executed in the blockchain system.
[0111] Specifically, as described above, after the first user confirms the first item exchange information and pays for the first exchange resource, the user terminal generates first confirmation operation data based on the confirmation operation performed by the first user on the first item exchange information, and carries the user's payment success data in the first confirmation operation data. Similarly, after the second user confirms the second item exchange information and pays for the second exchange resource, the user terminal generates second confirmation operation data based on the confirmation operation performed by the second user on the second item exchange information, and carries the user's payment success data in the second confirmation operation data.
[0112] Based on this, a blockchain node can determine that the first user has paid the first exchange resource based on the first user's first confirmation operation data regarding the exchange of the first item, and determine that the second user has paid the second exchange resource based on the second user's second confirmation operation data regarding the exchange of the second item. Then, the blockchain system executes the operation of exchanging the first user's first item for the second user's second item. Specifically, when the blockchain node retrieves successful payment data from the first confirmation operation data, it determines that the first user has paid the first exchange resource; when the blockchain node retrieves successful payment data from the second confirmation operation data, it determines that the second user has paid the second exchange resource.
[0113] In this embodiment, on the user terminal side, taking the first user as an example, after the first user confirms the first item exchange information and pays for the first exchange resource, the user terminal generates first confirmation operation data based on the confirmation operation performed by the first user on the first item exchange information, and carries the user's payment success data in the first confirmation operation data. If the user terminal determines that the first user has not confirmed the first item exchange information, or has not successfully paid for the first exchange resource after confirmation, the user terminal generates first rejection operation data and sends it to the blockchain node to notify the blockchain node that the first user has rejected the item exchange. On the blockchain node side, if the blockchain node receives the first confirmation operation data and retrieves the payment success data in the first confirmation operation data, it determines that the first user has paid for the first exchange resource; if it receives the first rejection operation data, it determines that the first user has rejected the item exchange. By verifying whether the first user has successfully paid on both the user terminal side and the blockchain side, a dual verification method can be used to ensure that the item exchange only takes place after the first user has successfully paid, thus ensuring the reliability of the item exchange.
[0114] Of course, in other embodiments, the first exchange resource and the second exchange resource may not be calculated. The first user only needs to confirm the first item exchange information, and the first user's user terminal generates the first confirmation operation data and sends it to the blockchain node. The second user only needs to confirm the second item exchange information, and the second user's user terminal generates the second confirmation operation data and sends it to the blockchain node. Based on the first confirmation operation data and the second confirmation operation data, the blockchain node does not need to analyze whether the first user and the second user have paid the first exchange resource and the second exchange resource, and can directly carry out the item handover.
[0115] In the above embodiment, the blockchain node performs the operation of exchanging a first user's first item for a second user's second item in the blockchain system, specifically as follows:
[0116] (d1) A blockchain node initiates the first transaction in the blockchain system. The first transaction is used to update the owner of the first item from the first user to the second user.
[0117] (d2) A blockchain node initiates a second transaction in the blockchain system. The second transaction is used to update the owner of the second item from the second user to the first user.
[0118] Updating the owner of the first item from the first user to the second user can be achieved by calling the fourth smart contract. Updating the owner of the second item from the second user to the first user can be achieved by calling the fifth smart contract.
[0119] Specifically, the first and second items can be digital collectibles, such as videos, audio recordings, and images. Blockchain nodes exchange items by changing the owner of one item from user one to user two, and vice versa, thus simplifying the process. Both the first and second transactions require consensus processing from all blockchain nodes within the blockchain system.
[0120] Furthermore, after the exchange of items, the blockchain node can send a successful exchange notification message, an access link and access key for the second item to the first user, and a successful exchange notification message, an access link and access key for the first item to the second user. The first user can access the second item by using the identity of the owner of the second item and the access key, and the second user can access the first item by using the identity of the owner of the first item and the access key.
[0121] Based on the above description of the specific functions of the first user's terminal, Figure 5 This is a flowchart illustrating another embodiment of a blockchain-based information processing method provided in this specification. The method can be applied to and executed by the user terminal of a first user, such as... Figure 5 As shown, the method includes the following steps:
[0122] Step S502: Send the first user's first item exchange request to the blockchain node for the second user; the first item exchange request is used to request the exchange of the first user's first item for the second user's second item.
[0123] Step S504: Obtain the first item exchange information sent by the blockchain node to the first user based on the first item exchange request; the first item exchange information is generated based on the first value of the first item and the second value of the second item.
[0124] Step S506: In response to the first confirmation operation performed by the first user for the first item exchange information, first confirmation operation data is sent to the blockchain node. The first confirmation operation data is used to enable the blockchain node to perform the operation of exchanging the first user's first item for the second user's second item in the blockchain system.
[0125] As can be seen, in this embodiment, when exchanging goods in the blockchain system, the first item exchange information is generated and sent to the first user based on the first value of the first item to be exchanged and the second value of the second item to be exchanged. This enables the first user to know the first and second values, ensuring the fairness and impartiality of the item exchange process. Furthermore, performing item exchange operations in the blockchain system not only improves the efficiency of item exchange but also makes the item exchange process traceable, preventing any party from failing to fulfill its exchange responsibilities and ensuring the openness and credibility of the item exchange process.
[0126] In one embodiment, step S502 above, sending the first user's first item exchange request for the second user to the blockchain node, specifically involves:
[0127] In response to the scanning operation of the first user on the barcode information of the second user, the user information of the second user and the item information of the second item are obtained from the barcode information, and the user information of the first user and the item information of the first item are obtained.
[0128] Based on the user information of the first user, the item information of the first item, the user information of the second user, and the item information of the second item, a first item exchange request is generated and sent to the blockchain node.
[0129] The first item exchange request includes the user information of the first user, the item information of the first item, the user information of the second user, and the item information of the second item. Specifically, the second user can initiate an item publishing transaction to the blockchain node through their user terminal. The item publishing transaction carries the user information of the second user and the item information of the second item. The item publishing transaction is used to upload the user information of the second user and the item information of the second item to the blockchain system for storage. Based on this, the blockchain node responds to the item publishing transaction by associating the user information of the second user and the item information of the second item to form an item exchange message, storing the item exchange message in the blockchain system, and setting the status of the item exchange message to public visibility, thereby achieving the effect of publishing the item exchange message in the blockchain system. After storing the item exchange message in the blockchain system, the blockchain node generates barcode information, such as a QR code, for the second user and sends it to the second user's terminal. This barcode information carries the second user's user information and the item information of the second item. The second user can provide this barcode information to the first user. Based on this, the first user scans the second user's barcode information through their terminal to obtain the second user's user information and the item information of the second item. The first user also enters their own user information and the item information of the first item into their terminal. Thus, the first user's terminal obtains the first user's user information, the second user's user information, the first item information, and the second item information, and generates a first item exchange request for the second user based on these information, and sends it to the blockchain node.
[0130] In the above process, after a blockchain node stores the item exchange message in the blockchain system and sets its status to public visibility, any user in the blockchain system can view the item exchange message through their user terminal. Therefore, the first user can also view the item exchange message through their user terminal. More specifically, the blockchain system can be a kind of item exchange platform. When a blockchain node stores the item exchange message in the blockchain system and sets its status to public visibility, it is equivalent to publishing the item exchange message on the item exchange platform. Then, any user on the item exchange platform can view the item exchange message through their user terminal, and thus, the first user can also view the item exchange message through their user terminal.
[0131] In the above process, after the first user scans the second user's barcode information with any barcode scanner in the user terminal, the user will be automatically redirected to the blockchain system, i.e., the goods exchange platform page. The user terminal obtains the second user's user information and the second item's item information based on the scanning operation and displays them on the goods exchange platform page. The user terminal also displays the first user's user information input box and the first item's item information input box on the goods exchange platform page so that the first user can input the first user's user information and the first item's item information.
[0132] As can be seen, in this embodiment, the first user can send a first item exchange request to the blockchain node by scanning the barcode information of the second user.
[0133] In another embodiment, in step S502 above, sending the first user's first item exchange request for the second user to the blockchain node specifically involves:
[0134] In response to a trigger operation by the first user in response to an item exchange message published by the second user in the blockchain system, the user information of the second user and the item information of the second item are obtained from the item exchange message, and the user information of the first user and the item information of the first item are also obtained.
[0135] Based on the user information of the first user, the item information of the first item, the user information of the second user, and the item information of the second item, a first item exchange request is generated and sent to the blockchain node.
[0136] As mentioned above, a blockchain node can associate and combine the user information of the second user and the item information of the second item into an item exchange message. This message is stored in the blockchain system and set to public visibility, effectively publishing the message within the blockchain. The first user can then view the message through their user terminal. Furthermore, the first user can trigger the item exchange message to obtain the user information of the second user and the item information of the second item. After triggering the message, the user terminal is redirected to a specific page displaying both the second user's and the item's information. This page also includes input fields for the first user's and item's information, allowing the user to input these details. The first user's terminal then obtains these information and generates a first item exchange request for the second user, which is then sent to the blockchain node.
[0137] In this embodiment, the first user can send a first item exchange request to the blockchain node by triggering the second user to publish an item exchange message in the blockchain system.
[0138] In step S504 above, the first user's terminal obtains the first item exchange information sent by the blockchain node to the first user based on the first item exchange request. The first item exchange information is generated based on the first value of the first item and the second value of the second item. The specific process of this step can be referred to the previous section on... Figure 2 The description will not be repeated here.
[0139] Based on the above... Figure 2 As can be seen from the introduction, in one embodiment, the first item exchange information includes value notification information, first exchange resource notification information, and user information of the second user; the value notification information is used to notify the first value and the second value; the first exchange resource notification information is used to notify the first exchange resource required to exchange the first item for the second item; based on this, in step S506, in response to the first confirmation operation performed by the first user on the first item exchange information, first confirmation operation data is sent to the blockchain node, specifically: in response to the first confirmation operation performed by the first user on the first item exchange information, after determining that the first user has paid the first exchange resource, first confirmation operation data is generated and sent to the blockchain node.
[0140] Specifically, the user terminal of the first user displays the first item exchange information and provides a confirmation control. The first user confirms the item exchange by triggering the confirmation control. Based on the first user's confirmation, the user terminal provides a payment control to the first user. The first user pays for the first exchange resource through the control. After the payment is successful, the user terminal generates first confirmation operation data based on the first user's confirmation operation on the first item exchange information, carries the user's payment success data in the first confirmation operation data, and sends the first confirmation operation data to the blockchain node.
[0141] As can be seen, in this embodiment, after confirming that the first user has successfully paid, the first confirmation operation data is generated and sent to the blockchain node on the user terminal side, thereby ensuring the exchange of items after successful payment and ensuring high reliability of item exchange.
[0142] Figure 5 The specific processes for steps S502-S506 can also be found in the previous section. Figures 2-4 The process description will not be repeated here.
[0143] Based on the above description of the specific functions of the second user's terminal, Figure 6This is a flowchart illustrating another embodiment of a blockchain-based information processing method provided in this specification. The method can be applied to and executed by a second user's user terminal, such as... Figure 6 As shown, the method includes the following steps:
[0144] Step S602: Initiate an item publishing transaction to the blockchain node; the item publishing transaction carries the user information of the second user and the item information of the second item to be exchanged by the second user; the item publishing transaction is used to store the user information of the second user and the item information of the second item on the blockchain.
[0145] Step S604: Obtain the second item exchange information sent by the blockchain node to the second user based on the first item exchange request of the first user; the first item exchange request is sent by the first user to the blockchain node; the first item exchange request is used to request the exchange of the first user's first item for the second item; the second item exchange information is generated based on the first value of the first item and the second value of the second item.
[0146] Step S606: In response to the second confirmation operation performed by the second user for the second item exchange information, second confirmation operation data is sent to the blockchain node. The second confirmation operation data is used to enable the blockchain node to perform the operation of exchanging the first user's first item for the second user's second item in the blockchain system.
[0147] As can be seen, in this embodiment, when exchanging goods in the blockchain system, the second item exchange information is generated and sent to the second user based on the first value of the first item to be exchanged and the second value of the second item to be exchanged. This enables the second user to know the first and second values, ensuring the fairness and impartiality of the item exchange process. Furthermore, performing item exchange operations in the blockchain system not only improves the efficiency of item exchange but also makes the item exchange process traceable, preventing any party from failing to fulfill its exchange responsibilities and ensuring the openness and credibility of the item exchange process.
[0148] Figure 6 The specific processes for steps S602-S604 can be found in the previous section. Figures 2-4 The process description will not be repeated here.
[0149] Based on the above... Figure 2As can be seen from the introduction, in one embodiment, the second item exchange information includes value notification information, second exchange resource notification information, and user information of the first user; the value notification information is used to notify the first value and the second value; the second exchange resource notification information is used to notify the second exchange resource required to exchange the second item for the first item; based on this, in step S606, in response to the second confirmation operation performed by the second user on the second item exchange information, sending the second confirmation operation data to the blockchain node can be: in response to the second confirmation operation performed by the second user on the second item exchange information, after determining that the second user has paid the second exchange resource, generating the second confirmation operation data and sending it to the blockchain node.
[0150] Specifically, while displaying the second item exchange information, the second user's terminal provides a confirmation control. The second user confirms the item exchange by triggering the confirmation control. Based on the second user's confirmation, the terminal provides a payment control. The second user pays for the second exchange resource through the control. After successful payment, the terminal generates second confirmation operation data based on the second user's confirmation operation on the second item exchange information, carries the user's successful payment data in the second confirmation operation data, and sends the second confirmation operation data to the blockchain node.
[0151] As can be seen, in this embodiment, after confirming that the second user has successfully paid, the second confirmation operation data is generated and sent to the blockchain node on the user terminal side, thereby ensuring the exchange of items after successful payment and guaranteeing the high reliability of item exchange.
[0152] Figure 6 The specific processes of steps S602-S606 can also be referred to the previous section on... Figures 2-4 The process description will not be repeated here.
[0153] Figure 7 A flowchart illustrating another embodiment of the blockchain-based information processing method provided in this specification is shown below. Figure 7 As shown, the method includes the following steps:
[0154] In step S701, the second user's terminal initiates an item publishing transaction with the blockchain node. The item publishing transaction is used to publish the second user's user information and the item information of the second item on the blockchain.
[0155] In step S702, the first user's terminal sends a first item exchange request to the blockchain node. The first item exchange request is used to request the exchange of the first user's first item for the second user's second item.
[0156] In step S703, the blockchain node responds to the first item exchange request by calling the first smart contract in the blockchain system to determine the first value of the first item and the second value of the second item.
[0157] In step S704, the blockchain node calls the second smart contract in the blockchain system to generate first item exchange information for the first user and second item exchange information for the second user based on the first value and the second value.
[0158] In step S705, the blockchain node sends the first item exchange information to the first user.
[0159] In step S706, the blockchain node sends the second item exchange information to the second user.
[0160] In step S707, the user terminal of the first user generates first confirmation operation data based on the first user's confirmation operation on the first item exchange information.
[0161] In step S708, the second user's user terminal generates second confirmation operation data based on the second user's confirmation operation for the second item exchange information.
[0162] In step S709, the first user's terminal sends the first confirmation operation data to the blockchain node.
[0163] In step S710, the second user's user terminal sends the second confirmation operation data to the blockchain node.
[0164] In step S711, the blockchain node performs an operation in the blockchain system to exchange the first item of the first user for the second item of the second user, based on the first confirmation operation data and the second confirmation operation data.
[0165] Figure 7 In this scenario, the first user can choose to pay for the first exchange resource or not, and the same applies to the second user. Figure 7 For the specific procedures of each step, please refer to the previous section. Figures 2-4 The process description will not be repeated here.
[0166] Figure 8 A flowchart illustrating another embodiment of the blockchain-based information processing method provided in this specification is shown below. Figure 8 As shown, the method includes the following steps:
[0167] In step S801, the second user's terminal initiates an item publishing transaction with the blockchain node. The item publishing transaction is used to publish the second user's user information and the item information of the second item on the blockchain.
[0168] In step S802, the first user's terminal sends a first item exchange request to the blockchain node. The first item exchange request is used to request the exchange of the first user's first item for the second user's second item.
[0169] In step S803, the second user's terminal sends a second item exchange request to the blockchain node. The second item exchange request is used to request the exchange of the first user's first item for the second user's second item.
[0170] In step S804, the blockchain node responds to the first item exchange request and the second item exchange request. After determining that the first item exchange request matches the second item exchange request, it calls the first smart contract in the blockchain system to determine the first value of the first item and the second value of the second item.
[0171] In step S805, the blockchain node calls the third smart contract in the blockchain system to calculate the first exchange resource required for the first user to exchange the first item for the second item and the second exchange resource required for the second user to exchange the second item for the first item.
[0172] In step S806, the blockchain node calls the second smart contract in the blockchain system to generate first item exchange information for the first user based on the first value, the second value, and the first exchange resource, and to generate second item exchange information for the second user based on the first value, the second value, and the second exchange resource.
[0173] In step S807, the blockchain node sends the first item exchange information to the first user.
[0174] In step S808, the blockchain node sends the second item exchange information to the second user.
[0175] In step S809, the user terminal of the first user generates first confirmation operation data based on the first user's confirmation operation for the first item exchange information and payment operation for the first exchange resource.
[0176] In step S810, the second user's user terminal generates second confirmation operation data based on the second user's confirmation operation for the second item exchange information and payment operation for the second exchange resource.
[0177] In step S811, the first user's user terminal sends the first confirmation operation data to the blockchain node.
[0178] In step S812, the second user's terminal sends the second confirmation operation data to the blockchain node.
[0179] In step S813, after determining that the first user has paid for the first exchange resource and the second user has paid for the second exchange resource based on the first confirmation operation data and the second confirmation operation data, the blockchain node executes the operation of exchanging the first user's first item for the second user's second item in the blockchain system.
[0180] Figure 8 For the specific procedures of each step, please refer to the previous section on... Figures 2-4 The process description will not be repeated here.
[0181] In summary, specific embodiments of this subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing can be advantageous.
[0182] The above describes one or more embodiments of a blockchain-based information processing method provided in this specification. Based on the same idea, one or more embodiments of this specification also provide a blockchain-based information processing device.
[0183] Figure 9 This is a schematic diagram of the structure of a blockchain-based information processing device provided in one embodiment of this specification, as shown below. Figure 9 As shown, the device includes:
[0184] The request acquisition unit 91 acquires a first item exchange request sent by the first user to the second user; the first item exchange request is used to request to exchange the first user's first item for the second user's second item;
[0185] The value determination unit 92, in response to the first item exchange request, invokes the first smart contract in the blockchain system to determine the first value of the first item and the second value of the second item;
[0186] Information generation unit 93 calls the second smart contract in the blockchain system to generate first item exchange information for the first user and second item exchange information for the second user based on the first value and the second value.
[0187] The information sending unit 94 sends the first item exchange information to the first user and the second item exchange information to the second user;
[0188] The item exchange unit 95 performs an operation in the blockchain system to exchange the first item of the first user for the second item of the second user, based on the first confirmation operation data of the first user for the first item exchange information and the second confirmation operation data of the second user for the second item exchange information.
[0189] Optionally, the request acquisition unit 91 acquires a first item exchange request sent by the first user to the second user by scanning the barcode information of the second user; wherein the barcode information carries the user information of the second user and the item information of the second item; or, it acquires a first item exchange request sent by the first user to the second user by triggering the item exchange message published by the second user in the blockchain system; wherein the item exchange message carries the user information of the second user and the item information of the second item.
[0190] Optionally, the request acquisition unit 91, before invoking the first smart contract in the blockchain system to determine the first value of the first item and the second value of the second item in response to the first item exchange request, acquires the second item exchange request sent by the second user to the first user; the second item exchange request is used to request to exchange the first user's first item using the second user's second item; correspondingly, the value determination unit 92, in response to the first item exchange request and the second item exchange request, after determining that the first item exchange request and the second item exchange request match, invokes the first smart contract in the blockchain system to determine the first value of the first item and the second value of the second item.
[0191] Optionally, the value determination unit 92 calls the first smart contract in the blockchain system to query the database to obtain the first value of the first item; or, it calls the first smart contract in the blockchain system to obtain the item value of a first target item that belongs to the same category as the first item, and determines the first value of the first item based on the item value of the first target item.
[0192] Optionally, the value determination unit 92 calls the first smart contract in the blockchain system to query the database to obtain the second value of the second item; or, it calls the first smart contract in the blockchain system to obtain the item value of a second target item that belongs to the same category as the second item, and determines the second value of the second item based on the item value of the second target item.
[0193] Optionally, the information generation unit 93 invokes a second smart contract in the blockchain system to generate value notification information for notifying the first value and the second value; invokes the second smart contract in the blockchain system to generate first item exchange information for the first user based on the value notification information and the user information of the second user, and generates second item exchange information for the second user based on the value notification information and the user information of the first user.
[0194] Optionally, it also includes a resource calculation unit, which, before calling the second smart contract in the blockchain system to generate first item exchange information for the first user and second item exchange information for the second user based on the first value and the second value, calls the third smart contract in the blockchain system to calculate the first exchange resource required by the first user to exchange the first item for the second item and the second exchange resource required by the second user to exchange the second item for the first item; correspondingly, the information generation unit 93 calls the second smart contract in the blockchain system to generate first item exchange information for the first user based on the first value, the second value and the first exchange resource, and generates second item exchange information for the second user based on the first value, the second value and the second exchange resource.
[0195] Optionally, the resource computing unit invokes a third smart contract in the blockchain system to determine, based on the current computing power of the blockchain system, the first exchange resource required by the first user to exchange the first item for the second item and the second exchange resource required by the second user to exchange the second item for the first item.
[0196] Optionally, the information generation unit 93 invokes a second smart contract in the blockchain system to generate value notification information for notifying the first value and the second value; invokes a second smart contract in the blockchain system to generate first exchange resource notification information for notifying the first exchange resource, and generates second exchange resource notification information for notifying the second exchange resource; invokes a second smart contract in the blockchain system to generate first item exchange information for the first user based on the value notification information, the first exchange resource notification information, and the user information of the second user, and generates second item exchange information for the second user based on the value notification information, the second exchange resource notification information, and the user information of the first user.
[0197] Optionally, the item exchange unit 95, after determining that the first user has paid the first exchange resource based on the first confirmation operation data of the first user regarding the first item exchange information, and after determining that the second user has paid the second exchange resource based on the second confirmation operation data of the second user regarding the second item exchange information, performs an operation in the blockchain system to exchange the first user's first item for the second user's second item.
[0198] Optionally, the item exchange unit 95 initiates a first transaction in the blockchain system, the first transaction being used to update the owner of the first item from the first user to the second user; and initiates a second transaction in the blockchain system, the second transaction being used to update the owner of the second item from the second user to the first user.
[0199] The blockchain-based information processing device in this embodiment can implement the various processes of the aforementioned blockchain-based information processing method embodiments and achieve the same effects and functions, which will not be repeated here.
[0200] Figure 10 A schematic diagram of the structure of a blockchain-based information processing device provided in another embodiment of this specification is shown below. Figure 10 As shown, the device includes:
[0201] The request sending unit 1001 sends a first item exchange request from the first user to the blockchain node for the second user; the first item exchange request is used to request the exchange of the first user's first item for the second user's second item.
[0202] The first information receiving unit 1002 acquires the first item exchange information sent by the blockchain node to the first user based on the first item exchange request; the first item exchange information is generated based on the first value of the first item and the second value of the second item.
[0203] The first data sending unit 1003, in response to the first confirmation operation performed by the first user for the first item exchange information, sends first confirmation operation data to the blockchain node. The first confirmation operation data is used to instruct the blockchain node to perform an operation in the blockchain system to exchange the first item of the first user for the second item of the second user.
[0204] Optionally, the request sending unit 1001, in response to the scanning operation of the first user on the barcode information of the second user, obtains the user information of the second user and the item information of the second item from the barcode information, and obtains the user information of the first user and the item information of the first item; and generates the first item exchange request based on the user information of the first user, the item information of the first item, the user information of the second user, and the item information of the second item, and sends it to the blockchain node.
[0205] Optionally, the request sending unit 1001, in response to a triggering operation by the first user in response to an item exchange message published by the second user in the blockchain system, obtains the user information of the second user and the item information of the second item from the item exchange message, and obtains the user information of the first user and the item information of the first item; and generates the first item exchange request based on the user information of the first user, the item information of the first item, the user information of the second user, and the item information of the second item, and sends it to the blockchain node.
[0206] Optionally, the first item exchange information includes value notification information, first exchange resource notification information, and user information of the second user; the value notification information is used to notify the first value and the second value; the first exchange resource notification information is used to notify the first exchange resource required to exchange the first item for the second item; the first data sending unit 1003, in response to the first confirmation operation performed by the first user on the first item exchange information, generates first confirmation operation data and sends it to the blockchain node after determining that the first user has paid the first exchange resource.
[0207] The blockchain-based information processing device in this embodiment can implement the various processes of the aforementioned blockchain-based information processing method embodiments and achieve the same effects and functions, which will not be repeated here.
[0208] Figure 11 A schematic diagram of the structure of a blockchain-based information processing device provided in another embodiment of this specification is shown below. Figure 11 As shown, the device includes:
[0209] The transaction publishing unit 1101 initiates an item publishing transaction to a blockchain node; the item publishing transaction carries the user information of the second user and the item information of the second item to be exchanged by the second user; the item publishing transaction is used to store the user information of the second user and the item information of the second item on the blockchain.
[0210] The second information receiving unit 1102 acquires second item exchange information sent by the blockchain node to the second user based on the first item exchange request of the first user; the first item exchange request is sent by the first user to the blockchain node; the first item exchange request is used to request to exchange the first item of the first user for the second item; the second item exchange information is generated based on the first value of the first item and the second value of the second item.
[0211] The second data sending unit 1103, in response to the second confirmation operation performed by the second user for the second item exchange information, sends second confirmation operation data to the blockchain node. The second confirmation operation data is used to instruct the blockchain node to perform an operation in the blockchain system to exchange the first user's first item for the second user's second item.
[0212] Optionally, the second item exchange information includes value notification information, second exchange resource notification information, and user information of the first user; the value notification information is used to notify the first value and the second value; the second exchange resource notification information is used to notify the second exchange resource required to exchange the second item for the first item; the second data sending unit 1102, in response to the second confirmation operation performed by the second user on the second item exchange information, generates second confirmation operation data and sends it to the blockchain node after determining that the second user has paid the second exchange resource.
[0213] The blockchain-based information processing device in this embodiment can implement the various processes of the aforementioned blockchain-based information processing method embodiments and achieve the same effects and functions, which will not be repeated here.
[0214] Following the same line of thought, one or more embodiments of this specification also provide a blockchain-based information processing device. Figure 12 A schematic diagram of the structure of the blockchain-based information processing device provided in one embodiment of this specification is shown below. Figure 12As shown, blockchain-based information processing devices can vary significantly due to differences in configuration or performance. They may include one or more processors 1201 and memory 1202, with memory 1202 storing one or more application programs or data. Memory 1202 can be temporary or persistent storage. The application programs stored in memory 1202 may include one or more modules (not shown), each module including a series of computer-executable instructions for the blockchain-based information processing device. Furthermore, processor 1201 may be configured to communicate with memory 1202, executing the series of computer-executable instructions stored in memory 1202 on the blockchain-based information processing device. The blockchain-based information processing device may also include one or more power supplies 1203, one or more wired or wireless network interfaces 1204, one or more input / output interfaces 1205, and one or more keyboards 1206.
[0215] In one embodiment, a blockchain-based information processing device includes a processor; and a memory arranged to store computer-executable instructions that, when executed by the processor, cause the processor to perform the following processes:
[0216] Obtain a first item exchange request sent by a first user to a second user; the first item exchange request is used to request to exchange the first user's first item for the second user's second item;
[0217] In response to the first item exchange request, the first smart contract in the blockchain system is invoked to determine the first value of the first item and the second value of the second item;
[0218] The second smart contract in the blockchain system is invoked to generate first item exchange information for the first user and second item exchange information for the second user based on the first value and the second value.
[0219] Send the first item exchange information to the first user, and send the second item exchange information to the second user;
[0220] Based on the first confirmation operation data of the first user for the first item exchange information and the second confirmation operation data of the second user for the second item exchange information, the operation of exchanging the first user's first item for the second user's second item is executed in the blockchain system.
[0221] The blockchain-based information processing device in this embodiment can implement the various processes of the aforementioned blockchain-based information processing method embodiment applied to blockchain nodes and achieve the same effects and functions, which will not be repeated here.
[0222] In another embodiment, the blockchain-based information processing device includes a processor; and a memory arranged to store computer-executable instructions, which, when executed by the processor, cause the processor to perform the following processes:
[0223] Send a first item exchange request from the first user to the blockchain node for the second user; the first item exchange request is used to request the exchange of the first user's first item for the second user's second item.
[0224] The blockchain node obtains the first item exchange information sent to the first user based on the first item exchange request; the first item exchange information is generated based on the first value of the first item and the second value of the second item.
[0225] In response to the first user's first confirmation operation regarding the first item exchange information, first confirmation operation data is sent to the blockchain node. The first confirmation operation data is used to instruct the blockchain node to perform an operation in the blockchain system to exchange the first user's first item for the second user's second item.
[0226] The blockchain-based information processing device in this embodiment can implement the various processes of the aforementioned blockchain-based information processing method embodiment applied to the user terminal of the first user, and achieve the same effect and function, which will not be repeated here.
[0227] In another embodiment, the blockchain-based information processing device includes a processor; and a memory arranged to store computer-executable instructions, which, when executed by the processor, cause the processor to perform the following processes:
[0228] Initiating an item posting transaction to a blockchain node; the item posting transaction carries the user information of the second user and the item information of the second item to be exchanged by the second user; the item posting transaction is used to store the user information of the second user and the item information of the second item on the blockchain;
[0229] The blockchain node obtains second item exchange information sent to the second user based on the first item exchange request from the first user; the first item exchange request is sent by the first user to the blockchain node; the first item exchange request is used to request the exchange of the first user's first item for the second item; the second item exchange information is generated based on the first value of the first item and the second value of the second item;
[0230] In response to the second user's second confirmation operation regarding the second item exchange information, a second confirmation operation data is sent to the blockchain node. The second confirmation operation data is used to instruct the blockchain node to perform an operation in the blockchain system to exchange the first user's first item for the second user's second item.
[0231] The blockchain-based information processing device in this embodiment can implement the various processes of the aforementioned blockchain-based information processing method embodiment applied to the user terminal of the second user, and achieve the same effect and function, which will not be repeated here.
[0232] This specification also provides a storage medium for storing computer-executable instructions that, when executed by a processor, cause the processor to perform the following process:
[0233] Obtain a first item exchange request sent by a first user to a second user; the first item exchange request is used to request to exchange the first user's first item for the second user's second item;
[0234] In response to the first item exchange request, the first smart contract in the blockchain system is invoked to determine the first value of the first item and the second value of the second item;
[0235] The second smart contract in the blockchain system is invoked to generate first item exchange information for the first user and second item exchange information for the second user based on the first value and the second value.
[0236] Send the first item exchange information to the first user, and send the second item exchange information to the second user;
[0237] Based on the first confirmation operation data of the first user for the first item exchange information and the second confirmation operation data of the second user for the second item exchange information, the operation of exchanging the first user's first item for the second user's second item is executed in the blockchain system.
[0238] The storage medium in this embodiment can implement the various processes of the aforementioned blockchain-based information processing method embodiment applied to blockchain nodes, and achieve the same effects and functions, which will not be repeated here.
[0239] Another embodiment of this specification provides a storage medium for storing computer-executable instructions that, when executed by a processor, cause the processor to perform the following process:
[0240] Send a first item exchange request from the first user to the blockchain node for the second user; the first item exchange request is used to request the exchange of the first user's first item for the second user's second item.
[0241] The blockchain node obtains the first item exchange information sent to the first user based on the first item exchange request; the first item exchange information is generated based on the first value of the first item and the second value of the second item.
[0242] In response to the first user's first confirmation operation regarding the first item exchange information, first confirmation operation data is sent to the blockchain node. The first confirmation operation data is used to instruct the blockchain node to perform an operation in the blockchain system to exchange the first user's first item for the second user's second item.
[0243] The storage medium in this embodiment can implement the various processes of the aforementioned embodiment of the blockchain-based information processing method applied to the user terminal of the first user, and achieve the same effect and function, which will not be repeated here.
[0244] Another embodiment of this specification provides a storage medium for storing computer-executable instructions that, when executed by a processor, cause the processor to perform the following process:
[0245] Initiating an item posting transaction to a blockchain node; the item posting transaction carries the user information of the second user and the item information of the second item to be exchanged by the second user; the item posting transaction is used to store the user information of the second user and the item information of the second item on the blockchain;
[0246] The blockchain node obtains second item exchange information sent to the second user based on the first item exchange request from the first user; the first item exchange request is sent by the first user to the blockchain node; the first item exchange request is used to request the exchange of the first user's first item for the second item; the second item exchange information is generated based on the first value of the first item and the second value of the second item;
[0247] In response to the second user's second confirmation operation regarding the second item exchange information, a second confirmation operation data is sent to the blockchain node. The second confirmation operation data is used to instruct the blockchain node to perform an operation in the blockchain system to exchange the first user's first item for the second user's second item.
[0248] The storage medium in this embodiment can implement the various processes of the aforementioned embodiment of the blockchain-based information processing method applied to the user terminal of the second user, and achieve the same effect and function, which will not be repeated here.
[0249] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0250] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using a hardware physical module. For example, a Programmable Logic Device (PLD) (e.g., a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program a digital system themselves to "integrate" it onto a PLD, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0251] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, ASICs, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0252] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0253] For ease of description, the above devices are described in terms of function, divided into various units. Of course, when implementing one or more of these specifications, the functions of each unit can be implemented in one or more software and / or hardware.
[0254] Those skilled in the art will understand that one or more embodiments of this specification can be provided as a method, system, or computer program product. Therefore, one or more of this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more of this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0255] This specification, one or more, is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to one or more embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0256] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0257] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0258] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0259] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0260] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0261] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0262] Those skilled in the art will understand that one or more embodiments of this specification can be provided as a method, system, or computer program product. Therefore, one or more of this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more of this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0263] This specification, one or more, can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification, one or more, can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0264] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0265] The above description is merely an embodiment of one or more embodiments of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.
Claims
1. A blockchain-based information processing method, comprising: Get the first item exchange request sent by the first user to the second user; The first item exchange request is used to request the exchange of the first user's first item for the second user's second item; In response to the first item exchange request, the first smart contract in the blockchain system is invoked to determine the first value of the first item and the second value of the second item; The second smart contract in the blockchain system is invoked to generate first item exchange information for the first user and second item exchange information for the second user based on the first value and the second value; wherein, both the first item exchange information and the second item exchange information include value notification information, which is used to notify the first value and the second value; Send the first item exchange information to the first user, and send the second item exchange information to the second user; Based on the first confirmation operation data of the first user for the first item exchange information and the second confirmation operation data of the second user for the second item exchange information, the operation of exchanging the first user's first item for the second user's second item is executed in the blockchain system.
2. The method according to claim 1, wherein, Retrieve the first item exchange request sent by the first user to the second user, including: The system obtains a first item exchange request sent by a first user to a second user by scanning the second user's barcode information; wherein the barcode information carries the second user's user information and the second item's item information. or, The system obtains a first item exchange request sent by a first user to a second user by triggering an item exchange message published by the second user in the blockchain system; wherein the item exchange message carries the user information of the second user and the item information of the second item.
3. The method according to claim 1, wherein, Before invoking a first smart contract in the blockchain system to determine the first value of the first item and the second value of the second item in response to the first item exchange request, the method further includes: Obtain a second item exchange request sent by the second user to the first user; the second item exchange request is used to request to exchange the second user's second item for the first user's first item; In response to the first item exchange request, a first smart contract in the blockchain system is invoked to determine the first value of the first item and the second value of the second item, including: In response to the first item exchange request and the second item exchange request, after determining that the first item exchange request matches the second item exchange request, the first smart contract in the blockchain system is invoked to determine the first value of the first item and the second value of the second item.
4. The method according to claim 1 or 3, wherein, Invoking the first smart contract in the blockchain system to determine the first value of the first item includes: The first smart contract in the blockchain system is invoked to retrieve the first value of the first item from the database. or, The first smart contract in the blockchain system is invoked to obtain the value of a first target item that belongs to the same category as the first item. Based on the value of the first target item, the first value of the first item is determined.
5. The method according to claim 1 or 3, wherein, Invoking the first smart contract in the blockchain system to determine the second value of the second item includes: The first smart contract in the blockchain system is invoked to retrieve the second value of the second item from the database. or, The first smart contract in the blockchain system is invoked to obtain the value of a second target item that belongs to the same category as the second item. Based on the value of the second target item, the second value of the second item is determined.
6. The method according to claim 1, wherein, The second smart contract in the blockchain system is invoked to generate first item exchange information for the first user and second item exchange information for the second user, based on the first value and the second value, including: The second smart contract in the blockchain system is invoked to generate value notification information for notifying the first value and the second value. The second smart contract in the blockchain system is invoked to generate first item exchange information for the first user based on the value notification information and the user information of the second user, and to generate second item exchange information for the second user based on the value notification information and the user information of the first user.
7. The method according to claim 1, wherein, Before invoking a second smart contract in the blockchain system to generate first item exchange information for the first user and second item exchange information for the second user based on the first value and the second value, the method further includes: Call the third smart contract in the blockchain system to calculate the first exchange resource required by the first user to exchange the first item for the second item and the second exchange resource required by the second user to exchange the second item for the first item. The second smart contract in the blockchain system is invoked to generate first item exchange information for the first user and second item exchange information for the second user, based on the first value and the second value, including: The second smart contract in the blockchain system is invoked to generate first item exchange information for the first user based on the first value, the second value, and the first exchange resource, and to generate second item exchange information for the second user based on the first value, the second value, and the second exchange resource.
8. The method according to claim 7, wherein, The process involves invoking a third smart contract within the blockchain system to calculate the first exchange resource required by the first user to exchange the first item for the second item, and the second exchange resource required by the second user to exchange the second item for the first item, including: The third smart contract in the blockchain system is invoked to determine, based on the current computing power of the blockchain system, the first exchange resource required by the first user to exchange the first item for the second item and the second exchange resource required by the second user to exchange the second item for the first item.
9. The method according to claim 7, wherein, The system invokes a second smart contract in the blockchain system to generate first item exchange information for the first user based on the first value, the second value, and the first exchange resource, and generates second item exchange information for the second user based on the first value, the second value, and the second exchange resource, including: The second smart contract in the blockchain system is invoked to generate value notification information for notifying the first value and the second value. The second smart contract in the blockchain system is invoked to generate a first exchange resource notification message for notifying the first exchange resource, and a second exchange resource notification message for notifying the second exchange resource. The second smart contract in the blockchain system is invoked to generate first item exchange information for the first user based on the value notification information, the first exchange resource notification information, and the user information of the second user. Then, based on the value notification information, the second exchange resource notification information, and the user information of the first user, second item exchange information for the second user is generated.
10. The method according to claim 9, wherein, Based on the first confirmation operation data of the first user regarding the exchange of the first item and the second confirmation operation data of the second user regarding the exchange of the second item, the operation of exchanging the first user's first item for the second user's second item is executed in the blockchain system, including: After determining that the first user has paid the first exchange resource based on the first user's first confirmation operation data for the first item exchange information, and determining that the second user has paid the second exchange resource based on the second user's second confirmation operation data for the second item exchange information, the operation of exchanging the first user's first item for the second user's second item is executed in the blockchain system.
11. The method according to claim 1 or 10, wherein, In a blockchain system, performing an operation to exchange a first item of the first user for a second item of the second user includes: Initiate a first transaction in the blockchain system, the first transaction being used to update the owner of the first item from the first user to the second user; A second transaction is initiated in the blockchain system to update the owner of the second item from the second user to the first user.
12. A blockchain-based information processing method, comprising: Send the first user's first item exchange request to the second user to the blockchain node; The first item exchange request is used to request the exchange of the first user's first item for the second user's second item; The blockchain node obtains the first item exchange information sent to the first user based on the first item exchange request; the first item exchange information is generated based on the first value of the first item and the second value of the second item, and the first item exchange information also includes value notification information, which is used to notify the first value and the second value. In response to the first user's first confirmation operation regarding the first item exchange information, first confirmation operation data is sent to the blockchain node. The first confirmation operation data is used to instruct the blockchain node to perform an operation in the blockchain system to exchange the first user's first item for the second user's second item.
13. The method according to claim 12, wherein, Send the first user's first item exchange request to the second user to the blockchain node, including: In response to a first user's scanning operation of the barcode information of a second user, the user information of the second user and the item information of the second item are obtained from the barcode information, and the user information of the first user and the item information of the first item are also obtained. Based on the user information of the first user, the item information of the first item, the user information of the second user, and the item information of the second item, a request for exchanging the first item is generated and sent to the blockchain node.
14. The method according to claim 12, wherein, Send the first user's first item exchange request to the second user to the blockchain node, including: In response to a triggering operation by a first user in response to an item exchange message published by a second user in the blockchain system, the user information of the second user and the item information of the second item are obtained from the item exchange message, and the user information of the first user and the item information of the first item are also obtained. Based on the user information of the first user, the item information of the first item, the user information of the second user, and the item information of the second item, a request for exchanging the first item is generated and sent to the blockchain node.
15. The method according to claim 12, wherein, The first item exchange information includes value notification information, first exchange resource notification information, and user information of the second user; the value notification information is used to notify the first value and the second value. The first exchange resource notification information is used to notify the first exchange resource required to exchange the first item for the second item; In response to the first confirmation operation performed by the first user regarding the first item exchange information, first confirmation operation data is sent to the blockchain node, including: In response to the first confirmation operation performed by the first user for the first item exchange information, after determining that the first user has paid the first exchange resource, first confirmation operation data is generated and sent to the blockchain node.
16. A blockchain-based information processing method, comprising: Initiating an item posting transaction to a blockchain node; the item posting transaction carries the user information of the second user and the item information of the second item to be exchanged by the second user; the item posting transaction is used to store the user information of the second user and the item information of the second item on the blockchain; The blockchain node obtains second item exchange information sent to the second user based on the first item exchange request of the first user; the first item exchange request is sent by the first user to the blockchain node; the first item exchange request is used to request to exchange the first item of the first user for the second item; the second item exchange information is generated based on the first value of the first item and the second value of the second item, and the second item exchange information also includes value notification information, which is used to notify the first value and the second value. In response to the second user's second confirmation operation regarding the second item exchange information, a second confirmation operation data is sent to the blockchain node. The second confirmation operation data is used to instruct the blockchain node to perform an operation in the blockchain system to exchange the first user's first item for the second user's second item.
17. The method according to claim 16, wherein, The second item exchange information includes value notification information, second exchange resource notification information, and user information of the first user; the value notification information is used to notify the first value and the second value. The second exchange resource notification information is used to notify the second exchange resource required to exchange the second item for the first item; In response to the second confirmation operation performed by the second user regarding the second item exchange information, second confirmation operation data is sent to the blockchain node, including: In response to the second confirmation operation performed by the second user for the second item exchange information, after determining that the second user has paid the second exchange resource, second confirmation operation data is generated and sent to the blockchain node.
18. A blockchain-based information processing device, comprising: The request acquisition unit acquires the first item exchange request sent by the first user to the second user; The first item exchange request is used to request the exchange of the first user's first item for the second user's second item; The value determination unit, in response to the first item exchange request, invokes the first smart contract in the blockchain system to determine the first value of the first item and the second value of the second item; The information generation unit invokes a second smart contract in the blockchain system to generate first item exchange information for the first user and second item exchange information for the second user based on the first value and the second value; wherein, both the first item exchange information and the second item exchange information include value notification information, which is used to notify the first value and the second value; The information sending unit sends the first item exchange information to the first user and the second item exchange information to the second user; The item exchange unit performs an operation in the blockchain system to exchange the first item of the first user for the second item of the second user, based on the first confirmation operation data of the first user for the first item exchange information and the second confirmation operation data of the second user for the second item exchange information.
19. A blockchain-based information processing device, comprising: The request sending unit sends the first user's first item exchange request to the second user to the blockchain node; The first item exchange request is used to request the exchange of the first user's first item for the second user's second item; The first information receiving unit acquires the first item exchange information sent by the blockchain node to the first user based on the first item exchange request; the first item exchange information is generated based on the first value of the first item and the second value of the second item, and the first item exchange information also includes value notification information, which is used to notify the first value and the second value. The first data sending unit, in response to the first confirmation operation performed by the first user for the first item exchange information, sends first confirmation operation data to the blockchain node. The first confirmation operation data is used to instruct the blockchain node to perform an operation in the blockchain system to exchange the first item of the first user for the second item of the second user.
20. A blockchain-based information processing device, comprising: The transaction publishing unit initiates an item publishing transaction to a blockchain node; the item publishing transaction carries the user information of the second user and the item information of the second item to be exchanged by the second user; the item publishing transaction is used to store the user information of the second user and the item information of the second item on the blockchain; The second information receiving unit acquires second item exchange information sent by the blockchain node to the second user based on the first item exchange request of the first user; the first item exchange request is sent by the first user to the blockchain node; the first item exchange request is used to request the exchange of the first user's first item for the second item; the second item exchange information is generated based on the first value of the first item and the second value of the second item, and the second item exchange information also includes value notification information, which is used to notify the first value and the second value. The second data sending unit, in response to the second user's second confirmation operation regarding the second item exchange information, sends second confirmation operation data to the blockchain node. The second confirmation operation data is used to instruct the blockchain node to perform an operation in the blockchain system to exchange the first user's first item for the second user's second item.
21. An information processing device, comprising: processor; as well as A memory configured to store computer-executable instructions, which, when executed by the processor, cause the processor to perform the steps of the method according to any one of claims 1-11, or the steps of the method according to any one of claims 12-15, or the steps of the method according to claim 16 or 17.
22. A storage medium for storing computer-executable instructions, which, when executed by a processor, cause the processor to perform the steps of the method according to any one of claims 1-11, or the steps of the method according to any one of claims 12-15, or the steps of the method according to claim 16 or 17.
Citation Information
Patent Citations
Barter method and system based on network
CN101458800A
Multi-party object-to-object exchange method and device based on block chain, and storage medium
CN114565437A
