Transaction fee transfer method and device based on blockchain

By receiving the transaction occurrence moment and calculating historical cumulative transaction volume in the blockchain system, dynamically adjusting the transaction fee rate, the problem of inflexible processing fee calculation in the existing technology is solved, and a more flexible and fair processing fee calculation is achieved.

CN113506176BActive Publication Date: 2025-02-25ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110796341.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-14
Publication Date
2025-02-25
Estimated Expiration
2041-07-14

AI Technical Summary

Technical Problem

When calculating transaction fees, existing blockchain technology lacks a technical solution to dynamically adjust the handling fee based on the historical cumulative transaction volume of both parties, resulting in inflexible calculation of handling fees.

Method used

By receiving the transaction occurrence moment in blockchain transactions, the historical cumulative transaction volume of the transaction party is determined based on the corresponding relationship and statistical cycle of the pre-maintained transaction volume interval and the handling fee rate, and the target handling fee rate is calculated to calculate the transaction fee. .

Benefits of technology

It realizes dynamic adjustment of handling fee rates based on the historical cumulative transaction volume of the trading party, improves the flexibility and fairness of trading fee calculation, and encourages trading parties to conduct more transactions to obtain lower handling fee rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113506176B_ABST
    Figure CN113506176B_ABST
Patent Text Reader

Abstract

One or more embodiments of the present specification provide a blockchain-based transaction fee transfer method and device, which are applied to a blockchain system, wherein the method may include: receiving a blockchain transaction in which a purchaser transfers money to a supplier, wherein the blockchain transaction includes the time when the transaction occurs; determining the historical cumulative transaction amount of the purchaser or the supplier within the statistical period to which the transaction time occurs based on a pre-maintained correspondence between a transaction amount range and a fee rate and a statistical period to which the correspondence applies, and determining a target fee rate corresponding to a target transaction amount range to which the historical cumulative transaction amount belongs; calculating the amount of the transaction fee based on the target fee rate and the target transaction amount included in the blockchain transaction, transferring an on-chain asset equal to the transaction fee to a preset fee collection account, and adding the target transaction amount to the historical cumulative transaction amount.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of this specification relate to the field of blockchain, and in particular, to a transaction fee transfer method and device based on blockchain. Background Art

[0002] Blockchain technology (also known as distributed ledger technology) is a decentralized distributed database technology with many characteristics such as decentralization, openness, transparency, immutability, and trustworthiness. It is suitable for many application scenarios with high demands on data reliability.

[0003] Related technologies have proposed a method for conducting transactions based on blockchain, which uses the immutability of blockchain technology to ensure the reliability of transactions. Under normal circumstances, at least one of the two parties to the transaction needs to transfer a certain amount of on-chain assets to an account as a transaction fee for this transaction. Among them, the blockchain system usually calculates the transaction fee based on a preset fixed fee rate and the transaction amount of this transaction. Summary of the invention

[0004] In view of this, one or more embodiments of this specification provide a transaction fee transfer method and device based on blockchain.

[0005] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:

[0006] According to a first aspect of one or more embodiments of this specification, a transaction fee transfer method based on blockchain is proposed, which is applied to a blockchain system, including:

[0007] Receiving a blockchain transaction for transferring money from a purchaser to a supplier, wherein the blockchain transaction includes the time when the transaction occurred;

[0008] According to the pre-maintained correspondence between the transaction amount range and the handling fee rate and the statistical period to which the correspondence applies, determine the historical cumulative transaction amount of the purchaser or the supplier within the statistical period to which the transaction occurred, and determine the target handling fee rate corresponding to the target transaction amount range to which the historical cumulative transaction amount belongs;

[0009] The amount of the transaction fee is calculated based on the target fee rate and the target transaction amount included in the blockchain transaction, and the on-chain assets equal to the transaction fee are transferred to a preset fee collection account, and the target transaction amount is added to the historical accumulated transaction amount.

[0010] According to a second aspect of one or more embodiments of this specification, a transaction fee transfer device based on blockchain is proposed, which is applied to a blockchain system, including:

[0011] A receiving unit receives a blockchain transaction in which a purchaser transfers money to a supplier, wherein the blockchain transaction includes a time when the transaction occurs;

[0012] A determination unit, based on a pre-maintained correspondence between a transaction amount interval and a handling fee rate and a statistical period to which the correspondence applies, determines the historical cumulative transaction amount of the purchaser or the supplier within the statistical period to which the transaction occurs, and determines a target handling fee rate corresponding to the target transaction amount interval to which the historical cumulative transaction amount belongs;

[0013] The transfer unit calculates the amount of the transaction fee based on the target fee rate and the target transaction amount included in the blockchain transaction, transfers the on-chain assets equal to the transaction fee to a preset fee collection account, and adds the target transaction amount to the historical accumulated transaction amount.

[0014] According to a third aspect of one or more embodiments of this specification, an electronic device is provided, including:

[0015] processor;

[0016] a memory for storing processor-executable instructions;

[0017] The processor implements the method as described in the first aspect by running the executable instructions.

[0018] According to a fourth aspect of one or more embodiments of the present specification, a computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the method described in the first aspect are implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 This is a flowchart of a transaction fee transfer method based on blockchain provided by an exemplary embodiment.

