CN117649229A - Settlement processing method and device - Google Patents
Settlement processing method and device Download PDFInfo
- Publication number
- CN117649229A CN117649229A CN202311575342.1A CN202311575342A CN117649229A CN 117649229 A CN117649229 A CN 117649229A CN 202311575342 A CN202311575342 A CN 202311575342A CN 117649229 A CN117649229 A CN 117649229A
- Authority
- CN
- China
- Prior art keywords
- settlement
- packet
- value
- updating
- initial
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 14
- 238000000034 method Methods 0.000 claims abstract description 51
- 238000012545 processing Methods 0.000 claims abstract description 36
- 230000008569 process Effects 0.000 claims abstract description 27
- 230000004044 response Effects 0.000 claims abstract description 5
- 238000004590 computer program Methods 0.000 claims description 9
- 238000001514 detection method Methods 0.000 claims description 4
- 238000012163 sequencing technique Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 8
- 230000001276 controlling effect Effects 0.000 description 7
- 238000004891 communication Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000013480 data collection Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000001105 regulatory effect Effects 0.000 description 1
- 238000010187 selection method Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/08—Payment architectures
- G06Q20/10—Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
- G06Q20/102—Bill distribution or payments
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/40—Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
- G06Q20/407—Cancellation of a transaction
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the disclosure discloses a settlement processing method and device. One embodiment of the method comprises the following steps: acquiring an initial settlement table of an account, wherein the initial settlement table comprises at least two settlement stages and settlement values corresponding to each settlement stage; in response to detecting an updating operation for the initial settlement table, updating the initial settlement table to obtain a new settlement table, wherein the difference value between the sum of settlement values corresponding to the new settlement table and the sum of settlement values corresponding to the initial settlement table is equal to the updating value indicated by the updating operation, the updating process is used for controlling the fixed settlement stage to be unchanged, and the difference between the settlement values in the new settlement table accords with a preset updating condition; and carrying out settlement processing on the account according to the settlement stage indicated by the new settlement table and the corresponding settlement value. This embodiment helps to promote stability of account settlement.
Description
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a settlement processing method and device.
Background
With the development of internet consumption finance and the continuous innovation of consumption modes, the consumption concept and the consumption mode of users are also continuously changed. For example, some first-consumption and then-payment consumption modes, etc. In these scenarios, such as installment, the user is required to pay back at a certain rate for a number of time periods (e.g., monthly, etc.), i.e., the user account may need to have a certain value of settlement processing at a number of settlement stages.
However, in an actual consumption scenario, the financial product service provider may collect a certain staged service fee, or before the entire settlement is completed, the user may initiate other operations such as repayment and refund, for example, refund the price of the user based on the insurance application, refund a part of the product or service for the user, and so on. These circumstances may lead to the need to re-plan the corresponding settlement value for each time period.
Disclosure of Invention
The embodiment of the disclosure provides a settlement processing method and device.
In a first aspect, embodiments of the present disclosure provide a settlement processing method, the method including: acquiring an initial settlement table of an account, wherein the initial settlement table comprises at least two settlement stages and settlement values corresponding to each settlement stage; in response to detecting an updating operation for the initial settlement table, updating the initial settlement table to obtain a new settlement table, wherein the difference value between the sum of settlement values corresponding to the new settlement table and the sum of settlement values corresponding to the initial settlement table is equal to the updating value indicated by the updating operation, the updating process is used for controlling the fixed settlement stage to be unchanged, and the difference between the settlement values in the new settlement table accords with a preset updating condition; and carrying out settlement processing on the account according to the settlement stage indicated by the new settlement table and the corresponding settlement value.
In a second aspect, embodiments of the present disclosure provide a settlement processing apparatus including: the system comprises an acquisition unit, a storage unit and a storage unit, wherein the acquisition unit is configured to acquire an initial settlement table of an account, and the initial settlement table comprises at least two settlement stages and settlement values corresponding to each settlement stage; the updating unit is configured to respond to detection of an updating operation for the initial settlement table, update the initial settlement table to obtain a new settlement table, wherein the difference value between the sum of settlement values corresponding to the new settlement table and the sum of settlement values corresponding to the initial settlement table is equal to the updating value indicated by the updating operation, the updating process is used for controlling the fixed settlement stage to be unchanged, and the difference between the settlement values in the new settlement table accords with a preset updating condition; and the settlement unit is configured to perform settlement processing on the account according to the settlement stage indicated by the new settlement table and the corresponding settlement value.
In a third aspect, embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage means for storing one or more programs; the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method as described in any of the implementations of the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer readable medium having stored thereon a computer program which, when executed by a processor, implements a method as described in any of the implementations of the first aspect.
According to the settlement processing method and device provided by the embodiment of the disclosure, the updated new settlement table is unchanged in each settlement stage, but differences among settlement values corresponding to each settlement stage respectively meet preset updating conditions, namely, from the point of view of differences among updated settlement values, user demands or actual demands are met best, so that on the basis of ensuring the accuracy of settlement processing of a user account, the differences among the values of settlement of the user account for a plurality of times can be controlled, the stability of settlement of the user account is facilitated, and user experience is improved.
Drawings
Other features, objects and advantages of the present disclosure will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings:
FIG. 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
FIG. 2 is a flow chart of one embodiment of a settlement processing method according to the disclosure;
FIG. 3 is a schematic diagram of one embodiment of an update process according to an embodiment of the present disclosure;
FIG. 4 is a flow chart of yet another embodiment of an update process according to the present disclosure;
fig. 5 is a schematic structural view of one embodiment of a settlement processing apparatus according to the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that, in the technical solution of the present invention, the related aspects of collection/collection, updating, analysis, use, transmission, storage, etc. of the user personal information (such as user account information, etc.) all conform to the rules of the related laws and regulations, are used for legal and reasonable purposes, are not shared, leaked or sold outside the legal aspects of use, etc., and are subject to supervision and management by the national regulatory department. Necessary measures should be taken for the personal information of the user, the use or access of the personal information data should be selectively prevented to prevent illegal access to such personal information data, to ensure that personnel having access to the personal information data comply with the regulations of the relevant laws and regulations, and to ensure the personal information security of the user. Furthermore, once such user personal information data is no longer needed, the risk should be minimized by limiting or even prohibiting the data collection and/or deletion.
It should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary architecture 100 to which embodiments of the settlement processing method or settlement processing apparatus of the present disclosure can be applied.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The terminal devices 101, 102, 103 interact with the server 105 via the network 104 to receive or send messages or the like. Various client applications can be installed on the terminal devices 101, 102, 103. For example, browser-type applications, search-type applications, instant messaging tools, financial-type applications, shopping-type applications, account management-type applications, and the like.
The terminal devices 101, 102, 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices with display screens, including but not limited to smartphones, tablets, electronic book readers, laptop and desktop computers, and the like. When the terminal devices 101, 102, 103 are software, they can be installed in the above-listed electronic devices. Which may be implemented as multiple software or software modules (e.g., multiple software or software modules for providing distributed services) or as a single software or software module. The present invention is not particularly limited herein.
The server 105 may be a server providing various services, such as a server providing back-end support for various client applications installed on the terminal devices 101, 102, 103. The server 105 may update the initial settlement table of the user account when detecting the update operation of the terminal device on the initial settlement table, so as to obtain a new settlement table, and perform settlement processing on the user account according to the settlement stage and the settlement value indicated by the new settlement table.
Note that, the settlement processing method provided by the embodiment of the present disclosure is generally executed by the server 105, and accordingly, the settlement processing apparatus is generally provided in the server 105.
It should also be noted that the terminal devices 101, 102, 103 may also have a settlement-type application installed therein. At this time, the settlement processing method may be executed by the terminal devices 101, 102, 103, and accordingly, the settlement processing apparatus may be provided in the terminal devices 101, 102, 103. At this point, the exemplary system architecture 100 may not have the server 105 and network 104 present.
The server 105 may be hardware or software. When the server 105 is hardware, it may be implemented as a distributed server cluster formed by a plurality of servers, or as a single server. When server 105 is software, it may be implemented as multiple software or software modules (e.g., multiple software or software modules for providing distributed services), or as a single software or software module. The present invention is not particularly limited herein.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of a settlement processing method according to the present disclosure is shown. The settlement processing method comprises the following steps:
step 201, obtaining an initial settlement table of an account.
In this embodiment, the account may refer to various accounts of the user that can perform settlement processing. Such as the user's electronic bank account, accounts that the user registers and uses in various transaction-like applications, and so forth.
The initial settlement table may be used to describe the time period and value for which the user account is to be settled. In general, the initial settlement table may include at least two settlement stages and a settlement value corresponding to each settlement stage. Wherein the settlement stage may be used to represent a specific period of time.
As an example, settlement stages may be divided monthly, one settlement stage being 3 months No. 1 to No. 31, corresponding settlement value being 5 yuan. It indicates that 5-membered settlement is about to be paid out to the user account at 3 months. For another example, if one settlement stage is 4 months 1 and the corresponding settlement value is 10 yuan, it means that settlement of 10 yuan of expenditure is about to be performed on the user account on the day of 4 months 1.
And 202, in response to detecting the updating operation of the initial settlement table, updating the initial settlement table to obtain a new settlement table.
In this embodiment, the update operation may refer to various operations that indicate or affect the initial settlement table. For example, a user actively initiates an update request to the initial settlement table. For another example, the clearing peer initiates an update operation to the initial clearing table, and so on.
As an example, the update operation may refer to an operation by which the user refunds or pays the settlement value indicated in the initial settlement table, or the like.
The new settlement table obtained after the update processing of the initial settlement table may also include a settlement stage and a corresponding settlement value. The update value indicates an update value of the sum of settlement values corresponding to the initial settlement table indicated by the update operation. Generally, the difference between the sum of the settlement values corresponding to the new settlement table and the sum of the settlement values corresponding to the initial settlement table is equal to the update value indicated by the update operation.
Wherein, the sum of the settlement values corresponding to the new settlement table represents the sum of the settlement values corresponding to each settlement stage in the new settlement table. The sum of the settlement values corresponding to the initial settlement table represents the sum of the settlement values corresponding to each settlement stage in the initial settlement table.
The updating process is used for controlling the fixed settlement stage to be unchanged, and the difference between the settlement values in the new settlement table accords with a preset updating condition. I.e. each settlement stage in the new settlement table is identical to each settlement stage in the initial settlement table.
The update condition may be preset by a related technician according to an actual application requirement and an application scenario. The difference between the settlement values can be expressed in various ways. For example, a variance representation may be used. For another example, the amount of different values included in each settlement value, the difference between the maximum settlement value and the minimum settlement value, and the like may be used.
As an example, the update condition may include that the variance of each settlement value in the new settlement table is less than a preset variance threshold.
And 203, performing settlement processing on the account according to the settlement stage indicated by the new settlement table and the corresponding settlement value.
In this embodiment, after the new settlement table is obtained, the settlement processing may be performed on the account according to the settlement values corresponding to the respective settlement stages in the new settlement table. Specifically, at each settlement stage, the corresponding settlement value is settled for the account.
The difference between the updated settlement values is controlled to be as small as possible, so that the settlement values of the accounts are relatively uniform each time, settlement processing is facilitated, and the settlement values of each settlement stage can be distributed as uniformly as possible according to requirements for users, so that complex settlement processing is avoided, settlement time is saved, and user experience is improved.
In some alternative implementations of the present embodiment, the update process of the initial settlement table may be performed as follows:
step one, grouping all settlement stages in an initial settlement table according to the corresponding settlement value to obtain a grouping result.
In this step, each group may include one settlement value or a plurality of settlement values. When a plurality of settlement values are included in a group, each settlement value in the group is the same. Moreover, the settlement value in different groups is different.
And step two, updating the initial settlement table according to the grouping result and taking the least grouping number included in the grouping result corresponding to the new settlement table as a constraint condition.
The minimum difference between the settlement values in the new settlement table can be ensured by controlling the minimum grouping quantity included in the grouping result corresponding to the new settlement table, so that a convenient updating mode is realized.
In some optional implementations of this embodiment, the update process is further used to control the value relationships corresponding to the settlement stages to be consistent.
Wherein the value relationship may represent a magnitude relationship between the settlement values in the initial settlement table and the new settlement table, respectively, corresponding to the settlement stages.
Generally, if the updated value indicates a decrease in the sum of the settlement values corresponding to the initial settlement table, the settlement value in the initial settlement table corresponding to each settlement stage should be greater than the settlement value in the new settlement table corresponding to that settlement stage.
Correspondingly, if the updated value represents an increase in the sum of the settlement values corresponding to the initial settlement table, the settlement value corresponding to each settlement stage in the initial settlement table should be smaller than the settlement value corresponding to the settlement stage in the new settlement table.
The consistency of the value relations corresponding to the settlement stages can be controlled to be used as one aspect of verification of the correctness of the settlement process, so that the correctness of the settlement process of the user account is ensured.
Referring now to FIG. 3, a flow 300 of one embodiment of an update process is shown. The method specifically comprises the following steps:
step 301, sorting each packet in the packet result according to the order of the corresponding settlement value from large to small to obtain a packet sequence.
Step 302, for each packet in the sequence of packets, determining a difference between the settlement values respectively corresponding to the packet and the following packet as a corresponding level difference of the packet, and determining a product of the number of settlement stages included in the packet and the corresponding level difference as a compensation value of the packet.
It should be noted that, for the last packet in the sequence of packets, since the packet has no subsequent packet, it may be determined that the packet corresponds to a level difference of 0. Correspondingly, the compensation value of the packet is also 0.
Step 303, determining a target packet from the packet sequence.
In this step, the sum of the compensation values respectively corresponding to the packets preceding the target packet in the packet sequence is smaller than the update value, and the sum of the compensation values respectively corresponding to the first packet to the target packet in the packet sequence is not smaller than the update value.
In other words, the sum of the compensation values respectively corresponding to the packets preceding the target packet in the packet sequence and the difference between the update value are not greater than the compensation value corresponding to the target packet.
And step 304, updating the settlement value corresponding to the target packet and each packet positioned before the target packet in the packet subsequence according to the corresponding compensation value.
In this step, according to the compensation value corresponding to each packet, various methods can be flexibly adopted to update the settlement value corresponding to the target packet and each packet located before the target packet in the packet subsequence.
For example, for each packet in the sequence of packets that precedes the target packet, the difference between the settlement value corresponding to that packet and its corresponding level difference may be determined as the settlement value corresponding to that packet in the new settlement table.
For the target packet, a difference value between a sum of compensation values and an update value corresponding to each packet before the target packet in the packet sequence is determined, then a difference value between the difference value and the compensation value corresponding to the target packet is determined as a target difference value, and then a sum of a settlement value corresponding to the target packet and the target difference value is determined as a settlement value corresponding to the target packet in a new settlement table.
For each packet in the sequence of packets that follows the target packet, it may be ensured that the settlement value corresponding to that packet is consistent in the initial and new settlement tables.
The update values are allocated by sequentially and preferentially utilizing the level differences among the settlement values corresponding to the groups, so that the settlement values in the new settlement table can be ensured to belong to the settlement values which appear in the initial settlement table as far as possible, the settlement processing of a plurality of settlement values is avoided for the user, the complexity of the settlement processing is further reduced, and the settlement processing efficiency is improved.
With continued reference to FIG. 4, a flow 400 of yet another embodiment of an update process is shown. The method specifically comprises the following steps:
and step 401, sequencing each group in the grouping result according to the sequence of the corresponding settlement value from large to small to obtain a grouping sequence.
Step 402, for each packet in the sequence of packets, determining a difference between the settlement values respectively corresponding to the packet and the following packet as a corresponding level difference for the packet, and determining a product of the number of settlement stages included in the packet and the corresponding level difference as a compensation value for the packet.
Step 403, determining a target packet from the sequence of packets.
The specific implementation of steps 401-403 may refer to the relevant description in the corresponding embodiment of fig. 3, and will not be described herein.
Step 404, determining the difference between the sum of the priority compensation values and the update value corresponding to each packet before the target packet in the packet sequence as the remaining update value.
Step 405, determining the quotient and remainder of the remaining update value and the number of settlement stages included in the target packet.
Step 406, splitting the remainder to obtain a split value sequence.
In this step, the split value sum represents the sum of the split values in the split value sequence. Specifically, the remainder can be split flexibly in various ways. For example, random splitting.
It should be noted that, in some cases, the remainder may be 0, and the remainder splitting and the related steps are not needed.
Step 407, determining the number of split values included in the split value sequence as a target number.
Step 408, sequentially selecting a target number of packets from the packet sequence as a packet sub-sequence.
In this step, various selection methods can be flexibly adopted to sequentially select the packet subsequence from the packet sequence. For example, a target number of packets may be randomly selected to form a packet sub-sequence. For another example, a target number of packets may be sequentially selected to form a packet sub-sequence.
Step 409, regarding the packet in the packet subsequence, taking the splitting value at the corresponding position in the splitting value sequence as the splitting value corresponding to the packet.
In this step, the number of packets included in the packet sub-sequence is consistent with the number of split values included in the split value sequence, that is, the packets in the packet sub-sequence and the split values in the split value sequence may correspond to each other by location one to one. The first packet corresponds to a first split value, the second packet corresponds to a second split value, and so on.
Step 410, for the packet in the packet subsequence, updating the settlement value of the packet corresponding to the initial settlement table according to the compensation value and the splitting value corresponding to the packet from the packet to the target packet, so as to obtain the settlement value of the packet corresponding to the new settlement table.
In this step, for each packet in the packet subsequence, the settlement value of the packet corresponding to the initial settlement table may be updated in various manners according to the compensation value and the splitting value corresponding to the packet respectively corresponding to each packet in the packet to the target packet, so as to obtain the settlement value of the packet corresponding to the new settlement table.
For example, for each packet in the sub-sequence of packets, the sum of the compensation value respectively corresponding to the packet to the target packet and the split value corresponding to the packet may be determined first, and then the difference between the obtained sum and the settlement value corresponding to the packet in the initial settlement table is determined as the settlement value corresponding to the packet in the new settlement table.
Step 411, for the packets except the sub-sequence of the packet in the packet sequence, updating the settlement value of the packet corresponding to the initial settlement table according to the compensation value respectively corresponding to the packet to the target packet, so as to obtain the settlement value of the packet corresponding to the new settlement table.
In this step, for each packet except for the sub-sequence of the packet in the packet sequence, the settlement value of the packet corresponding to the initial settlement table may be updated in various ways according to the compensation value corresponding to each packet from the packet to the target packet, so as to obtain the settlement value of the packet corresponding to the new settlement table.
For example, for each packet in the sequence of packets except for the sub-sequence of packets, the sum of the compensation values respectively corresponding to each packet in the sequence of packets to the target packet may be determined first, and then the difference between the obtained sum and the settlement value corresponding to the packet in the initial settlement table is determined as the settlement value corresponding to the packet in the new settlement table.
Optionally, when splitting the remainder, the remainder may be split according to the minimum split value to obtain a split value sequence.
Wherein the minimum separable value may correspond to a minimum value that the user account may settle. For example, when the minimum value that the user account can settle is 0.01, the minimum detachable value can be 0.01.
The update value is distributed by sequentially and preferentially using the level differences of the two adjacent groups, then the two adjacent groups can be regarded as the same group, and then the update value is distributed by using the level differences of the group and the next group, and so on until the update value is distributed, the number of groups corresponding to the new settlement table can be as small as possible, and the difference of the settlement values in the new settlement tables corresponding to the groups is as small as possible, so that the settlement processing of the user account is simplified, and the settlement efficiency is improved.
The actual settlement process and the differences between the prior art and the scheme of the application are described below by taking a scenario that refunds occur in the installment process to cause the repayment plan to be updated as an example:
in the prior art, common settlement methods include deduction and differential deduction. The refund deduction is usually carried out by refunding from the last period, if the last period is refunded, then the penultimate period is refunded, and so on until the updated value (i.e. refund total) is totally refunded. The way the balance is deducted is usually to stage the total remaining value after refund directly.
If the sum of the initial settlement values is 1000, when 500 refunds (i.e., deduction values) are required, the deduction method is described as shown in the following table one, and the difference deduction method is described as shown in the following table two:
list one
Watch II
For some special scenarios, for example, the sum of initial settlement values is 199.98, and when 0.01 needs to be refunded, the difference deduction mode is as follows in table three:
watch III
As can be seen from the above table one, the new settlement values corresponding to each period in the deduction manner are very uneven, do not meet the requirement of the period, and the value required to be settled in the previous period is not reduced for the user, and do not meet the requirement that many users expect to reduce the value required to be settled in each period.
As can be seen from the above tables two and three, although the difference deduction method can make the corresponding settlement value of each period as uniform as possible, when some minimum value needs to be updated (the deduction of 0.01 is performed as shown in the above table three), the deduction value of a certain period may be negative, and the system will report the situation in error, thereby causing account settlement errors.
The following describes a specific settlement process of the present application scheme taking a refund scenario of little value as an example: assume that the initial settlement table is as follows:
table four
Grouping the periods according to the settlement value, and calculating the grade difference and the compensation value corresponding to each group as shown in the following table five:
TABLE five
Packet sequence | Number of minutes | Initial settlement value | Level difference | Compensation value |
1 | 4 | 37 | 0.01 | 0.01 |
2 | 3 | 36.99 | 0.02 | 0.02 |
3 | 5、2、1 | 36.97 | 0.29 | 0.29*3=0.87 |
4 | 6 | 36.68 | 0 | 0 |
Assuming that the value of the refund is required to be 1, the refund value may be amortized using the first stage difference in table five, and the next packet may be incorporated by the 4 th stage of the update after the amortization, with the remaining refund value being 1-0.01 = 0.99, as shown in table six below:
TABLE six
Packet sequence | Number of minutes | Initial settlement value | Level difference | Compensation value |
2 | 4、3 | 36.99 | 0.02 | 0.02*2=0.04 |
3 | 5、2、1 | 36.97 | 0.29 | 0.29*3=0.87 |
4 | 6 | 36.68 | 0 | 0 |
The refund value may then be apportioned using the second stage in table five, and the next packet may be incorporated by the 3 rd and 4 th stages updated after apportionment, with the remaining refund value being 0.99-0.04 = 0.95, as shown in table seven below:
Watch seven
Since the current remaining refund value 0.95 is smaller than the sum of the compensation values 1.45 in table seven, in order to uniformly distribute the remaining refund values as much as possible, the quotient of 0.95 and the total number of stages 5 can be calculated to be 0.19, and the remainder is 0, so that it can be determined that each stage is respectively distributed by 0.19, and the corresponding settlement value update of the five stages after the distribution is 36.97-0.19= 36.78, as shown in the following table eight: table eight
Packet sequence | Number of minutes | Initial settlement value |
3 | 5、4、3、2、1 | 36.78 |
4 | 6 | 36.68 |
Finally, the refund values respectively apportioned in each period can be summarized as follows:
the refund value amortized in stage 4 is: 0.01+0.02+0.19=0.22;
the refund value amortized in stage 3 is: 0.02+0.19=0.21;
refund values at stages 5, 2, and 1 are: 0.19
The new settlement table finally updated is shown in the following table nine:
table nine
If the remainder is not 0, the remaining refund value to be allocated in each period may be determined based on the minimum resolvable value of 0.01.
From the tables four to nine, compared with the existing modes of deducting the reverse order and deducting the difference, the finally updated settlement table of the settlement mode of the application only comprises two groups, namely, the distribution of settlement values corresponding to each period is as uniform as possible, and abnormal situations of errors when refund values are smaller are avoided, so that problems of the existing settlement mode are effectively solved, convenience and accuracy of settlement are improved, and settlement value pressure of each period of a user can be uniformly relieved under the conditions of refund and the like, and user experience is improved. In addition, the whole related calculation process is simple, and no complex calculation relation exists, so that the settlement efficiency is improved.
With further reference to fig. 5, as an implementation of the method illustrated in the above figures, the present disclosure provides an embodiment of a computing processing apparatus, which corresponds to the method embodiment illustrated in fig. 2, and which is particularly applicable in a variety of electronic devices.
As shown in fig. 5, the settlement processing device 500 provided by the present embodiment includes an acquisition unit 501, an update unit 502, and a settlement unit 503. Wherein the obtaining unit 501 is configured to obtain an initial settlement table of the account, where the initial settlement table includes at least two settlement stages and a settlement value corresponding to each settlement stage; the updating unit 502 is configured to respond to detection of an updating operation for the initial settlement table, update the initial settlement table to obtain a new settlement table, wherein the difference between the sum of settlement values corresponding to the new settlement table and the sum of settlement values corresponding to the initial settlement table is equal to the updating value indicated by the updating operation, the updating process is used for controlling the fixed settlement stage to be unchanged, and the difference between the settlement values in the new settlement table accords with a preset updating condition; the settlement unit 503 is configured to perform settlement processing on the account according to the settlement stage indicated by the new settlement table and the corresponding settlement value.
In the present embodiment, in the settlement processing device 500: the specific processes of the obtaining unit 501, the updating unit 502 and the settlement unit 503 and the technical effects thereof may refer to the descriptions related to step 201, step 202 and step 203 in the corresponding embodiment of fig. 2, and are not described herein.
In some optional implementations of this embodiment, the updating unit 502 is further configured to: grouping each settlement stage in the initial settlement table according to the corresponding settlement values to obtain a grouping result, wherein the settlement values corresponding to the settlement stages in the grouping are the same, and the settlement values corresponding to the settlement stages in different groupings are different; and according to the grouping result, updating the initial settlement table by taking the least grouping quantity included in the grouping result corresponding to the new settlement table as a constraint condition.
In some optional implementations of this embodiment, the updating process is further configured to control the value relationships corresponding to the settlement stages to be consistent, where the value relationships represent the magnitude relationships between the settlement values in the initial settlement table and the new settlement table corresponding to the settlement stages, respectively.
In some optional implementations of this embodiment, the updating unit 502 is further configured to: sequencing each group in the grouping result according to the sequence of the corresponding settlement value from large to small to obtain a grouping sequence; for each packet in the sequence of packets, determining a difference between settlement values respectively corresponding to the packet and a subsequent packet as a corresponding level difference for the packet, and determining a product of the number of settlement stages included in the packet and the corresponding level difference as a compensation value for the packet; determining a target packet from a packet sequence, wherein the sum of compensation values respectively corresponding to the packets before the target packet in the packet sequence is smaller than the update value, and the sum of compensation values respectively corresponding to the first packet to the target packet in the packet sequence is not smaller than the update value; and updating the corresponding settlement value of the target packet and each packet positioned before the target packet in the packet sequence according to the corresponding compensation value.
In some optional implementations of this embodiment, the updating unit 502 is further configured to: determining the difference between the sum of the priority compensation values and the update value corresponding to each packet before the target packet in the packet sequence as the residual update value; determining a quotient and remainder of the remaining update value and the number of settlement stages included in the target packet; splitting the remainder to obtain a split value sequence, wherein the sum of the split values of the split value sequence is equal to the remainder; determining the number of the split values included in the split value sequence as a target number; sequentially selecting a target number of packets from the packet sequence as a packet subsequence; for the packet in the packet subsequence, taking the splitting value at the corresponding position in the splitting value sequence as the splitting value corresponding to the packet; and updating the settlement value of the packet corresponding to the initial settlement table according to the compensation value and the splitting value corresponding to the packet from the packet to the target packet in the packet subsequence, so as to obtain the settlement value of the packet corresponding to the new settlement table.
In some optional implementations of this embodiment, the updating unit 502 is further configured to: and updating the settlement value of the packet corresponding to the initial settlement table according to the compensation value respectively corresponding to the packet to the target packet in the packet sequence except the packet subsequence, and obtaining the settlement value of the packet corresponding to the new settlement table.
In some optional implementations of this embodiment, the updating unit 502 is further configured to: and splitting the remainder according to the minimum split value to obtain a split value sequence.
According to the device provided by the embodiment of the disclosure, the initial settlement table of the account is obtained through the obtaining unit, wherein the initial settlement table comprises at least two settlement stages and settlement values corresponding to each settlement stage; the updating unit is used for responding to the detection of the updating operation of the initial settlement table, updating the initial settlement table to obtain a new settlement table, wherein the difference value between the settlement value sum corresponding to the new settlement table and the settlement value sum corresponding to the initial settlement table is equal to the updating value indicated by the updating operation, the updating process is used for controlling the fixed settlement stage to be unchanged, and the difference between the settlement values in the new settlement table accords with a preset updating condition; the settlement unit performs settlement processing on the account according to the settlement stage indicated by the new settlement table and the corresponding settlement value, so that the settlement value of the account is relatively uniform each time, the settlement processing is convenient, and the settlement value of each settlement stage can be uniformly distributed as much as possible according to requirements for users, so that complex settlement processing is avoided, settlement time is saved, and user experience is improved.
Referring now to fig. 6, a schematic diagram of an electronic device (e.g., server in fig. 1) 600 suitable for use in implementing embodiments of the present disclosure is shown. The terminal set shown in fig. 6 is only one example and should not impose any limitation on the functionality and scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the electronic device 600 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 shows an electronic device 600 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead. Each block shown in fig. 6 may represent one device or a plurality of devices as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing means 601.
It should be noted that, the computer readable medium according to the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In an embodiment of the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. Whereas in embodiments of the present disclosure, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring an initial settlement table of an account, wherein the initial settlement table comprises at least two settlement stages and settlement values corresponding to each settlement stage; in response to detecting an updating operation for the initial settlement table, updating the initial settlement table to obtain a new settlement table, wherein the difference value between the sum of settlement values corresponding to the new settlement table and the sum of settlement values corresponding to the initial settlement table is equal to the updating value indicated by the updating operation, the updating process is used for controlling the fixed settlement stage to be unchanged, and the difference between the settlement values in the new settlement table accords with a preset updating condition; and carrying out settlement processing on the account according to the settlement stage indicated by the new settlement table and the corresponding settlement value.
Computer program code for carrying out operations of embodiments of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments described in the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The described units may also be provided in a processor, for example, described as: a processor includes an acquisition unit, an update unit, and a settlement unit. The names of these units do not constitute a limitation on the unit itself in some cases, and the acquisition unit may also be described as "a unit that acquires an initial settlement table of an account", for example.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above technical features, but encompasses other technical features formed by any combination of the above technical features or their equivalents without departing from the spirit of the invention. Such as the above-described features, are mutually substituted with (but not limited to) the features having similar functions disclosed in the embodiments of the present disclosure.
Claims (10)
1. A settlement processing method, comprising:
acquiring an initial settlement table of an account, wherein the initial settlement table comprises at least two settlement stages and settlement values corresponding to each settlement stage;
in response to detecting the updating operation for the initial settlement table, updating the initial settlement table to obtain a new settlement table, wherein the difference value between the sum of settlement values corresponding to the new settlement table and the sum of settlement values corresponding to the initial settlement table is equal to the updating value indicated by the updating operation, the updating process is used for controlling the fixed settlement stage to be unchanged, and the difference between the settlement values in the new settlement table accords with a preset updating condition;
And carrying out settlement processing on the account according to the settlement stage indicated by the new settlement table and the corresponding settlement value.
2. The method of claim 1, wherein the updating the initial settlement table comprises:
grouping each settlement stage in the initial settlement table according to the corresponding settlement values to obtain a grouping result, wherein the settlement values corresponding to the settlement stages in the grouping are the same, and the settlement values corresponding to the settlement stages in different groupings are different;
and according to the grouping result, updating the initial settlement table by taking the least grouping quantity included in the grouping result corresponding to the new settlement table as a constraint condition.
3. The method of claim 2, wherein the updating process is further configured to control a value relationship corresponding to each settlement stage to be consistent, wherein the value relationship indicates a magnitude relationship between settlement values in the initial settlement table and the new settlement table, respectively.
4. A method according to claim 3, wherein the update process comprises the steps of:
sequencing all the packets in the packet result according to the sequence of the corresponding settlement value from large to small to obtain a packet sequence;
For each packet in the sequence of packets, determining a difference between settlement values respectively corresponding to the packet and a subsequent packet as a corresponding level difference for the packet, and determining a product of the number of settlement stages included in the packet and the corresponding level difference as a compensation value for the packet;
determining a target packet from the packet sequence, wherein the sum of compensation values respectively corresponding to the packets before the target packet in the packet sequence is smaller than the update value, and the sum of compensation values respectively corresponding to the first packet to the target packet in the packet sequence is not smaller than the update value;
and updating the settlement value corresponding to the target packet and each packet positioned before the target packet in the packet subsequence according to the corresponding compensation value.
5. The method of claim 4, wherein updating the settlement value of each of the target packet and the packets preceding the target packet in the packet sub-sequence according to the corresponding compensation value comprises:
determining the difference between the sum of the priority compensation values corresponding to the packets positioned before the target packet in the packet sequence and the update value as the residual update value;
Determining a quotient and remainder of the remaining update value and a number of settlement stages included in the target packet;
splitting the remainder to obtain a split value sequence, wherein the sum of the split values of the split value sequence is equal to the remainder;
determining the number of the split values included in the split value sequence as a target number;
sequentially selecting a target number of packets from the packet sequence as a packet subsequence;
for the packet in the packet subsequence, taking the splitting value at the corresponding position in the splitting value sequence as the splitting value corresponding to the packet;
and updating the settlement value of the packet corresponding to the initial settlement table according to the compensation value and the splitting value corresponding to the packet from the packet to the target packet in the packet subsequence, so as to obtain the settlement value of the packet corresponding to the new settlement table.
6. The method of claim 5, wherein updating the settlement value of each of the target packet and the packets preceding the target packet in the packet subsequence according to the corresponding compensation value, further comprises:
And updating the settlement value of the packet corresponding to the initial settlement table according to the compensation value respectively corresponding to the packet to the target packet in the packet sequence except the packet subsequence, and obtaining the settlement value of the packet corresponding to the new settlement table.
7. The method of claim 6, wherein the splitting the remainder to obtain a split value sequence comprises:
and splitting the remainder according to the minimum split value to obtain a split value sequence.
8. A settlement processing device comprising:
the system comprises an acquisition unit, a storage unit and a storage unit, wherein the acquisition unit is configured to acquire an initial settlement table of an account, and the initial settlement table comprises at least two settlement stages and settlement values corresponding to each settlement stage;
the updating unit is configured to respond to detection of an updating operation for the initial settlement table, update the initial settlement table to obtain a new settlement table, wherein the difference value between the sum of settlement values corresponding to the new settlement table and the sum of settlement values corresponding to the initial settlement table is equal to the updating value indicated by the updating operation, the updating process is used for controlling the fixed settlement stage to be unchanged, and the difference between the settlement values in the new settlement table accords with a preset updating condition;
And the settlement unit is configured to perform settlement processing on the account according to the settlement stage indicated by the new settlement table and the corresponding settlement value.
9. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-7.
10. A computer readable medium having stored thereon a computer program, wherein the program when executed by a processor implements the method of any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311575342.1A CN117649229A (en) | 2023-11-23 | 2023-11-23 | Settlement processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311575342.1A CN117649229A (en) | 2023-11-23 | 2023-11-23 | Settlement processing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117649229A true CN117649229A (en) | 2024-03-05 |
Family
ID=90047032
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311575342.1A Pending CN117649229A (en) | 2023-11-23 | 2023-11-23 | Settlement processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117649229A (en) |
-
2023
- 2023-11-23 CN CN202311575342.1A patent/CN117649229A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112132674A (en) | Transaction processing method and device | |
CN110046988A (en) | A kind of batch processing system operational approach, device, medium and electronic equipment | |
CN111080276A (en) | Payment method, device, equipment and storage medium for withholding order | |
CN111429259A (en) | Method and device for processing interest data | |
CN115187378A (en) | Loan automatic repayment method, system, computer equipment and storage medium | |
CN108694588B (en) | Virtual resource request method and terminal equipment | |
CN110689425A (en) | Method and device for pricing quota based on income and electronic equipment | |
CN113159453A (en) | Resource data prediction method, device, equipment and storage medium | |
CN111754329A (en) | Loan interest settlement method, loan interest settlement device, electronic equipment and storage medium | |
CN111429251A (en) | Method and device for processing data under multiple modes | |
CN117649229A (en) | Settlement processing method and device | |
US10764788B2 (en) | Managing bandwidth in mobile telecommunications networks | |
CN111161067A (en) | Method and device for determining transaction route | |
CN114997977B (en) | Data processing method, device, electronic equipment and computer readable medium | |
US10121138B2 (en) | Correctable pre-payment for database services | |
CN114239532A (en) | Report generation method and device | |
CN113989001A (en) | Virtual asset settlement method, device, electronic equipment and storage medium | |
CN113129127A (en) | Early warning method and device | |
CN114049196A (en) | Method and device for settlement of interest on loan and computer equipment | |
CN114090247A (en) | Method, device, equipment and storage medium for processing data | |
CN111402018A (en) | Method and system for reporting resource budget | |
CN111415244B (en) | Method and device for processing data | |
CN112579572B (en) | Associated account maintenance method and device and electronic equipment | |
CN115829753B (en) | Cross-border securities business exchange method and system based on blockchain | |
CN112308661B (en) | Order processing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |