CN108876333A - Transaction fee estimation method and device - Google Patents

Transaction fee estimation method and device Download PDF

Info

Publication number
CN108876333A
CN108876333A CN201810688362.2A CN201810688362A CN108876333A CN 108876333 A CN108876333 A CN 108876333A CN 201810688362 A CN201810688362 A CN 201810688362A CN 108876333 A CN108876333 A CN 108876333A
Authority
CN
China
Prior art keywords
transaction
unit price
target
trading order
record
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810688362.2A
Other languages
Chinese (zh)
Inventor
韩峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Internet Security Software Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201810688362.2A priority Critical patent/CN108876333A/en
Publication of CN108876333A publication Critical patent/CN108876333A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Abstract

The embodiment of the invention provides a transaction fee estimation method and a device, wherein the transaction fee estimation method comprises the following steps: and determining the target trading unit price aiming at the target token to be traded according to the trading record of the target token in the ether house, constructing a simulated trading order aiming at the target token, processing the simulated trading order in the ether house, and estimating the trading fee to be traded according to the feedback result of the simulated trading order. According to the technical scheme provided by the embodiment of the invention, the current target trading unit price is estimated by utilizing the completed token transaction in the ether house, the simulated trading order with the same trading amount and the trading unit price as the to-be-traded is constructed and traded, the trading fee to be traded is estimated according to the feedback result of the simulated trading order, and the estimated trading fee can provide reference for a user who initiates the to-be-traded so that the user provides proper trading fee for the to-be-traded and the trading failure caused by overhigh trading fee is avoided.

Description