[0020] Figure 2 It is a flowchart of a method for storing correspondence evidence provided by an exemplary embodiment.

[0021] Figure 3 It is a flowchart of another blockchain-based transaction fee transfer method provided by an exemplary embodiment.

[0022] Figure 4 It is a structural schematic diagram of a device provided by an exemplary embodiment.

[0023] Figure 5 It is a block diagram of a transaction fee transfer device based on blockchain provided by an exemplary embodiment. DETAILED DESCRIPTION

[0024] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0025] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0026] Blockchain technology (also known as distributed ledger technology) is a decentralized distributed database technology with many characteristics such as decentralization, openness, transparency, immutability, and trustworthiness. It is suitable for many application scenarios with high demands on data reliability.

[0027] In view of this, the related art proposes a method for conducting transactions based on blockchain, which utilizes the immutability of blockchain technology to ensure the reliability of transactions. In actual operation, at least one of the two parties to the transaction needs to transfer a certain amount of on-chain assets to a certain account as the transaction fee for this transaction. Among them, when calculating the transaction fee, the blockchain system in the related art will mostly calculate the transaction fee based on the fixed fee rate maintained by itself and the transaction amount of this transaction.

[0028] It can be seen that in the relevant technology, there is no technical solution that can dynamically adjust the handling fee rate based on the historical cumulative transaction amount of the two parties to the transaction.

[0029] Figure 1 is a flowchart of a transaction fee transfer method based on blockchain, shown in an exemplary embodiment of this specification. The method is applied to a blockchain system, such as Figure 1 As shown, the method may include the following steps:

[0030] Step 102: receiving a blockchain transaction for transferring money from the purchaser to the supplier, wherein the blockchain transaction includes the time when the transaction occurred.

[0031] In this specification, either party to the transaction may submit a blockchain transaction to the blockchain system to instruct the purchaser to transfer funds to the supplier according to the progress of the transaction. For example, the purchaser may submit the above blockchain transaction when it receives the goods provided by the supplier and confirms the received goods; for another example, the supplier may submit the above blockchain transaction (equivalent to making an advance payment before the goods are shipped) when it receives the purchase information provided by the purchaser. Of course, the above examples are only illustrative, and which entity submits the above blockchain transaction to the blockchain system at which execution stage of the transaction can be determined by those skilled in the art according to actual conditions, and this specification does not limit this.

[0032] In this specification, the blockchain system determines the transaction fee rate based on the historical cumulative transaction amount in the period to which the transaction occurs. Therefore, the blockchain transaction received by the blockchain system should include the time when the transaction occurs. For example, in the actual transaction process, a corresponding purchase order is usually generated. Then, the time when the purchase order is generated can be used as the time when the transaction occurs. Of course, the initiator of the above-mentioned blockchain transaction can also add other times as the time when the transaction occurs to the above-mentioned blockchain transaction. For example, the supplier's delivery time or the purchaser's receipt time can also be added to the blockchain transaction as the time when the transaction occurs. Which specific time is used as the time when the transaction occurs can be determined by those skilled in the art according to actual conditions, and this specification does not limit this.

[0033] Step 104, based on the pre-maintained correspondence between transaction amount ranges and handling fee rates and the statistical period to which the correspondence applies, determine the historical cumulative transaction amount of the purchaser or the supplier within the statistical period to which the transaction occurred, and determine the target handling fee rate corresponding to the target transaction amount range to which the historical cumulative transaction amount belongs.

[0034] In this specification, the corresponding relationship used to determine the handling fee rate and its applicable statistical period can be recorded in the blockchain system by sending a record transaction to the blockchain system. The record transaction can include: a number of transaction amount intervals, the handling fee rates corresponding to the transaction amount intervals, and the statistical period applicable to the corresponding relationship between each group of transaction amount intervals and the handling fee rate. In actual operation, the above statistical period can be counted according to multiple dimensions such as year, month, day, quarter, etc.

[0035] In one case, the above correspondence can be set only for the statistical period of a single time dimension, that is, the value of any handling fee rate is only related to the historical cumulative transaction amount of a single time dimension. For example, if the quarter is used as the statistical period, then any corresponding relationship recorded in the evidence transaction can be: transaction amount range-handling fee rate-applicable quarter. For example, if the record is "[0,2000)-2%-first quarter", the corresponding relationship represents: if the transaction occurs in the first quarter, and the historical cumulative transaction amount in the first quarter is within the range of [0,2000), then the transaction fee corresponding to this exchange can be calculated using the handling fee rate of 2%.

[0036] In another case, the above correspondence can be set for statistical periods of multiple dimensions, that is, the value of any fee rate is related to the historical cumulative transaction volume of multiple time dimensions. For example, if both the month and the quarter are used as statistical periods, then any corresponding relationship recorded in the evidence transaction can be: the first transaction volume interval-the second transaction volume interval-fee rate-applicable quarter and month. For example, if the record is "[0,2000)-[0-200)-2%-first quarter January", the corresponding relationship represents: if the transaction occurs in January of the first quarter, and the historical cumulative transaction volume in the first quarter is within the range of [0,2000) and the historical cumulative transaction volume in January is within the range of [0,200), then the transaction fee corresponding to this transaction can be calculated by the fee rate of 2%.

