CN106910065B - Data processing method, device and system for calculating settlement amount based on multiple transactions - Google Patents

Data processing method, device and system for calculating settlement amount based on multiple transactions Download PDF

Info

Publication number
CN106910065B
CN106910065B CN201610427975.1A CN201610427975A CN106910065B CN 106910065 B CN106910065 B CN 106910065B CN 201610427975 A CN201610427975 A CN 201610427975A CN 106910065 B CN106910065 B CN 106910065B
Authority
CN
China
Prior art keywords
settlement
amount
transaction
user
current
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.)
Active
Application number
CN201610427975.1A
Other languages
Chinese (zh)
Other versions
CN106910065A (en
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.)
Advanced Nova Technology Singapore Holdings Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201610427975.1A priority Critical patent/CN106910065B/en
Priority to CN202010753746.5A priority patent/CN112016919A/en
Publication of CN106910065A publication Critical patent/CN106910065A/en
Application granted granted Critical
Publication of CN106910065B publication Critical patent/CN106910065B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/38Payment protocols; Details thereof
    • G06Q20/381Currency conversion
    • 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 application provides a data processing method, device and system for calculating a settlement amount based on multiple transactions. The method comprises the following steps: acquiring the settlement application amount and the current settlement transaction data, and judging whether the current settlement transaction data contains single transaction data marked as declared or not; if not, calculating the transaction amount of the user according to the calculated amount of the single transaction amount, and judging whether the amount is less than or equal to the transaction amount; if the sum is less than or equal to the sum of the selected candidate transaction group, matching and calculating the difference value between the single group total sum and the sum of the settlement application according to a preset settlement calculation mode to meet the matching requirement; and taking the single group total amount of the candidate transaction group as the settlement declaration amount data returned to the user, and marking the single transaction data as the settlement declaration amount as the declared single transaction data. By utilizing the embodiment of the application, the settlement application amount provided by the user can be accurately matched when multiple transactions are simultaneously submitted, and the user requirements are met.

Description

