Transaction method, system and device based on block chain, medium and product
Through the blockchain-based transaction method, reward assets are generated and distributed to merchants based on user evaluations, which solves the problem of low enthusiasm of merchants in pre-deposited consumption scenarios, improves service quality and user experience, forms a virtuous cycle, and enhances blockchain Participation in the chain.
Patent Information
- Application Number
- CN202410634415.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-21
- Publication Date
- 2024-09-03
AI Technical Summary
Existing merchants are less motivated to carry out activities and improve service quality in pre-deposited consumption scenarios, resulting in users suffering losses and being unable to provide high-quality services for a long time.
Through the blockchain-based transaction method, reward assets are generated and distributed to merchants based on user evaluation results, motivating merchants to improve service quality and user experience, thereby increasing the enthusiasm for pre-deposit activities.
It improves merchants' service enthusiasm and user experience, forms a virtuous cycle, and enhances user and merchant participation in the blockchain.
Smart Images

Figure CN118587010A
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of blockchain technology, and in particular to a transaction method, system, device, medium and product based on blockchain. Background Art
[0002] There are many pre-deposit consumption scenarios now, where users deposit funds in merchant accounts to get discounts. However, since merchants fail to perform according to the contract, users often suffer losses. If the settlement is simply made once after a service according to the contract rules, merchants will have low enthusiasm for carrying out pre-deposit activities and will not be able to bring pre-deposit consumption discounts to users. In addition, merchants will have low enthusiasm for improving service quality and enhancing user experience, and will not be able to provide high-quality services for a long time. Summary of the invention
[0003] The embodiments of the present application provide a transaction method, system, device, medium and product based on blockchain to solve the problem that existing merchants are less motivated to carry out pre-deposit activities and improve service quality.
[0004] In order to solve the above technical problems, this application is implemented as follows:
[0005] In a first aspect, an embodiment of the present application provides a transaction method based on blockchain, the method comprising:
[0006] generating reward assets based on the prepaid assets of the first user;
[0007] When the merchant determination target condition is met, a second merchant is determined from the first merchants according to the evaluation result of the second user on the first merchant, and the reward assets are allocated to the second merchant;
[0008] The second user is a user among the first users who has completed a transaction with the first merchant, and the evaluation result is the evaluation of the second user on the service provided by the first merchant.
[0009] Optionally, also include:
[0010] Obtaining a smart contract established by the first user and the first merchant;
[0011] A smart contract template is created and stored according to the smart contract, wherein the content of the smart contract includes an asset settlement rule for paying the first user's prepaid assets to the first merchant after the first merchant completes the service.
[0012] Optionally, also include:
[0013] Selecting a smart contract template from the stored smart contract templates according to the asset settlement rules after the service is completed determined by the first user and the first merchant;
[0014] Generate a smart contract between the first user and the first merchant according to the selected smart contract template.
[0015] Optionally, the target condition is that a new block needs to be generated;
[0016] The determining a second merchant from the first merchants according to the evaluation result of the second user on the first merchant, and allocating the reward assets to the second merchant comprises:
[0017] Determining the first merchant with the highest evaluation result according to the evaluation result of the second user on the first merchant;
[0018] Determine the first merchant with the highest evaluation result as the second merchant;
[0019] Allocating the accounting right of the new block to the second merchant;
[0020] Allocate part of the reward assets to the second merchant who has the accounting right.
[0021] Optionally, some of the reward assets include:
[0022] The reward assets corresponding to the part of the prepaid assets paid by the second user to the first merchant during the current block transaction record process;
[0023] Or, in the new block transaction record process, the second user pays the first merchant a portion of the prepaid assets corresponding to the reward assets.
[0024] Optionally, also include:
[0025] receiving an instruction from the first user or the first merchant to query target information;
[0026] Return the query result of the target information through an open interface;
[0027] The target information includes at least one of the following: public ledger information, prepaid asset information of the first user, settlement asset information of the first merchant, and smart contract information between the user and the merchant.
[0028] In a second aspect, an embodiment of the present application provides a blockchain-based transaction system, the system comprising:
[0029] A first processing module, configured to generate reward assets based on the prepaid assets of the first user;
[0030] A second processing module, configured to, when the merchant determination target condition is met, determine a second merchant from the first merchants according to the evaluation result of the second user on the first merchant, and allocate the reward assets to the second merchant;
[0031] The second user is a user among the first users who has completed a transaction with the first merchant, and the evaluation result is the evaluation of the second user on the service provided by the first merchant.
[0032] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the blockchain-based transaction method described in the first aspect above are implemented.
[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the blockchain-based transaction method described in the first aspect above are implemented.
[0034] In the present application, a reward asset is generated based on the prepaid asset of the first user. By setting the reward asset, the merchant can obtain rewards from the public ledger while obtaining income; when the target condition for determining the second merchant is met, the second merchant is determined from the first merchants based on the evaluation result of the second user on the first merchant, and the reward asset is allocated to the second merchant; wherein the second user is a user among the first users who has completed a transaction with the first merchant, and the evaluation result is the evaluation of the second user on the service provided by the first merchant. The transaction method based on blockchain in the embodiment of the present application ensures the security and reliability of asset allocation, selects the second merchant based on the evaluation result of the first merchant by the second user who completes the transaction, and allocates rewards to the second merchant, so that the second merchant can obtain additional income from the public account book while obtaining income. The second merchant will maintain or improve its own services to continue to obtain additional income, and the remaining first merchants will also improve their evaluation results by improving their own service levels to obtain rewards. It can effectively motivate merchants in the blockchain to obtain rewards by improving service quality and enhancing user experience, and improve the service enthusiasm of the first merchants. Since pre-deposit activities can increase merchants' rewards, they can also increase merchants' enthusiasm for pre-deposit activities. High-quality services and pre-deposit activities will attract more users to enter the blockchain. The first merchant can also choose to give users discounts for pre-deposit consumption to attract users. More users will generate more evaluations, forming a positive feedback closed loop, thereby achieving a virtuous circle and enhancing the participation of users and merchants in the entire blockchain. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0036] Figure 1 This is a flowchart of a blockchain-based transaction method provided in an embodiment of the present application;
[0037] Figure 2 This is an architecture diagram of a blockchain-based transaction system provided in an embodiment of the present application;
[0038] Figure 3 is a flowchart of another blockchain-based transaction method provided in an embodiment of the present application;
[0039] Figure 4 This is a schematic diagram of a ledger of a blockchain-based transaction provided in an embodiment of the present application;
[0040] Figure 5 It is a structural schematic diagram of a blockchain-based transaction device provided in an embodiment of the present application;
[0041] Figure 6 This is a schematic diagram of the structure of a blockchain-based transaction system provided in an embodiment of the present application;
[0042] Figure 7 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0044] Blockchain technology is a technology that involves several computing devices participating in a distributed peer-to-peer (P2P) ledger technology to jointly maintain a complete distributed intelligent database. Blockchain technology has been widely used because of its decentralization, openness and transparency, each computing device can participate in database records, and each computing device can quickly synchronize data and execute consistently. Smart contracts are contracts that replace legal language with computer language and are automatically executed by programs. Smart contracts are deployed on the blockchain, so they cannot be tampered with. As long as the rules of the smart contract are met, the contract content will be automatically executed.
[0045] For the current pre-deposit consumption scenario, settlement can be carried out through smart contracts to ensure that merchants perform according to the contract. However, simply automatically settling once after a service through the blockchain smart contract rules will reduce the enthusiasm of merchants to carry out pre-deposit activities and fail to bring pre-deposit consumption benefits to users.
[0046] Therefore, please refer to Figure 1 , the embodiment of the present application provides a transaction method based on blockchain, the method comprising:
[0047] Step 11: Generate reward assets based on the prepaid assets of the first user;
[0048] Optionally, the prepaid assets of the first user are received and stored, and part of the prepaid assets are deposited into a public ledger as reward assets.
[0049] Among them, assets can be in digital form or digital representations of real-world assets, for example, cryptocurrencies, tokens, and physical assets.
[0050] Among them, the prepaid assets can be deposited as part of the assets in the public ledger as reward assets according to a certain ratio. For example, 5% of the prepaid assets of each first user can be deposited in the public ledger as reward assets. Of course, the proportion of partial assets can be set according to actual conditions and can be continuously changed according to actual needs. For example, as the number of users and merchants in the subsequent blockchain increases, the proportion of pre-deposited funds deposited in the public ledger can be appropriately reduced, such as to 2%.
[0051] Step 12: When the merchant determination target condition is met, a second merchant is determined from the first merchants according to the evaluation result of the second user on the first merchant, and the reward assets are allocated to the second merchant;
[0052] The second user is a user among the first users who has completed a transaction with the first merchant, and the evaluation result is the evaluation of the second user on the service provided by the first merchant.
[0053] In the present application, a reward asset is generated based on the prepaid asset of the first user. By setting the reward asset, the merchant can obtain rewards from the public ledger while obtaining income; when the target condition for determining the second merchant is met, the second merchant is determined from the first merchants based on the evaluation result of the second user on the first merchant, and the reward asset is allocated to the second merchant; wherein the second user is a user among the first users who has completed a transaction with the first merchant, and the evaluation result is the evaluation of the second user on the service provided by the first merchant. The transaction method based on blockchain in the embodiment of the present application ensures the security and reliability of asset allocation, selects the second merchant based on the evaluation result of the first merchant by the second user who completes the transaction, and allocates rewards to the second merchant, so that the second merchant can obtain additional income from the public account book while obtaining income. The second merchant will maintain or improve its own services to continue to obtain additional income, and the remaining first merchants will also improve their evaluation results by improving their own service levels to obtain rewards. It can effectively motivate merchants in the blockchain to obtain rewards by improving service quality and enhancing user experience, and improve the service enthusiasm of the first merchants. Since pre-deposit activities can increase merchants' rewards, they can also increase merchants' enthusiasm for pre-deposit activities. High-quality services and pre-deposit activities will attract more users to enter the blockchain. The first merchant can also choose to give users discounts for pre-deposit consumption to attract users. More users will generate more evaluations, forming a positive feedback closed loop, thereby achieving a virtuous circle and enhancing the participation of users and merchants in the entire blockchain.
[0054] Optionally, the blockchain in the embodiment of the present application may be a consortium chain, and the nodes of the consortium chain may be merchants and users in different industries. For example, the industry may involve the catering industry, the training industry, and many other industries. The consortium chain in the embodiment of the present application allows authorized participants to join the network, and these participants are usually trusted entities or organizations. In the embodiment of the present application, by limiting the blockchain to a consortium chain, the reliability, security, and privacy of the consortium chain can be increased, ensuring the stability and reliability of the entire consortium chain.
[0055] It is worth mentioning that please refer to Figure 2 In an embodiment of the present application, the prepaid assets of the first user can be received and stored by the data layer, and the data layer includes a blockchain ledger.
[0056] In the embodiment of the present application, the incentive layer can deposit part of the prepaid assets into the public ledger as reward assets. In the prior art, in the Proof of Work (PoW) scenario, the incentive layer mining mechanism means that whoever contributes more computing power will get a Bitcoin reward. The incentive layer in the present application is different from the existing mechanism, and a reward exchange mechanism is added, which takes 5% (adjustable) of the pre-deposited assets submitted by each first user and deposits it into the public ledger as a reward asset.
[0057] In the embodiment of the present application, the consensus layer can set the target conditions for determining the second merchant, determine the second merchant from the first merchant according to the evaluation result of the second user on the first merchant, and allocate the reward assets to the second merchant. The existing consensus mechanism algorithms include POW, Proof of Stake (PoS) and Delegated Proof of Stake (DPoS), etc. The consensus mechanism algorithm in the embodiment of the present application is based on the evaluation value consensus management mechanism. The evaluation value consensus management module determines the second merchant from the first merchant based on the evaluation result of the merchant provided by the evaluation management module in the application layer, and allocates the reward assets to the second merchant.
[0058] The embodiment of the present application also includes a network layer, which is a P2P point-to-point network.
[0059] The embodiment of the present application also includes an application layer, which is based on various application scenarios of blockchain. The application layer in the embodiment of the present application also adds an evaluation management module, which is used to obtain the evaluation of the second user on the service provided by the first merchant. For example, the evaluation score range can be set to [-5,5]. Based on the evaluation scores of all second users on the first merchant, the evaluation management module calculates the evaluation average and provides the evaluation value consensus management module of the consensus layer to determine the second merchant from the first merchant.
[0060] Optionally, in the embodiment of the present application, it also includes:
[0061] Obtaining a smart contract established by the first user and the first merchant;
[0062] A smart contract template is created and stored according to the smart contract, wherein the content of the smart contract includes an asset settlement rule for paying the first user's prepaid assets to the first merchant after the first merchant completes the service.
[0063] In the embodiment of the present application, the settlement transaction mode after the service agreed upon by the first user and the first merchant is solidified into a smart contract template to facilitate subsequent application of the smart contract template by other users and other merchants. In the embodiment of the present application, the contract layer can manage smart contracts and execute script codes. For example, if the first merchant is a training structure, and the settlement mode agreed upon by the user and the training institution is one lesson one settlement module, then a smart contract that meets the one lesson one settlement mode is created, and this smart contract can be maintained through the smart contract template management module in the contract layer. Subsequent users and merchants with the same settlement demands can directly select this template rule from the smart contract template and use it directly.
[0064] In the embodiment of the present application, the post-transaction asset allocation can be automatically executed through smart contracts without human intervention, thereby improving efficiency and reducing errors. Automated contract execution can also make asset allocation and management more efficient, transparent and secure. The transfer of prepaid assets can be directly controlled by the smart contract in the embodiment of the present application. When the contract conditions are met, the assets can be transferred immediately without waiting. By making the smart contract template-based and making the contract reusable, the standardization of smart contracts can be improved, saving the time cost of users generating smart contracts.
[0065] Optionally, in the embodiment of the present application, it also includes:
[0066] Selecting a smart contract template from the stored smart contract templates according to the asset settlement rules after the service is completed determined by the first user and the first merchant;
[0067] Generate a smart contract between the first user and the first merchant according to the selected smart contract template.
[0068] In an embodiment of the present application, a smart contract template is selected from the stored smart contract templates according to the asset settlement rules after the completion of the service determined by the first user and the first merchant, and then a smart contract between the first user and the first merchant is generated. By using smart contract templating, smart contract templates that comply with the same settlement rules are reusable, thereby saving the user's time cost in generating smart contracts.
[0069] Furthermore, the application layer in the embodiment of the present application also adds a new contract rule signature management module, which is used to store and manage the signatures of the contract signed by the first user and the first merchant. The contract rule signature management module ensures that the contract settlement rules are agreed upon by the first user and the first merchant who signed the contract, wherein the contract settlement rules include the asset settlement rules that the first user's prepaid assets are paid to the first merchant after the first merchant completes the service, so as to avoid disputes between the first user and the first merchant. The settlement between the first user and the first merchant is based on the relevant rules of the smart contract, and a smart contract is formulated, or a suitable smart contract is selected from the smart contract template. The first user and the first merchant who signed the contract sign the private key, and the digital signature is used to verify the consent and commitment of all parties to ensure that both parties agree on such settlement rules. If the user and the merchant have objections to the smart contract settlement rules, the contract rule signature management module uses the stored user and merchant public keys to verify the signature of the effective smart contract. The correct verification of the signature indicates that the effective smart contract rules are agreed upon by the user and the merchant, avoiding the situation in which one party does not recognize the settlement rules in the future.
[0070] Optionally, in an embodiment of the present application, the target condition is that a new block needs to be generated;
[0071] The determining a second merchant from the first merchants according to the evaluation result of the second user on the first merchant, and allocating the reward assets to the second merchant comprises:
[0072] Determining the first merchant with the highest evaluation result according to the evaluation result of the second user on the first merchant;
[0073] Determine the first merchant with the highest evaluation result as the second merchant;
[0074] Allocating the accounting right of the new block to the second merchant;
[0075] Allocate part of the reward assets to the second merchant who has the accounting right.
[0076] In the embodiment of the present application, if a new block needs to be generated, the next second merchant is determined, the first merchant with the highest evaluation result of the second user on the first merchant is determined as the second merchant, and the bookkeeping right of the new block is allocated to the second merchant, and part of the assets in the reward assets are directly allocated to the second merchant with the bookkeeping right. In the embodiment of the present application, the reward assets are further allocated by allocating the bookkeeping right, and a more transparent reward allocation record is provided through the bookkeeping right. Anyone in the blockchain can verify the allocation of rewards, which increases the transparency of the system. And on the basis of allocating rewards, let the second merchant participate in the maintenance of the network, increase the degree of decentralization and anti-fragility of the network, and further make the merchant more motivated to maintain the normal operation of the network, including providing stable node operation and participating in the consensus process. Of course, the second merchant who obtains the bookkeeping right can have the next bookkeeping qualification of the current blockchain, and the reward obtained can not only include part of the assets in the reward assets, but also include the transaction fee.
[0077] In an embodiment of the present application, the incentive layer may use part of the reward assets as rewards for merchants with accounting rights; the evaluation management module in the application layer may calculate the evaluation results for use by the evaluation value consensus management module in the consensus layer to select the second merchant to obtain the accounting rights.
[0078] Optionally, in the embodiment of the present application, some of the reward assets include:
[0079] The reward assets corresponding to the part of the prepaid assets paid by the second user to the first merchant during the current block transaction record process;
[0080] Or, in the new block transaction record process, the second user pays the first merchant a portion of the prepaid assets corresponding to the reward assets.
[0081] In an embodiment of the present application, the reward assets corresponding to part of the prepaid assets paid by the second user who completes the transaction service to the first merchant during the current block transaction record process can be used as a reward for the second merchant who obtains the accounting right. For example, during the current block transaction record process, the merchant 2 has the highest evaluation result. Merchant 2 obtains the accounting right for the next block, but obtains the reward generated during the current block transaction record process.
[0082] Or, in the new block transaction record process, the reward assets corresponding to the part of the prepaid assets paid by the second user who completes the transaction service to the first merchant are used as rewards for the second merchant who obtains the bookkeeping rights. For example, in the current block transaction record process, the merchant 2 has the highest evaluation result, and merchant 2 obtains the bookkeeping rights of the next block and the rewards generated in the next block transaction record process.
[0083] In the embodiment of the present application, the evaluation result may include only the evaluation generated after the transaction service is completed in the current block transaction record process, or may include all the evaluations obtained from the merchant entering the blockchain to the current moment, or may be selected according to actual needs, and the present application does not impose any restrictions. Optionally, limiting the evaluation result to only include the evaluation generated after the transaction service is completed in the current block transaction record process can mobilize the enthusiasm of the merchant, so that the merchant can improve the quality of service in each block transaction record process to improve the evaluation result of this time.
[0084] In the embodiment of the present application, the reward assets allocated according to the bookkeeping rights can be the reward assets generated in the new block, or the reward assets generated in the old block. Unlike the prior art in which the user with the bookkeeping rights obtains the bookkeeping reward of the next block, the bookkeeping reward in the embodiment of the present application can be the reward generated in the current block transaction record process, which is in line with the mechanism of award allocation through evaluation in the present application. The second merchant with the highest evaluation result in the current block transaction process has the reward generated in the current block transaction process. The service provided by the merchant at the moment will affect the allocation of this bookkeeping right and the reward generated in this block transaction process. This reward allocation method can ensure that the merchant has the enthusiasm to improve the service quality in each block transaction record process. Of course, it can also be set to allocate rewards after the bookkeeping is completed.
[0085] Optionally, in the embodiment of the present application, it also includes:
[0086] receiving an instruction from the first user or the first merchant to query target information;
[0087] Return the query result of the target information through an open interface;
[0088] The target information includes at least one of the following: public ledger information, prepaid asset information of the first user, settlement asset information of the first merchant, and smart contract information between the user and the merchant.
[0089] Furthermore, in the embodiment of the present application, a resource management module is added to the application layer. The resource management module executes the above embodiment to execute the instruction received from the first user or the first merchant to query the target information; and returns the query result of the target information through an open interface. The first user and the first merchant can query the corresponding assets, transaction records and smart contract rules agreed upon by the user and merchant who triggered the transaction according to their own permissions. The resource management module returns JSON or XML messages through an open API interface, and users and merchants can query their own account assets (including the user's prepaid asset information and the merchant's settlement asset information), public account status and smart contract rules for settlement between users and merchants in real time. In the embodiment of the present application, the query target information result is returned through an open interface. On the basis of transaction transparency, the query process is simplified, which is simple and convenient for ordinary users and merchants to operate, and helps to further attract more users and merchants to enter the current blockchain.
[0090] Please refer to Figure 3 and Figure 4 , the present application will be further described below through specific embodiments.
[0091] Step S1: There are service and transaction demands between User 1 and Merchant 1. User 1 and Merchant 1 agree on the settlement transaction model after the service: select the smart contract template according to the settlement rules to create a smart contract.
[0092] In this embodiment, Merchant 1 is a training structure. Please refer to Table 1 for different contract templates and corresponding template rules provided in this embodiment. The settlement mode agreed upon by User 1 and Merchant 1 is "pay 1 class fee after completing 1 class", totaling 10 classes. Therefore, select Smart Contract Template 1 to create a smart contract, and maintain this smart contract through the smart contract template management module. Subsequent users and merchants who need to use this settlement mode can directly obtain this smart contract from the smart contract template and sign it with the private key and upload it to the blockchain.
[0093] Table 1
[0094] Contract Template Template Rules Template 1 Pay the fee for 1 lesson after completing 1 lesson Template 2 Pay one week's tuition fee after completing one week's lessons Template 3 Pay half semester tuition fee after completing half semester Template 4 Pay one semester's tuition fee after completing one semester's lessons Template 5 Pay one semester's tuition fee first
[0095] Step S2: receiving and storing the prepaid funds 1000 pre-deposited by user 1 into the membership card.
[0096] User 1’s pre-deposited funds of 1,000 are uploaded to the blockchain’s data layer, and User 1’s funds are recorded and stored in the blockchain’s User 1 ledger.
[0097] Step S3: Deposit 5% (50) of User 1’s prepaid funds of 1000 into the public ledger as reward assets.
[0098] Please refer to Figure 3 , the public ledger's reward assets also include 5% of the funds of user 2 (pre-deposited 2000) and user 3 (pre-deposited 3000). Therefore, there are a total of 300 reward assets in the public ledger at this time. The initial ledgers of user 1, user 2 and user 3 are 1000, 2000 and 3000 respectively. After deducting the reward assets, the ledgers of user 1, user 2 and user 3 are 950, 1900 and 2850 respectively. In this embodiment, the reward assets are rewards for merchants with bookkeeping rights. As more users and merchants are settled in, the proportion of pre-deposited funds deposited in the public ledger can be appropriately reduced, for example, to 2%.
[0099] Step S4: Merchant 1 completes 1 hour of service.
[0100] Step S5: After completing one class of training, the smart contract rules are triggered, and the user's funds in the blockchain are paid to the merchant according to the income from one class (95), and detailed transaction records are recorded in the blockchain. User 1 evaluates the training results of Merchant 1. Please refer to Figure 3 After Merchant 1 completes 1 hour of teaching, the settlement rule of smart contract template 1 is triggered. Merchant 1 obtains 1 hour of profit, and 95 is credited to Merchant 1's account book. The reward asset corresponding to this transaction is 5. User 1's account book deducts 1 hour of funds, and 855 remains.
[0101] Step S6: Allocate the reward assets to the second merchant:
[0102] If the settlement rule of the reward assets is: the merchant who has the right to record the transaction in the current block will receive the reward in the current block transaction (i.e., the aforementioned part of the reward assets is "the reward assets corresponding to the part of the prepaid assets paid by the second user to the first merchant in the new block transaction process"). Assuming that Merchant 2 is the second merchant with the right to record the transaction in the current block determined by the evaluation results at the end of the previous block transaction record, the reward assets 5 corresponding to the transaction between User 1 and Merchant 1 are allocated to Merchant 2.
[0103] Step S7: When the target condition for determining the second merchant is met, the target condition in this embodiment is the need to generate a new block. Then, based on the historical evaluation results of all first merchants in the evaluation management module during the current block transaction record process, the consensus node management module dynamically allocates accounting rights to the merchants. Merchants who obtain new accounting rights can have the next accounting qualification of this blockchain and obtain accounting rights rewards and handling fees for the new block.
[0104] Please refer to Table 2. For example, there are three merchants, B1, B2 and B3, and three users, C1, C2 and C3. After merchant B1 completes the service for the three users C1-C3, users C1, C2 and C3 give merchant B1 scores of 5, 2 and -1 points respectively. Merchant B2 completes the service for users C1 and C3, and users C1 and C3 give merchant B2 scores of 3 and 2 points respectively. After merchant B3 completes the service for user C3, user C3 gives a score of 3 points. When the consensus node management module allocates the accounting right, the total score of merchant B1 obtained from the evaluation management module is 5+2+(-1)=6 points, and the average score is total score / number of users=6 / 3=2 points. Similarly, the average score of merchant B2=(3+2) / 2=2.5 points, and the average score of B3=3 / 1=3 points, then merchant B3 will obtain the next accounting right. If the merchants have the same average share, the merchant service user order volume will be compared, and the merchant with the higher order volume will get the next accounting right. The higher the merchant service quality, the higher the evaluation, and the more orders the merchant receives, the higher the probability of obtaining the accounting right. The more accounting rights the merchant receives, the higher the public benefits the merchant can obtain.
[0105] Table 2
[0106] B1 B2 B3 C1 5 3 / C2 2 / / C3 -1 2 3 total 6 5 3 average value 2 2.5 3
[0107] It is worth mentioning that in order to avoid differences in ratings between different users and between different merchants given by the same user, the ratings given by the same user to different merchants can be normalized, and then the normalized ratings can be averaged to make the evaluation system fairer.
[0108] Step S8: User 1 and Merchant 1 can query the corresponding assets, transaction records and smart contract rules agreed upon by the user and merchant that triggered the transaction according to their own permissions.
[0109] Please refer to Figure 5, the embodiment of the present application provides a transaction device 50 based on blockchain, and the device includes: a data layer 51, an incentive layer 52, a consensus layer 53, a contract layer 54 and an application layer 55. The data layer 51 is used to receive and store the prepaid assets of the first user. The incentive layer 52 is used to deposit part of the prepaid assets into the public ledger as reward assets; the consensus layer 53 is used to set the target conditions that meet the trigger to determine the second merchant. In the embodiment of the present application, an evaluation value consensus management module is added to the consensus layer 53. The evaluation value consensus management module selects the second merchant based on the evaluation of the first merchant by the second user provided by the evaluation management module in the application layer 55, and allocates the accounting right to the second merchant. In the incentive layer 52, a new accounting reward exchange is added, and part of the funds from the pre-deposited assets submitted by the first user are deposited in the public ledger as reward assets, wherein the reward assets can be allocated to the second merchant with the accounting right. A new smart contract template management module is added in the contract layer 54. The settlement transaction mode after the first user and the first merchant agree on the service is solidified into a smart contract template. Subsequent users and merchants with the same settlement demands can directly select the same template from the smart contract template for use. In the application layer 55, a new contract rule signature management is added to ensure that the user and the merchant are in agreement on the contract settlement rules; the evaluation management module obtains the second user's evaluation of the service provided by the first merchant. Based on the service provided by the merchant, the user can evaluate it to affect whether it obtains the right to record accounts; the resource management module provides an API interface so that users and merchants can obtain account book information and effective contract rules in real time. The architecture in the embodiment of the present application also effectively expands the use scenarios and settlement modes of blockchain smart contracts. The architecture in the embodiment of the present application ensures the security and reliability of asset allocation. The second merchant is selected based on the evaluation results of the first merchant by the second user who completes the transaction, and rewards are allocated to the second merchant, so that the second merchant can obtain additional income from the public account book while obtaining income. The second merchant will maintain or improve its own services to continue to obtain additional income. The remaining first merchants will also improve their evaluation results by improving their own service levels to obtain rewards. It can effectively motivate merchants in the blockchain to obtain rewards by improving service quality and enhancing user experience, and improve the service enthusiasm of the first merchants. Since pre-deposit activities can increase merchants' rewards, they can also increase merchants' enthusiasm for pre-deposit activities. High-quality services and pre-deposit activities will attract more users to enter the blockchain. The first merchant can also choose to give users pre-deposit consumption discounts to attract users. More users will generate more evaluations, forming a positive feedback closed loop, thereby achieving a virtuous circle and enhancing the participation of users and merchants in the entire blockchain.
[0110] Please refer to Figure 6 , the embodiment of the present application provides a blockchain-based transaction system 60, the system comprising:
[0111] A first processing module 61, configured to generate reward assets based on the prepaid assets of the first user;
[0112] A second processing module 62 is configured to, when the merchant determination target condition is met, determine a second merchant from the first merchants according to the evaluation result of the second user on the first merchant, and allocate the reward assets to the second merchant;
[0113] The second user is a user among the first users who has completed a transaction with the first merchant, and the evaluation result is the evaluation of the second user on the service provided by the first merchant.
[0114] Optionally, the blockchain-based transaction system 60 further includes:
[0115] A contract module, used to obtain a smart contract established by the first user and the first merchant;
[0116] A smart contract template is created and stored according to the smart contract, wherein the content of the smart contract includes an asset settlement rule for paying the first user's prepaid assets to the first merchant after the first merchant completes the service.
[0117] Optionally, the blockchain-based transaction system 60 further includes:
[0118] A selection module, configured to select a smart contract template from the stored smart contract templates according to the asset settlement rules after the service is completed determined by the first user and the first merchant;
[0119] Generate a smart contract between the first user and the first merchant according to the selected smart contract template.
[0120] Optionally, the target condition is that a new block needs to be generated;
[0121] The second processing module 62 includes:
[0122] An accounting right module, used for determining the first merchant with the highest evaluation result according to the evaluation result of the second user on the first merchant;
[0123] Determine the first merchant with the highest evaluation result as the second merchant;
[0124] Allocating the accounting right of the new block to the second merchant;
[0125] Allocate part of the reward assets to the second merchant who has the accounting right.
[0126] Optionally, some of the reward assets include:
[0127] The reward assets corresponding to the part of the prepaid assets paid by the second user to the first merchant during the current block transaction record process;
[0128] Or, in the new block transaction record process, the second user pays the first merchant a portion of the prepaid assets corresponding to the reward assets.
[0129] Optionally, the blockchain-based transaction system 60 further includes:
[0130] A query module, configured to receive an instruction from the first user or the first merchant to query target information;
[0131] Return the query result of the target information through an open interface;
[0132] The target information includes at least one of the following: public ledger information, prepaid asset information of the first user, settlement asset information of the first merchant, and smart contract information between the user and the merchant.
[0133] The blockchain-based transaction system 60 provided in the embodiment of the present application can achieve Figures 1 to 4 The various processes implemented by the method embodiment and achieving the same technical effect are not described here to avoid repetition.
[0134] The present application embodiment provides an electronic device 70, see Figure 7 As shown, Figure 7 This is a principle block diagram of an electronic device 70 according to an embodiment of the present application, including a processor 71, a memory 72, and a program or instruction stored in the memory 72 and executable on the processor 71. When the program or instruction is executed by the processor, the steps of any blockchain-based transaction method of the present application are implemented.
[0135] An embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of an embodiment of a blockchain-based transaction method as described above is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0136] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules 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 technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0137] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0138] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this application are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information and network security.
[0139] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0140] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a service classification device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0141] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A transaction method based on blockchain, characterized in that: The method comprises: generating reward assets based on the prepaid assets of the first user; When the merchant determination target condition is met, a second merchant is determined from the first merchants according to the evaluation result of the second user on the first merchant, and the reward assets are allocated to the second merchant; The second user is a user among the first users who has completed a transaction with the first merchant, and the evaluation result is the evaluation of the second user on the service provided by the first merchant.
2. The method according to claim 1, characterized in that Also includes: Obtaining a smart contract established by the first user and the first merchant; A smart contract template is created and stored according to the smart contract, wherein the content of the smart contract includes an asset settlement rule for paying the first user's prepaid assets to the first merchant after the first merchant completes the service.
3. The method according to claim 1 or 2, characterized in that: Also includes: Selecting a smart contract template from the stored smart contract templates according to the asset settlement rules after the service is completed determined by the first user and the first merchant; Generate a smart contract between the first user and the first merchant according to the selected smart contract template.
4. The method according to claim 1, characterized in that The target condition is that a new block needs to be generated; The determining a second merchant from the first merchants according to the evaluation result of the second user on the first merchant, and allocating the reward assets to the second merchant comprises: Determining the first merchant with the highest evaluation result according to the evaluation result of the second user on the first merchant; Determine the first merchant with the highest evaluation result as the second merchant; Allocating the accounting right of the new block to the second merchant; Allocate part of the reward assets to the second merchant who has the accounting right.
5. The method according to claim 4, characterized in that Some of the bonus assets include: The reward assets corresponding to the part of the prepaid assets paid by the second user to the first merchant during the current block transaction record process; Or, in the new block transaction record process, the second user pays the first merchant a portion of the prepaid assets corresponding to the reward assets.
6. The method according to claim 3, characterized in that Also includes: receiving an instruction from the first user or the first merchant to query target information; Return the query result of the target information through an open interface; The target information includes at least one of the following: public ledger information, prepaid asset information of the first user, settlement asset information of the first merchant, and smart contract information between the user and the merchant.
7. A transaction system based on blockchain, characterized in that: The system comprises: A first processing module, configured to generate reward assets based on the prepaid assets of the first user; A second processing module, configured to, when the merchant determination target condition is met, determine a second merchant from the first merchants according to the evaluation result of the second user on the first merchant, and allocate the reward assets to the second merchant; The second user is a user among the first users who has completed a transaction with the first merchant, and the evaluation result is the evaluation of the second user on the service provided by the first merchant.
8. An electronic device, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the blockchain-based transaction method as described in any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that: A computer program is stored on a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the blockchain-based transaction method as described in any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of any one of 1 to 6 of the blockchain-based transaction method.