[0037] Of course, the above-mentioned method of setting the corresponding relationship and the statistical period to which it applies is only illustrative. The specific method of setting the above-mentioned corresponding relationship and the statistical period to which it applies can be set by technical personnel in this field according to actual conditions, and this specification does not limit this.

[0038] In this specification, after receiving the above-mentioned evidence transaction, the blockchain system can store the corresponding relationship contained in the evidence transaction and the statistical period to which it applies in the blockchain system. For example, the evidence transaction can be directly packaged into a block, and the packaged block can be added to the end of the blockchain maintained by the blockchain system to complete the evidence; for another example, the corresponding relationship contained in the evidence transaction and the statistical period to which it applies can be stored in the contract state corresponding to the evidence contract logic by executing the evidence contract logic called by the above-mentioned evidence transaction.

[0039] In this specification, before the corresponding relationship contained in the evidence transaction and the statistical period to which it applies are recorded, the verification contract logic called by the evidence exchange can also be executed to verify the corresponding relationship and the statistical period to which it applies according to the predefined verification rules; if the verification passes, the above-mentioned operation of recording the corresponding relationship contained in the evidence transaction and the statistical period to which it applies is executed. In practical applications, the predefined verification rules can be set by a technician in this field according to actual needs. For example, the verification rules may include: the statistical period to which the corresponding relationship applies is a predefined legal statistical period (e.g., the statistical period must be one or more of: year, month, day, quarter), the transaction amount intervals contained in the corresponding relationship do not overlap (e.g., [0-200] and [100-300] cannot appear at the same time), and the lower limit value of the transaction amount interval with the smallest amount is 0 (e.g., if there is no interval [0-n), it is determined that the verification fails).

[0040] From the above introduction, it can be seen that the handling fee rates corresponding to multiple historical cumulative transaction amounts belonging to the same transaction amount range in this specification are the same; while the handling fee rates corresponding to multiple historical cumulative transaction amounts belonging to different transaction amount ranges are different. Specifically, the handling fee rates corresponding to multiple historical transaction amounts may be negatively correlated with the corresponding historical cumulative transaction amounts, that is, the higher the historical cumulative transaction amounts corresponding to different transaction amount ranges, the lower the handling fee rate corresponding to the transaction amount range in which the historical cumulative transaction amounts are located. It can be seen that the higher the historical cumulative transaction amount of the transaction party in this specification during the statistical period, the lower the handling fee can be paid when conducting transactions. Setting the handling fee rate in this way can incentivize the transaction party to conduct more transactions to obtain a lower handling fee rate.

[0041] It should be stated that the above-mentioned historical cumulative transaction amount can be set for both the above-mentioned supplier and the above-mentioned purchaser. Normally, if the handling fee is paid by the supplier, the above-mentioned historical cumulative transaction amount is set for the supplier; if the handling fee is paid by the purchaser, the above-mentioned historical cumulative transaction amount is set for the purchaser. Furthermore, the above-mentioned historical cumulative transaction amount can also be set only for a single product. For example, it can be set only for the target product sold by the supplier. In this case, the handling fee is calculated based on the handling fee rate corresponding to the historical cumulative transaction amount only when there is a purchaser purchasing the target product. Of course, the above examples are only illustrative. The specific method of setting the above-mentioned historical cumulative transaction amount can be set by a technician in this field according to the actual situation, and this specification does not limit this.

[0042] Step 106, calculating the amount of the transaction fee based on the target fee rate and the target transaction amount included in the blockchain transaction, transferring the on-chain assets equal to the transaction fee to a preset fee collection account, and adding the target transaction amount to the historical accumulated transaction amount.

[0043] In this specification, after determining the target fee rate corresponding to the received blockchain exchange, the amount of the transaction fee can be calculated based on the target fee rate and the target transaction amount contained in the blockchain transaction, and the corresponding on-chain assets can be transferred to the preset fee collection account according to the amount to complete the payment of the transaction fee.

[0044] In practical applications, transaction fees can be paid in a variety of ways.

[0045] In one embodiment, the transaction fee and the target transaction amount can be settled independently. Specifically, on the one hand, after receiving the blockchain transaction, the blockchain system can transfer the on-chain assets equal to the target transaction amount from the block account of the purchaser to the blockchain account of the supplier based on the target transaction amount contained therein to complete the payment of the goods; on the other hand, after calculating the transaction fee, the blockchain system can deduct the on-chain assets equal to the transaction fee from the blockchain account of the payer of the fee (i.e., the supplier or purchaser), and add the on-chain assets equal to the transaction fee to the preset fee collection account to complete the payment of the transaction fee.

[0046] In another embodiment, the transaction fee and the target transaction amount can be settled uniformly. Specifically, in the case where the transaction fee is paid by the purchaser, the on-chain assets equal to the sum of the target transaction amount and the transaction fee can be deducted from the purchaser's blockchain account, and the on-chain assets equal to the target transaction amount can be added to the supplier's blockchain account; in the case where the transaction fee is paid by the supplier, the on-chain assets equal to the target transaction amount can be deducted from the purchaser's blockchain account, and the target on-chain assets can be added to the supplier's blockchain account. The amount of the target on-chain assets can be calculated based on the difference between the target transaction amount and the transaction fee.