Data processing method, device and system for calculating settlement amount based on multiple transactions
Technical Field
The application belongs to the technical field of currency settlement information data processing, and particularly relates to a data processing method, device and system for calculating settlement amount based on multiple transactions.
Background
In recent years, rapid development of information technology promotes rapid rise of cross-border transactions, and more merchants participate in cross-border transaction ranks directly or through online transaction platforms and the like.
Due to different currency exchange rates and policy influences among different countries, seller merchants and the like generally need to remit transaction currencies and convert the transaction currencies into corresponding domestic currencies. For example, currently, seller users of domestic merchants in China need to settle and enter the country after foreign transactions are converged into RMB. The state requires declaration of foreign currency entry settlement renowned currency according to the supervision requirement, and declaration of the foreign currency entry settlement renowned currency is required according to transaction dimension at present.
In the settlement process, based on the requirements of a monitoring organization, the settlement amount must be proved to be the transaction which really occurs abroad, and the settlement amount can be declared, and one transaction can be declared only once. Moreover, because the result of the piecing together of the amount of remittance of the transaction cannot be completely consistent with the amount of remittance proposed by the user when a plurality of transactions exist, even a large error is generated, the existing foreign exchange settlement method only adopts the mode of remitting the amount of data of a single transaction. The reason is that the amount of each settlement application is independently proposed by the user, the amount of the settlement application has no substantial relation with the actual amount of the settlement available to the user, and the user may input more than or less than the amount of the settlement available, or an integer settlement, or a decimal settlement, or multiple settlement, etc. For each transaction, there are refunds (refunds completed or underway) or other change factors after the payment is successful, and the remittance amount calculation needs to remove the refunds, so the remittance amount has a piecing concept. However, in the actual settlement process, there are large uncertain factors such as the number of check strokes and the settlement amount of the user, and it is difficult to meet the accurate settlement requirement of the user for simultaneously declaring multiple transactions.
Therefore, in the actual foreign exchange settlement method, only the sum of the single transaction data is settled. Obviously, the mode is inefficient in processing the settlement amount and cannot meet the precise matching requirement of the settlement amount, which is provided when a user simultaneously declares for multiple transactions.
Disclosure of Invention
The application aims to provide a data processing method, device and system for calculating the settlement amount based on multiple transactions, which can realize that the settlement application amount provided by a user can be accurately matched when multiple transactions are simultaneously declared, meet the demand and improve the user experience.
The application provides a data processing method, a device and a system for calculating the settlement amount based on multiple transactions, which are realized as follows:
a data processing method of calculating a settlement amount based on a plurality of transactions, the method comprising:
acquiring the settlement application amount of a user based on settlement application request information of the user, inquiring current settlement transaction data of the user, and judging whether single transaction data marked as declared exists in the current settlement transaction data;
if the judged result is that the single transaction data marked as declared does not exist, calculating the single negotiable amount of the single transaction data in the current negotiable transaction data, and calculating the transaction negotiable total amount of the user according to the single transaction negotiable amount; judging whether the settlement application amount of the user is less than or equal to the calculated transaction settlement total amount;
if the result of the judgment is that the settlement application amount is less than or equal to the transaction settlement total amount, matching and calculating a candidate transaction group of which the difference value between the single group total amount and the settlement application amount meets the matching requirement according to a preset settlement calculation mode based on the single settlement amount of the single transaction data in the current settlement transaction data;
and taking the single group total amount of the candidate transaction group as the result declaration amount data returned to the user, and marking the single transaction data included in the selected candidate transaction group as the result declaration amount as the declared single transaction data.
A data processing apparatus for calculating a settlement amount based on a plurality of transactions, the apparatus comprising:
the declaration state judgment module is used for acquiring the settlement application amount of the user based on settlement application request information of the user, inquiring current settlement transaction data of the user and judging whether single transaction data marked as declaration exists in the current settlement transaction data or not;
the sum comparison module is used for calculating the single negotiable sum of the single transaction data in the current remittance transaction data and calculating the transaction negotiable sum of the user according to the single transaction negotiable sum when the judged result is that the single transaction data marked as declared does not exist; judging whether the settlement application amount of the user is less than or equal to the calculated transaction settlement total amount;
the candidate transaction group calculation module is used for matching and calculating a candidate transaction group of which the difference value between the single group total amount and the settlement application amount meets the matching requirement according to a preset settlement calculation mode based on the single settlement amount of the single transaction data in the current settlement transaction data when the result of the judgment is that the settlement application amount is less than or equal to the transaction settlement total amount; and the declaration result processing module is used for taking the single group total amount of the candidate transaction group as the settlement declaration amount data returned to the user, and marking the single transaction data included in the candidate transaction group which is selected as the settlement declaration amount as the declared single transaction data.
A settlement amount processing system, the system comprising:
the data acquisition unit is used for acquiring the settlement application amount of the user based on the settlement application request information of the user and inquiring the current settlement transaction data of the user;
the settlement processing unit is used for judging whether the current settlement transaction data contains single transaction data marked as declared or not; the system is further used for calculating the single negotiable amount of the single transaction data in the current negotiable transaction data when the judged result is that the single transaction data marked as declared does not exist, and calculating the transaction negotiable total amount of the user according to the single transaction negotiable amount; the system is also used for judging whether the settlement application amount of the user is less than or equal to the calculated transaction accountable total amount, and matching and calculating a candidate transaction group of which the difference value between the single group total amount and the settlement application amount meets the matching requirement according to a preset settlement calculation mode based on the single settlement amount of the single transaction data in the current settlement transaction data if the settlement application amount of the user is less than or equal to the calculated transaction accountable total amount; and further for using a single set of total amounts for the candidate transaction group as settlement claim amount data returned to the user;
and the declaration state updating unit is used for marking the single transaction data included in the selected candidate transaction group as the settlement declaration amount as the declared single transaction data.
According to the data processing method, device and system for calculating the settlement amount based on multiple transactions, the settlement amount can be accurately calculated based on multiple transaction latitudes through set business information judgment, processing algorithms and flows, and the requirement of reporting with a current supervision institution can be met. In the embodiment of the application, whether the declared transaction meets the declaration requirement or not can be judged, for example, whether the declared transaction exists or whether the settlement application amount is smaller than the transaction settlement total amount or not can be judged. If yes, then judging whether the transaction settlement total amount is larger than the settlement application amount of the user according to the settlement amount of each transaction. If not, the candidate transaction group with the smallest difference with the settlement application amount can be screened out from the multiple transactions applied by the user, and the candidate transaction group can comprise one or more single transaction data combinations. Therefore, the total sum of each amount which can be remitted in the candidate transaction group is used as the remittance declaration sum of the user, the remittance amount can be accurately calculated by the user based on multiple transaction dimensions, the remittance calculation efficiency is improved, the complex business scene requirement of the user for remitting in multiple transactions is met, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
FIG. 1 is a schematic flow chart diagram illustrating one embodiment of a method for processing data to calculate a settlement amount based on multiple transactions provided herein;
FIG. 2 is a schematic flow chart diagram illustrating an alternative embodiment of a method for processing data to calculate a settlement amount based on multiple transactions provided herein;
FIG. 3 is a flowchart illustrating an exemplary embodiment of a method for calculating candidate transaction groups in a data processing method for calculating a settlement amount based on multiple transactions;
FIG. 4 is a schematic flow chart diagram illustrating another embodiment of a method for calculating a candidate transaction group in a data processing method for calculating a settlement amount based on multiple transactions provided by the present application;
FIG. 5 is a schematic flow chart diagram illustrating an alternative embodiment of a method for processing data to calculate a settlement amount based on multiple transactions provided herein;
FIG. 6 is a schematic flow chart diagram illustrating a method for processing data to calculate a settlement amount based on a plurality of transactions according to another embodiment of the present disclosure;
FIG. 7 is a flowchart illustrating a method of calculating another embodiment of candidate transaction groups in a data processing method for calculating a settlement amount based on multiple transactions provided by the present application;
FIG. 8 is a block diagram illustrating an exemplary embodiment of a data processing apparatus for calculating a settlement amount based on multiple transactions according to the present disclosure;
FIG. 9 is a block diagram illustrating the structure of one embodiment of a candidate transaction group calculation module provided herein;
FIG. 10 is a block diagram illustrating another embodiment of a candidate transaction group calculation block provided herein;
FIG. 11 is a block diagram illustrating another embodiment of a candidate transaction group calculation module provided herein;
FIG. 12 is a block diagram illustrating an exemplary embodiment of a data processing apparatus for calculating a settlement amount based on a plurality of transactions according to the present disclosure;
FIG. 13 is a block diagram illustrating an exemplary embodiment of a data processing apparatus for calculating a settlement amount based on multiple transactions according to the present disclosure.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The following describes in detail a data processing method, device and client for calculating a settlement amount based on multiple transactions according to the present application with reference to the accompanying drawings. FIG. 1 is a method flow diagram of an embodiment of a data processing method for calculating a settlement amount based on multiple transactions provided by the present application. Although the present application provides data processing method operational steps or apparatus configurations as illustrated in the following examples or figures, more or less operational steps or module configurations may be included in the method or apparatus based on conventional or non-inventive efforts. In the case of steps or structures where there is no logically necessary cause-and-effect relationship, the execution order of the steps or the block structure of the apparatus is not limited to the execution order or the block structure provided in the embodiments of the present application. When the data processing method or the module structure is executed in an actual data processing device or an end product, the data processing method or the module structure shown in the embodiment or the figure may be executed sequentially or executed in parallel (for example, in the environment of a parallel processor or a multi-thread process).
The embodiment of the application takes the settlement amount of the user in China as an application scene to explain the scheme in detail. Of course, it should be noted that the present application is not limited to the application of renminbi settlement calculation in china, and other services related to the same or similar algorithms and logics in the embodiments of the present application, such as multiple transaction settlement calculations in foreign currencies of different currencies, can be applied to the embodiments of the present application. Specifically, in the application scenario of the embodiment of the application, the seller users of domestic merchants need to merge foreign currencies of multiple transactions occurring abroad into RMB and enter the country. The state relates to foreign currency entry settlement into RMB, and declares according to the supervision requirement and the transaction latitude.
In general, there are many uncertain engines such as refund, declaration state change, new generation transaction, etc. for the transaction number and the settlement amount of the user, and in reality, the user is generally required to autonomously submit a settlement application. In the application scenario of the embodiment of the application, the user can randomly propose a settlement application amount, wherein the settlement application amount is the sum of settlement amounts of multiple transactions, the declaration amount is not less than the declaration application amount of the user of the actual seller, and the declared transactions are not allowed to be repeatedly declared. Specifically, as shown in fig. 1, in an embodiment of a data processing method for calculating a settlement amount based on multiple transactions provided by the present application, the method may include:
s1: and acquiring the settlement application amount of the user based on settlement application request information of the user, inquiring current settlement transaction data of the user, and judging whether the single transaction data marked as declared exists in the current settlement transaction data.
In the embodiment of the application, when a user needs to carry out a settlement application, the user can submit a corresponding settlement application request to a settlement processing system, and the settlement processing system can acquire settlement application request information of the user, acquire settlement application amount of the user from the request information and inquire current settlement transaction data of the user. In the embodiment of the application, a user can provide a settlement application based on multiple transactions, the user can provide the settlement application amount at the moment, and then the system inquires the information of the multiple current transactions of the user. In this embodiment, each transaction may be provided with a flag indicating the status of the transaction declaration, such as tag true or false, for indicating whether the transaction has been declared settled, and if so, tag of the transaction is set to true, otherwise, the transaction is set to false. Of course, other embodiments of the present application use other markers or ways to mark whether a transaction is declared, for example, setting a marker as mark or uniformly setting the name of a declared transaction to the beginning of the same character string, etc.
In the embodiment of the application, the settlement application amount of the user can be obtained based on the settlement application request information of the user, the current settlement transaction data of the user is inquired, and whether a single transaction data marked as declared exists in the current settlement transaction data or not is judged.
S2: if the judged result is that the single transaction data marked as declared does not exist, calculating the single negotiable amount of the single transaction data in the current negotiable transaction data, and calculating the transaction negotiable total amount of the user according to the single transaction negotiable amount; and judging whether the settlement application amount of the user is less than or equal to the calculated transaction settlement total amount.
And if the current settlement transaction data declared by the user does not have single transaction data already declared, further calculating the transaction settlement sum of the user. Specifically, the single amount of the acquirable sum of each transaction may be calculated, and then all the amounts of the acquirable sums of the users may be added to obtain the total amount of the transaction acquirable sum of the users. The transaction settlement total may be used to determine whether the settlement applied amount by the user meets the requirements. In this embodiment, in a hard scenario, it may be set that the next settlement calculation is performed when the settlement applied amount of the user is less than or equal to (including any one of the cases of less than or equal to) the transaction settlement total amount.
Specifically, for example, the amount of money requested by the user for the settlement is 200 yuan, and the user has 7 current settlement transaction data, where the amount of money of Trade4 is 140 yuan per unit transaction data, and the refund amount of money of Trade data is 40 yuan per unit transaction data, then the amount of money that can be settled per unit transaction is 100 yuan to 140 yuan to 40 yuan. The other 6 current knot-meeting transaction data are Trade1 ═ 10, Trade2 ═ 80, Trade3 ═ 70, Trade4 ═ 140(refund4 ═ 40), Trade5 ═ 270, Trade6 ═ 50(refund ═ 30), Trade7 ═ 200(refund7 ═ 140), the units are elements, and the knot-meeting mark tag is false. In the 7 transactions, 3 transactions have refunds, and the sum of single settlement is the sum of single transaction data-the refund sum of single transaction data, so Trade4 is 140-40 is 100, Trade6 is 50-30 is 20, Trade7 is 200 and 140 is 60. The user's transaction may then be concluded with a total of 10+80+70+ (140-40) +270+ (50-30) + (200-140) — 610 dollars. The calculated current verified and collectible total amount 610 yuan of the user is larger than the user settlement application amount 200 yuan, which can be considered to satisfy the settlement calculation requirement in the embodiment, and further settlement calculation can be performed.
Of course, if there is a single transaction data already declared in the current settlement transaction data, for example, the settlement flag tag4 of Trade4 is false, the transaction may be processed according to a preset processing method, for example, it is determined that the transaction is an illegal settlement transaction, and the transaction cannot participate in the settlement calculation, and the current settlement application is invalid. Or deleting the single transaction data marked as declared, and then carrying out settlement calculation. Thus, in another embodiment of the present application, the method further comprises:
s2': if the judged result is that single transaction data with the transaction mark declared exists in the current settlement transaction data, executing any one of the following implementation modes:
s201': judging that the current settlement application of the user fails;
s202': and deleting the single transaction data marked as declared from the current settlement transaction data of the user, and calculating the settlement amount by using the current settlement transaction data marked as the declared single transaction data.
FIG. 2 is a flow chart illustrating a method of processing data to calculate a settlement amount based on a plurality of transactions according to another embodiment of the present disclosure. In other embodiments, processing may also be performed according to a customized operation mode when the current settlement transaction data has a single transaction data that has been declared according to a specific application scenario. And will not be described in detail herein.
S3: and if the result of the judgment is that the settlement application amount is less than or equal to the transaction settlement total amount, matching and calculating a candidate transaction group of which the difference value between the single group total amount and the settlement application amount meets the matching requirement according to a preset settlement calculation mode based on the single settlement amount of the single transaction data in the current settlement transaction data.
By comparing the settlement application amount of the user with the transaction amount, whether the settlement application amount is less than or equal to the calculated transaction amount of the user can be determined. If less than or equal to, a candidate transaction group may be computed based on a single match of the negotiable amount for each transaction in the current closing transaction data. The candidate transaction group may include one or more single transaction data sets meeting the settlement calculation requirement in the current settlement transaction data of the user calculated according to a preset settlement manner. For example, the candidate transaction group described in this embodiment may include that the total sum of the single remittance amounts of all the single transaction data in the candidate transaction group matches the difference between the remittance application amounts, such as the difference is zero or minimum.
The preset settlement calculation mode can be calculated according to specific application scenarios or design requirements, and includes, but is not limited to, an algorithm utilizing permutation or combination, an algorithm utilizing known sum reverse solution combination, an alternate superposition algorithm adopting a specific mode, and an algorithm of obtaining a single transaction combination with a difference value meeting matching requirements through other matching calculations. The application provides an implementation mode for calculating the candidate transaction group, which can effectively match and calculate the candidate transaction group meeting the requirements. Specifically, in another embodiment of the data processing method for calculating a settlement amount based on multiple transactions, the step of matching and calculating a single group of total amount and the settlement application amount according to a preset settlement calculation method to obtain a candidate transaction group whose difference between the single group of total amount and the settlement application amount meets a matching requirement may include:
s301: searching whether single transaction data with the same amount as the user settlement application amount exists in the single settlement amount in the current settlement transaction data of the user; if yes, taking K single transaction data with the same amount as the settlement application amount in the current settlement transaction data as K candidate transaction groups respectively, wherein K is a positive integer;
s302: if no single transaction data with the same amount of money as the money requested by the user is available in the current money settlement transaction data, enumerating all single transaction combinations C (N, M) of the current money settlement transaction data by taking the single money of the single transaction data as an element, and calculating a single group total amount of the single money of each single transaction combination in the single transaction combinations C (N, M), wherein N is the number of the single transactions in the current money settlement transaction data of the user, and M is an integer and takes a value of [2, N ] ]respectively;
s303: judging whether a single transaction combination with a single group total amount identical to the settlement application amount exists in the single transaction combination C (N, M); and if so, taking the single transaction combination with the same amount as the settlement application amount as the candidate transaction group.
FIG. 3 is a flowchart illustrating an embodiment of a method for calculating candidate transaction groups in a data processing method for calculating a settlement amount based on multiple transactions according to the present application. Specifically, for example, in the application scenario of the current 7(N is 7) pieces of the current settlement transaction data, based on 200 pieces of the settlement application amount provided by the user, a single piece of transaction data with a resultable amount of 200 pieces of the current 7 pieces of the settlement transaction data, which is Trade1 ═ 10, Trade2 ═ 80, Trade3 ═ 70, Trade4 ═ 100, Trade5 ═ 270, Trade6 ═ 20, and Trade7 ═ 60, can be searched. If so, the single transaction data with the single amount of the resumable sum of 200 yuan can be directly used as the candidate transaction group. If there is a single transaction of data with a 200 dollar amount that can be concluded, multiple candidate transaction groups may be formed.
In the application scenario of this embodiment, if there is no single transaction data with the same amount of money as the amount of money requested by the user for the result, all combinations of the current result transaction data may be listed by using the single amount of money requested by each transaction of the 7 current result transaction data of the user as an element, for example, first listing a combination C (7, 2) of every two transactions in the 7 current result transaction data as a group, then listing a combination C (7, 3) of every three transactions in the 7 current result transaction data as a group, and so on, up to the combination C (7, 7), which is 120 combinations. Then, a single group total amount of single amount of money capable of being remitted in the current remittance transaction data included in each group of 120 combinations is calculated, and the single group total amount of which groups is the same as the remittance application amount is judged. If there is a single group with the same total amount as the settlement application amount, the group can be used as the candidate transaction group. For convenience of description in this embodiment, the combinations meeting the screening requirement of the candidate transaction group in the plurality of combinations, for example, 120 combinations, may be referred to as candidate groups. Among the above 120 combinations, the candidate groups having the same total amount as the amount of the aforementioned knot transfer application may include (Trade1+ Trade3+ Trade4+ Trade6 +10 +70+100+20 ═ 200), (Trade2+ Trade4+ Trade6 ═ 80+100+20 ═ 200). The two sets of candidate groupings may then be used as candidate transaction sets.
According to the implementation scheme of the embodiment of the application, all combinations can be listed by taking single settlement amount of each current settlement transaction data as an element, then the candidate groups with the single group total amount being the same as the settlement application amount of the user are searched in the combinations, and the searched candidate groups are used as the candidate transaction groups. Thus, a single transaction corresponding to the applied amount can be matched out of a plurality of transactions of the user accurately.
Optionally, in another embodiment of the present application, if there is no single group of candidate groups with the total amount equal to the amount of the settlement application in the combination C (N, M), the group with the smallest difference between the single group amount and the amount of the settlement application may be selected as the candidate transaction group. Therefore, a settlement declaration amount which is most accurate to the settlement application amount provided by the user can be calculated for the user on the premise of meeting the settlement rule. Specifically, in another embodiment of the data processing method for calculating a settlement amount based on multiple transactions, the method may further include:
s304: and if no single transaction combination with the same single group total amount as the settlement application amount exists in the single transaction combination C (N, M), calculating the difference value between the single group total amount of each single transaction combination in the single transaction combination C (N, M) and the settlement application amount, and selecting the single transaction combination with the minimum difference value and the single group total amount smaller than or equal to the settlement application amount as a candidate transaction group.
FIG. 4 is a flowchart illustrating an embodiment of a method for calculating candidate transaction groups in a data processing method for calculating a settlement amount based on multiple transactions according to the present application. Specifically, for example, if there is no single group of total sum of the 120 combinations of all C (N, M) that is 200 dollars of the settlement application amount of the user, the difference between each of the 120 combinations and the settlement application amount of 200 dollars can be calculated based on the single suspendable amount. In the embodiment of the present application, since there may be some groups whose single total amount is greater than the settlement application amount, for example, Trade4+ Trade1+ Trade2+ Trade6 is 210>200, the group with the minimum difference and the single total amount less than or equal to the settlement application amount may be selected as the candidate transaction group.
Of course, if the result of the determination is that the amount of the settlement application is greater than the transaction amount of the settlement application, for example, the amount of the settlement application is 650 yuan, and the amount of the settlement application is greater than 610 yuan, the settlement application may be processed according to a predetermined processing method, for example, it is determined that the settlement application does not meet the settlement application requirement, and the current settlement application is invalid. Of course, after the user is notified, the execution mode may be specifically set according to the design requirement, such as processing based on the amount of the settlement application that is modified by the user and meets the settlement application requirement. Thus, in another embodiment of the present application, the method further comprises:
s3': and if the judgment result is that the settlement application amount is larger than the transaction settlement total amount, judging that the current settlement application of the user fails.
FIG. 5 is a flow chart illustrating a method of processing data to calculate a settlement amount based on multiple transactions according to another embodiment of the present disclosure.
In the above embodiment, a single transaction data meeting the requirement of the user for the amount of the settlement application may be searched first, and if the single transaction data does not exist, all possible combinations of the current settlement transaction data may be listed further by using the combination as a unit. And then calculating the total sum of the single group of each group, searching whether a combination which is the same as the settlement application sum of the user exists, and if so, controlling the candidate transaction group by the combination. It should be noted that, in some embodiments of the present application, the candidate transaction group obtained by the final screening may include one, and of course, in other embodiments, a plurality of candidate transaction groups meeting the requirement may exist, which is not limited in the present application. For example, in this embodiment, a match with the difference of the amount of the settlement application may require zero, that is, a group with a single set of total amount equal to the amount of the settlement application in the single transaction combination C (N, M) is searched, and if such a group exists, the group may be regarded as a candidate transaction group.
In this embodiment of the application, when the result of the determination is that the settlement applied amount is less than or equal to the transaction settlement total amount, based on the single settlement amount of the single transaction data in the current settlement transaction data, the candidate transaction group whose difference between the single group total amount and the settlement applied amount meets the matching requirement is calculated in a preset settlement calculation manner in a matching manner.
S4: and taking the single group total amount of the candidate transaction group as the result declaration amount data returned to the user, and marking the single transaction data included in the selected candidate transaction group as the result declaration amount as the declared single transaction data.
As previously mentioned, the set of candidate transactions may include one or more sets of events. A group of candidate transaction groups can be selected according to scene design requirements or settlement rules and the like, and the selected single group total amount of the candidate transaction groups is used as the settlement declaration amount of the user. At the same time, selected transactions that are candidate transaction groups for the settlement of the declared amount may be marked as declared. Specifically, for example, in the application scenario of the above embodiment, two candidate transaction groups obtained by filtering the single group of total amount and the settlement application amount with the smallest difference (preferably 0) are: (Trade1+ Trade3+ Trade4+ Trade6 ═ 10+70+100+20 ═ 200) and (Trade2+ Trade4+ Trade6 ═ 80+100+20 ═ 200). One of the groups may then be selected according to predefined selection rules, such as selecting the group containing the most or least transaction data or the largest amount. In this embodiment, to reduce the transaction amount, it may be configured to preferentially select the candidate transaction group containing the most transaction data, that is, select the candidate transaction group containing 4 transactions from the two groups: (Trade1+ Trade3+ Trade4+ Trade6 is 10+70+100+20 is 200). Each transaction Trade in the candidate transaction group may then be marked as declared, e.g., Trade mark tag true for Trade1, Trade3, Trade4, Trade 6.
Based on the business specifications and the process algorithm set in the embodiment provided by the application, when multiple transactions are simultaneously declared, a settlement declaration amount which is most accurate to the settlement application amount provided by the user can be provided for the user on the premise of meeting the settlement rule, the autonomous settlement requirement of the user is met, and the user experience is improved.
In another embodiment of the data processing method for calculating the settlement amount based on multiple transactions, after the result of the judgment is that the settlement applied amount is less than or equal to the transaction settlement total amount, the single transaction data in which the single settlement amount is greater than the settlement applied amount of the current user in the current settlement transaction data can be deleted, so that the settlement calculation rate can be further improved. Fig. 6 is a schematic method flow diagram of another embodiment of a data processing method for calculating a settlement amount based on multiple transactions, specifically as shown in fig. 6, in another embodiment of the data processing method for calculating a settlement amount based on multiple transactions, after determining that the settlement applied amount of the user is less than or equal to the calculated transaction settlement amount, the method may further include:
s5: and deleting a single transaction datum of which the amount of the acquirable money is larger than the money application amount of the user from the current money transaction data of the user.
In the application scenario of the above embodiment, the single amount of the held transaction Trade, Trade. Obviously, the calculation amount of the settlement data after the single settlement amount larger than the settlement application amount is deleted is less than that before, so that the settlement calculation speed can be increased, and the settlement processing efficiency can be improved.
The application also provides another embodiment of a preset settlement calculation mode, which can be used for calculating a candidate transaction group in a convenient and quick matching manner and calculating the settlement declaration amount of the user. FIG. 7 is a flowchart illustrating a method for calculating a candidate transaction group according to another embodiment of the data processing method for calculating a settlement amount based on multiple transactions provided by the present application. Specifically, in another embodiment of the data processing method for calculating a settlement amount based on multiple transactions, the candidate transaction groups, which are based on a single settlement amount of single transaction data in the current settlement transaction data and match and calculate a difference between a single group total amount and the settlement application amount according to a preset settlement calculation method, and meet a matching requirement, may include:
s331: sorting the current settlement transaction data according to the amount dimension of the single transaction data;
s332: summing is carried out from one side of the maximum value of the sorting queue according to head and tail alternative values in sequence;
s333: comparing the current sum with the settlement application amount after each summation, stopping taking the value when the current sum is larger than the settlement application amount, and removing the value of the single transaction calculated by the current settlement;
s334: taking the single transaction included in the current sum value corresponding to the value of the single transaction without the current settlement calculation as a candidate transaction group; accordingly, the step of providing a single set of total amounts for the candidate transaction group as the settlement claim amount data returned to the user comprises: and taking the current sum obtained by removing the value of the single transaction calculated by the current settlement as settlement application amount data returned to the user.
In a specific example application field, for example, a user has 7 existing transactions, the amount of single transaction data is 140, the refund amount of single transaction data is 40, the amount of single transaction can be 100, Trade1 is 10, Trade2 is 80, Trade3 is 70, Trade4 is 140(refund4 is 40), Trade5 is 270, Trade6 is 50(refund is 30), Trade7 is 200(refund7 is 140), and the tag is marked as tag false. And 3 of the 7 transactions have refunds, and the sum of each remitable transaction is equal to the sum of each transaction data-the refund sum of each transaction data. Trade 4-140-40-100, Trade 6-50-30-20, Trade 7-200-140-60. The total amount that the current user can end up is the total amount of 7 transactions: the transaction may be concluded with a total of 10+80+70+100+270+20+ 60-610.
The data processing method provided by the example can comprise the following implementation processes:
1. if the user submits a settlement application amount of 200;
2. judging whether the user has a transaction tag which is false, if so, continuing the next step, and if not, failing to apply for the settlement;
3. judging that the amount of the settlement application is less than or equal to the transaction amount of the settlement, if so, continuing the next step, otherwise, failing to apply the settlement;
4. deleting the transaction number which is larger than the applied amount in the transaction, such as the example data: trade 5;
5. the remaining 6 transactions are ordered from small to large according to the latitude of the amount:
Trade1=10<Trade6=20<Trade7=60<Trade3=70<Trade2=80<Trade4=100;
6. then summing the data from the head and the tail of the sequencing queue, starting to obtain from the tail of the queue, then obtaining the head, and sequentially alternating;
7. each pick is compared to the settlement application amount, and when the calculated amount > the settlement application amount, it is stopped and the current transaction is removed. As detailed steps in the example data:
the first step is as follows: trade4 is 100<200, accumulation is continued;
the second step is that: continuing to accumulate Trade4+ Trade1 when 110 is less than 200;
the third step: continuing to accumulate Trade4+ Trade1+ Trade2 when 190 is less than 200;
the fourth step: stop when Trade4+ Trade1+ Trade2+ Trade6 is greater than 210> 200;
8. removing Trade6, and taking Trade4, Trade1 and Trade2 as candidate transaction groups; taking Trade4, Trade1 and Trade2 to obtain the sum of the single settlement amount, wherein the sum is equal to the settlement declaration amount, and marking Trade4, Trade1 and Trade2, and tag is true;
9. and if the settlement application is successful, the settlement declaration amount is 190, which is less than 200 of the user application amount.
According to the implementation scheme, a settlement amount value which is most accurate to the settlement provided by the user can be provided on the premise of meeting the settlement rule according to the calculation in the provided current flow, and the requirement of the user for independent settlement is met.
According to the data processing method for calculating the settlement amount based on the multiple transactions, the settlement amount can be accurately calculated based on the multiple transaction latitudes through the set business information judgment, processing algorithm and process, and the declaration requirement of the current supervision institution can be met. In the embodiment of the application, whether the declared transaction meets the declaration requirement or not can be judged, for example, whether the declared transaction exists or whether the settlement application amount is smaller than the transaction settlement total amount or not can be judged. If yes, then judging whether the transaction settlement total amount is larger than the settlement application amount of the user according to the settlement amount of each transaction. If not, the candidate transaction group with the smallest difference with the settlement application amount can be screened out from the multiple transactions applied by the user, and the candidate transaction group can comprise one or more single transaction data combinations. Therefore, the total sum of each amount which can be remitted in the candidate transaction group is used as the remittance declaration sum of the user, the remittance amount can be accurately calculated by the user based on multiple transaction dimensions, the remittance calculation efficiency is improved, the complex business scene requirement of the user for remitting in multiple transactions is met, and the user experience is improved.
The application provides a data processing device for calculating the settlement amount based on multiple transactions. Fig. 8 is a block diagram of an embodiment of a data processing apparatus for calculating a settlement amount based on multiple transactions according to the present application, as shown in fig. 8, the apparatus may include:
the declaration state judgment module 101 may be configured to obtain a settlement application amount of the user based on settlement application request information of the user, query current settlement transaction data of the user, and judge whether a single transaction data marked as a declaration exists in the current settlement transaction data;
the amount comparison module 102 may be configured to calculate a single negotiable amount of the single transaction data in the current closing transaction data when the single transaction data marked as declared does not exist as a result of the determination, and calculate a transaction negotiable total amount of the user according to the single transaction negotiable amount; judging whether the settlement application amount of the user is less than or equal to the calculated transaction settlement total amount;
the candidate transaction group calculation module 103 may be configured to, when the result of the determination is that the settlement application amount is less than or equal to the transaction settlement total amount, match and calculate a candidate transaction group in which a difference between a single group total amount and the settlement application amount meets a matching requirement according to a preset settlement calculation manner based on a single settlement amount of a single transaction data in the current settlement transaction data;
the declaration result processing module 104 may be configured to use a single group total amount of the candidate transaction group as the settlement declaration amount data returned to the user, and mark the single transaction data included in the candidate transaction group that is selected as the settlement declaration amount as declared single transaction data.
In another embodiment of the data processing apparatus for calculating a settlement amount based on a plurality of transactions, the candidate transaction group calculating module 103 may include:
the first processing module 1031 may be configured to find whether a single transaction data with the same amount as the amount applied for the settlement of the user exists in a single amount of the settlement transaction data currently held by the user; if yes, taking K single transaction data with the same amount as the settlement application amount in the current settlement transaction data as K candidate transaction groups respectively, wherein K is a positive integer;
the second processing module 1032 may be configured to, when there is no single transaction data with a single amount of remittance identical to the user remittance application amount in the current remittance transaction data, list all single transaction combinations C (N, M) of the current remittance transaction data by using the single amount of remittance of the single transaction data as an element, and calculate a single group total amount of the single amount of remittance of each single transaction combination in the single transaction combinations C (N, M), where N is a single transaction number in the current remittance transaction data of the user, and M is an integer and takes a value [2, N ] respectively;
the third processing module 1033 may determine whether there is a single transaction combination with a single group total amount that is the same as the settlement application amount in the single transaction combination C (N, M); and if so, taking the single transaction combination with the same amount as the settlement application amount as the candidate transaction group.
FIG. 9 is a block diagram of an embodiment of a candidate transaction group calculation module provided by the present application.
In another embodiment of the data processing apparatus for calculating a settlement amount based on multiple transactions, the candidate transaction group calculating module 103 may further include:
the fourth processing module 1034 may be configured to, when there is no single transaction combination with the same total amount as the settlement application amount in the single transaction combination C (N, M), calculate a difference between the single total amount of each single transaction combination in the single transaction combination C (N, M) and the settlement application amount, and select the single transaction combination with the smallest difference and the single total amount less than or equal to the settlement application amount as a candidate transaction group.
Fig. 10 is a block diagram of another embodiment of a candidate transaction group calculation module provided in the present application.
In another embodiment of the data processing apparatus for calculating a settlement amount based on a plurality of transactions, the candidate transaction group calculating module 103 may include:
the amount sorting module 1131 may be configured to sort the current remittance transaction data according to the amount dimension of the single transaction data;
the summation calculation module 1132 is configured to sum the values sequentially according to head and tail alternative values from one side of the maximum value of the sorting queue;
the sum value comparison processing module 1133 may be configured to compare the current sum value with the amount of the settlement application after each value summation, stop taking the value when the current sum value is greater than the amount of the settlement application, and remove the value of the single transaction calculated by the current settlement;
the transaction group determining module 1134 may be configured to use a single transaction included in a current sum value corresponding to a value of the single transaction obtained by removing the current settlement calculation as a candidate transaction group; correspondingly, the declaration result processing module 104 is configured to use the single group total amount of the candidate transaction group as the settlement declaration amount data returned to the user, and the declaration result processing module 104 is configured to use the current sum obtained by removing the value of the single transaction calculated by the current settlement as the settlement application amount data returned to the user.
Fig. 11 is a block diagram of another embodiment of a candidate transaction group calculation module provided in the present application.
In another embodiment of a data processing apparatus for calculating a settlement amount based on a plurality of transactions, the apparatus may further include:
the transaction deletion module 105 may be configured to delete a single transaction datum, in which the amount of the remittance application of the user is greater than the amount of the remittance application of the user, from the current remittance transaction datum of the user after determining that the amount of the remittance application of the user is less than or equal to the calculated total amount of the remittance accountability of the transaction.
FIG. 12 is a block diagram illustrating an exemplary embodiment of a data processing apparatus for calculating a settlement amount based on multiple transactions according to the present disclosure.
In another embodiment of a data processing apparatus for calculating a settlement amount based on a plurality of transactions, the apparatus may further comprise at least one of:
the first failure processing module 1061 may be configured to, when the determined result is that a single transaction data marked as declared transaction exists in the current settlement transaction data, determine that the current settlement application of the user fails;
the recalculation processing module 1062 may be configured to delete the single transaction data marked as declared from the current settlement transaction data of the user, and perform settlement amount calculation using the current settlement transaction data marked as the declared single transaction data.
In another embodiment of a data processing apparatus for calculating a settlement amount based on a plurality of transactions, the apparatus may further include:
the second failure processing module 1063 may be configured to determine that the current settlement application of the user fails when the determination result indicates that the settlement application amount is greater than the transaction settlement total amount.
FIG. 13 is a block diagram illustrating an exemplary embodiment of a data processing apparatus for calculating a settlement amount based on multiple transactions according to the present disclosure.
The specific details of the candidate transaction group calculation method, the combined calculation method, the amount sorting, the alternate value taking, the value comparison, and the like specifically referred to in the data processing apparatus provided in the above embodiment may refer to the relevant descriptions of other embodiments or application scenarios in the present application, and are not described herein again. The data processing device for calculating the settlement amount based on multiple transactions provided by the embodiment of the application can realize the accurate calculation of the settlement amount based on multiple transaction latitudes through the set service information judgment, processing algorithm and flow, and can meet the declaration requirements of the current supervision institution. In the embodiment of the application, whether the declared transaction meets the declaration requirement or not can be judged, for example, whether the declared transaction exists or whether the settlement application amount is smaller than the transaction settlement total amount or not can be judged. If yes, then judging whether the transaction settlement total amount is larger than the settlement application amount of the user according to the settlement amount of each transaction. If not, the candidate transaction group with the smallest difference with the settlement application amount can be screened out from the multiple transactions applied by the user, and the candidate transaction group can comprise one or more single transaction data combinations. Therefore, the total sum of each amount which can be remitted in the candidate transaction group is used as the remittance declaration sum of the user, the remittance amount can be accurately calculated by the user based on multiple transaction dimensions, the remittance calculation efficiency is improved, the complex business scene requirement of the user for remitting in multiple transactions is met, and the user experience is improved.
The data processing method or device for calculating the settlement amount based on multiple transactions can be applied to a processing system for calculating the settlement amount, can meet the requirement that settlement application amount provided by a user cannot be repeatedly declared and can be accurately matched when multiple transactions are simultaneously declared, can provide settlement calculation efficiency, and improves user experience. Specifically, the present application provides a settlement amount processing system, which may include:
the data acquisition unit can be used for acquiring the settlement application amount of the user based on the settlement application request information of the user and inquiring the current settlement transaction data of the user;
the settlement processing unit can be used for judging whether the current settlement transaction data contains single transaction data marked as declared or not; the system is further used for calculating the single negotiable amount of the single transaction data in the current negotiable transaction data when the judged result is that the single transaction data marked as declared does not exist, and calculating the transaction negotiable total amount of the user according to the single transaction negotiable amount; the system is also used for judging whether the settlement application amount of the user is less than or equal to the calculated transaction accountable total amount, and matching and calculating a candidate transaction group of which the difference value between the single group total amount and the settlement application amount meets the matching requirement according to a preset settlement calculation mode based on the single settlement amount of the single transaction data in the current settlement transaction data if the settlement application amount of the user is less than or equal to the calculated transaction accountable total amount; and further for using a single set of total amounts for the candidate transaction group as settlement claim amount data returned to the user;
and the declaration state updating unit can be used for marking the single transaction data included in the selected candidate transaction group as the settlement declaration amount as the declared single transaction data.
The user's settlement transaction data may include, but is not limited to, storage by means of a distributed database, cloud storage, local storage, relational or non-relational database storage, and the like, and the settlement processing unit may include, but is not limited to, a CPU, a logic gate, a programmable circuit, and the like.
Of course, in other embodiments, the settlement processing unit matches the candidate transaction group whose difference between the single group total amount and the settlement application amount meets the matching requirement according to a preset settlement calculation method, and is configured to include the following embodiments:
searching whether single transaction data with the same amount as the user settlement application amount exists in the single settlement amount in the current settlement transaction data of the user; if yes, taking K single transaction data with the same amount as the settlement application amount in the current settlement transaction data as K candidate transaction groups respectively, wherein K is a positive integer;
when no single transaction data with the same amount of the remittance amount as the remittance application amount of the user exists in the current remittance transaction data, enumerating all single transaction combinations C (N, M) of the current remittance transaction data by taking the single remittance amount of the single transaction data as an element, and calculating a single group total amount of the single remittance amount of each single transaction combination in the single transaction combinations C (N, M), wherein N is the number of the single transactions in the current remittance transaction data of the user, and M is an integer and takes a value of [2, N ] respectively;
judging whether a single transaction combination with a single group total amount identical to the settlement application amount exists in the single transaction combination C (N, M); and if so, taking the single transaction combination with the same amount as the settlement application amount as the candidate transaction group.
Of course, in other embodiments, the settlement processing unit matches the candidate transaction group whose difference between the single group total amount and the settlement application amount meets the matching requirement according to a preset settlement calculation method, and is configured to include the following embodiments:
sorting the current settlement transaction data according to the amount dimension of the single transaction data;
summing is carried out from one side of the maximum value of the sorting queue according to head and tail alternative values in sequence;
comparing the current sum with the settlement application amount after each summation, stopping taking the value when the current sum is larger than the settlement application amount, and removing the value of the single transaction calculated by the current settlement;
and correspondingly, the single transaction included in the current sum value corresponding to the value of the single transaction without the current settlement calculation is used as a candidate transaction group, and the settlement declaration amount data returned to the user by using the single group total amount of the candidate transaction group comprises the declaration result processing module which is used for using the current sum value obtained by removing the value of the single transaction without the current settlement calculation as settlement application amount data returned to the user.
Specifically, the implementation process of the data processing of the junction processing unit in the embodiment of the processing system may refer to the description of other embodiments of the method or apparatus of the present application, and is not described herein again.
According to the data processing method, the data processing device and the data processing system for calculating the settlement amount based on the multiple transactions, the settlement amount can be accurately calculated based on the multiple transaction latitudes through the set business information judgment and processing algorithm and the set process, and the declaration requirement of a current supervision institution can be met. In the embodiment of the application, whether the declared transaction meets the declaration requirement or not can be judged, for example, whether the declared transaction exists or whether the settlement application amount is smaller than the transaction settlement total amount or not can be judged. If yes, then judging whether the transaction settlement total amount is larger than the settlement application amount of the user according to the settlement amount of each transaction. If not, the candidate transaction group with the smallest difference with the settlement application amount can be screened out from the multiple transactions applied by the user, and the candidate transaction group can comprise one or more single transaction data combinations. Therefore, the total sum of each amount which can be remitted in the candidate transaction group is used as the remittance declaration sum of the user, the remittance amount can be accurately calculated by the user based on multiple transaction dimensions, the remittance calculation efficiency is improved, the complex business scene requirement of the user for remitting in multiple transactions is met, and the user experience is improved.
Although the present application refers to the description of RMB settlement, calculation of permutation and combination, amount comparison, candidate transaction group selection, data calculation of settlement processing when the amount of single transaction data is larger than the amount of settlement application, information interaction, rule definition, and the like, the present application is not limited to the case of data calculation, information interaction, rule definition, which must be complete standard, settlement of a certain currency in a certain country, or the mentioned manner. The above description of the various embodiments of the present application is only an application of some embodiments of the present application, and the embodiments with slight modifications based on some standards, methods, and national currency settlement rules can also implement the solutions of the embodiments of the present application. Of course, other non-inventive variations of the processing method steps described in the above embodiments consistent with the present application may still be implemented in the same application, and are not described herein again.
Although the present application provides data processing method operational steps as described in an embodiment or a flowchart, more or fewer operational steps may be included based on conventional or non-inventive labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When the data processing apparatus or the client product in practice executes, it may execute sequentially or in parallel (for example, in the context of parallel processors or multi-threaded processing) according to the data processing method shown in the embodiment or the figures.
The apparatuses, units or modules illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. The functionality of the modules may be implemented in the same one or more software and/or hardware implementations of the present application. Of course, a module that implements a certain function may be implemented by a plurality of sub-modules or sub-units in combination.
The data processing methods, apparatuses or modules described herein may be implemented in a computer readable program code means for a controller implemented in any suitable way, e.g. the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g. software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller and an embedded microcontroller, examples of the controller including, but not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may therefore be considered as a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
Some of the modules in the apparatus described herein may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary hardware. Based on such understanding, the technical solutions of the present application may be embodied in the form of software products or in the implementation process of data migration, which essentially or partially contributes to the prior art. The computer software product may be stored in a storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, mobile terminal, server, or network device, etc.) to perform the methods described in the various embodiments or portions of the embodiments of the present application.
The embodiments in the present specification are described in a progressive manner, and the same or similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. All or portions of the present application are operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, mobile communication terminals, multiprocessor systems, microprocessor-based systems, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
While the present application has been described with examples, those of ordinary skill in the art will appreciate that there are numerous variations and permutations of the present application without departing from the spirit of the application, and it is intended that the appended claims encompass such variations and permutations without departing from the spirit of the application.

