A method, device and electronic device for processing order data based on balance settlement
By adopting balance clearing-based order data processing methods on the innovative comprehensive service platform of debt affairs, the problem that the platform cannot fully utilize account balances is solved, and data utilization and processing efficiency are improved.
Patent Information
- Application Number
- CN202111495835.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-09
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2041-12-09
AI Technical Summary
Innovative comprehensive service platforms for bond affairs cannot fully utilize the balance data in the platform wallet during order processing, resulting in low data utilization and slow data processing rate.
Through a balance clearing method, the order creation request is received using the receiving module, the calculation module and the matching module, the order creation request is generated, the account snapshot is generated, the amount to be filled is converted, the barter amount is called into the interface, and the account balance is updated and locked based on the callback information to be updated and locked, the order settlement is completed.
It improves the utilization rate of platform account balance, enhances data processing efficiency, and makes the order processing process more efficient.
Smart Images

Figure CN114119212B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of order data processing, and in particular to an order data processing method, device and electronic device based on balance settlement. Background Art
[0002] At present, there are some innovative debt-related comprehensive service platforms on the market. Such platforms are essentially professional e-commerce systems that eliminate inventory, reduce debts, and deal with non-performing assets. They are used to solve the problems of overcapacity and sales bottlenecks of small and medium-sized enterprises through online barter. Such platforms generally have two sets of barter quota systems. In addition to the normal barter quota, they also have a platform-specific exclusive quota, and the two equivalents have the characteristics of irreversible conversion. In the order processing process of general scenarios, the barter system often requires traders to choose from the wallets of other platforms or applications to pay the order fees in full, and it is impossible to fully utilize the balance data in the platform wallet. Especially for the innovative debt-related comprehensive service platform, the particularity of the platform's online barter results in the price of the goods used for trading being composed of the normal barter quota and the exclusive quota corresponding to the goods to be bartered, rather than being priced by pure barter quota or exclusive quota, which further increases the difficulty of fully utilizing the balance data in the platform wallet, resulting in low data utilization and slow data processing rate. Summary of the invention
[0003] In order to solve the above problems, the embodiments of the present application provide an order data processing method, device and electronic device based on balance settlement.
[0004] In a first aspect, an embodiment of the present application provides an order data processing method based on balance settlement, which is applied to an order data processing device based on balance settlement, the device comprising a receiving module, a calculating module, and a matching module, and the method comprises:
[0005] When the receiving module receives the order creation request, it determines the current account balance and generates an account snapshot, and generates order information based on the account snapshot, wherein the current account balance includes the first barter quota and the second barter quota, and the order information includes the order quota, the account snapshot quota, and the quota to be supplemented;
[0006] The calculation module converts the to-be-filled amount based on the second barter amount conversion ratio to obtain a first to-be-filled first barter amount, and calls up a barter amount transfer interface according to the first to-be-filled first barter amount;
[0007] The matching module receives the callback information, updates and locks the current account balance, and calculates the current credit limit change amount based on the callback information and the current account balance. After the current credit limit change amount matches the order credit limit, the order credit limit is settled based on the current credit limit change amount and the order is completed.
[0008] Preferably, the amount to be made up includes a first barter amount to be made up and a second barter amount to be made up;
[0009] The calculation module converts the to-be-filled amount based on the second barter amount conversion ratio to obtain the first to-be-filled first barter amount, including:
[0010] The calculation module calculates the second barter quota to be made up based on the second barter quota conversion ratio to obtain the first barter quota to be converted;
[0011] The first barter quota to be converted is combined with the first barter quota to be supplemented to obtain the first first barter quota to be supplemented.
[0012] Preferably, after calculating the total amount of current credit limit change based on the callback information and the current account balance, the method further includes:
[0013] Compare the total amount of the current credit limit change with the order credit limit;
[0014] When the total amount of the current credit limit change is less than the order credit limit, the second first barter credit limit to be made up is calculated based on the credit limit difference between the current account balance and the account snapshot credit limit, and the barter credit limit transfer interface is called up according to the second first barter credit limit to be made up;
[0015] Repeat the steps of receiving the callback information, updating and locking the current account balance, and calculating the total amount of the current credit limit change based on the callback information and the current account balance.
[0016] Preferably, after clearing the order quota based on the current quota change total amount and completing the order, the method further includes:
[0017] Unlocking the current account balance and updating the current account balance;
[0018] An account transaction record is generated based on the total amount of the current credit limit change.
[0019] Preferably, the method further comprises:
[0020] When a credit limit refund request instruction is received, the dynamic account snapshot corresponding to the order information is queried, and the current account balance is rolled back based on the dynamic account snapshot.
[0021] Preferably, after the calculation module converts the to-be-filled amount based on the second barter amount conversion ratio to obtain the first to-be-filled first barter amount, it further includes:
[0022] When there are convertible goods and the amount to be made up has a second barter amount to be made up, determine the single amount value of the convertible goods, and calculate the goods amount conversion ratio according to the single amount value and the domestic value of the goods, the single amount value is the second barter amount of the convertible goods in the bartering country corresponding to the order information, and the domestic value of the goods is the first barter amount corresponding to the convertible goods in the country;
[0023] Comparing the goods quota conversion ratio with the second barter quota conversion ratio;
[0024] When the goods quota conversion ratio is higher than the second barter quota conversion ratio, the second barter quota total amount of the convertible goods is calculated, and the first barter quota to be completed is updated based on the second barter quota total amount.
[0025] Preferably, the updating of the first to-be-completed first barter quota based on the second total barter quota includes:
[0026] When the total amount of the second barter quota is higher than the second barter quota to be supplemented, after deducting the second barter quota to be supplemented from the quota to be supplemented, the first first barter quota to be supplemented is updated based on the quota to be supplemented;
[0027] When the total amount of the second barter quota is not higher than the second barter quota to be supplemented, after deducting the total amount of the second barter quota from the quota to be supplemented, the first first barter quota to be supplemented is updated based on the quota to be supplemented.
[0028] In a second aspect, an embodiment of the present application provides an order data processing device based on balance settlement, the device comprising:
[0029] A receiving module, configured to determine the current account balance and generate an account snapshot when receiving an order creation request, and generate order information based on the account snapshot, wherein the current account balance includes a first barter quota and a second barter quota, and the order information includes an order quota, an account snapshot quota, and a quota to be supplemented;
[0030] A calculation module, configured to convert the to-be-filled amount based on the second barter amount conversion ratio to obtain a first to-be-filled first barter amount, and to call up a barter amount transfer interface according to the first to-be-filled first barter amount;
[0031] A matching module is used to receive callback information, update and lock the current account balance, and calculate the current credit limit change amount based on the callback information and the current account balance. After the current credit limit change amount matches the order credit limit, the order credit limit is settled based on the current credit limit change amount and the order is completed.
[0032] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method provided in the first aspect or any possible implementation of the first aspect are implemented.
[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method provided in the first aspect or any possible implementation manner of the first aspect.
[0034] The beneficial effects of the present invention are as follows: by transferring the remaining barter quota into the combined payment scheme, the platform account balance is fully utilized, thereby improving the data utilization rate of the account balance data. At the same time, the second barter quota used to replace the actual value of goods can be converted and calculated independently during the order barter process, and the order is processed only after the second barter quota is converted and calculated, thereby improving the data processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0036] Figure 1 A flowchart of an order data processing method based on balance settlement provided in an embodiment of the present application;
[0037] Figure 2 A schematic diagram of the structure of an order data processing device based on balance settlement provided in an embodiment of the present application;
[0038] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0040] In the following introduction, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The following introduction provides multiple embodiments of the present application, and different embodiments can be replaced or combined, so the present application can also be considered to include all possible combinations of the same and / or different embodiments recorded. Therefore, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then the present application should also be considered to include embodiments containing one or more of all other possible combinations of A, B, C, and D, although the embodiment may not be clearly recorded in the following text.
[0041] The following description provides examples and does not limit the scope, applicability or examples set forth in the claims. Changes may be made to the functions and arrangements of the elements described without departing from the scope of the present application. Various processes or components may be appropriately omitted, substituted or added to each example. For example, the described method may be performed in an order different from the order described, and various steps may be added, omitted or combined. In addition, features described in some examples may be combined in other examples.
[0042] See also Figure 1 , Figure 1 : is a flow chart of an order data processing method based on balance settlement provided in an embodiment of the present application. In an embodiment of the present application, the method includes:
[0043] S101. When the receiving module receives an order creation request, it determines the current account balance and generates an account snapshot, and generates order information based on the account snapshot. The current account balance includes a first barter quota and a second barter quota, and the order information includes an order quota, an account snapshot quota, and a quota to be supplemented.
[0044] The executor of this application can be the cloud server of the innovative comprehensive debt service platform.
[0045] The snapshot in the embodiment of the present application can be understood as a fully available copy of the specified data set, which includes an image of the corresponding data at a certain time point (the time point when the copy starts). The account snapshot is a snapshot generated based on the current account balance. The account snapshot is generated in the present application because the current account balance may change at any time if it is not locked, so it is necessary to generate order information based on the account snapshot at the transaction time to ensure the accuracy and stability of the order information.
[0046] In the embodiment of the present application, when the user performs a transaction operation on the debt innovative comprehensive service platform, the cloud server will receive an order creation request, and construct the order of this transaction based on the order creation request. At this time, the cloud server will determine the current account balance of the user in the platform. Due to the particularity of the debt innovative comprehensive service platform, the order barter process is composed of a part of the cash flow (i.e., the first barter quota) and a part of the actual goods converted into the quota value (i.e., the second barter quota), so the current account balance includes the first barter quota and the second barter quota. Among them, the first barter quota can be the cash flow stored by the user in the platform, which can be transferred in and out as needed. The second barter quota can be converted by the user according to the equivalent of the backlog of goods that he is eager to sell, or it can be the transaction amount obtained by other users purchasing his own goods, or it can be converted in a one-way manner based on cash in proportion. Since the second barter quota mainly represents the value corresponding to the actual goods in the barter process, it is irreversible, that is, the second barter quota cannot be reversely converted into the first barter quota and transferred out under normal circumstances, and can only be used for transactions on this platform. Based on this particularity, users hope to be able to achieve normal barter through this platform when their own cash flow is insufficient or the goods are seriously overstocked, but they do not want to hoard too much second barter quota on the platform that cannot be used elsewhere. Therefore, this application will generate order information based on the account snapshot corresponding to the user's current account balance when starting a new transaction, so as to make full use of the current account balance through payment merging, so that the user only needs to make additional payments based on the difference between the current account balance and the order quota to be spent on the order, that is, the amount to be filled, instead of having to pay the full transaction quota due to the current account balance being insufficient to pay for the transaction, thereby improving the utilization rate of data.
[0047] S102. The calculation module converts the amount to be made up based on the second barter amount conversion ratio to obtain a first barter amount to be made up, and calls up a barter amount transfer interface according to the first barter amount to be made up.
[0048] The second barter quota conversion ratio in the embodiment of the present application can be understood as the conversion ratio of the first barter quota to the second barter quota within the platform. For example, when the ratio is 1:1, it means that 1 first barter quota can be converted into 1 second barter quota.
[0049] In the embodiment of the present application, due to the particularity of the aforementioned platform transactions, the commodity pricing in the platform is composed of the first barter quota part and the second barter quota part. Therefore, when a user trades, the first barter quota may be insufficient, the second barter quota may be insufficient, or both may be insufficient. The amount transferred by the user through the barter quota transfer interface must be a cash amount, so it is necessary to convert and calculate the amount to be supplemented through the second barter quota conversion ratio, and after obtaining the first barter quota to be supplemented, the barter quota transfer interface is aroused, so that the user can transfer the quota through other methods to supplement the transaction amount required for the order.
[0050] For example, if the current account balance is 50 first barter quota and 50 second barter quota, and the price of the goods traded by the user this time is 150 first barter quota and 100 second barter quota, then the amount to be paid in the order information is 100 first barter quota and 50 second barter quota. Assuming that the conversion ratio of the second barter quota is 1:1, the final calculated first barter quota to be paid is 150 cash.
[0051] In one possible implementation, the amount to be made up includes a first barter amount to be made up and a second barter amount to be made up;
[0052] The calculation module converts the to-be-filled amount based on the second barter amount conversion ratio to obtain the first to-be-filled first barter amount, including:
[0053] The calculation module calculates the second barter quota to be made up based on the second barter quota conversion ratio to obtain the first barter quota to be converted;
[0054] The first barter quota to be converted is combined with the first barter quota to be supplemented to obtain the first first barter quota to be supplemented.
[0055] In the embodiment of the present application, since the amount transferred through the barter quota transfer interface must be a cash amount, when there is a second barter quota to be made up in the amount to be made up, it is necessary to first perform a conversion calculation on it, that is, calculate the first barter quota to be converted through the second barter quota conversion ratio, and then calculate the first barter quota to be converted and the first barter quota to be made up by accumulating the first barter quota to be converted and the first barter quota to be made up, and finally obtain the first barter quota to be made up.
[0056] In one possible implementation, after the calculation module converts the to-be-filled amount based on the second barter amount conversion ratio to obtain the first to-be-filled first barter amount, it further includes:
[0057] When there are convertible goods and the amount to be made up has a second barter amount to be made up, determine the single amount value of the convertible goods, and calculate the goods amount conversion ratio according to the single amount value and the domestic value of the goods, the single amount value is the second barter amount of the convertible goods in the bartering country corresponding to the order information, and the domestic value of the goods is the first barter amount corresponding to the convertible goods in the country;
[0058] Comparing the goods quota conversion ratio with the second barter quota conversion ratio;
[0059] When the goods quota conversion ratio is higher than the second barter quota conversion ratio, the second barter quota total amount of the convertible goods is calculated, and the first barter quota to be completed is updated based on the second barter quota total amount.
[0060] In the embodiment of the present application, in addition to the goods that are urgently needed to be sold and have been converted into the second barter quota before the transaction, the user may have a batch of surplus goods that are not in a hurry to sell immediately, and these goods can be registered as convertible goods in the platform. For the user, when the goods that are eager to sell are converted into the second barter quota, the barter object is the platform party, and there may be no barter object temporarily. At this time, the second barter quota will be converted based on the average price of the goods in the user's country. In the order transaction, it is a transaction between the user and another user. If the other user accepts to trade with part of the goods, the transaction can be carried out through the registered convertible goods. Since the transaction object of the convertible goods has become another user at this time, the other user may come from other countries, and the same goods may have different prices in different countries according to their rarity. Therefore, the value of the single quota corresponding to the convertible goods in the barter party country will be determined at this time, and it will be compared and calculated with the value of the goods in the country of origin. In other words, the domestic value of the goods represents the cash value of the goods in the country, and the single-item quota value represents the second barter quota value corresponding to the goods abroad. Combining the two with the second barter quota conversion ratio, the goods quota conversion ratio can be calculated, that is, the conversion ratio of the first barter quota and the second barter quota when the convertible goods are converted into the second barter quota for trading with the transaction object. By comparing the goods quota conversion ratio with the second barter quota conversion ratio, it is possible to determine which conversion ratio has a higher cost-effectiveness. If the second barter quota conversion ratio is still more cost-effective, the subsequent calculation will still be directly based on the first barter quota to be supplemented. If the goods quota conversion ratio is more cost-effective, the total amount of the second barter quota of the convertible goods will be calculated, so as to update the first barter quota to be supplemented, which still needs to be paid based on a third party.
[0061] In one possible implementation, the updating of the first to-be-completed first barter quota based on the second total barter quota includes:
[0062] When the total amount of the second barter quota is higher than the second barter quota to be supplemented, after deducting the second barter quota to be supplemented from the quota to be supplemented, the first first barter quota to be supplemented is updated based on the quota to be supplemented;
[0063] When the total amount of the second barter quota is not higher than the second barter quota to be supplemented, after deducting the total amount of the second barter quota from the quota to be supplemented, the first first barter quota to be supplemented is updated based on the quota to be supplemented.
[0064] In the embodiment of the present application, the number of convertible goods is determined by the user's own registration, so there will be two situations where the value of the second barter quota corresponding to the convertible goods is higher or lower than the value of the second barter quota that needs to be supplemented in this order transaction. When the total amount of the second barter quota is higher than the second barter quota to be supplemented, the second barter quota to be supplemented will be directly deducted from the amount to be supplemented, and the first first barter quota to be supplemented will be updated. When the total amount of the second barter quota is not higher than the second barter quota to be supplemented, the total amount of the second barter quota will be deducted from the amount to be supplemented, and the first first barter quota to be supplemented will be updated. In addition, the cloud server also needs to update and adjust the number of convertible goods of the user in the platform accordingly according to the amount deducted from the total amount of the second barter quota.
[0065] S103. The matching module receives the callback information, updates and locks the current account balance, and calculates the current credit limit change amount based on the callback information and the current account balance. After the current credit limit change amount matches the order credit limit, the order credit limit is settled based on the current credit limit change amount and the order is completed.
[0066] In the embodiment of the present application, the callback information can be understood as the information called back to the cloud server after the barter credit transfer interface completes the transfer, that is, the information corresponding to the first barter credit transferred by the user from the barter credit transfer interface.
[0067] In the embodiment of the present application, after the user completes the transfer of the barter quota transfer interface, the barter quota transfer interface will send a callback message to the cloud server. After receiving the callback message, the cloud server will update the current account balance, and after obtaining the latest current account balance, it will lock the current account balance, calculate the total amount of current quota change, determine whether the total amount of current quota change matches the order quota, and pay the order quota after the two match to complete the transaction process of the order. It should be noted that before receiving the callback message and completing the callback authentication, the amount that the user can pay is not enough to complete the order, that is, the order cannot be completed at this time, so during this period, the current account balance will not be used to complete the payment process of the order, and the cloud server will not lock the current account balance. Only when the user completes the transfer of the barter quota transfer interface, theoretically, the current amount that the user can clear can complete the order, the cloud server will lock the current account balance, so as to calculate the total amount of current quota change and determine whether it can match the order quota. The reason why the calculation and matching process of the total amount of current credit limit change is needed at this time is that during the period from invoking the barter credit limit transfer interface to the completion of settlement, the account credit limit may change due to reasons such as the user completing the payment of other orders. Therefore, it is necessary to update the current account balance data to obtain the latest current account balance and perform calculations. Only when the total amount of current credit limit change matches the order credit limit, the current credit limit change total amount will be converted based on the first barter credit limit quantity and the second barter credit limit required in the order credit limit, and the payment of the order will be completed, thereby improving the data processing efficiency during the order processing process.
[0068] In one possible implementation, after calculating the total amount of current credit limit change based on the callback information and the current account balance, the method further includes:
[0069] Compare the total amount of the current credit limit change with the order credit limit;
[0070] When the total amount of the current credit limit change is less than the order credit limit, the second first barter credit limit to be made up is calculated based on the credit limit difference between the current account balance and the account snapshot credit limit, and the barter credit limit transfer interface is called up according to the second first barter credit limit to be made up;
[0071] Repeat the steps of receiving the callback information, updating and locking the current account balance, and calculating the total amount of the current credit limit change based on the callback information and the current account balance.
[0072] In an embodiment of the present application, since the current account balance may change during the quota data processing of the barter quota transfer interface, the current quota change total amount will be compared with the order quota after the current quota change total amount is calculated. If the total amount of the first barter quota and the second barter quota in the current quota change total amount is less than the total amount of the first barter quota and the second barter quota in the order quota, it is considered that the current account balance has undergone a quota change during the data processing of the barter quota transfer interface, and the current account balance has become less. At this time, the pending payment status of the order will be maintained, and the quota difference calculation will be performed based on the account snapshot obtained when the order was generated and the current account balance at this time, so as to determine the second first barter quota to be filled that needs to be additionally filled through the barter quota transfer interface, and the barter quota transfer interface will be called up again, so that the user can complete the barter quota transfer interface transfer operation again.
[0073] In one possible implementation, after the order quota is settled based on the current quota change total amount and the order is completed, the method further includes:
[0074] Unlocking the current account balance and updating the current account balance;
[0075] An account transaction record is generated based on the total amount of the current credit limit change.
[0076] In the embodiment of the present application, after the order transaction is completed, the current account balance will be unlocked and the value of the current account balance will be updated. At the same time, an account flow record will be generated based on the total amount of the current credit limit change to facilitate user query and confirmation. In order to allow users to clearly know their own contributions in this transaction, the account flow record is not generated based on the order credit limit, but based on the total amount of the current credit limit change, that is, the amount actually spent by the user.
[0077] For example, if the order amount is 100 first barter amount and 100 second barter amount, and the user's current account balance is 50 second barter amount, assuming the second barter amount conversion ratio is 1:1, the amount actually paid by the user, that is, the total amount of current amount change should be 150 first barter amount and 50 second barter amount. Therefore, the expenditure in the account flow record should be 150 first barter amount and 50 second barter amount, rather than 100 first barter amount and 100 second barter amount.
[0078] In one embodiment, the method further comprises:
[0079] When a credit limit refund request instruction is received, the dynamic account snapshot corresponding to the order information is queried, and the current account balance is rolled back based on the dynamic account snapshot.
[0080] In the embodiment of the present application, although the second barter quota cannot be converted into the first barter quota under normal circumstances, for the special case of refund, the original return principle should be followed, and the first barter quota converted into the second barter quota during the order payment process should be returned to the first barter quota and then returned to the user. Specifically, during the order payment process, whenever the payment amount related to the order information changes due to the transfer in the barter quota transfer interface and the change in the current account balance, the cloud server will record a dynamic account snapshot to characterize the account changes during the order payment process. Therefore, after receiving the quota refund request instruction, the cloud server queries the dynamic account snapshot based on the time sequence, and can realize the dynamic account snapshot rollback, and return the first barter quota converted into the second barter quota during this period to the first barter quota, and return it to the current account balance.
[0081] The following will be combined with the attached Figure 2 , the order data processing device based on balance settlement provided by the embodiment of the present application is introduced in detail. It should be noted that the attached Figure 2 The order data processing device based on balance settlement shown is used to execute the application Figure 1 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 1 The embodiment shown.
[0082] See also Figure 2 , Figure 2 Schematic diagram of the structure of an order data processing device based on balance settlement provided by an embodiment of the present application. Figure 2 As shown, the device comprises:
[0083] The receiving module 201 is used to determine the current account balance and generate an account snapshot when receiving an order creation request, and generate order information based on the account snapshot, wherein the current account balance includes a first barter quota and a second barter quota, and the order information includes an order quota, an account snapshot quota, and a quota to be supplemented;
[0084] The calculation module 202 is used to convert the to-be-filled amount based on the second barter amount conversion ratio to obtain a first to-be-filled first barter amount, and to call up a barter amount transfer interface according to the first to-be-filled first barter amount;
[0085] The matching module 203 is used to receive the callback information, update and lock the current account balance, and calculate the current credit limit change amount based on the callback information and the current account balance. After the current credit limit change amount matches the order credit limit, the order credit limit is settled based on the current credit limit change amount and the order is completed.
[0086] In one possible implementation, the calculation module 202 includes:
[0087] A first calculation unit, configured to calculate the second barter quota to be made up based on the second barter quota conversion ratio to obtain the first barter quota to be converted;
[0088] The combining unit is used to combine the first barter quota to be converted with the first barter quota to be supplemented to obtain a first first barter quota to be supplemented.
[0089] In one possible implementation, the matching module 203 is further configured to:
[0090] Compare the total amount of the current credit limit change with the order credit limit;
[0091] When the total amount of the current credit limit change is less than the order credit limit, the second first barter credit limit to be made up is calculated based on the credit limit difference between the current account balance and the account snapshot credit limit, and the barter credit limit transfer interface is called up according to the second first barter credit limit to be made up;
[0092] Repeat the steps of receiving the callback information, updating and locking the current account balance, and calculating the total amount of the current credit limit change based on the callback information and the current account balance.
[0093] In one possible implementation, the device further comprises:
[0094] An unlocking module, used to unlock the current account balance and update the current account balance;
[0095] A generation module is used to generate an account transaction record based on the total amount of the current credit limit change.
[0096] In one possible implementation, the device further comprises:
[0097] The query module is used to query the dynamic account snapshot corresponding to the order information when receiving the credit limit refund request instruction, and roll back the current account balance based on the dynamic account snapshot.
[0098] In one possible implementation, the calculation module 202 further includes:
[0099] The second calculation unit is used to determine the single quota value of the convertible goods when there are convertible goods and the quota to be supplemented has a second barter quota to be supplemented, and calculate the goods quota conversion ratio according to the single quota value and the domestic value of the goods, wherein the single quota value is the second barter quota amount of the convertible goods in the bartering country corresponding to the order information, and the domestic value of the goods is the first barter quota amount corresponding to the convertible goods in the country;
[0100] A comparison unit, used to compare the goods quota conversion ratio with the second barter quota conversion ratio;
[0101] The third calculation unit is used to calculate the second total barter quota of the convertible goods when the goods quota conversion ratio is higher than the second barter quota conversion ratio, and update the first first barter quota to be supplemented based on the second total barter quota.
[0102] In one possible implementation, the third computing unit includes:
[0103] A first updating component is used for, when the total amount of the second barter quota is higher than the second barter quota to be supplemented, updating the first first barter quota to be supplemented based on the quota to be supplemented after deducting the second barter quota to be supplemented from the quota to be supplemented;
[0104] The second updating element is used to update the first first barter amount to be supplemented based on the amount to be supplemented after deducting the second total barter amount from the amount to be supplemented when the total amount of the second barter amount is not higher than the second barter amount to be supplemented.
[0105] Those skilled in the art can clearly understand that the technical solutions of the embodiments of the present application can be implemented with the help of software and / or hardware. The "unit" and "module" in this specification refer to software and / or hardware that can independently complete or cooperate with other components to complete specific functions, where the hardware can be, for example, a field programmable gate array (FPGA), an integrated circuit (IC), etc.
[0106] Each processing unit and / or module of the embodiments of the present application may be implemented by an analog circuit that implements the functions described in the embodiments of the present application, or may be implemented by software that executes the functions described in the embodiments of the present application.
[0107] See also Figure 3 , which shows a schematic diagram of the structure of an electronic device involved in an embodiment of the present application, the electronic device can be used to implement Figure 1 The method in the embodiment shown. Figure 3 As shown, the electronic device 300 may include: at least one central processor 301 , at least one network interface 304 , a user interface 303 , a memory 305 , and at least one communication bus 302 .
[0108] The communication bus 302 is used to realize the connection and communication between these components.
[0109] The user interface 303 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 303 may also include a standard wired interface and a wireless interface.
[0110] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0111] Among them, the central processing unit 301 may include one or more processing cores. The central processing unit 301 uses various interfaces and lines to connect various parts of the entire electronic device 300, and executes various functions and processes data of the terminal 300 by running or executing instructions, programs, code sets or instruction sets stored in the memory 305, and calling data stored in the memory 305. Optionally, the central processing unit 301 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The central processing unit 301 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the central processing unit 301, and it can be implemented separately through a chip.
[0112] Among them, the memory 305 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 305 includes a non-transitory computer-readable storage medium. The memory 305 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 305 may also be optionally at least one storage device located away from the aforementioned central processor 301. As Figure 3 As shown, the memory 305 as a computer storage medium may include an operating system, a network communication module, a user interface module, and program instructions.
[0113] exist Figure 3 In the electronic device 300 shown, the user interface 303 is mainly used to provide an input interface for the user and obtain the data input by the user; and the central processor 301 can be used to call the order data processing application based on balance settlement stored in the memory 305, and specifically perform the following operations:
[0114] When an order creation request is received, the current account balance is determined and an account snapshot is generated, and order information is generated based on the account snapshot, wherein the current account balance includes a first barter quota and a second barter quota, and the order information includes an order quota, an account snapshot quota, and a quota to be supplemented;
[0115] The to-be-filled amount is converted based on the second barter amount conversion ratio to obtain a first to-be-filled first barter amount, and a barter amount transfer interface is invoked according to the first to-be-filled first barter amount;
[0116] Upon receiving the callback information, the current account balance is updated and locked, and the current credit limit change amount is calculated based on the callback information and the current account balance. After the current credit limit change amount matches the order credit limit, the order credit limit is settled based on the current credit limit change amount and the order is completed.
[0117] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the above method are implemented. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a micro drive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.
[0118] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0119] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0120] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0121] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0122] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0123] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk and other media that can store program codes.
[0124] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by entering a program to instruct related hardware, and the program may be stored in a computer-readable memory, which may include a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0125] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A method for processing order data based on balance settlement, applied to an order data processing device based on balance settlement, the device comprising a receiving module, a calculating module, and a matching module, characterized in that: The method comprises: When the receiving module receives the order creation request, it determines the current account balance and generates an account snapshot, and generates order information based on the account snapshot, wherein the current account balance includes the first barter quota and the second barter quota, and the order information includes the order quota, the account snapshot quota, and the quota to be supplemented; The calculation module converts the to-be-filled amount based on the second barter amount conversion ratio to obtain a first to-be-filled first barter amount, and calls up a barter amount transfer interface according to the first to-be-filled first barter amount; The matching module receives the callback information, updates and locks the current account balance, and calculates the current credit limit change amount based on the callback information and the current account balance. After the current credit limit change amount matches the order credit limit, the order credit limit is settled based on the current credit limit change amount and the order is completed; Wherein, after the calculation module converts the to-be-filled amount based on the second barter amount conversion ratio to obtain the first to-be-filled first barter amount, it further includes: When there are convertible goods and the amount to be made up has a second barter amount to be made up, determine the single amount value of the convertible goods, and calculate the goods amount conversion ratio according to the single amount value and the domestic value of the goods, the single amount value is the second barter amount of the convertible goods in the bartering country corresponding to the order information, and the domestic value of the goods is the first barter amount corresponding to the convertible goods in the country; Comparing the goods quota conversion ratio with the second barter quota conversion ratio; When the goods quota conversion ratio is higher than the second barter quota conversion ratio, the second barter quota total amount of the convertible goods is calculated, and the first barter quota to be completed is updated based on the second barter quota total amount.
2. The method according to claim 1, characterized in that The amount to be made up includes the first barter amount to be made up and the second barter amount to be made up; The calculation module converts the to-be-filled amount based on the second barter amount conversion ratio to obtain the first to-be-filled first barter amount, including: The calculation module calculates the second barter quota to be made up based on the second barter quota conversion ratio to obtain the first barter quota to be converted; The first barter quota to be converted is combined with the first barter quota to be supplemented to obtain the first first barter quota to be supplemented.
3. The method according to claim 1, characterized in that After calculating the total amount of current credit limit change based on the callback information and the current account balance, the method further includes: Compare the total amount of the current credit limit change with the order credit limit; When the total amount of the current credit limit change is less than the order credit limit, the second first barter credit limit to be made up is calculated based on the credit limit difference between the current account balance and the account snapshot credit limit, and the barter credit limit transfer interface is called up according to the second first barter credit limit to be made up; Repeat the steps of receiving the callback information, updating and locking the current account balance, and calculating the total amount of the current credit limit change based on the callback information and the current account balance.
4. The method according to claim 1, characterized in that: After the order amount is settled based on the current amount change total and the order is completed, the method further includes: Unlocking the current account balance and updating the current account balance; An account transaction record is generated based on the total amount of the current credit limit change.
5. The method according to claim 1, characterized in that The method further comprises: When a credit limit refund request instruction is received, the dynamic account snapshot corresponding to the order information is queried, and the current account balance is rolled back based on the dynamic account snapshot.
6. The method according to claim 1, characterized in that The updating of the first to-be-completed first barter quota based on the second total barter quota includes: When the total amount of the second barter quota is higher than the second barter quota to be supplemented, after deducting the second barter quota to be supplemented from the quota to be supplemented, the first first barter quota to be supplemented is updated based on the quota to be supplemented; When the total amount of the second barter quota is not higher than the second barter quota to be supplemented, after deducting the total amount of the second barter quota from the quota to be supplemented, the first first barter quota to be supplemented is updated based on the quota to be supplemented.
7. An order data processing device based on balance settlement, characterized in that: The device comprises: A receiving module, configured to determine the current account balance and generate an account snapshot when receiving an order creation request, and generate order information based on the account snapshot, wherein the current account balance includes a first barter quota and a second barter quota, and the order information includes an order quota, an account snapshot quota, and a quota to be supplemented; A calculation module, configured to convert the to-be-filled amount based on the second barter amount conversion ratio to obtain a first to-be-filled first barter amount, and to call up a barter amount transfer interface according to the first to-be-filled first barter amount; A matching module, configured to receive the callback information, update and lock the current account balance, and calculate the current credit limit change amount based on the callback information and the current account balance, and after the current credit limit change amount matches the order credit limit, settle the order credit limit based on the current credit limit change amount and complete the order; The calculation module also includes: The second calculation unit is used to determine the single quota value of the convertible goods when there are convertible goods and the quota to be supplemented has a second barter quota to be supplemented, and calculate the goods quota conversion ratio according to the single quota value and the domestic value of the goods, wherein the single quota value is the second barter quota amount of the convertible goods in the bartering country corresponding to the order information, and the domestic value of the goods is the first barter quota amount corresponding to the convertible goods in the country; A comparison unit, used to compare the goods quota conversion ratio with the second barter quota conversion ratio; The third calculation unit is used to calculate the second total barter quota of the convertible goods when the goods quota conversion ratio is higher than the second barter quota conversion ratio, and update the first first barter quota to be supplemented based on the second total barter quota.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Data transmitting and processing method and device
CN103312662A
Payment method, device and apparatus
CN109118210A