[0047] In this specification, in addition to the settlement of payment and handling fees based on the received blockchain transactions, the historical cumulative transaction amount must also be updated based on the target transaction amount of this transaction. Specifically, the target transaction amount can be added to the historical cumulative transaction amount, and the accumulated amount can be used as the historical cumulative transaction amount at the time of transaction transfer.

[0048] In actual applications, the purchaser may need to refund the goods for various reasons. Specifically, the refund transaction corresponding to the above blockchain transaction can be sent to the blockchain system to instruct the blockchain system to perform a refund operation through on-chain asset transfer. In this case, the blockchain system can further deduct the above target transaction amount from the current historical cumulative transaction amount to update the current historical cumulative transaction amount. In this way, the problem of inaccurate historical cumulative transaction amount records due to transaction refund events is avoided, thereby avoiding errors in the calculation of handling fees for subsequent transactions.

[0049] It should be understood that the blockchain system may have executed other blockchain transactions for indicating transfers in the period between receiving the above blockchain transaction and receiving the above refund transaction. For other blockchain transactions executed in this period, the historical cumulative transaction amounts used are all amounts before the above deduction operation, which may cause the calculated transaction fee to be inconsistent with the actual amount of the fee to be transferred. Therefore, this specification can also perform a correction operation on the transaction fee when a transaction refund occurs.

[0050] Specifically, the historical cumulative transaction amount corresponding to the above-mentioned other blockchain transactions can be obtained, and the transaction amount difference between the historical cumulative transaction amount and the above-mentioned target transaction amount can be calculated. On this basis, when the transaction amount difference and the obtained historical cumulative transaction amount correspond to different transaction fees, the transaction amount difference can be used as the historical cumulative transaction amount corresponding to other blockchain transactions to correct the transaction fees corresponding to the other blockchain transactions. In this specification, it can be determined in a variety of ways whether the above-mentioned transaction amount difference and the obtained historical cumulative transaction amount correspond to different transaction fees.

[0051] In one embodiment, it is possible to determine whether the transaction amount difference and the acquired historical cumulative transaction amount correspond to different transaction fees based on whether the transaction amount difference and the acquired historical cumulative transaction amount are within the same transaction amount range. If the transaction amount difference and the acquired historical cumulative transaction amount are not within the same transaction amount range, it means that the transaction amount difference and the acquired historical cumulative transaction amount usually correspond to different fee rates, proving that the two correspond to different transaction fees. Then, the transaction amount difference can be used as the historical cumulative transaction amount corresponding to other blockchain accounts, and the transaction fee corresponding to the other blockchain transactions can be recalculated.

[0052] In another embodiment, the transaction amount difference is equivalent to the corrected historical cumulative transaction amount corresponding to the other blockchain transactions. Therefore, the transaction fee corresponding to the other blockchain transactions can be recalculated directly based on the transaction amount difference. Then, the recalculated transaction fee can be compared with the transaction fee corresponding to the acquired historical cumulative transaction amount to determine whether the two correspond to the same transaction fee. In particular, when the two correspond to different transaction fees, the transaction fee corresponding to the other blockchain transaction can be corrected based on the amount of the recalculated transaction fee.

[0053] It should be noted that when it is determined that the difference in the transaction amount and the acquired historical cumulative transaction amount correspond to different transaction fees, a reminder message about this situation may be sent to the payer or receiver of the fee in priority, so that the receiver of the reminder message can decide whether to correct the transaction fee corresponding to the other blockchain transaction. In particular, when the blockchain system receives confirmation information for the reminder message, it can perform an operation to correct the transaction fee of other blockchain transactions based on the amount of the recalculated transaction fee.

[0054] It should also be emphasized that the purchaser in this specification refers to: the transaction party that purchases the target goods through assets, for example, it can be a buyer in the traditional sense; and the supplier refers to: the transaction party that provides goods to the purchaser to obtain asset returns, for example, it can be a seller in the traditional sense. In the actual procurement scenario, whether any transaction party acts as a purchaser or a supplier should be determined according to the role played by any transaction party in the corresponding transaction. If any transaction party provides goods in this transaction, it will be the supplier in this transaction. If any transaction party purchases the corresponding goods through assets in this transaction, it will be the purchaser of this transaction. It should be understood that the same transaction party can switch between the two identities of supplier and purchaser in different procurement transactions. Whether any transaction party acts as a purchaser or a supplier in a transaction can be determined by technical personnel in this field based on the actual transaction scenario and the above-mentioned definitions of purchaser and supplier.

[0055] In addition, the various operations performed by the purchaser or supplier involved in this specification, such as the above-mentioned operation of submitting blockchain transactions, the operation of adding transaction time to blockchain transactions, etc., should essentially be understood as: performed by the purchaser through the purchaser's device held by the purchaser, and performed by the supplier through the supplier's device held by the supplier. In actual applications, the purchaser's device can be: a mobile terminal such as a smart phone, a tablet computer, or a fixed terminal such as a PC (Personal Computer) or a smart TV; similarly, the supplier's device can also be: a mobile terminal such as a smart phone, a tablet computer, or a fixed terminal such as a PC or a smart TV. It should be understood that the specific type of device of the purchaser's device and the supplier's device in this specification can be determined by a technician in this field according to actual conditions, and this specification does not limit this.