Claims (17)

1. A data processing method for calculating a settlement amount based on a plurality of transactions, the method comprising:
acquiring the settlement application amount of a user based on settlement application request information of the user, inquiring current settlement transaction data of the user, and judging whether single transaction data marked as declared exists in the current settlement transaction data;
if the judged result is that the single transaction data marked as declared does not exist, calculating the single amount of the single transaction data in the current settlement transaction data, calculating the transaction settlement total amount of the user according to the single amount of the settlement transaction data, and judging whether the settlement application amount of the user is less than or equal to the calculated transaction settlement total amount;
if the result of the judgment is that the settlement application amount is less than or equal to the transaction settlement total amount, matching and calculating a candidate transaction group of which the difference value between the single group total amount and the settlement application amount meets the matching requirement according to a preset settlement calculation mode based on the single settlement amount of the single transaction data in the current settlement transaction data;
and taking the single group total amount of the candidate transaction group as the result declaration amount data returned to the user, and marking the single transaction data included in the selected candidate transaction group as the result declaration amount as the declared single transaction data.
2. The data processing method for calculating the settlement amount based on multiple transactions as claimed in claim 1, wherein the candidate transaction group for which the difference between the single group total amount and the settlement application amount meets the matching requirement in the preset settlement calculation manner comprises:
searching whether single transaction data with the same amount as the user settlement application amount exists in the single settlement amount in the current settlement transaction data of the user; if yes, taking K single transaction data with the same amount as the settlement application amount in the current settlement transaction data as K candidate transaction groups respectively, wherein K is a positive integer;
if no single transaction data with the same amount of the remittance amount as the remittance application amount of the user exists in the current remittance transaction data, enumerating all single transaction combinations C (N, M) of the current remittance transaction data by taking the single remittance amount of the single transaction data as an element, and calculating a single group total amount of the single remittance amount of each single transaction combination in the single transaction combinations C (N, M), wherein N is the number of the single transaction data in the current remittance transaction data of the user, and M is an integer and takes a value of [2, N ] respectively;
judging whether a single transaction combination with a single group total amount identical to the settlement application amount exists in the single transaction combination C (N, M); and if so, taking the single transaction combination with the same amount as the settlement application amount as the candidate transaction group.
3. The data processing method for calculating a settlement amount based on a plurality of transactions of claim 2, wherein the method further comprises:
and if no single transaction combination with the same single group total amount as the settlement application amount exists in the single transaction combination C (N, M), calculating the difference value between the single group total amount of each single transaction combination in the single transaction combination C (N, M) and the settlement application amount, and selecting the single transaction combination with the minimum difference value and the single group total amount smaller than or equal to the settlement application amount as a candidate transaction group.
4. The data processing method for calculating the settlement amount based on multiple transactions as claimed in claim 1, wherein the candidate transaction group for which the difference between the single group total amount and the settlement application amount meets the matching requirement based on the single settlement amount of the single transaction data in the current settlement transaction data and matched and calculated according to a preset settlement calculation method comprises:
sorting the current settlement transaction data according to the amount dimension of the single transaction data;
summing is carried out from one side of the maximum value of the sorting queue according to head and tail alternative values in sequence;
comparing the current sum with the settlement application amount after each summation, stopping taking the value when the current sum is larger than the settlement application amount, and removing the value of the single transaction calculated by the current settlement;
taking the single transaction data included in the current sum value corresponding to the value of the single transaction without the current settlement calculation as a candidate transaction group; accordingly, the step of providing a single set of total amounts for the candidate transaction group as the settlement claim amount data returned to the user comprises: and taking the current sum obtained by removing the value of the single transaction calculated by the current settlement as settlement application amount data returned to the user.
5. The data processing method for calculating a settlement amount based on a plurality of transactions according to any one of claims 1 to 4, wherein after determining that the settlement applied amount of the user is equal to or less than the calculated transaction settlement amount, the method further comprises:
and deleting a single transaction datum of which the amount of the acquirable money is larger than the money application amount of the user from the current money transaction data of the user.
6. A data processing method for calculating a settlement amount based on a plurality of transactions according to any one of claims 1 to 4, wherein said method further comprises:
if the judged result is that single transaction data with the transaction mark declared exists in the current settlement transaction data, executing any one of the following implementation modes:
judging that the current settlement application of the user fails;
and deleting the single transaction data marked as declared from the current settlement transaction data of the user, and calculating the settlement amount by using the current settlement transaction data marked as the declared single transaction data.
7. A data processing method for calculating a settlement amount based on a plurality of transactions according to any one of claims 1 to 4, wherein said method further comprises:
and if the judgment result is that the settlement application amount is larger than the transaction settlement total amount, judging that the current settlement application of the user fails.
8. A data processing apparatus for calculating a settlement amount based on a plurality of transactions, the apparatus comprising:
the declaration state judgment module is used for acquiring the settlement application amount of the user based on settlement application request information of the user, inquiring current settlement transaction data of the user and judging whether single transaction data marked as declaration exists in the current settlement transaction data or not;
the sum comparison module is used for calculating the single negotiable sum of the single transaction data in the current remittance transaction data and calculating the transaction negotiable sum of the user according to the single negotiable sum when the judged result is that the single transaction data marked as declared does not exist; judging whether the settlement application amount of the user is less than or equal to the calculated transaction settlement total amount;
the candidate transaction group calculation module is used for matching and calculating a candidate transaction group of which the difference value between the single group total amount and the settlement application amount meets the matching requirement according to a preset settlement calculation mode based on the single settlement amount of the single transaction data in the current settlement transaction data when the result of the judgment is that the settlement application amount is less than or equal to the transaction settlement total amount;
and the declaration result processing module is used for taking the single group total amount of the candidate transaction group as the settlement declaration amount data returned to the user, and marking the single transaction data included in the candidate transaction group which is selected as the settlement declaration amount as the declared single transaction data.
9. The data processing apparatus for calculating a settlement amount based on a plurality of transactions of claim 8, wherein the candidate transaction group calculation module comprises:
the first processing module is used for searching whether a single transaction data which is the same as the settlement application amount of the user exists in a single settlement amount in the current settlement transaction data of the user; if yes, taking K single transaction data with the same amount as the settlement application amount in the current settlement transaction data as K candidate transaction groups respectively, wherein K is a positive integer;
the second processing module is used for listing all single transaction combinations C (N, M) of the current settlement transaction data by taking the single settlement amount of the single transaction data as an element when no single transaction data with the same single settlement amount as the settlement application amount of the user exists in the current settlement transaction data, and calculating a single group total amount of the single settlement amount of each single transaction combination in the single transaction combinations C (N, M), wherein N is the single transaction number in the current settlement transaction data of the user, and M is an integer and takes a value of [2, N ] respectively;
the third processing module is used for judging whether a single transaction combination with a single group total sum identical to the settlement application sum exists in the single transaction combination C (N, M); and if so, taking the single transaction combination with the same amount as the settlement application amount as the candidate transaction group.
10. The data processing apparatus for calculating a settlement amount based on a plurality of transactions of claim 9, wherein the candidate transaction group calculation module further comprises:
and the fourth processing module is used for calculating the difference value between the single group total amount of each single transaction combination in the single transaction combination C (N, M) and the settlement application amount when no single transaction combination with the single group total amount and the settlement application amount which are the same in the single transaction combination C (N, M) exists, and selecting the single transaction combination with the minimum difference value and the single group total amount less than or equal to the settlement application amount as a candidate transaction group.
11. The data processing apparatus for calculating a settlement amount based on a plurality of transactions of claim 8, wherein the candidate transaction group calculation module comprises:
the money sorting module is used for sorting the current remittance transaction data according to the money dimension of the single transaction data;
the summation calculation module is used for carrying out summation from one side of the maximum value of the sorting queue according to head and tail alternative values in sequence;
the sum value comparison processing module is used for comparing the current sum value with the settlement application amount after each time of value summation, stopping value taking when the current sum value is larger than the settlement application amount, and removing the value of the single transaction calculated by the current settlement;
the transaction group determination module is used for taking the single transaction included by the current sum value corresponding to the value of the single transaction without the current settlement calculation as a candidate transaction group; correspondingly, the declaration result processing module is configured to use the single group total amount of the candidate transaction group as the settlement declaration amount data returned to the user, and the declaration result processing module is configured to use a current sum obtained by removing the value of the single transaction calculated by the current settlement as the settlement application amount data returned to the user.
12. A data processing apparatus for calculating a settlement amount based on a plurality of transactions according to any one of claims 8 to 11, said apparatus further comprising:
and the transaction deleting module is used for deleting a single transaction datum of which the amount of the acquaintance can be more than the amount of the settlement application of the user from the current settlement transaction data of the user after judging that the amount of the settlement application of the user is less than or equal to the calculated amount of the transaction acquaintance.
13. A data processing apparatus for calculating a settlement amount based on a plurality of transactions according to any one of claims 8 to 11, the apparatus further comprising at least one of:
the first failure processing module is used for judging that the current settlement application of the user fails when the judged result is that single transaction data marked as declared transaction exists in the current settlement transaction data;
and the recalculation processing module is used for deleting the single transaction data marked as declared from the current settlement transaction data of the user and calculating the settlement amount by using the current settlement transaction data of the single transaction data marked as declared.
14. A data processing apparatus for calculating a settlement amount based on a plurality of transactions according to any one of claims 8 to 11, said apparatus further comprising:
and the second failure processing module is used for judging that the current settlement application of the user fails when the judgment result is that the settlement application amount is larger than the transaction settlement total amount.
15. A settlement amount processing system, the system comprising:
the data acquisition unit is used for acquiring the settlement application amount of the user based on the settlement application request information of the user and inquiring the current settlement transaction data of the user;
the settlement processing unit is used for judging whether the current settlement transaction data contains single transaction data marked as declared or not; the system is further used for calculating the single negotiable amount of the single transaction data in the current remittance transaction data and calculating the transaction negotiable total amount of the user according to the single negotiable amount when the judgment result is that the single transaction data marked as declared does not exist; the system is also used for judging whether the settlement application amount of the user is less than or equal to the calculated transaction accountable total amount, and matching and calculating a candidate transaction group of which the difference value between the single group total amount and the settlement application amount meets the matching requirement according to a preset settlement calculation mode based on the single settlement amount of the single transaction data in the current settlement transaction data if the settlement application amount of the user is less than or equal to the calculated transaction accountable total amount; and further for using a single set of total amounts for the candidate transaction group as settlement claim amount data returned to the user;
and the declaration state updating unit is used for marking the single transaction data included in the selected candidate transaction group as the settlement declaration amount as the declared single transaction data.
16. The settlement processing system of claim 15, wherein the settlement processing unit matches a candidate transaction group for which a difference between a single group total amount and the settlement application amount meets a matching requirement in a preset settlement calculation manner, and is configured to implement the following:
searching whether single transaction data with the same amount as the user settlement application amount exists in the single settlement amount in the current settlement transaction data of the user; if yes, taking K single transaction data with the same amount as the settlement application amount in the current settlement transaction data as K candidate transaction groups respectively, wherein K is a positive integer;
when no single transaction data with the same amount of the remittance amount as the remittance application amount of the user exists in the current remittance transaction data, enumerating all single transaction combinations C (N, M) of the current remittance transaction data by taking the single remittance amount of the single transaction data as an element, and calculating a single group total amount of the single remittance amount of each single transaction combination in the single transaction combinations C (N, M), wherein N is the number of the single transactions in the current remittance transaction data of the user, and M is an integer and takes a value of [2, N ] respectively;
judging whether a single transaction combination with a single group total amount identical to the settlement application amount exists in the single transaction combination C (N, M); and if so, taking the single transaction combination with the same amount as the settlement application amount as the candidate transaction group.
17. The settlement processing system of claim 15, wherein the settlement processing unit matches a candidate transaction group for which a difference between a single group total amount and the settlement application amount meets a matching requirement in a preset settlement calculation manner, and is configured to implement the following:
sorting the current settlement transaction data according to the amount dimension of the single transaction data;
summing is carried out from one side of the maximum value of the sorting queue according to head and tail alternative values in sequence;
comparing the current sum with the settlement application amount after each summation, stopping taking the value when the current sum is larger than the settlement application amount, and removing the value of the single transaction calculated by the current settlement;
and correspondingly, the single transaction included in the current sum value corresponding to the value of the single transaction without the current settlement calculation is used as a candidate transaction group, and correspondingly, the settlement declaration sum data returned to the user by using the single group total sum of the candidate transaction group comprises the settlement processing unit, and the current sum value obtained by removing the value of the single transaction with the current settlement calculation is used as the settlement application sum data returned to the user.
CN201610427975.1A 2016-06-16 2016-06-16 Data processing method, device and system for calculating settlement amount based on multiple transactions Active CN106910065B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610427975.1A CN106910065B (en) 2016-06-16 2016-06-16 Data processing method, device and system for calculating settlement amount based on multiple transactions
CN202010753746.5A CN112016919A (en) 2016-06-16 2016-06-16 Data processing method and device for calculating settlement amount

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610427975.1A CN106910065B (en) 2016-06-16 2016-06-16 Data processing method, device and system for calculating settlement amount based on multiple transactions

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202010753746.5A Division CN112016919A (en) 2016-06-16 2016-06-16 Data processing method and device for calculating settlement amount

