Specific embodiment
In order that those skilled in the art more fully understand the technical scheme in the application, below in conjunction with the application reality
The accompanying drawing in example is applied, the technical scheme in the embodiment of the present application is clearly and completely described, it is clear that described implementation
Example is only some embodiments of the present application, rather than whole embodiments.Based on the embodiment in the application, this area is common
The every other embodiment that technical staff is obtained under the premise of creative work is not made, should all belong to the application protection
Scope.
Below in conjunction with the accompanying drawings to data processing method, the device that the settlement of exchange amount of money is calculated based on many transactions described herein
And client is described in detail.Fig. 1 is the data processing side that the settlement of exchange amount of money is calculated based on many transactions that the application is provided
A kind of method flow schematic diagram of the embodiment of method.Although at such as following embodiments or data shown in the drawings
Reason method operating procedure or apparatus structure, but based on conventional or can be with methods described or device without performing creative labour
Including more or less operating procedure or modular structure.The step of in logicality in the absence of necessary causality or structure
In, the execution sequence of these steps or the modular structure of device are not limited to execution sequence or module knot that the embodiment of the present application is provided
Structure.When the data processing equipment in practice or end product of described data processing method or modular structure are performed, can be with
Order execution or executed in parallel (example are carried out according to embodiment or data processing method shown in the drawings or modular structure connection
Such as parallel processor or the environment of multiple threads).
The embodiment of the present application is described in detail as application scenarios with the settlement of exchange amount of money of user within Chinese territory to this programme.When
So, it is necessary to illustrate, the application is not limited to the application that RMB settlement of exchange within Chinese territory is calculated, and other are related to the application to implement
Many transaction settlements of exchange are calculated under the same or similar business of algorithm and logic in scheme, such as foreign currency of different currency types, can
It is applicable the application embodiment.Specifically, in the embodiment of the present application application scenarios, domestic trade company seller user is for overseas sending out
Raw many transaction foreign currencies need to enter a country after settling the exchange into RMB.Country is related to foreign currency immigration and settles accounts into RMB, is required for
Declared according to regulatory requirements, and declared needs and declared according to transaction latitude.
Under normal circumstances, there is reimbursement, declare Status Change, new generation transaction etc. in the transaction stroke count of user and the settlement of exchange amount of money
Various uncertain engines, generally require user and independently propose settlement of exchange application in reality.In the embodiment of the present application application scenarios, use
Family can at random propose the settlement of exchange application amount of money, and the settlement of exchange application amount of money is that many transactions can settle the exchange the summation of the amount of money, and amount declared must not
Must be withdrawn deposit the application amount of money less than actual seller user, and the transaction declared does not allow to repeat to declare.Specifically such as Fig. 1 institutes
Show, described in a kind of embodiment in a kind of data processing method that the amount of money of settling the exchange is calculated based on many transactions that the application is provided
Method can include:
S1:Settlement of exchange application solicited message based on user obtains the settlement of exchange application amount of money of the user, and inquires described
The current settlement of exchange transaction data of user, judges to be handed over the presence or absence of labeled as the single declared in the current settlement of exchange transaction data
Easy data.
In the embodiment of the present application, user needs be submitted to during settlement of exchange application to submit corresponding to settlement of exchange processing system
Settlement of exchange application request, the settlement of exchange processing system can obtain the settlement of exchange application solicited message of user, from the solicited message
It is middle to obtain the settlement of exchange application amount of money of the user, and inquire the current settlement of exchange transaction data of the user.The embodiment of the present application
Middle user can propose the settlement of exchange application based on many transactions, and now user can provide the settlement of exchange application amount of money, and then system is looked into
Ask the information of the current many transactions of user.In the present embodiment, expression can be provided with per transaction, and this declares state than concluding the business
Marker character, tag=true or false can be such as set, for represent transaction whether declared settlement process mistake, if
It has been declared that, then the tag of the transaction has been set to true, be otherwise provided as false.Certainly, adopted in the application others embodiment
Whether it is to have declared with other marker characters or mode marker transactions, for example setting marker character is mark or unification will have been declared
The title of transaction sets same character string beginning etc..
In the embodiment of the present application, the settlement of exchange application solicited message that can be based on user obtains the settlement of exchange application gold of the user
Volume, and the current settlement of exchange transaction data of the user is inquired, judge to whether there is mark in the current settlement of exchange transaction data
It is the single transaction data declared.
S2:If the result of the judgement is described current in the absence of labeled as the single transaction data declared, calculating
The single of single transaction data can settle the exchange the amount of money in settlement of exchange transaction data, can be settled the exchange according to single transaction described in the amount of money calculates
The transaction of user can settle the exchange total value;And judge whether the settlement of exchange application amount of money of the user can less than or equal to the transaction being calculated
Settlement of exchange total value.
If can enter in the absence of the single transaction data declared in the current settlement of exchange transaction data that user declares
The transaction of the calculating user of one step can settle the exchange total value.The amount of money specifically, single that can respectively calculate every transaction can settle the exchange, so
All singles that the user can settle the exchange amount of money that can settle the exchange is added afterwards, obtaining the transaction of the user can settle the exchange total value.Described friendship
The total value that can easily settle the exchange can be used for judging whether the settlement of exchange application amount of money of user meets requirement.In the present embodiment obstinately scene,
The settlement of exchange application amount of money that user can be arranged on can be tied less than or equal to (including any one situation in being less than or equal to) transaction
Next step settlement of exchange is just carried out when collecting volume to calculate.
The settlement of exchange application amount of money of specific such as user is 200 yuan, the current settlement of exchange transaction data of existing 7 of user, wherein
The Trade4 single transaction data amount of money is 140 yuan, and single transaction data refund amount is 40 yuan, then the single amount of money that can settle the exchange is
100 yuan=140 yuan -40 yuan.Other 6 current settlement of exchange transaction data are respectively Trade1 '=10, Trade2 '=80,
Trade3 '=70, Trade4 '=140 (refund4=40), Trade5 '=270, Trade6 '=50 (refund=30),
Trade7 '=200 (refund7=140), unit is unit, and settlement of exchange mark tag is false.Having 3 in wherein 7 transactions has
Reimbursement, single can settle the exchange the amount of money=single transaction data amount of money-single transaction data refund amount, therefore Trade4=140-
40=100, Trade6=50-30=20, Trade7=200-140=60.Then the transaction of the user total value that can settle the exchange is
10+80+70+ (140-40)+270+ (50-30)+(200-140)=610 yuan.The current verification of the user that calculates can settle the exchange
610 yuan of total value is more than user's settlement of exchange 200 yuan of amount of money of application, it is believed that meets the settlement of exchange in the present embodiment and calculates and requires, can be with
Further carry out settlement of exchange calculating.
Certainly, if currently there is the single transaction data declared, the settlement of exchange mark of such as Trade4 in settlement of exchange transaction data
Note tag4=false, then can be processed according to processing mode set in advance, for example, judge that the transaction is illegal settlement of exchange
Transaction, it is impossible to participate in this settlement of exchange calculating, this clearing application is invalid.Or, delete with labeled as the single number of deals declared
According to rear, then carry out settlement of exchange calculating.Therefore, in another embodiment of the application, methods described also includes:
S2’:If the result of the judgement is that currently to there is transactional marking in settlement of exchange transaction data be that the single declared is handed over
Easy data, then perform it is following in any one implementation method:
S201’:Judge the current settlement of exchange application failure of user;
S202’:Deleted labeled as the single transaction data declared, with described from the current settlement of exchange transaction data of user
The current settlement of exchange transaction data deleted labeled as the single transaction data declared carries out the settlement of exchange amount of money and calculates.
Fig. 2 is a kind of another implementation of data processing method for calculating the settlement of exchange amount of money based on many transactions that the application is provided
The method flow schematic diagram of example.In other embodiments, it is also possible to according to specific application scenarios in current settlement of exchange transaction data
Processed according to customized mode of operation during in the presence of the single transaction data declared.Will not be described here.
S3:If the result for judging can settle the exchange total value as the settlement of exchange application amount of money less than or equal to transaction, based on institute
Stating the single of single transaction data in current settlement of exchange transaction data can settle the exchange the amount of money, according to default settlement of exchange calculation matching primitives
Go out single group total amount and meet the candidate's transaction group for matching and requiring with the difference of the settlement of exchange application amount of money.
The comparing of the total value that can be settled the exchange by the settlement of exchange application amount of money of above-mentioned user and transaction, it may be determined that the settlement of exchange application amount of money
Whether can be settled the exchange total value less than or equal to the transaction of user calculated.If less than being equal to, then can be handed over based on current settlement of exchange
Single in easy data per transaction can settle the exchange amount of money matching primitives candidate's transaction group.Candidate's transaction group described herein can be with
User including being calculated according to clearing form set in advance currently settles the exchange and meets settlement of exchange in transaction data and calculate what is required
The set of one or more single transaction data.Candidate's transaction group for example described in the present embodiment can include candidate's transaction group
In the single of all single transaction data can settle the exchange the total amount of the amount of money and the difference of the settlement of exchange application amount of money meets and matches, such as
Difference is zero or minimum.
Described default settlement of exchange calculation can be calculated according to specific application scenarios or design requirement, including but
It is not limited to the algorithm using arrangement or combination, the algorithm of the Converse solved combination of known and value, is superimposed using the alternating of ad hoc fashion
Algorithm and other matching primitives show that difference meets algorithm of single transaction combination that matching is required etc..The application provides one
The implementation method for calculating candidate's transaction group is planted, can be effectively matched and be calculated satisfactory candidate's transaction group.Specifically,
It is herein described it is a kind of based on many transactions calculate settlement of exchange the amount of money data processing method another embodiment in, it is described according to
Default settlement of exchange calculation matching primitives go out single group total amount and meet the time for matching and requiring with the difference of the settlement of exchange application amount of money
Selecting transaction group can include:
S301:Search whether user's amount of money that can settle the exchange of single in transaction data of currently settling the exchange has and user's settlement of exchange application amount of money
Identical single transaction data;If so, then being concluded the business with settlement of exchange application amount of money K single of identical with transaction data of currently settling the exchange
Respectively as K candidate's transaction group, K is positive integer to data;
S302:If not having single in settlement of exchange transaction data currently can settle the exchange the amount of money and user settlement of exchange application amount of money identical list
Transaction data, then can settle the exchange the amount of money as element with the single of single transaction data, include the current settlement of exchange transaction data
All singles transaction combination C (N, M), and calculate the single of each single transaction combination in single transaction combination C (N, M)
Can be settled the exchange the single group total amount of the amount of money, and N is the single transaction amount that user currently settles the exchange in transaction data, and M is integer and difference
Value [2, N]];
S303:Judge whether there is single group total amount with the settlement of exchange application amount of money phase in single transaction combination C (N, M)
Same single transaction combination;If so, then being combined as the time with the settlement of exchange application amount of money identical single transaction using described
Select transaction group.
Fig. 3 be the application provide it is a kind of based on many transactions calculate settlement of exchange the amount of money data processing method in calculate candidate
A kind of method flow schematic diagram of embodiment of transaction group.The settlement of exchange application amount of money of specific for example above-mentioned user is 200 yuan, existing
7 (N is 7) pens currently settle the exchange transaction data application scenarios in, can be based on user propose 200 yuan of the settlement of exchange application amount of money, look into
Trade1=10, Trade2=80, Trade3=70, Trade4=100 in the current settlement of exchange transaction data of current 7 of user are looked for,
The single of Trade5=270, Trade6=20, Trade7=60 can settle the exchange the single transaction data that the amount of money is 200 yuan.If any,
Can directly can then be settled the exchange single transaction data that the amount of money is 200 yuan as candidate's transaction group using the single.If single can
The settlement of exchange amount of money is 200 yuan of single transaction data, then can form multiple candidate's transaction groups.
Such as in the present embodiment application scenarios, if the settlement of exchange application amount of money identical of can be settled the exchange without the single amount of money and user
Single transaction data, then can settle the exchange the amount of money as element with the single of the 7 of user current every transactions of settlement of exchange transaction data,
The combination of all of current settlement of exchange transaction data is included, for example, first includes every two friendships in 7 current settlement of exchange transaction data
The combination C (7,2) of Yi Weiyi groups, then enumerates the combination C that every three transaction in 7 current settlement of exchange transaction data is a group again
(7,3), by that analogy, until combination C (7,7), a kind of 120 kinds of combinations.Then each group of institute in 120 kinds of combinations is calculated again
Including current settlement of exchange transaction data in single can settle the exchange the single group total amount of the amount of money, judge the single group total amount of which packet with
The settlement of exchange application amount of money is identical.If there is single group total amount to be grouped with the settlement of exchange application amount of money identical, can be with described
Packet is used as candidate's transaction group.For ease of description in the present embodiment, time can will be met in such as 120 kinds combinations of multiple combination
Select transaction group to screen desired combination and be referred to as candidate's packet.In above-mentioned 120 kinds of combinations, single total amount and the settlement of exchange application are golden
Volume identical candidate packet can include (Trade1+Trade3+Trade4+Trade6=10+70+100+20=200),
(Trade2+Trade4+Trade6=80+100+20=200).Then can be concluded the business as candidate using two groups of candidate's packets
Group.
The embodiment of the embodiment of the present application, be able to can be settled the exchange the amount of money as element with the single of every current settlement of exchange transaction data
All of combination is included, the settlement of exchange application amount of money identical candidate of single group total amount and user is then searched in the combination again
Packet, using candidate's packet for finding as candidate's transaction group.So, can in many transactions of user accurate match go out with
For applying for the single transaction that the amount of money is consistent.
Optionally, in another embodiment of the application, if there is no single group total amount and institute in combination C (N, M)
State to settle the exchange and apply for amount of money identical candidate packet, then can choose the single group amount of money and apply for dividing for amount of money difference minimum with the settlement of exchange
Group is used as candidate's transaction group.So, can on the premise of market settlement is met for user calculate one most accurately in
The settlement of exchange amount declared of the settlement of exchange application amount of money that family provides.Specifically, a kind of herein described calculating based on many transactions is settled the exchange
In another embodiment of the data processing method of the amount of money, methods described can also include:
S304:If there is no single group total amount in single transaction combination C (N, M) with the settlement of exchange application amount of money identical
Single transaction combination, then calculate the single group total amount of each single transaction combination in single transaction combination C (N, M) with it is described
Settle the exchange and apply for the difference of the amount of money, and choose the single friendship that the difference minimum and single group total amount apply for the amount of money less than or equal to settling the exchange
Easily combination is used as candidate's transaction group.
Fig. 4 be the application provide it is a kind of based on many transactions calculate settlement of exchange the amount of money data processing method in calculate candidate
A kind of method flow schematic diagram of embodiment of transaction group.Specifically, there is no one group of single group in such as 120 kinds all C (N, M) combinations
Total amount for user 200 yuan of the settlement of exchange application amount of money, then can based on single can settle the exchange the amount of money calculate respectively this 120 kinds combination often
The difference of 200 yuan of the amount of money is applied in individual combination with settlement of exchange.Because the single group that may have some to be grouped in the embodiment of the present application scheme is total
The amount of money is more than the settlement of exchange application amount of money, such as Trade4+Trade1+Trade2+Trade6=210>Can in 200, therefore the present embodiment
To choose, the difference is minimum and single group total amount is concluded the business as candidate less than or equal to the packet of the settlement of exchange application amount of money and is grouped.
Certainly, if the judged result can settle the exchange total value for the settlement of exchange application amount of money more than transaction, such as settlement of exchange applies for that the amount of money is
650 yuan, more than 610 yuan of the total value that can settle the exchange of concluding the business, then can be processed according to processing mode set in advance, for example, be judged not
Meet settlement of exchange application to require, this clearing application is invalid.It is of course also possible to after notifying user, knot be met after being changed based on user
The settlement of exchange application amount of money that the application that converges is wanted is processed etc., specifically can be configured executive mode according to design requirement.Therefore,
In another embodiment of the application, methods described also includes:
S3’:If the judged result can settle the exchange total value for the settlement of exchange application amount of money more than transaction, the current knot of judgement user
The application that converges fails.
Fig. 5 is a kind of another implementation of data processing method for calculating the settlement of exchange amount of money based on many transactions that the application is provided
The method flow schematic diagram of example.
In above-described embodiment, the single transaction data for meeting user's settlement of exchange application amount of money requirement can be first searched, if not depositing
The all of possible combination of current settlement of exchange transaction data then can be further being included in units of combination.Then calculate every
One group of single group total amount, searches whether to be combined with the settlement of exchange application amount of money identical of user, if any then with the combination or so
Candidate's transaction group.Explanation is needed, some embodiments in the application finally screen the candidate's transaction group for obtaining can include one
It is individual, certainly, can include there are multiple satisfactory candidate's transaction groups in further embodiments, the application does not do to this
Limitation.For example in the present embodiment, zero can be wanted with the matching for difference of the settlement of exchange application amount of money, that is, search the single
Single group total amount and the settlement of exchange application amount of money identical packet in transaction combination C (N, M), if there is such packet, then
Can be as candidate's transaction group.
In the embodiment of the present application, can be in the result for judging as the settlement of exchange application amount of money can be tied less than or equal to transaction
When collecting volume, the single based on single transaction data in the current settlement of exchange transaction data can settle the exchange the amount of money, and according to default knot
The calculation matching primitives that converge go out single group total amount and meet the candidate's transaction for matching and requiring with the difference of the settlement of exchange application amount of money
Group.
S4:Using the single group total amount of candidate's transaction group as the settlement of exchange amount declared data for returning to user, and will
The single that single transaction data included by candidate's transaction group as settlement of exchange amount declared of selection is labeled as having declared is concluded the business
Data.
As it was previously stated, described candidate's transaction group can include one group or multigroup situation.Can be according to Scenario Design
It is required that or market settlement etc. choose one group of candidate's transaction group, using the single group total amount of candidate's transaction group chosen as user
Settlement of exchange amount declared.Meanwhile, the transactional marking of the candidate's transaction group as settlement of exchange amount declared that can be chosen is Shen
Report.Specifically, in such as above-described embodiment application scenarios, screening single group total amount is minimum (preferably with settlement of exchange application amount of money difference
For two groups of candidate's transaction groups 0) being calculated are:(Trade1+Trade3+Trade4+Trade6=10+70+100+20=
200) with (Trade2+Trade4+Trade6=80+100+20=200).Then can according to the selection rule for pre-establishing,
Such as choose and at most or at least or comprising maximum dollar amount choose one of which comprising single transaction data.It is reduction in the present embodiment
Transaction odd number, can set preferred selection comprising the most candidate's transaction group of single transaction data, you can with from above-mentioned two groups of choosings
Take the candidate's transaction group comprising 4 transactions in candidate's transaction group:(Trade1+Trade3+Trade4+Trade6=10+70+100
+ 20=200).Then every transaction Trade1, Trade3, Trade4, the Trade6 that will can change in candidate's transaction group are labeled as
It has been declared that, for example, the transactional marking tag=true of Trade1, Trade3, Trade4, Trade6 has been set.
Business norms, the flow algorithm set in embodiment are provided based on the application, can be in many transactions while Shen
Give the correct time, for user provides a settlement of exchange Shen for the settlement of exchange application amount of money for most accurately being proposed in user under the premise of settlement of exchange rule is met
The report amount of money, meets user and independently settles the exchange needs, lifts Consumer's Experience.
In a kind of another embodiment of herein described data processing method that the settlement of exchange amount of money is calculated based on many transactions,
After the result for judging can settle the exchange total value as the settlement of exchange application amount of money less than or equal to transaction, may also take on the current settlement of exchange of deletion and hand over
Single can settle the exchange single transaction data of the amount of money more than this user settlement of exchange application amount of money in easy data, so, can be further
Improve settlement of exchange computation rate.Fig. 6 is a kind of data processing method that the settlement of exchange amount of money is calculated based on many transactions that the application is provided
Another method flow schematic diagram of embodiment, it is specific as shown in fig. 6, a kind of herein described calculating based on many transactions is tied
In another embodiment of the data processing method of foreign exchange volume, judging the settlement of exchange application amount of money of the user less than or equal to calculating
The transaction for obtaining can settle the exchange after total value, and methods described can also include:
S5:From the user currently settle the exchange transaction data in delete single can settle the exchange the amount of money more than user settlement of exchange application gold
The single transaction data of volume.
Single as in above-mentioned embodiment application scenarios, there is a transaction Trade5 in the transaction of user 7 can settle the exchange the amount of money
It is 270 yuan, more than 200 yuan of the settlement of exchange application amount of money of user, therefore can this is current by Trade5 in calculating process of settling the exchange
Settlement of exchange transaction data is deleted, and settlement of exchange calculating is carried out with remaining 6 current settlement of exchange transaction data.Obviously, deleting single can tie
Foreign exchange volume, than few before, can accelerate calculating speed of settling the exchange more than the settlement of exchange data amount of calculation after the settlement of exchange application amount of money, improve
Settlement of exchange treatment effeciency.
The application also provides the embodiment of another default settlement of exchange calculation, can be used for convenient, quick matching meter
Candidate's transaction group is calculated, the settlement of exchange amount declared of user is calculated.Fig. 7 is that one kind that the application is provided is calculated based on many transactions
The method flow schematic diagram of candidate's transaction group another kind embodiment is calculated in the data processing method of the amount of money of settling the exchange.Specifically, this
Apply it is described it is a kind of based on many transactions calculate settlement of exchange the amount of money data processing method another embodiment in, it is described based on institute
Stating the single of single transaction data in current settlement of exchange transaction data can settle the exchange the amount of money, and according to default settlement of exchange calculation matching meter
Calculate single group total amount with it is described settlement of exchange application the amount of money difference meet match requirement candidate's transaction group can include:
S331:Current settlement of exchange transaction data is ranked up according to the amount of money dimension of single transaction data;
S332:Since the side of sequencing queue maximum, sued for peace according to alternating values end to end successively;
S333:Current and value is compared with the settlement of exchange application amount of money after value summation each time, when described current and value is big
Stop value when the settlement of exchange application amount of money, and remove the value of the single transaction that current settlement of exchange is calculated;
S334:The single included by the current and value corresponding to value that the single calculated with removing current settlement of exchange is concluded the business is handed over
Easily as candidate's transaction group;Accordingly, the single group total amount using candidate's transaction group is used as the settlement of exchange for returning to user
Amount declared data include:Current and value as return obtained by the value that the single calculated using removing the current settlement of exchange is concluded the business
To the settlement of exchange application value data of user.
In specific embodiment applied field, existing 7 transaction of such as user, the single transaction data amount of money by taking Trade4 as an example
It is 140, single transaction data refund amount is 40, single can settle the exchange the amount of money for 100, Trade1=10, Trade2=80,
Trade3=70, Trade4=140 (refund4=40), Trade5=270, Trade6=50 (refund=30), Trade7
=200 (refund7=140), settlement of exchange mark tag=false.Having 3 in wherein 7 transactions has a reimbursement, and single can settle the exchange gold
Volume=single transaction data the amount of money-single transaction data refund amount.Trade4=140-40=100, Trade6=50-
30=20, Trade7=200-140=60.Active user can settle the exchange total value be exactly 7 transactions total value:Transaction can settle the exchange total
Volume=10+80+70+100+270+20+60=610.
According to the data processing method that this example is provided, can include process is implemented as follows:
The 1st, if user proposes that the settlement of exchange application amount of money is 200;
2nd, judge whether the user has transaction tag=false, if it is continue next step, if Shen of being settled the exchange without if
Please fail;
3rd, judge that the settlement of exchange application amount of money≤transaction can settle the exchange total value, if it is continue next step, if otherwise settling the exchange Shen
Please fail;
4th, the Transaction Identification Number more than this application amount of money in concluding the business, such as citing data are deleted:Trade5;
5th, remaining 6 transaction is ranked up from small to large according to amount of money latitude:
Trade1=10<Trade6=20<Trade7=60<Trade3=70<Trade2=80<Trade4=100;
6 and then sued for peace from the access end to end of sequencing queue, taken since rear of queue, then taken head, handed over successively
Replace;
7th, often take and once compare with the settlement of exchange application amount of money, when the calculating amount of money>Settlement of exchange application the amount of money when stop, and remove work as
Preceding this transaction.Detailed step in data of such as illustrating:
The first step:Trade4=100<200, continue cumulative;
Second step:Trade4+Trade1=110<200, continue cumulative;
3rd step:Trade4+Trade1+Trade2=190<200, continue cumulative;
4th step:Trade4+Trade1+Trade2+Trade6=210>200, stop;
8th, remove Trade6, be candidate's transaction group with Trade4, Trade1, Trade2;Take Trade4, Trade1,
Trade2 obtain single settlement of exchange the amount of money and value, should and value the amount of money be equal to settle the exchange amount declared, and mark Trade4, Trade1,
Trade2, tag=true;
9th, settlement of exchange applies for that successfully settlement of exchange amount declared is 190,200 applied less than user.
The embodiment of the application can be according to the current process for providing calculating, be to meet the regular premise of settlement of exchange
Under provide a settlement of exchange amount of money value for most accurately being proposed in user, meet user and independently settle the exchange demand.
A kind of data processing method that the settlement of exchange amount of money is calculated based on many transactions that the embodiment of the present application is provided, can pass through
The business information of setting judges, Processing Algorithm and flow are realized accurately calculating the settlement of exchange amount of money based on many transaction latitudes,
The requirements of customs declaration with regulator instantly can be met.In the application embodiment, can first judge whether is the transaction declared
Meet requirements of customs declaration, such as whether can be settled the exchange total value etc. less than transaction in the presence of transaction or the settlement of exchange application amount of money has been declared.If meeting, so
Afterwards according to per transaction the settled the exchange amount of money judge transaction can settle the exchange total value whether be more than user the settlement of exchange application amount of money.If no
It is more than, then the candidate transaction group minimum with settlement of exchange application amount of money difference, institute can be filtered out from many transactions of user's application
The candidate's transaction group stated can include the one or many combination of single transaction data.So, with candidate's transaction group
Every total amount of the amount of money that can settle the exchange as user settlement of exchange amount declared, it is possible to achieve user be based on many transaction dimensions essence
The settlement of exchange amount of money is really calculated, settlement of exchange computational efficiency is improved, the complicated business scene demand that many transactions of user are settled the exchange is met,
Lifting Consumer's Experience.
Based on a kind of data processing method that the settlement of exchange amount of money is calculated based on many transactions described herein, the application is provided
A kind of data processing equipment that the settlement of exchange amount of money is calculated based on many transactions.Fig. 8 is described herein a kind of based on many transactions
A kind of modular structure schematic diagram of embodiment of data processing equipment of the settlement of exchange amount of money is calculated, as shown in figure 8, described device can be wrapped
Include:
Condition judgment module 101 is declared, be can be used for the settlement of exchange application solicited message based on user and obtained the user's
The settlement of exchange application amount of money, and inquire the current settlement of exchange transaction data of the user, judge be in the current transaction data of settling the exchange
It is no to exist labeled as the single transaction data declared;
Amount of money comparison module 102, the result that can be used in the judgement is to be handed in the absence of labeled as the single declared
During easy data, calculating the single of single transaction data in the current settlement of exchange transaction data can settle the exchange the amount of money, according to the single
The transaction amount of money that can settle the exchange calculates the transaction of the user and can settle the exchange total value;And judge whether the settlement of exchange application amount of money of the user is small
Can be settled the exchange total value in equal to the transaction being calculated;
Candidate's transaction group computing module 103, can be used in the result for judging as the settlement of exchange application amount of money is less than
Equal to transaction can settle the exchange total value when, the single based on single transaction data in the current settlement of exchange transaction data can settle the exchange the amount of money,
And according to it is default settlement of exchange calculation matching primitives go out single group total amount with it is described settlement of exchange application the amount of money difference meet match want
The candidate's transaction group asked;
Result treatment module 104 is declared, be can be used for using the single group total amount of candidate's transaction group as returning to use
The settlement of exchange amount declared data at family, and the single number of deals included by candidate's transaction group of settlement of exchange amount declared that will be chosen
According to labeled as the single transaction data declared.
In a kind of another embodiment of herein described data processing equipment that the settlement of exchange amount of money is calculated based on many transactions,
Candidate's transaction group computing module 103 can include:
First processing module 1031, can be used for searching user currently settle the exchange single in transaction data can settle the exchange the amount of money whether
Have and user's settlement of exchange application amount of money identical single transaction data;If so, then applying with settlement of exchange with transaction data of currently settling the exchange
Respectively as K candidate's transaction group, K is positive integer to K single transaction data of amount of money identical;
Second processing module 1032, can be used for not having in current settlement of exchange transaction data single can settle the exchange the amount of money and user
During settlement of exchange application amount of money identical single transaction data, the amount of money can be settled the exchange as element with the single of single transaction data, included
All singles transaction combination C (N, M) of the current settlement of exchange transaction data, and calculate every in single transaction combination C (N, M)
The single of one single transaction combination can settle the exchange the single group total amount of the amount of money, and N is that the single that user currently settles the exchange in transaction data is handed over
Easy number, M is integer and difference value [2, N];
3rd processing module 1033, it can be determined that whether have single group total amount and institute in single transaction combination C (N, M)
State settlement of exchange application amount of money identical single transaction combination;If so, then being handed over the settlement of exchange application amount of money identical single with described
Easily combination is used as candidate's transaction group.
Fig. 9 is candidate's a kind of modular structure schematic diagram of embodiment of transaction group computing module that the application is provided.
In a kind of another embodiment of herein described data processing equipment that the settlement of exchange amount of money is calculated based on many transactions,
Candidate's transaction group computing module 103 can also include:
Fourth processing module 1034, can be used for not having single group total amount and institute in single transaction combination C (N, M)
When stating settlement of exchange application amount of money identical single transaction combination, each single transaction group in single transaction combination C (N, M) is calculated
The difference of the single group total amount of conjunction and the settlement of exchange application amount of money, and choose that the difference is minimum and single group total amount is less than or equal to
The single transaction combination of the settlement of exchange application amount of money is used as candidate's transaction group.
Figure 10 is the modular structure schematic diagram of candidate's transaction group computing module another kind embodiment that the application is provided.
In a kind of another embodiment of herein described data processing equipment that the settlement of exchange amount of money is calculated based on many transactions,
Candidate's transaction group computing module 103 can include:
Total money sequence module 1131, can be used for current amount of money dimension of the transaction data according to single transaction data of settling the exchange
It is ranked up;
Read group total module 1132, can be used for since the side of sequencing queue maximum, successively according to replacing end to end
Value is sued for peace;
With value comparison process module 1133, can be used for current and value is applied for into gold with settlement of exchange after value is sued for peace each time
Volume compares, and value is stopped when the current and value is more than the settlement of exchange application amount of money, and remove the single transaction that current settlement of exchange is calculated
Value;
Transaction group determining module 1134, can be used for removing corresponding to the value that the single of current settlement of exchange calculating is concluded the business
Single included by current and value is concluded the business as candidate's transaction group;Accordingly, the result treatment module 104 of declaring is for institute
The single group total amount for stating candidate's transaction group declares result treatment as the settlement of exchange amount declared data for returning to user including described
Module 104 be used for using remove the single transaction that the current settlement of exchange is calculated value obtained by current and value as returning to user
Settlement of exchange application value data.
Figure 11 is the modular structure schematic diagram of candidate's transaction group computing module another kind embodiment that the application is provided.
In a kind of another embodiment of herein described data processing equipment that the settlement of exchange amount of money is calculated based on many transactions,
Described device can also include:
Transaction removing module 105, can be used for being less than or equal to be calculated in the settlement of exchange application amount of money for judging the user
Transaction can settle the exchange after total value, from the user currently settle the exchange transaction data in delete single and can settle the exchange the amount of money more than user's
The single transaction data of the settlement of exchange application amount of money.
Figure 12 is that a kind of data processing equipment that the amount of money of settling the exchange is calculated based on many transactions described herein is another real
Apply the modular structure schematic diagram of example.
In a kind of another embodiment of herein described data processing equipment that the settlement of exchange amount of money is calculated based on many transactions,
Described device can also include it is following at least one:
First failure handling module 1061, can be used for there is transaction in the result for judging is as current settlement of exchange transaction data
During labeled as the single transaction data declared, the current settlement of exchange application failure of user is judged;
Re-computation processing module 1062, can be used for the deletion from the current settlement of exchange transaction data of user and is labeled as having declared
Single transaction data, settled the exchange labeled as the current settlement of exchange transaction data of single transaction data declared with described deletion
The amount of money is calculated.
In a kind of another embodiment of herein described data processing equipment that the settlement of exchange amount of money is calculated based on many transactions,
Described device can also include:
Second failure handling module 1063, can be used in the judged result for the settlement of exchange application amount of money can be tied more than transaction
When collecting volume, then the current settlement of exchange application failure of user is judged.
Figure 13 is that a kind of data processing equipment that the amount of money of settling the exchange is calculated based on many transactions described herein is another real
Apply the modular structure schematic diagram of example.
Candidate's transaction group computational methods, the meter of combination in the data processing equipment that above-described embodiment is provided specifically related to
Calculation method, total money sequence and alternating values and compare etc. and specifically may be referred to the application other embodiment or applied field with value
The associated description of scape, will not be described here.A kind of number that the settlement of exchange amount of money is calculated based on many transactions that the embodiment of the present application is provided
According to processing unit, can be realized by the business information judgement, Processing Algorithm and the flow that set based on many transaction latitudes essence
The settlement of exchange amount of money is really calculated, the requirements of customs declaration with regulator instantly can be met.In the application embodiment, Ke Yixian
Whether the transaction that judgement is declared meets requirements of customs declaration, such as whether can be tied less than transaction in the presence of transaction or the settlement of exchange application amount of money has been declared
Collect volume etc..If meeting, then judge that whether transaction can settle the exchange total value more than user's according to the settled the exchange amount of money per transaction
The settlement of exchange application amount of money.If it is not greater, then can be filtered out from many transactions of user's application and settlement of exchange application amount of money difference
Minimum candidate's transaction group, described candidate's transaction group can include the one or many combination of single transaction data.So, with
Every in the candidate's transaction group total amount of the amount of money that can settle the exchange as user settlement of exchange amount declared, it is possible to achieve Yong Huji
The settlement of exchange amount of money is accurately calculated in many transaction dimensions, settlement of exchange computational efficiency is improved, many transactions of user is met and is settled the exchange
Complicated business scene demand, lifted Consumer's Experience.
The application described above data processing method or device that calculate the settlement of exchange amount of money based on many transactions can be applied
In the processing system that the settlement of exchange amount of money is calculated simultaneously, it is possible to achieve when many transactions are declared, satisfaction can not be repeated to declare and also
The demand of the amount of money is applied in the settlement of exchange for asking energy accurately mate user to propose, can provide settlement of exchange computational efficiency, improves Consumer's Experience.Tool
Body, the application provides a kind of settlement of exchange amount of money processing system, and the system can include:
Data capture unit, can be used for the settlement of exchange application that the settlement of exchange application solicited message based on user obtains the user
The amount of money, and inquire the current settlement of exchange transaction data of the user;
Settlement of exchange processing unit, can be used for judging in the current settlement of exchange transaction data with the presence or absence of being labeled as what is declared
Single transaction data;When the result being additionally operable in the judgement is in the absence of labeled as the single transaction data declared, calculate
The single of single transaction data can settle the exchange the amount of money in the current settlement of exchange transaction data, can be settled the exchange the amount of money according to single transaction
Calculating the transaction of the user can settle the exchange total value;Whether it is additionally operable to judge the settlement of exchange application amount of money of the user less than or equal to calculating
The transaction for obtaining can settle the exchange total value, and in the result for judging as the settlement of exchange application amount of money can settle the exchange always less than or equal to transaction
Volume, the single based on single transaction data in the current settlement of exchange transaction data can settle the exchange the amount of money, and be counted according to default settlement of exchange
Calculation mode matching primitives go out single group total amount and meet the candidate's transaction group for matching and requiring with the difference of the settlement of exchange application amount of money;Also
For using the single group total amount of candidate's transaction group as the settlement of exchange amount declared data for returning to user;
Declare state updating unit, can be used for will choose as settlement of exchange amount declared candidate's transaction group included by
Single transaction data is labeled as the single transaction data declared.
The settlement of exchange transaction data of user can include but is not limited to be stored by the way of distributed data base, cloud storage,
Be locally stored, relation or non-relational database storage etc., described settlement of exchange processing unit can include but is not limited to CPU, logic
The modes such as door, programmable circuit are realized.
Certainly, in other examples, described settlement of exchange processing unit is according to default settlement of exchange calculation matching primitives
Go out single group total amount and meet the candidate's transaction group for match requirement with the difference of the settlement of exchange application amount of money, be configured to include following
Implementation method:
Search whether user's amount of money that can settle the exchange of single in transaction data of currently settling the exchange has identical with user's settlement of exchange application amount of money
Single transaction data;If so, then applying for amount of money K single transaction data of identical with settlement of exchange with transaction data of currently settling the exchange
Respectively as K candidate's transaction group, K is positive integer;
There is no the single amount of money that can settle the exchange to be handed over user's settlement of exchange application amount of money identical single in current settlement of exchange transaction data
During easy data, the amount of money can be settled the exchange as element with the single of single transaction data, include the institute of the current settlement of exchange transaction data
Having single to conclude the business and combine C (N, M), and calculate the single of each single transaction combination in single transaction combination C (N, M) to tie
The single group total amount of foreign exchange volume, N is the single transaction amount that user currently settles the exchange in transaction data, and M is integer and value respectively
[2, N];
Judge whether there is single group total amount with the settlement of exchange application amount of money identical in single transaction combination C (N, M)
Single transaction combination;If so, then being handed over as the candidate using described combination with the settlement of exchange application amount of money identical single transaction
Easy group.
Certainly, in other examples, described settlement of exchange processing unit is according to default settlement of exchange calculation matching primitives
Go out single group total amount and meet the candidate's transaction group for matching and requiring with the difference of the settlement of exchange application amount of money, be configured to, including under
The implementation method stated:
Current settlement of exchange transaction data is ranked up according to the amount of money dimension of single transaction data;
Since the side of sequencing queue maximum, sued for peace according to alternating values end to end successively;
Current and value is compared with the settlement of exchange application amount of money after value summation each time, when described current and value is more than settlement of exchange
Stop value during the application amount of money, and remove the value of the single transaction that current settlement of exchange is calculated;
The single included by the current and value corresponding to value that the single calculated with removing current settlement of exchange is concluded the business is concluded the business and is made
It is candidate's transaction group, accordingly, the single group total amount using candidate's transaction group is declared as the settlement of exchange for returning to user
Value data includes the value institute that the single for declaring result treatment module for being calculated to remove the current settlement of exchange is concluded the business
The current and value for obtaining is used as the settlement of exchange application value data for returning to user.
Specifically, the implementation process of the settlement of exchange processing unit data processing being related in the embodiment of above-mentioned processing system can
With reference to described in the application other method or device embodiment, will not be described here.
What the embodiment of the present application was provided a kind of calculate the settlement of exchange data processing method of the amount of money, device and is based on many transactions
System, can realize being accurately calculated based on many transaction latitudes by the business information judgement, Processing Algorithm and the flow that set
The settlement of exchange amount of money, the requirements of customs declaration with regulator instantly can be met.In the application embodiment, can first judge to declare
Transaction whether meet requirements of customs declaration, such as whether can be settled the exchange total value less than transaction in the presence of transaction or the settlement of exchange application amount of money has been declared
Deng.If meet, then according to per transaction the settled the exchange amount of money judge transaction can settle the exchange total value whether be more than user settlement of exchange Shen
Please the amount of money.If it is not greater, then can be filtered out from many transactions of user's application and settlement of exchange application amount of money difference minimum
Candidate's transaction group, described candidate's transaction group can include the one or many combination of single transaction data.So, with the time
Every in the transaction group total amount of the amount of money that can settle the exchange is selected as the settlement of exchange amount declared of user, it is possible to achieve user is based on many
Transaction dimension accurately calculates the settlement of exchange amount of money, improves settlement of exchange computational efficiency, meets the complexity that many transactions of user are settled the exchange
Business scenario demand, lifts Consumer's Experience.
Although mentioning RMB settlement of exchange, the calculating of permutation and combination in teachings herein, the amount of money compares, candidate's transaction group is chosen
Mode, the single transaction data amount of money are more than the settlement of exchange application amount of money and comprising the data meter for having settled the exchange settlement of exchange treatment when concluding the business
The description of calculation, information exchange, rule definition etc, but, the application is not limited to be complete standard, certain goods of certain state
Coin settlement of exchange or the data calculating of mentioned mode, information exchange, the situation of rule definition.Each embodiment institute in the application
The foregoing description being related to only is the application in some embodiments in the application, in some standards, method, national currency settlement of exchange rule
Implementation method amended slightly can also carry out the scheme of each embodiment of above-mentioned the application on the basis of then.Certainly, meeting
Other deformations without creativeness of process method step described in the application the various embodiments described above, still can realize identical
Application, will not be repeated here.
Although this application provides the data processing method operating procedure as described in embodiment or flow chart, based on routine
Or can include more or less operating procedures without performing creative labour.The step of being enumerated in embodiment order be only only
A kind of mode in numerous step execution sequences, unique execution sequence is not represented.Data processing equipment in practice or visitor
When family end product is performed, can be performed or executed in parallel according to embodiment or data processing method shown in the drawings order
(environment of such as parallel processor or multiple threads).
Device, unit or module that above-described embodiment is illustrated, can specifically be realized, Huo Zheyou by computer chip or entity
Product with certain function is realized.For convenience of description, it is divided into various modules with function when describing apparatus above to distinguish
Description.The function of each module can be realized in same or multiple softwares and/or hardware when the application is implemented.Certainly,
Can also will realize that the module of certain function combines realization by multiple submodule or subelement.
Data processing method described herein, device or module can be realized in computer readable program code mode
Controller is implemented in any suitable manner, for example, controller can take such as microprocessor or processor and storage can
By computer-readable medium, the logic of the computer readable program code (such as software or firmware) of (micro-) computing device
Door, switch, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), FPGA
The form of controller and embedded microcontroller, the example of controller includes but is not limited to following microcontroller:ARC 625D、
Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, Memory Controller is also
May be implemented as a part for the control logic of memory.It is also known in the art that except with pure computer-readable
Program code means are realized beyond controller, can carry out programming in logic come so that controller is to patrol by by method and step completely
The form of door, switch, application specific integrated circuit, programmable logic controller (PLC) and embedded microcontroller etc. is collected to realize identical function.
Therefore this controller is considered a kind of hardware component, and the device for realizing various functions included to its inside
The structure in hardware component can also be considered as.Or even, can both can will be for realizing that the device of various functions is considered as
The software module of implementation method can be again the structure in hardware component.
Part of module in herein described device can be in the general of computer executable instructions
Described in context, such as program module.Usually, program module includes performing particular task or realizes specific abstract data class
Routine, program, object, component, data structure, class of type etc..The application can also be in a distributed computing environment put into practice,
In these DCEs, task is performed by the remote processing devices connected by communication network.In distribution
In computing environment, program module may be located at including in the local and remote computer-readable storage medium including storage device.
As seen through the above description of the embodiments, those skilled in the art can be understood that the application can
Realized by the mode of software plus required hardware.Based on such understanding, the technical scheme of the application is substantially in other words
The part contributed to prior art can be embodied in the form of software product, it is also possible to by the implementation of Data Migration
During embody.The computer software product can be stored in storage medium, such as ROM/RAM, magnetic disc, CD, bag
Some instructions are included to be used to so that a computer equipment (can be personal computer, mobile terminal, server, or network sets
It is standby etc.) perform method described in some parts of each embodiment of the application or embodiment.
Each embodiment in this specification is described by the way of progressive, same or analogous portion between each embodiment
Divide mutually referring to what each embodiment was stressed is the difference with other embodiment.The whole of the application or
Person part can be used in numerous general or special purpose computing system environments or configuration.For example:Personal computer, server are calculated
Machine, handheld device or portable set, laptop device, mobile communication terminal, multicomputer system, based on microprocessor it is
System, programmable electronic equipment, network PC, minicom, mainframe computer, the distribution including any of the above system or equipment
Formula computing environment etc..
Although depicting the application by embodiment, it will be appreciated by the skilled addressee that the application have it is many deformation and
Change is without deviating from spirit herein, it is desirable to which appended claim includes these deformations and changes without deviating from the application's
Spirit.