[0056] It can be seen from the above technical solution that since this specification maintains the correspondence between the transaction amount range and the handling fee rate in the blockchain system, as well as the statistical period to which the correspondence applies, when this specification receives a blockchain transaction for indicating the settlement of a transaction, it can determine the historical cumulative transaction amount of the purchaser or supplier within the statistical period to which the transaction time belongs based on the transaction time contained in the blockchain transaction, and further determine the handling fee rate that should be used for this transaction based on the transaction amount range to which the historical cumulative transaction amount belongs. On this basis, the blockchain system can calculate the transaction fee amount of this transaction based on the determined target handling fee rate and the target transaction amount contained in the blockchain transaction, and settle the handling fee based on the calculated amount.

[0057] It can be seen that through the technical solution of this specification, when goods transactions are conducted through blockchain, the amount of handling fees that the purchaser or supplier needs to pay can be calculated through different handling fee rates based on the historical cumulative transaction amount of the purchaser or supplier at different transaction times, thereby avoiding the problem that related technologies can only settle transaction fees through fixed handling fee rates when conducting goods transactions based on blockchain.

[0058] Furthermore, the handling fee rate corresponding to each transaction amount interval in this specification may be negatively correlated with the historical cumulative transaction amount within the corresponding transaction amount interval, that is, the larger the value within the transaction amount interval, the lower the corresponding handling fee rate. In this way, the blockchain system in this specification can provide a lower handling fee rate for purchasers or suppliers with higher historical cumulative transaction amounts, thereby promoting the transaction enthusiasm of purchasers or suppliers.

[0059] Furthermore, when the blockchain system in this specification receives the refund transaction corresponding to the above blockchain transaction, it can also recalculate the transaction amount difference between the historical cumulative transaction amount corresponding to other blockchain exchanges received after receiving the above blockchain transaction and before receiving the refund transaction and the above target transaction amount, and determine whether the transaction amount difference and the historical cumulative transaction amount corresponding to the other blockchain exchanges correspond to the same transaction fee amount. Wherein, when the two correspond to different transaction fee amounts, the blockchain system can further recalculate the transaction fee amount corresponding to the other blockchain exchanges according to the transaction amount difference, so as to correct the transaction fee of other blockchain transactions according to the recalculated amount.

[0060] Next, the technical solution of this specification is introduced by taking the case where the supplier pays the handling fee as an example.

[0061] Figure 2 is a flowchart of a corresponding relationship evidence storage method shown in an exemplary embodiment of this specification. Figure 2 As shown, the method is applied to a blockchain system and may include the following steps:

[0062] Step 201, receiving the evidence storage transaction sent by the client.

[0063] The client in this embodiment may be a client used by the owner of the fee collection account maintained in the blockchain system (hereinafter referred to as the fee collector for the convenience of description). The fee collector may edit the "correspondence between transaction amount interval and fee, and the statistical period applicable to the correspondence" for the supplier in the client, and generate a certificate transaction based on the edited correspondence and its applicable statistical period. The client may send the certificate transaction to the blockchain system so that the blockchain system calls the corresponding contract to store the correspondence contained therein and its applicable statistical period.

[0064] Step 202, execute the verification contract called by the evidence exchange to verify the corresponding relationship contained in the evidence transaction and the statistical period applicable to the corresponding relationship; if the verification passes, jump to step 203, otherwise, jump to step 204.

[0065] In this embodiment, the blockchain system may maintain verification rules for the above-mentioned correspondences, so as to verify the correspondences contained in the received evidence transactions and the statistical periods to which they apply. For example, the verification rules may include: the transaction amount intervals included do not overlap, whether the statistical period to which the correspondence applies is a predefined legal statistical period, etc. Then, after receiving the evidence transaction sent by the client, the blockchain system may first verify the correspondences contained in the evidence transaction and the statistical periods used by it according to the maintained verification rules. If the verification is successful, the correspondences and the statistical periods to which they apply will be recorded; otherwise, they will not be recorded. In actual operation, the verification operation can be performed by calling the verification contract.

[0066] For example, the legal statistical periods specified in the blockchain system may include "year, month, day, quarter". Then, if the statistical period applicable to the correspondence included in the evidence transaction is "first quarter", which belongs to the legal statistical period of "quarter", it proves that the statistical period applicable to the correspondence included in the evidence transaction meets the above-mentioned "the statistical period applicable to the correspondence is a predefined legal statistical period" This inspection rule, only needs to determine that the correspondence in the evidence transaction does not contain overlapping transaction amount intervals, it can be determined that the correspondence included in the evidence transaction and its applicable statistical period have passed the inspection. On the contrary, if the statistical period applicable to the correspondence included in the evidence transaction is "5 o'clock-6 o'clock", that is, "hours" is used as the statistical period, which does not belong to the legal statistical period maintained by the blockchain system, it can be determined that the statistical period applicable to the correspondence included in the evidence transaction has not passed the inspection.

[0067] Step 203, execute the evidence contract called by the evidence exchange to store the above-mentioned corresponding relationship and the statistical period to which it applies in the contract state corresponding to the evidence contract.

[0068] In this embodiment, when the corresponding relationship contained in the evidence transaction and the statistical period to which it applies pass the verification, the corresponding evidence contract can be called to store the corresponding relationship and the statistical period to which it applies in the contract state corresponding to the evidence contract by executing the evidence contract.