A kind of transaction fee predictor method and device
Technical field
The present invention relates to field of computer technology, more particularly to a kind of transaction fee predictor method and device.
Background technique
Ether mill is a public block platform chain with intelligent contract function, and each node is connected with each other in ether mill Form the application platform of decentralization.The most important currency traded in ether mill is in addition to this ether coin further includes Other tokens.Based on this block platform chain of ether mill, user can carry out ether coin by the arbitrary node in ether mill Transaction and token transaction, transaction include transfer the possession of, dealing etc..
For the transaction of token, the transaction between the same currency type can be, the transaction being also possible between different currency types. Either any token transactions, the transaction fee of certain expense can all be generated each time by trading, and the transaction fee of token transactions is to use Ether coin measures.Transaction fee is related with the turnover traded every time, many factors such as unit price of trading, and therefore, trades each time Transaction fee all may not be identical.In this way for the user of token transactions, the transaction fee traded each time is all difficult to estimate. If transaction fee is excessively high, the ether coin in user account is not enough to pay excessively high transaction fee, and leads to Fail Transaction.Therefore, exist Trade each time before how to tranaction costs to be transacted carry out estimation be a problem to be solved.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of transaction fee predictor method and device, to realize to token transactions Transaction fee is estimated.Specific technical solution is as follows:
In a first aspect, the embodiment of the invention provides a kind of transaction fee predictor method, the method includes:
According to the transaction record of target token in ether mill, the target transaction to be transacted for being directed to the target token is determined Unit price;
Building is directed to the mock trading order of the target token, and to the mock trading order in the ether mill It is handled, wherein the turnover of the mock trading order is identical as the turnover to be transacted, and the mock trading is ordered Single transaction unit price is the target transaction unit price, and the calculation amount upper limit of the mock trading order is preset upper limit value;
According to the feedback result of the mock trading order, the transaction fee to be transacted is estimated.
Optionally, the transaction record according to target token in ether mill is determined for the target token wait hand over The step of easy target transaction unit price, including:
From the transaction record for target token that ether mill is stored, it is corresponding to obtain preset transaction duration grade Transaction record;
Based on acquired transaction record, the corresponding transaction unit price of each transaction duration grade is determined;
The target transaction unit price to be transacted for the target token is determined from identified transaction unit price.
Optionally, described based on acquired transaction record, determine the corresponding transaction unit price of each transaction duration grade The step of, including:
Obtain the real trade expense and practical calculation amount in transaction record corresponding to each transaction duration grade;
Real trade in each transaction record is taken to the transaction obtained divided by practical calculation amount for the transaction record Unit price;
When the corresponding transaction record of a transaction duration grade, then the transaction unit price of the transaction record is determined as this The corresponding transaction unit price of duration grade of trading;
When corresponding at least two transaction record of a transaction duration grade, by the transaction of at least two transaction record Unit price carries out average computation, obtains average transaction unit price, and the average transaction unit price is determined as the transaction duration grade pair The transaction unit price answered.
Optionally, described from the transaction record for target token that ether mill is stored, when obtaining preset transaction The step of long grade corresponding transaction record, including:
The transaction record for being directed to target token is obtained from default node included by ether mill;
From in acquired transaction record choose preset time period in transaction duration grade corresponding to transaction record.
Optionally, described to be ordered according to the mock trading when the feedback result of the mock trading order is transaction fee Single feedback result, the step of estimating the transaction fee to be transacted, including:
The transaction fee of the mock trading order is extracted from the feedback result of the mock trading order;
Extracted transaction fee is determined as the transaction fee to be transacted.
Optionally, described to be ordered according to the mock trading when the feedback result of the mock trading order is calculation amount Single feedback result, the step of estimating the transaction fee to be transacted, including:
The calculation amount of the mock trading order is extracted from the feedback result of the mock trading order;
Extracted calculation amount is determined as the target calculation amount to be transacted;
The target calculation amount is multiplied with the target transaction unit price, obtains the transaction fee to be transacted.
Second aspect, the embodiment of the invention provides a kind of transaction fee estimating device, described device includes:
Determining module, for the transaction record according to target token in ether mill, determine for the target token to The target transaction unit price of transaction;
Module is constructed, for constructing the mock trading order for being directed to the target token, and to institute in the ether mill Mock trading order to be stated to be handled, wherein the turnover of the mock trading order is identical as the turnover to be transacted, The transaction unit price of the mock trading order is the target transaction unit price, and the calculation amount upper limit of the mock trading order is pre- If upper limit value;
Estimation block estimates the transaction fee to be transacted for the feedback result according to the mock trading order.
Optionally, the determining module, including:
Acquisition submodule, for obtaining preset friendship from the transaction record for target token that ether mill is stored The easily corresponding transaction record of duration grade;
First determines submodule, for based on acquired transaction record, determining that each transaction duration grade is corresponding Transaction unit price;
Second determines submodule, for determining from identified transaction unit price for the to be transacted of the target token Target transaction unit price.
Optionally, described first determine that submodule is specifically used for:
Obtain the real trade expense and practical calculation amount in transaction record corresponding to each transaction duration grade;
Real trade in each transaction record is taken to the transaction obtained divided by practical calculation amount for the transaction record Unit price;
When the corresponding transaction record of a transaction duration grade, then the transaction unit price of the transaction record is determined as this The corresponding transaction unit price of duration grade of trading;
When corresponding at least two transaction record of a transaction duration grade, by the transaction of at least two transaction record Unit price carries out average computation, obtains average transaction unit price, and the average transaction unit price is determined as the transaction duration grade pair The transaction unit price answered.
Optionally, the acquisition submodule is specifically used for:
The transaction record for being directed to target token is obtained from default node included by ether mill;
From in acquired transaction record choose preset time period in transaction duration grade corresponding to transaction record.
Optionally, when the feedback result of the mock trading order is transaction fee, the estimation block is specifically used for:
The transaction fee of the mock trading order is extracted from the feedback result of the mock trading order;
Extracted transaction fee is determined as the transaction fee to be transacted.
Optionally, when the feedback result of the mock trading order is calculation amount, the estimation block is specifically used for:
The calculation amount of the mock trading order is extracted from the feedback result of the mock trading order;
Extracted calculation amount is determined as the target calculation amount to be transacted;
The target calculation amount is multiplied with the target transaction unit price, obtains the transaction fee to be transacted.
The third aspect, the embodiment of the invention provides a kind of electronic equipment, including processor, communication interface, memory and Communication bus, wherein processor, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any of the above-described transaction fee side of estimating Method method and step.
Fourth aspect, the embodiment of the invention provides a kind of computer readable storage medium, the computer-readable storage Dielectric memory contains computer program, and the computer program realizes that any of the above-described transaction fee is pre- when being executed by processor Estimate method method and step.
In technical solution provided in an embodiment of the present invention, according to the transaction record of target token in ether mill, determination is directed to The target transaction unit price to be transacted of target token, building are directed to the mock trading order of target token, and right in ether mill Mock trading order is handled, and according to the feedback result of mock trading order, estimates transaction fee to be transacted.Through the invention The technical solution that embodiment provides estimates current target transaction unit price, structure using completed token transactions in ether mill It builds and trades and turnover to be transacted and the identical mock trading order of transaction unit price, according to the feedback knot of mock trading order Fruit estimates transaction fee to be transacted, and the transaction fee estimated can provide reference to initiate user to be transacted, so that handy Family provides suitable transaction fee to be to be transacted, Fail Transaction caused by avoiding transaction fee excessively high.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow chart of transaction fee predictor method provided in an embodiment of the present invention;
Fig. 2 is a kind of structural schematic diagram of transaction fee estimating device provided in an embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
Ether mill is the block platform chain with intelligent contract function an of open source, includes multiple nodes in ether mill, Node can be computer, mobile phone etc. in the form of physical machine existing for terminal device, can also be run in physical machine it is virtual Machine.The valuable currency to circulate in ether mill includes ether coin and other tokens, the intelligent contract based on ether mill, can be with The transaction of ether coin and token transactions are carried out in ether mill.
Token transactions are the calculation amounts based on transaction in ether mill, and calculation amount, that is, Gas executes certain movement institutes for measuring The calculation amount needed, wherein traded in ether mill, execute intelligent contract and start decentralization application program Dapps, Need a certain number of calculation amounts.
For the transaction in ether mill, each transaction includes the calculation amount upper limit and transaction unit price, and the calculation amount upper limit is For Gas Limit, the calculation amount upper limit is that user is ready max calculation amount for transaction payment to be processed.
Transaction unit price be Gas Price, using Gwei as measurement unit, transaction unit price for indicate user be ready spend in The price of the calculation amount of each unit, it is the amount of money measured which, which is with ether coin,.
Transaction fee caused by transaction in ether mill is paid by ether coin ETH, and ether coin can be with It being indicated respectively with Finney, Szabo, Gwei, Mwei, Kwei and Wei, wherein Wei is the smallest ether coin unit, one Ether coin is equal to 1,000 Finney, and ether coin is equal to 1,000,000 Szabo, and an ether coin is equal to 1,000,000,000 Gwei, one with Too coin is equal to 1,000,000,000,000,000,000 Wei.
In order to realize that the transaction fee to token transactions is estimated, the embodiment of the invention provides a kind of transaction fee sides of estimating Method and device, wherein the transaction fee predictor method includes:
According to the transaction record of target token in ether mill, the target transaction to be transacted for being directed to the target token is determined Unit price;
Building is directed to the mock trading order of target token, and handles in ether mill mock trading order, In, the turnover of mock trading order is identical as turnover to be transacted, and the transaction unit price of mock trading order is target transaction Unit price, the calculation amount upper limit of mock trading order are preset upper limit value;
According to the feedback result of mock trading order, transaction fee to be transacted is estimated.
In technical solution provided in an embodiment of the present invention, according to the transaction record of target token in ether mill, determination is directed to The target transaction unit price to be transacted of target token, building are directed to the mock trading order of target token, and right in ether mill Mock trading order is handled, and according to the feedback result of mock trading order, estimates transaction fee to be transacted.Through the invention The technical solution that embodiment provides estimates current target transaction unit price, structure using completed token transactions in ether mill It builds and trades and turnover to be transacted and the identical mock trading order of transaction unit price, according to the feedback knot of mock trading order Fruit estimates transaction fee to be transacted, and the transaction fee estimated can provide reference to initiate user to be transacted, so that handy Family provides suitable transaction fee to be to be transacted, Fail Transaction caused by avoiding transaction fee excessively high.
A kind of transaction fee predictor method provided in an embodiment of the present invention is introduced first below, the embodiment of the present invention mentions A kind of transaction fee predictor method supplied, as shown in Figure 1, including the following steps.
S101 determines that the target to be transacted for target token is handed over according to the transaction record of target token in ether mill Easily unit price.
Wherein, target token can be user on ether mill it is customized building distribution, target token can for based on The token of ERC20 agreement can also be the token based on ERC23 agreement.Target token can for ZCash, Lay spy coin, Any one of tokens such as Monero, Gnosis, Augur.
The each token transactions occurred in ether mill can be recorded, and can be synchronized to included by ether mill and own Node, in this way, each of ether mill node is stored with the transaction note of each token transactions occurred in the ether mill Record.Specifically, when a token transactions A has occurred in the node A in ether mill, then node A will record token transactions A, and The token transactions A recorded is synchronized in ether mill other nodes in addition to node A, in this way, each of ether mill Node is stored with the transaction record of token transactions A.
Token may include multiple types, and the transaction record in ether mill can be divided according to token type in ether mill Class storage, the corresponding classification of each token.For example, transaction record caused by Gnosis token transactions is stored in and is directed to In the transaction record of Gnosis token.
According to the transaction record for target token completed in ether mill, can calculate flat based on transaction record Transaction unit price, can be by the transaction unit price of the average transaction unit price as current goal token, i.e., by the average transaction unit price As target transaction unit price to be transacted.
In a kind of embodiment, from the transaction record for target token that ether mill is stored, preset friendship is obtained The easily corresponding transaction record of duration grade.
Wherein, it will record the duration that corresponding transaction is spent in each transaction record.For example, target token transactions A Recorded in corresponding transaction record a when it is 10 minutes a length of, then it represents that target token transactions A complete the exchange cost Shi Changwei 10 minutes.
Transaction duration grade, which refers to, completes the grade that spent duration divides according to transaction, the division for duration grade of trading It can be customized setting.For example, transaction duration grade is divided into four grades, the first estate is to complete to hand within 10 minutes Easily, the second grade is the transaction of completion in 10 minutes to 20 minutes, and the tertiary gradient is the transaction of completion in 20 minutes to 30 minutes, the fourth estate It is that the completion more than 30 minutes is needed to trade.When trade B transaction record in when it is 12 minutes a length of, then corresponding to transaction B Transaction duration grade is the second grade.
Acquisition for transaction record in a kind of implementation, can obtain transaction from any node in ether mill Record.In another implementation, the transaction record of target token can be obtained from default node included by ether mill.Its In, default node can be customized setting.For example, in order to improve the confidence level with higher of acquired transaction record And accuracy, default node can be the third party's node for having higher public credibility, wherein the public credibility of node can be user's root According to determined by experience.
After getting transaction record from default node, preset time period can be chosen from acquired transaction record Transaction record corresponding to interior transaction duration grade.Wherein, preset time period can be customized setting.For example, default Period is one day, then the transaction record stored in the time before choosing current point in time.
For example, preset time period be 30 minutes, from the current point in time that default node is got before 30 minutes in institute The transaction record of storage includes transaction record 1, transaction record 2, transaction record 3, transaction record 4, transaction record 5 and transaction record 6, wherein when 8 minutes a length of, when 12 minutes a length of, 3 institute of transaction record that transaction record 2 is recorded that transaction record 1 is recorded Record when it is 18 minutes a length of, transaction record 4 recorded when it is 28 minutes a length of, transaction record 5 recorded when it is 15 points a length of Clock, transaction record 6 recorded when it is 6 minutes a length of.In addition, transaction duration grade includes the first estate and the second grade, wherein The first estate is that transaction is completed within 10 minutes, and the second grade is the transaction of completion in 10 minutes to 20 minutes.Then the first estate institute is right The transaction record answered includes:Transaction record 1, transaction record 6, transaction record corresponding to the second grade include:Transaction record 2, Transaction record 3 and transaction record 5.
After obtaining the corresponding transaction record of preset transaction duration grade, based on acquired transaction record, determine The corresponding transaction unit price of each transaction duration grade.
Record has real trade expense and practical calculation amount in each transaction record.Wherein, real trade expense refers to completion Transaction fee caused by the transaction reality of target token, calculating needed for practical calculation amount refers to the transaction for having executed target token Amount, calculation amount may be considered amount of action performed in process of exchange, wherein calculation amount is measured with gas.
Duration grade of trading calculates separately the transaction unit price of each transaction record when being corresponding at least one transaction record, The transaction unit price of comprehensive at least one corresponding transaction record again, it can obtain the corresponding trading card of transaction duration grade Valence.
In a kind of implementation, after determining transaction record corresponding to each transaction duration grade, each is obtained Included real trade takes and practical calculation amount in transaction record corresponding to transaction duration grade.For each transaction note Record can be taken with the real trade in transaction record divided by practical calculation amount, the available trading card for the transaction record Valence.
For example, transaction duration grade in the first estate corresponding to transaction record include transaction record 1 and transaction record 2, wherein it is 20000Gwei that real trade, which takes, in transaction record 1, and practical calculation amount is 20000, then is directed to the friendship of transaction record 1 Easily unit price is 1Gwei, is indicated in the transaction corresponding to transaction record 1, and the cost of each Gas unit is 1Gwei.Wherein, Gwei is a unit for indicating an ether coin, and 1Gwei is approximately equal to 0.00000002 ether coin.
It, can for the corresponding transaction unit price of transaction duration grade after the transaction unit price for calculating each transaction record To be divided into following three kinds of situations.
The first situation, a transaction duration grade only correspond to a transaction record.Then directly by the friendship of the transaction record Easy unit price is determined as the corresponding transaction unit price of the transaction duration grade.
For example, transaction record corresponding to the first estate in transaction duration grade only includes transaction record 1, transaction note The transaction unit price of record 1 is 1Gwei, then the corresponding transaction unit price of the first estate is 1Gwei.
Second situation, a transaction duration grade are corresponding at least two transaction records.By at least two transaction note The transaction unit price of record carries out average computation, obtains average transaction unit price.
Specifically, average transaction unit price can be calculated according to following formula:
Wherein, Q is average transaction unit price, and n is the quantity of transaction record corresponding to transaction duration grade, piWhen to trade The transaction unit price of i-th of transaction record, p in transaction record corresponding to long gradenFor transaction record corresponding to transaction duration grade In n-th transaction record transaction unit price.
After obtaining average transaction unit price, which can be determined as trading corresponding to duration grade Transaction unit price.
The third situation does not consider the transaction duration grade if transaction duration grade does not have corresponding transaction record.
After determining the transaction unit price of each transaction duration grade, it can be chosen from identified transaction unit price One transaction unit price, as the target transaction unit price to be transacted for target token.
Specifically, each transaction duration grade is corresponding with a transaction unit price, and transaction duration grade reflects target generation The speed of coin transaction, it is believed that target token transactions the time it takes is fewer, and the speed of target token transactions is faster, mesh Mark token transactions duration higher grade.In general, transaction duration higher grade, and corresponding transaction unit price is higher;When transaction Long lower grade, and corresponding transaction unit price is lower.
Based on the relationship between above-mentioned transaction duration grade and transaction unit price, each transaction duration grade is being determined After transaction unit price, each the transaction unit price determined is shown to user, is selected wherein by user according to own situation One transaction unit price is as target transaction unit price to be transacted.If selecting higher transaction unit price, processed speed to be transacted Degree is very fast, and the time it takes is less, but higher for the spent transaction fee to be transacted;If selecting lower trading card Valence, then in transaction to be processed is lined up it is to be transacted can be lined up relatively after, in this way, processed speed to be transacted is slower, cost Time is longer, in addition due to transaction unit price it is low cannot be processed and lead to Fail Transaction.
S102, building be directed to target token mock trading order, and in ether mill to mock trading order at Reason.
Wherein, the turnover of the constructed mock trading order for target token is identical as turnover to be transacted. Turnover is the amount of money involved in process of exchange, and technical solution provided by the embodiment of the present invention is the friendship for target token Easily, therefore turnover is measured with target token.For example, target token is Lay spy coin, user A needs to pay 4 Lays to user B Special coin, then this time the turnover of transaction is 4 Lay spy's coin.
Wherein, the transaction unit price of mock trading order is target transaction unit price.The calculation amount upper limit of mock trading order is Preset upper limit value.
Wherein, the calculation amount upper limit can be customized setting.Used calculation amount is not up to counted when the transaction is complete Remaining calculation amount can then be returned to the founder of the personnel for initiating transaction or intelligent contract by the calculation amount upper limit.Work as transaction When used calculation amount reaches the calculation amount upper limit when not completing also, then it can shut the book, lead to Fail Transaction.For transaction The calculation amount upper limit, if setting is too low, it is believed that the transaction is invalid.
The calculation amount upper limit for mock trading order is preset upper limit value, can be customized setting.On this is default As long as limit value is arranged sufficiently low so that the mock trading order may be considered that in vain, then the preset upper limit value be all can Capable.
Complete construct mock trading order after, the mock trading order is handled in ether mill, i.e., with The transaction to the mock trading order is initiated too in mill.
S103 estimates transaction fee to be transacted according to the feedback result of mock trading order.
Mock trading order is considered invalid because preset upper limit value is lower, for the mock trading order Trade fair Fail Transaction.It, can be to the creation of the user for initiating transaction or intelligent contract after the failure of mock trading order transaction Person sends feedback result, wherein feedback result can be transaction fee, can also be calculation amount.Separately below with regard to two kinds of situations into Row is introduced.
When feedback result is transaction fee, which is for transaction fee caused by mock trading order transaction.From The transaction fee that the mock trading order is extracted in the feedback result of mock trading order, the transaction based on the mock trading order Volume, transaction unit price, calculation amount are identical as turnover to be transacted, transaction unit price, calculation amount, it is believed that the mock trading Transaction fee needed for order is identical as required transaction fee to be transacted, therefore, extracted transaction fee can be determined as wait hand over Easy transaction fee.
When feedback result is calculation amount, which is calculation amount needed for mock trading order completes transaction.From mould The calculation amount that mock trading order is extracted in the feedback result of quasi- trade order, turnover, friendship based on the mock trading order Easily unit price, calculation amount are identical as turnover to be transacted, transaction unit price, calculation amount, it is believed that the mock trading order institute The calculation amount needed is identical as required calculation amount to be transacted, therefore, extracted calculation amount can be determined as to mesh to be transacted Mark calculation amount.
After determining target calculation amount to be transacted, target calculation amount is multiplied with target transaction unit price, obtain to The transaction fee of transaction, i.e., according to the available transaction fee to be transacted of following formula:
F=G × P
Wherein, F is transaction fee to be transacted, and G is target calculation amount, and P is target transaction unit price.
In technical solution provided in an embodiment of the present invention, according to the transaction record of target token in ether mill, determination is directed to The target transaction unit price to be transacted of target token, building are directed to the mock trading order of target token, and right in ether mill Mock trading order is handled, and according to the feedback result of mock trading order, estimates transaction fee to be transacted.Through the invention The technical solution that embodiment provides estimates current target transaction unit price, structure using completed token transactions in ether mill It builds and trades and turnover to be transacted and the identical mock trading order of transaction unit price, according to the feedback knot of mock trading order Fruit estimates transaction fee to be transacted, and the transaction fee estimated can provide reference to initiate user to be transacted, so that handy Family provides suitable transaction fee to be to be transacted, Fail Transaction caused by avoiding transaction fee excessively high.
Corresponding to transaction fee predictor method embodiment, the embodiment of the present invention also provides a kind of transaction fee estimating device, such as Fig. 2 Shown, which includes:
Determining module 210 is determined for target token for the transaction record according to target token in ether mill wait hand over Easy target transaction unit price;
Module 220 is constructed, for constructing the mock trading order for being directed to target token, and to mock trading in ether mill Order is handled, wherein the turnover of mock trading order is identical as turnover to be transacted, the transaction of mock trading order Unit price is target transaction unit price, and the calculation amount upper limit of mock trading order is preset upper limit value;
Estimation block 230 estimates transaction fee to be transacted for the feedback result according to mock trading order.
Optionally it is determined that module 210 may include:
Acquisition submodule, for obtaining preset friendship from the transaction record for target token that ether mill is stored The easily corresponding transaction record of duration grade;
First determines submodule, for based on acquired transaction record, determining that each transaction duration grade is corresponding Transaction unit price;
Second determines submodule, for determining the target to be transacted for being directed to target token from identified transaction unit price Transaction unit price.
Optionally, first determine that submodule is specifically used for:
Obtain the real trade expense and practical calculation amount in transaction record corresponding to each transaction duration grade;
Real trade in each transaction record is taken to the transaction obtained divided by practical calculation amount for the transaction record Unit price;
When the corresponding transaction record of a transaction duration grade, then the transaction unit price of the transaction record is determined as this The corresponding transaction unit price of duration grade of trading;
When corresponding at least two transaction record of a transaction duration grade, by the transaction unit price of at least two transaction records Average computation is carried out, obtains average transaction unit price, and average transaction unit price is determined as the corresponding transaction of transaction duration grade Unit price.
Optionally, acquisition submodule is specifically used for:
The transaction record for being directed to target token is obtained from default node included by ether mill;
From in acquired transaction record choose preset time period in transaction duration grade corresponding to transaction record.
Optionally, when the feedback result of mock trading order is transaction fee, estimation block 230 is specifically used for:
The transaction fee of mock trading order is extracted from the feedback result of mock trading order;
Extracted transaction fee is determined as to transaction fee to be transacted.
Optionally, when the feedback result of mock trading order is calculation amount, estimation block 230 is specifically used for:
The calculation amount of mock trading order is extracted from the feedback result of mock trading order;
Extracted calculation amount is determined as to target calculation amount to be transacted;
Target calculation amount is multiplied with target transaction unit price, obtains transaction fee to be transacted.
In technical solution provided in an embodiment of the present invention, according to the transaction record of target token in ether mill, determination is directed to The target transaction unit price to be transacted of target token, building are directed to the mock trading order of target token, and right in ether mill Mock trading order is handled, and according to the feedback result of mock trading order, estimates transaction fee to be transacted.Through the invention The technical solution that embodiment provides estimates current target transaction unit price, structure using completed token transactions in ether mill It builds and trades and turnover to be transacted and the identical mock trading order of transaction unit price, according to the feedback knot of mock trading order Fruit estimates transaction fee to be transacted, and the transaction fee estimated can provide reference to initiate user to be transacted, so that handy Family provides suitable transaction fee to be to be transacted, Fail Transaction caused by avoiding transaction fee excessively high.
Corresponding to transaction fee predictor method embodiment, the embodiment of the invention also provides a kind of electronic equipment, such as Fig. 3 institute Show, including processor 310, communication interface 320, memory 330 and communication bus 340, wherein processor 310, communication interface 320, memory 330 completes mutual communication by communication bus 340;
Memory 330, for storing computer program;
Processor 310 when for executing the program stored on memory 330, realizes following steps:
According to the transaction record of target token in ether mill, the target transaction list to be transacted for being directed to target token is determined Valence;
Building is directed to the mock trading order of target token, and handles in ether mill mock trading order, In, the turnover of mock trading order is identical as turnover to be transacted, and the transaction unit price of mock trading order is target transaction Unit price, the calculation amount upper limit of mock trading order are preset upper limit value;
According to the feedback result of mock trading order, transaction fee to be transacted is estimated.
The technical solution provided through the embodiment of the present invention is estimated currently using completed token transactions in ether mill Target transaction unit price, construct and trade and turnover to be transacted and the monovalent identical mock trading order of transaction, according to mould The feedback result of quasi- trade order estimates transaction fee to be transacted, the user that the transaction fee estimated can be to be transacted for initiation Reference is provided, so that user provides suitable transaction fee to be to be transacted, Fail Transaction caused by avoiding transaction fee excessively high.
The communication bus that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned electronic equipment and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components.
Corresponding to transaction fee predictor method embodiment, the embodiment of the present invention also provides a kind of computer readable storage medium, Computer program is stored in the computer readable storage medium, the computer program is realized above-mentioned when being executed by processor Any transaction fee predictor method step.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for transaction fee For estimating device, electronic equipment and computer readable storage medium embodiment, since it is substantially similar to the method embodiment, institute To be described relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (10)