Publications (2)

Publication Number Publication Date
CN106910065A CN106910065A (en) 2017-06-30
CN106910065B true CN106910065B (en) 2020-08-14

Family

ID=59206243

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202010753746.5A Pending CN112016919A (en) 2016-06-16 2016-06-16 Data processing method and device for calculating settlement amount
CN201610427975.1A Active CN106910065B (en) 2016-06-16 2016-06-16 Data processing method, device and system for calculating settlement amount based on multiple transactions

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202010753746.5A Pending CN112016919A (en) 2016-06-16 2016-06-16 Data processing method and device for calculating settlement amount

Country Status (1)

Country Link
CN (2) CN112016919A (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107833138A (en) * 2017-11-06 2018-03-23 中国银行股份有限公司 A kind of processing method and processing device of the Foreign Exchange Settlement and Sale transaction based on net amount netting
CN110610409A (en) * 2018-06-14 2019-12-24 杭州振牛信息科技有限公司 Order processing method and device and computer equipment
CN109165933A (en) * 2018-07-27 2019-01-08 阿里巴巴集团控股有限公司 A kind of cross-border transaction declaration method and device
CN109583826B (en) * 2018-09-28 2022-09-13 创新先进技术有限公司 Declaration file generation method, declaration file generation device, server and readable storage medium
CN109584057B (en) * 2018-09-28 2023-08-11 创新先进技术有限公司 Transaction detail data acquisition method, device and server
CN112465650B (en) * 2020-11-30 2023-12-08 深圳市富途网络科技有限公司 Method, device and system for gathering equity incentive benefits

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1507600A (en) * 2001-02-26 2004-06-23 ��ʽ������������ϵͳ Method and system for facilitating foreign currency exchange transactions over a network
CN104657843A (en) * 2015-03-06 2015-05-27 上海玖纳信息科技有限公司 Cross-border on-line automatic customs clearance and reconciliation method and system

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH103564A (en) * 1996-06-18 1998-01-06 Oki Electric Ind Co Ltd Method for checking transaction amount and automatic transaction system
CN101350087A (en) * 1999-12-27 2009-01-21 赵频 Business settlement system
KR20040014887A (en) * 2002-08-12 2004-02-18 손영호 System and Method of performing foreign exchanging using the Internet
US20060095361A1 (en) * 2004-10-29 2006-05-04 Rude Michael G Methods and apparatus for automatic settlement of foreign securities trades in trader's operating currency
JP2006343998A (en) * 2005-06-09 2006-12-21 Hitachi Ltd Foreign exchange settlement system
US20080010186A1 (en) * 2006-07-07 2008-01-10 Rts Realtime Systems Software Gmbh System and method for internally matching electronic trade orders originated by a preselected group of traders
CN1928935A (en) * 2006-10-11 2007-03-14 中国工商银行股份有限公司 Remittance exchange settlement system and method
CN101075336A (en) * 2007-07-20 2007-11-21 中国建设银行股份有限公司 Foreign-currency trade system
US8429057B1 (en) * 2007-11-19 2013-04-23 Curex Innovations Llc Systems and methods for creation, issuance, redemption, conversion, offering, trading, and clearing a debt obligation convertible into cash plus a spot foreign exchange contract that is priced to reflect the value of the debt obligation in a base currency in relation to the value of a reference currency
TWI462047B (en) * 2008-08-21 2014-11-21 Alibaba Group Holding Ltd To achieve overseas transactions online trading methods and online trading system
KR20110051380A (en) * 2009-11-10 2011-05-18 주식회사 하나은행 Method for internet foreign exchanging
US20150011265A1 (en) * 2013-07-05 2015-01-08 James A. Walsh, JR. Support Apparatus for Mobile Device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1507600A (en) * 2001-02-26 2004-06-23 ��ʽ������������ϵͳ Method and system for facilitating foreign currency exchange transactions over a network
CN104657843A (en) * 2015-03-06 2015-05-27 上海玖纳信息科技有限公司 Cross-border on-line automatic customs clearance and reconciliation method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
A出口企业汇率风险规避模式研究;张德超;《中国优秀硕士论文全文数据库经济与管理科学辑》;20160315(第3期);全文 *

Also Published As

Publication number Publication date
CN112016919A (en) 2020-12-01
CN106910065A (en) 2017-06-30

Similar Documents

Publication Publication Date Title
CN106910065B (en) Data processing method, device and system for calculating settlement amount based on multiple transactions
TW201905773A (en) Vehicle risk risk prediction method, device and server
CN109784934A (en) A kind of transaction risk control method, apparatus and relevant device and medium
JP7309242B2 (en) Cryptocurrency transaction analysis method and device
JP2018526704A (en) Dynamic topological system and method for efficient billing
CN107909178B (en) Electronic device, loss of association repair rate prediction method, and computer-readable storage medium
CN104951446A (en) Big data processing method and platform
CN111383005B (en) Digital currency flow direction tracking method and device
CN112633842B (en) Task pushing method, device and system
CN111612453A (en) Decentralized transaction method and device based on block chain and electronic equipment
WO2018032982A1 (en) Method and device for detecting fund transaction route in electronic payment process
CN109034819A (en) The report method and device of transaction
CN113792089B (en) Illegal behavior detection method, device, equipment and medium based on artificial intelligence
CN109934693A (en) Classification account checking method and system, storage medium, electronic equipment
CN109918385A (en) Tripartite&#39;s account checking method, electronic device and readable storage medium storing program for executing
CN109472680A (en) A kind of accounting processing method and system
CN107133233A (en) A kind of processing method and processing device of configuration data inquiry
CN106708869B (en) Group data processing method and device
CN108985755A (en) A kind of account state identification method, device and server
CN115328621B (en) Transaction processing method, device, equipment and storage medium based on block chain
CN109166042B (en) Node device, real-time reconciliation method based on blockchain, and storage medium
CN111159355A (en) Customer complaint order processing method and device
CN110348983A (en) Transaction Information management method and device, electronic equipment and non-transient storage media
CN110610409A (en) Order processing method and device and computer equipment
CN115330532B (en) Block chain processing method, device, equipment and storage medium based on account model

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Advanced innovation technology Co.,Ltd.

Address before: Greater Cayman, British Cayman Islands

Patentee before: Alibaba Group Holding Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240221

Address after: Guohao Times City # 20-01, 128 Meizhi Road, Singapore

Patentee after: Advanced Nova Technology (Singapore) Holdings Ltd.

Country or region after: Singapore

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman ky1-9008

Patentee before: Innovative advanced technology Co.,Ltd.

Country or region before: Cayman Islands

TR01 Transfer of patent right