[0069] It should be noted that this embodiment is only introduced by taking "deploying the verification contract logic and evidence storage contract logic described above through different contracts" as an example. In actual applications, the verification contract logic and evidence storage contract logic can also be deployed in the same smart contract, that is, only one smart contract needs to be called to complete the above-mentioned verification and evidence storage operations.

[0070] Step 204: The corresponding relationship included in the evidence transaction and its applicable statistical period are not recorded.

[0071] In this embodiment, a notification message of "whether the corresponding relationship included in the evidence transaction and the applicable statistical period have been recorded" can also be returned to the client.

[0072] It can be seen from the above technical solution that the party collecting the handling fee in this specification can, with the help of its own client, send a recorded transaction to the blockchain system to record the correspondence between the set transaction amount range and the handling fee rate and the applicable statistical period in the blockchain system, so as to settle the handling fee in subsequent transactions.

[0073] Figure 3 This is a flowchart of another blockchain-based transaction fee transfer method shown in an exemplary embodiment of this specification, which is applied to a blockchain system. Figure 3 As shown, the method may include the following steps:

[0074] Step 301: receiving a settlement transaction sent by a client.

[0075] In this embodiment, the party sending the settlement transaction may be the purchaser of the transaction or the supplier of the transaction. For example, after receiving the purchase order, the supplier may determine the target transaction amount of the transaction according to the purchase order, generate a settlement transaction based on the target transaction amount, and send it to the blockchain system; for another example, after confirming the goods returned by the supplier, the purchaser may generate a settlement transaction based on the target transaction amount of the goods, and send it to the blockchain system.

[0076] Specifically, in this embodiment, whether the settlement transaction is initiated by the purchaser client or the supplier client can be determined by those skilled in the art according to actual conditions, and this embodiment does not limit this.

[0077] Step 302, obtaining the corresponding relationship corresponding to the supplier indicated in the settlement transaction and the applicable statistical period.

[0078] As described in the above embodiment, the party collecting the handling fee can pre-set the "correspondence between the transaction amount range and the handling fee rate, and the statistical period applicable to the correspondence" for the supplier, and store the evidence in the blockchain system.

[0079] In actual applications, the blockchain system usually maintains the "correspondence between transaction amount intervals and handling fee rates, and the statistical period applicable to the correspondence" for multiple suppliers. Therefore, after receiving the settlement transaction, the blockchain system in this embodiment can preferentially determine the supplier indicated therein, and determine the "correspondence between transaction amount intervals and handling fee rates, and the statistical period applicable to the correspondence" corresponding to the supplier.

[0080] For example, the obtained corresponding relationship and its applicable statistical period may be shown in the following Table 1:

[0081]

[0082] Table 1

[0083] It should be noted that Table 1 only shows the correspondence between the transaction amount range and the handling fee rate for the applicable statistical periods of the "first quarter" and "second quarter". In actual application, it can also include the correspondence applicable to the "third quarter" and the fourth quarter.

[0084] Step 303, read the transaction occurrence time from the settlement transaction.

[0085] Step 304, determine the statistical period to which the transaction occurs.

[0086] In this embodiment, the time when the transaction occurs can be read from the settlement transaction to determine the corresponding statistical period.

[0087] Continuing with the above example, assuming that the transaction time read is: January 25, then it can be determined that the statistical period to which the transaction time belongs is the "first quarter".

[0088] Step 305, obtaining the historical cumulative transaction amount of the supplier within the determined statistical period.

[0089] In this embodiment, the blockchain system can also maintain the historical cumulative transaction amount of the supplier.

[0090] Following the above example, the historical accumulated transaction amount can be stored in association with the above corresponding relationship. Specifically, it can be as shown in Table 2 below:

[0091]

[0092]

[0093] Table 2

[0094] Step 306, determining the handling fee rate corresponding to the transaction amount range to which the historical accumulated transaction amount belongs.

[0095] Continuing with the above example, it can be seen from Table 2 that the historical cumulative transaction amount in the statistical period (i.e. the first quarter) when the transaction occurred is 1200, and 1200 belongs to the transaction amount range of [1000,1500). Therefore, it can be determined that the handling fee rate corresponding to this transaction is 1%.

[0096] Step 307, obtaining the target transaction amount corresponding to the settlement exchange.

[0097] In this embodiment, the target transaction amount can be directly read from the settlement transaction, or it can be calculated based on the procurement information included in the settlement transaction. The specific method of obtaining the target transaction amount can be determined by technical personnel in this field according to actual needs, and this embodiment does not limit this.

[0098] Step 308: Calculate the transaction fee based on the determined fee rate and the target transaction amount.

[0099] Continuing with the above example, assuming that the target transaction amount is 400, then the calculated transaction fee is: 400*1%=4.

[0100] Step 309: deduct on-chain assets equal to the target transaction amount from the balance of the purchaser's account.

[0101] Continuing with the above example, since the target transaction amount is 400, this step can deduct 400 on-chain assets from the balance of the purchaser's account as funds for purchasing the goods.

[0102] Step 310: Add an amount of on-chain assets equal to the difference between the target transaction amount and the transaction fee to the balance of the supplier's account.