1. a kind of transaction fee predictor method, which is characterized in that the method includes:
According to the transaction record of target token in ether mill, the target transaction list to be transacted for being directed to the target token is determined Valence;
Building is directed to the mock trading order of the target token, and carries out in the ether mill to the mock trading order Processing, wherein the turnover of the mock trading order is identical as the turnover to be transacted, the mock trading order Transaction unit price is the target transaction unit price, and the calculation amount upper limit of the mock trading order is preset upper limit value;
According to the feedback result of the mock trading order, the transaction fee to be transacted is estimated.
2. the method according to claim 1, wherein the transaction record according to target token in ether mill, Determine the step of the target transaction unit price to be transacted for the target token, including:
From the transaction record for target token that ether mill is stored, the corresponding transaction of preset transaction duration grade is obtained Record;
Based on acquired transaction record, the corresponding transaction unit price of each transaction duration grade is determined;
The target transaction unit price to be transacted for the target token is determined from identified transaction unit price.
3. according to the method described in claim 2, determining each it is characterized in that, described based on acquired transaction record The step of the corresponding transaction unit price of duration grade of trading, including:
Obtain the real trade expense and practical calculation amount in transaction record corresponding to each transaction duration grade;
Real trade in each transaction record is taken to the trading card obtained divided by practical calculation amount for the transaction record Valence;
When the corresponding transaction record of a transaction duration grade, then the transaction unit price of the transaction record is determined as the transaction The corresponding transaction unit price of duration grade;
When corresponding at least two transaction record of a transaction duration grade, by the transaction unit price of at least two transaction record Average computation is carried out, average transaction unit price is obtained, and it is corresponding that the average transaction unit price is determined as the transaction duration grade Transaction unit price.
4. according to the method described in claim 2, it is characterized in that, the friendship for target token stored from ether mill Easily in record, the step of obtaining preset transaction duration grade corresponding transaction record, including:
The transaction record for being directed to target token is obtained from default node included by ether mill;
From in acquired transaction record choose preset time period in transaction duration grade corresponding to transaction record.
5. the method according to claim 1, wherein when the feedback result of the mock trading order is transaction fee When, the feedback result according to the mock trading order, the step of estimating the transaction fee to be transacted, including:
The transaction fee of the mock trading order is extracted from the feedback result of the mock trading order;
Extracted transaction fee is determined as the transaction fee to be transacted.
6. the method according to claim 1, wherein when the feedback result of the mock trading order is calculation amount When, the feedback result according to the mock trading order, the step of estimating the transaction fee to be transacted, including:
The calculation amount of the mock trading order is extracted from the feedback result of the mock trading order;
Extracted calculation amount is determined as the target calculation amount to be transacted;
The target calculation amount is multiplied with the target transaction unit price, obtains the transaction fee to be transacted.
7. a kind of transaction fee estimating device, which is characterized in that described device includes:
Determining module is determined for the transaction record according to target token in ether mill for the to be transacted of the target token Target transaction unit price;
Module is constructed, for constructing the mock trading order for being directed to the target token, and to the mould in the ether mill Quasi- trade order is handled, wherein the turnover of the mock trading order is identical as the turnover to be transacted, described The transaction unit price of mock trading order is the target transaction unit price, and the calculation amount upper limit of the mock trading order is on default Limit value;
Estimation block estimates the transaction fee to be transacted for the feedback result according to the mock trading order.
8. device according to claim 7, which is characterized in that the determining module, including:
Acquisition submodule, for from the transaction record for target token that ether mill is stored, when obtaining preset transaction The corresponding transaction record of long grade;
First determines submodule, for based on acquired transaction record, determining each corresponding transaction of transaction duration grade Unit price;
Second determines submodule, for determining the target to be transacted for being directed to the target token from identified transaction unit price Transaction unit price.
9. a kind of electronic equipment, which is characterized in that including processor, communication interface, memory and communication bus, wherein processing Device, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any method and step of claim 1-6.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium Program realizes claim 1-6 any method and step when the computer program is executed by processor.
CN201810688362.2A 2018-06-28 2018-06-28 Transaction fee estimation method and device Pending CN108876333A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810688362.2A CN108876333A (en) 2018-06-28 2018-06-28 Transaction fee estimation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810688362.2A CN108876333A (en) 2018-06-28 2018-06-28 Transaction fee estimation method and device