[0103] Continuing with the above example, since the target transaction amount is 400 and the calculated transaction fee is 4, 396 on-chain assets can be added to the supplier's account as the payment after the supplier pays the fee.

[0104] Step 311, add on-chain assets equal to the transaction fee to the fee collection account.

[0105] Continuing with the above example, since the transaction fee is 4, an amount of 4 on-chain assets can be added to the fee collection account as the transaction fee that the fee collector deserves.

[0106] It can be seen from the above technical solution that this embodiment can determine the historical cumulative transaction amount within the statistical period to which the transaction occurred when settling the transaction, and determine the handling fee rate corresponding to the transaction amount interval to which the historical cumulative transaction amount belongs based on the correspondence between the transaction amount interval and the handling fee rate maintained in advance in the blockchain system. On this basis, this embodiment can calculate the transaction fee based on the target transaction amount in the settlement transaction and the determined handling fee rate, and then complete the settlement based on the transaction fee and the target transaction amount. It can be seen that the technical solution of this embodiment can use different handling fee rates to calculate the transaction fee according to the situation of the transaction when settling different transactions, avoiding the situation in the related technology where the transaction fee can only be calculated by a fixed handling fee rate.

[0107] Furthermore, since within the same statistical period of this embodiment, the amount contained in each transaction amount range is negatively correlated with the corresponding handling fee rate, that is, the larger the historical cumulative transaction amount belonging to different transaction amount ranges, the lower the corresponding handling fee rate, this embodiment can encourage suppliers to conduct more transactions in order to obtain lower handling fee rates by increasing the historical cumulative transaction amount, thereby promoting transactions between purchasers and suppliers.

[0108] Figure 4 is a schematic structural diagram of a device provided by an exemplary embodiment. Figure 4 At the hardware level, the device includes a processor 402, an internal bus 404, a network interface 406, a memory 408, and a non-volatile memory 410, and may also include hardware required for other services. One or more embodiments of this specification may be implemented based on software, such as the processor 402 reading the corresponding computer program from the non-volatile memory 410 into the memory 408 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0109] Please refer to Figure 5 , the transaction fee transfer device based on blockchain can be applied to Figure 4 The device shown in the figure is used to implement the technical solution of this specification. The transaction fee transfer device based on blockchain may include:

[0110] The receiving unit 501 receives a blockchain transaction in which a purchaser transfers money to a supplier, wherein the blockchain transaction includes a time when the transaction occurs;

[0111] The determination unit 502 determines the historical cumulative transaction amount of the purchaser or the supplier within the statistical period to which the transaction occurs, and determines the target transaction amount rate corresponding to the target transaction amount interval to which the historical cumulative transaction amount belongs, based on the pre-maintained correspondence between the transaction amount interval and the handling fee rate and the statistical period to which the correspondence applies;

[0112] The transfer unit 503 calculates the amount of the transaction fee based on the target fee rate and the target transaction amount included in the blockchain transaction, transfers the on-chain assets equal to the transaction fee to a preset fee collection account, and adds the target transaction amount to the historical accumulated transaction amount.

[0113] Optionally, the receiving unit 501 is further used for:

[0114] Receiving a proof transaction, wherein the proof transaction includes the corresponding relationship and the applicable statistical period thereof;

[0115] The evidence transaction is packaged into a block, and the block is added to the end of the blockchain maintained by the blockchain system; or, the evidence contract logic called by the evidence transaction is executed to record the corresponding relationship and its applicable statistical period to the contract state corresponding to the evidence contract logic.

[0116] Optionally, also include:

[0117] The verification unit 504 executes the verification contract logic called by the evidence storage transaction to verify the corresponding relationship and its applicable statistical period according to the predefined verification rules;

[0118] Among them, the conditions for packaging the corresponding relationship and its applicable statistical period into a block or storing it in the contract status include: the corresponding relationship and its applicable statistical period pass the inspection.

[0119] Optionally, the verification rule includes at least one of the following:

[0120] The statistical period to which the corresponding relationship applies is a predefined legal statistical period, the transaction amount intervals contained in the corresponding relationship do not overlap, and the lower limit value of the transaction amount interval containing the smallest amount is 0.

[0121] Optionally, the verification rule includes at least one of the following:

[0122] The statistical period to which the corresponding relationship applies is a predefined legal statistical period, the transaction amount intervals contained in the corresponding relationship do not overlap, and the lower limit value of the transaction amount interval containing the smallest amount is 0.

[0123] Optionally, the transfer unit 503 is also used to:

[0124] Deducting on-chain assets equal to the target transaction amount from the purchaser's blockchain account;

[0125] Add target on-chain assets to the supplier's blockchain account, where the amount of the target on-chain assets is equal to the difference between the target transaction amount and the transaction fee.

[0126] Optionally, the transfer unit 503 is also used to:

[0127] Deducting on-chain assets equal to the sum of the target transaction amount and the transaction fee from the purchaser's blockchain account;

[0128] Adding on-chain assets equal to the target transaction amount to the supplier's blockchain account.

[0129] Optionally, also include:

[0130] The updating unit 505, when receiving a refund transaction corresponding to the blockchain transaction, deducts the target transaction amount from the current historical accumulated transaction amount to update the current historical accumulated transaction amount.

[0131] Optionally, also include:

[0132] The correction unit 506 obtains the historical cumulative transaction amount corresponding to other blockchain transactions executed between the blockchain transaction and the refund transaction, and calculates the transaction amount difference between the obtained historical cumulative transaction amount and the target transaction amount; and, when the transaction amount difference and the determined historical cumulative transaction amount correspond to different transaction fees, uses the transaction amount difference as the historical cumulative transaction amount corresponding to the other blockchain transactions to correct the transaction fees corresponding to the other blockchain transactions.

[0133] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0134] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0135] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0136] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. 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 disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media 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 also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0138] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0139] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0140] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0141] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.

Claims

1. A transaction fee transfer method based on blockchain, applied to a blockchain system, comprising: Receiving a blockchain transaction for transferring money from a purchaser to a supplier, wherein the blockchain transaction includes the time when the transaction occurred; According to the pre-maintained correspondence between the transaction amount range and the handling fee rate and the statistical period to which the correspondence applies, determine the historical cumulative transaction amount of the purchaser or the supplier within the statistical period to which the transaction occurred, and determine the target handling fee rate corresponding to the target transaction amount range to which the historical cumulative transaction amount belongs; Calculate the amount of the transaction fee based on the target fee rate and the target transaction amount included in the blockchain transaction, transfer the on-chain assets equal to the transaction fee to a preset fee collection account, and add the target transaction amount to the historical accumulated transaction amount; When a refund transaction corresponding to the blockchain transaction is received, the target transaction amount is deducted from the current historical cumulative transaction amount to update the current historical cumulative transaction amount; Obtaining the historical cumulative transaction amounts corresponding to other blockchain transactions executed between the blockchain transaction and the refund transaction, and calculating the transaction amount difference between the obtained historical cumulative transaction amount and the target transaction amount; In the case where the transaction amount difference and the determined historical cumulative transaction amount correspond to different transaction fees, the transaction amount difference is used as the historical cumulative transaction amount corresponding to the other blockchain transactions to correct the transaction fees corresponding to the other blockchain transactions.

2. The method according to claim 1, further comprising: Receiving a proof transaction, wherein the proof transaction includes the corresponding relationship and the applicable statistical period thereof; The evidence transaction is packaged into a block, and the block is added to the end of the blockchain maintained by the blockchain system; or, the evidence contract logic called by the evidence transaction is executed to record the corresponding relationship and its applicable statistical period to the contract state corresponding to the evidence contract logic.

3. The method according to claim 2, further comprising: Execute the verification contract logic called by the evidence storage transaction to verify the corresponding relationship and its applicable statistical period according to the predefined verification rules; Among them, the conditions for packaging the corresponding relationship and its applicable statistical period into a block or storing it in the contract status include: the corresponding relationship and its applicable statistical period pass the inspection.

4. The method according to claim 3, wherein the verification rule comprises at least one of the following: The statistical period to which the corresponding relationship applies is a predefined legal statistical period, the transaction amount intervals contained in the corresponding relationship do not overlap, and the lower limit value of the transaction amount interval containing the smallest amount is 0.

5. The method according to claim 1, further comprising: Deducting on-chain assets equal to the target transaction amount from the purchaser's blockchain account; Add target on-chain assets to the supplier's blockchain account, where the amount of the target on-chain assets is equal to the difference between the target transaction amount and the transaction fee.

6. The method according to claim 1, further comprising: Deducting on-chain assets equal to the sum of the target transaction amount and the transaction fee from the purchaser's blockchain account; Adding on-chain assets equal to the target transaction amount to the supplier's blockchain account.

7. A transaction fee transfer device based on blockchain, applied to a blockchain system, comprising: A receiving unit receives a blockchain transaction in which a purchaser transfers money to a supplier, wherein the blockchain transaction includes a time when the transaction occurs; A determination unit, based on a pre-maintained correspondence between a transaction amount interval and a handling fee rate and a statistical period to which the correspondence applies, determines the historical cumulative transaction amount of the purchaser or the supplier within the statistical period to which the transaction occurs, and determines a target handling fee rate corresponding to the target transaction amount interval to which the historical cumulative transaction amount belongs; A transfer unit, which calculates the amount of the transaction fee based on the target fee rate and the target transaction amount included in the blockchain transaction, transfers the on-chain assets equal to the transaction fee to a preset fee collection account, and adds the target transaction amount to the historical accumulated transaction amount; an updating unit, which, upon receiving a refund transaction corresponding to the blockchain transaction, deducts the target transaction amount from the current historical accumulated transaction amount to update the current historical accumulated transaction amount; A correction unit, which obtains the historical cumulative transaction amount corresponding to other blockchain transactions executed between the blockchain transaction and the refund transaction, and calculates the transaction amount difference between the obtained historical cumulative transaction amount and the target transaction amount; In the case where the transaction amount difference and the determined historical cumulative transaction amount correspond to different transaction fees, the transaction amount difference is used as the historical cumulative transaction amount corresponding to the other blockchain transactions to correct the transaction fees corresponding to the other blockchain transactions.

8. An electronic device comprising: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 6 by running the executable instructions.

9. A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and device for processing service charge service through block chain

    CN113065860A

  • Home trading system having a function of rankedbrokerage for accumulation contract

    KR1020010107456A