Publications (1)

Publication Number Publication Date
CN108876333A true CN108876333A (en) 2018-11-23

Family

ID=64296460

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810688362.2A Pending CN108876333A (en) 2018-06-28 2018-06-28 Transaction fee estimation method and device

Country Status (1)

Country Link
CN (1) CN108876333A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110599343A (en) * 2019-09-21 2019-12-20 腾讯科技(深圳)有限公司 Contract data processing method, related device and medium
CN110597916A (en) * 2019-09-21 2019-12-20 腾讯科技(深圳)有限公司 Data processing method and device based on block chain, storage medium and terminal
CN117574320A (en) * 2024-01-15 2024-02-20 腾讯科技(深圳)有限公司 Data processing method, device, computer readable medium and electronic equipment
CN117574320B (en) * 2024-01-15 2024-04-26 腾讯科技(深圳)有限公司 Data processing method, device, computer readable medium and electronic equipment

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110599343A (en) * 2019-09-21 2019-12-20 腾讯科技(深圳)有限公司 Contract data processing method, related device and medium
CN110597916A (en) * 2019-09-21 2019-12-20 腾讯科技(深圳)有限公司 Data processing method and device based on block chain, storage medium and terminal
CN113052699A (en) * 2019-09-21 2021-06-29 腾讯科技(深圳)有限公司 Contract data processing method, related device and medium
CN113052699B (en) * 2019-09-21 2022-09-13 腾讯科技(深圳)有限公司 Contract data processing method, related device and medium
CN117574320A (en) * 2024-01-15 2024-02-20 腾讯科技(深圳)有限公司 Data processing method, device, computer readable medium and electronic equipment
CN117574320B (en) * 2024-01-15 2024-04-26 腾讯科技(深圳)有限公司 Data processing method, device, computer readable medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN109583904A (en) Training method, impaired operation detection method and the device of abnormal operation detection model
CN108415960A (en) A kind of implementation method and device of geo-location service, electronic equipment
CN109949108A (en) Invoice creation method and device, electronic equipment based on block chain
CN107563889A (en) Account balance information processing method and processing device
CN108876333A (en) Transaction fee estimation method and device
CN110097170A (en) Information pushes object prediction model acquisition methods, terminal and storage medium
CN110163634A (en) Withdrawing method and device, electronic equipment based on block chain
CN110458561A (en) The method and device of secret transaction is realized in block chain network
CN107818460A (en) A kind of method of payment and device
CN109034819A (en) The report method and device of transaction
CN109948882A (en) Task processing method and relevant device based on block data structures
Zhang et al. Auction-based ex-post-payment incentive mechanism design for horizontal federated learning with reputation and contribution measurement
CN107767152A (en) Product purchase intention analysis method and server
CN105654326B (en) A kind of information processing system and method
CN108711004A (en) Methods of risk assessment and device and computer readable storage medium
CN108876620A (en) Transaction fee estimation method and device
CN109741093A (en) Credits Valuation Method and device, storage medium, terminal
CN109345252A (en) A kind of online trading control method, device and computer equipment
CN104079566B (en) The computational methods of result property value in terminal, server and the page
CN110348983A (en) Transaction Information management method and device, electronic equipment and non-transient storage media
CN109377356A (en) A kind of calculation method of repayment amount, device and electronic equipment
CN109785151A (en) A kind of emulation mode and device of medical insurance policies
CN106469173B (en) A kind of other Weight Determination of problem priority, device, system and server
CN109584057A (en) Transaction details data capture method, device and server
CN110505281A (en) Service entrance display methods and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181123