A method, device, equipment and storage medium for fee settlement
By constructing a cost set and randomly selecting sub-cost combinations, the problem of low efficiency in fixed-amount settlement in existing technologies is solved, achieving efficient cost detail combination and reducing the workload of billing personnel.
Patent Information
- Application Number
- CN202310136494.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-17
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2043-02-17
AI Technical Summary
In the current technology for fixed-amount settlement, billing personnel need to accumulate and fine-tune each expense detail one by one, resulting in a large workload, low efficiency, long time consumption for combining expense details, and low accuracy.
By constructing a cost set, initializing the target and element set, randomly selecting sub-costs for combination, determining whether the budgeted cost is not greater than the preset target value, and moving the sub-costs to the element set if the condition is met, iterating repeatedly until the target value is approached, and responding to the stop command to determine the settlement cost.
Within a large set of costs, sub-cost combinations are automatically and randomly selected to quickly approximate the target value, improving the accuracy of combinations under preset target value constraints, reducing the workload of billing personnel, and increasing the efficiency of cost detail combinations.
Smart Images

Figure CN116228218B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer search technology, and more specifically, to a method, apparatus, device, and storage medium for fee settlement. Background Technology
[0002] With the continuous development of information technology, computers are increasingly capable of processing information. Hospital Information Systems (HIS) can settle patients' medical and hospitalization expenses in segments, providing immediate settlement amounts. Currently, due to patients' expense settlement needs, there are situations requiring fixed-amount settlements, such as the amounts each party needs to pay after a traffic accident. Both parties need to issue invoices based on their respective fixed payment amounts and the details that make up the payment amount. In this case, it is necessary to combine various expense details with a specified amount to obtain an expense breakdown that constitutes the specified amount.
[0003] Currently, the method for fixed-amount settlements is to start with the first detailed expense and accumulate them one by one until they approach the fixed payment amount. Then, the billing staff makes fine adjustments, selecting or unselecting some items to make the total result closer to the target amount. However, in practice, this greatly increases the workload of the billing staff, and the process of combining expense details is time-consuming and has low accuracy. Summary of the Invention
[0004] In view of the above problems, this application is made to provide a method, apparatus, equipment and storage medium for fee settlement, so as to efficiently assist billing personnel in fee settlement and improve the efficiency of fee detail combination.
[0005] To achieve the above objectives, the following specific solutions are proposed:
[0006] A method for settling fees, comprising:
[0007] Obtain each sub-cost that makes up the total cost, and construct a cost set based on each sub-cost;
[0008] The target cost is initialized to 0, and the target set is empty;
[0009] Initialize an empty set of elements and construct an element selection set, which is the same as the cost set;
[0010] The budget cost is calculated by randomly selecting a sub-cost from the element selection set and adding it to the total amount of all sub-costs in the element set.
[0011] Determine whether the budgeted cost is not greater than the preset target value;
[0012] If so, the sub-cost selected in the element selection set is moved to the element set to obtain a new element set and a new element selection set, and the process returns to the step of calculating the budget cost.
[0013] If not, if the difference between the total amount of each sub-cost in the element set and the preset target value is less than the difference between the target cost and the preset target value, and the total amount of each sub-cost in the element set is not equal to the preset target value, then the total amount of each sub-cost in the element set is taken as the new target cost, and the element set is taken as the new target set. Then, the steps of initializing the empty element set and constructing the element selection set are returned.
[0014] In response to the instruction to stop cost calculation, determine the current target cost as the settlement cost, and determine the sub-costs of the current target set as settlement cost details.
[0015] Optionally, the method further includes:
[0016] If the budgeted cost is greater than the preset target value, and the difference between the total cost of each sub-cost in the element set and the preset target value is not less than the difference between the target cost and the preset target value, then return to the step of initializing the empty element set and constructing the element selection set.
[0017] Optionally, the method further includes:
[0018] If the budgeted cost is greater than the preset target value, when the total amount of each sub-cost in the element set is equal to the preset target value, the total amount of each sub-cost in the element set is determined as the settlement cost, and each sub-cost in the element set is determined as the settlement cost details.
[0019] Optionally, after the instruction to stop calculating the response cost determines the current target cost as the settlement cost and determines the sub-costs of the current target set as settlement cost details, the method further includes:
[0020] Calculate the difference between the settlement fee and the preset target value;
[0021] In the cost set, determine each first target sub-cost other than the sub-costs in the target set;
[0022] Among the various first target sub-costs, select a second target sub-cost whose amount is greater than the difference;
[0023] The second target sub-cost is split based on the difference to obtain a split cost equal to the difference;
[0024] The splitting cost is added to the target set to obtain the modified target set.
[0025] Optionally, after initializing the empty set of elements and constructing the element selection set, the method further includes:
[0026] The system continuously displays cost calculation information, which includes the preset target value, the current target cost, the difference between the current target cost and the preset target value, the total number of steps that have been returned to execute the initialization of the empty element set and construct the element selection set, and cost calculation time information.
[0027] Optionally, after determining the sub-fees of the current target set as settlement fee details, the method further includes:
[0028] Displays each cost category and the cost amount for each cost category. Each sub-cost has a corresponding cost category. Each cost category includes several sub-costs from the current target set. The cost amount for each cost category is the total amount of all sub-costs included in that cost category.
[0029] A payment settlement device, comprising:
[0030] The cost set construction unit is used to obtain each sub-cost that makes up the total cost and construct the cost set based on each sub-cost.
[0031] The target information initialization unit is used to initialize the target cost with a value of 0 and an empty target set;
[0032] The calculation element initialization unit is used to initialize an empty element set and construct an element selection set, wherein the element selection set is the same as the cost set;
[0033] A budget cost calculation unit is used to calculate budget costs, wherein the budget cost is obtained by randomly selecting a sub-cost from the element selection set and adding it to the total amount of all sub-costs in the element set;
[0034] The budget overrun determination unit is used to determine whether the budgeted expenses are not greater than the preset target value. If yes, the sub-expense transfer unit is executed; if no, the target information update unit is executed.
[0035] The sub-cost transfer unit is used to move the sub-cost selected in the element selection set to the element set, obtain a new element set and a new element selection set, and return to execute the budget cost calculation unit.
[0036] The target information update unit is configured to, if the difference between the total amount of each sub-cost in the element set and the preset target value is less than the difference between the target cost and the preset target value, and the total amount of each sub-cost in the element set is not equal to the preset target value, set the total amount of each sub-cost in the element set as the new target cost, set the element set as the new target set, and return to execute the calculation element initialization unit;
[0037] The settlement cost determination unit is used to respond to the instruction to stop cost calculation, determine the current target cost as the settlement cost, and determine the sub-costs of the current target set as settlement cost details.
[0038] Optionally, the device may also include:
[0039] The element set discard unit is used to return to the execution of the calculation element initialization unit if the budgeted cost is greater than the preset target value and the difference between the total amount of each sub-cost in the element set and the preset target value is not less than the difference between the target cost and the preset target value.
[0040] Optionally, the device may also include:
[0041] The settlement fee direct output unit is used to determine the total amount of each sub-fee in the element set as the settlement fee when the budgeted fee is greater than the preset target value and the total amount of each sub-fee in the element set is equal to the preset target value, and to determine each sub-fee in the element set as the settlement fee details.
[0042] Optionally, the device may also include:
[0043] The difference calculation unit is used to calculate the difference between the settlement cost and the preset target value after the settlement cost determination unit responds to the instruction to stop cost calculation, determines the current target cost as the settlement cost, and determines each sub-cost of the current target set as the settlement cost details.
[0044] The first target sub-cost determination unit is used to determine, in the cost set, each first target sub-cost other than each sub-cost in the target set;
[0045] The second target sub-cost determination unit is used to select a second target sub-cost whose amount is greater than the difference from the various first target sub-costs;
[0046] The cost splitting unit is used to split the second target sub-cost based on the difference to obtain a split cost equal to the difference.
[0047] The target set determination unit is used to add the splitting cost to the target set to obtain the modified target set.
[0048] Optionally, the device may also include:
[0049] A continuous display unit is used to continuously display cost calculation information after the calculation element initialization unit initializes an empty element set and constructs an element selection set. The cost calculation information includes the preset target value, the current target cost, the difference between the current target cost and the preset target value, the total number of times the steps of initializing the empty element set and constructing the element selection set have been returned, and cost calculation time information.
[0050] Optionally, the device may also include:
[0051] The display unit is used to display each expense category and the expense amount of each expense category after the settlement expense determination unit determines that each sub-expense of the current target set is a settlement expense detail. Each sub-expense has a corresponding expense category, each expense category includes several sub-expenses in the current target set, and the expense amount of each expense category is the total amount of the sub-expenses included in that expense category.
[0052] A billing device, comprising a memory and a processor;
[0053] The memory is used to store programs;
[0054] The processor is used to execute the program to implement the various steps of the fee settlement method described above.
[0055] A storage medium having a computer program stored thereon, which, when executed by a processor, implements the various steps of the fee settlement method described above.
[0056] Using the above technical solution, this application obtains each sub-cost that constitutes the total cost, constructs a cost set based on each sub-cost, initializes a target cost with a value of 0, and creates an empty target set. An empty element set is also initialized, and an element selection set is constructed, which is the same as the cost set. Further, a budget cost is calculated, which is obtained by randomly selecting a sub-cost from the element selection set and adding it to the total amount of all sub-costs in the element set. Further, it determines whether the budget cost is not greater than a preset target value. If so, the selected sub-cost from the element selection set is moved to the element set, resulting in a new element set. A new set of elements is selected, and the process returns to the step of calculating the budgeted cost. If the difference between the total amount of each sub-cost in the element set and the preset target value is less than the difference between the target cost and the preset target value, and the total amount of each sub-cost in the element set is not equal to the preset target value, the total amount of each sub-cost in the element set is taken as the new target cost, and the element set is taken as the new target set. The process returns to the step of initializing an empty element set and constructing the element selection set. In response to the instruction to stop cost calculation, the current target cost is determined as the settlement cost, and each sub-cost in the current target set is determined as the settlement cost details. Therefore, in a large cost set, several sub-costs can be automatically and randomly selected multiple times for combination. Under the constraint of a preset target value, a better combination of sub-costs can be quickly found by approximating the target value, improving the accuracy of sub-cost combination under the preset target value constraint. This solves the difficulty for toll collectors in combining multiple sub-costs according to a preset target value, efficiently assisting toll collectors in cost settlement, reducing their workload, and improving the efficiency of cost detail combination. Attached Figure Description
[0057] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0058] Figure 1 This is a schematic diagram illustrating a process for implementing cost settlement, provided in an embodiment of this application.
[0059] Figure 2 A schematic diagram illustrating a fee settlement interface provided in an embodiment of this application;
[0060] Figure 3 A schematic diagram of a device structure for implementing fee settlement is provided in an embodiment of this application;
[0061] Figure 4This is a schematic diagram of a device for implementing fee settlement, provided as an embodiment of this application. Detailed Implementation
[0062] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0063] The proposed solution can be implemented based on a terminal with data processing capabilities, such as a computer, server, cloud, or Hospital Information System (HIS).
[0064] Next, combined Figure 1 The method for settling fees in this application may include the following steps:
[0065] Step S110: Obtain each sub-cost that constitutes the total cost, and construct a cost set based on each sub-cost.
[0066] Each sub-fee can represent the cost of medical / hospitalization / pharmacy procedures.
[0067] For example, a patient's total cost at the hospital may consist of multiple sub-costs, such as 1 blood gas analysis: 50 yuan, 12 computer-controlled blood glucose monitoring sessions: 74.4 yuan, 1 CT scan: 344.6 yuan, 1 bottle of vitamin C tablets: 5.2 yuan, etc. The resulting cost set could be [50 74.4 344.6 5.2…].
[0068] Step S120: Initialize the target cost to 0 and the target set to empty.
[0069] Specifically, the target cost can be used to record the total cost of the combination that is closest to the preset target value during the cost calculation process, and the target set can be used to record each sub-cost that makes up the total cost of the combination.
[0070] Step S130: Initialize an empty set of elements and construct an element selection set.
[0071] The element set can be used to record the various sub-costs that need to be combined. The element selection set is the difference between the cost set and the element set. During the cost calculation process, sub-costs need to be selected from the element selection set and moved to the element set.
[0072] Specifically, during the initialization phase, the element selection set can be the same as the cost set. Upon the first execution of step S130, the search and calculation of the target cost and the target set begins.
[0073] Step S140: Calculate the budgeted costs.
[0074] Specifically, the budget cost can be represented as the total cost based on the set of elements plus a sub-cost. A sub-cost can be randomly selected from the set of elements and added to the total of all sub-costs in the set of elements to obtain the budget cost.
[0075] Understandably, since the element set can be used to record the various sub-costs that need to be combined, the total amount of the various sub-costs in the element selection set is not greater than the preset target value.
[0076] Step S150: Determine whether the budgeted cost is not greater than the preset target value. If yes, proceed to step S160; otherwise, proceed to step S170.
[0077] Step S160: Move the selected sub-cost in the element selection set to the element set to obtain a new element set and a new element selection set, and return to execute step S140.
[0078] It is understandable that when the budgeted cost is not greater than the preset target value, it means that the element set plus the selected sub-cost can get closer to the preset target value. Therefore, the sub-cost selected in the element selection set can be moved to the element set, thereby updating the element set and the element selection set, and continuing to look for sub-costs that can be merged in the element selection set.
[0079] Step S170: If the difference between the total amount of each sub-cost in the element set and the preset target value is less than the difference between the target cost and the preset target value, and the total amount of each sub-cost in the element set is not equal to the preset target value, then the total amount of each sub-cost in the element set is taken as the new target cost, and the element set is taken as the new target set, and the process returns to step S130.
[0080] Understandably, when the budgeted cost exceeds the preset target value, it indicates that the total amount of each sub-cost in the element set is close to the preset target value. Adding another sub-cost would cause it to overflow the preset target value. In this case, we can compare the difference between the total amount of each sub-cost in the element set and the preset target value, and the difference between the target cost and the preset target value. If the difference between the total amount of each sub-cost in the element set and the preset target value is less than the difference between the target cost and the preset target value, it means that the total amount of each sub-cost in the element set is closer to the preset target value than the target cost. Therefore, we can consider the difference between each sub-cost in the element set.
[0081] Furthermore, since the sub-costs of the element set are randomly selected and added from the element selection set, the target cost may not be the optimal value if the total amount of the sub-costs in the element set is not equal to the preset target value. Therefore, it is necessary to return to step S130 to repeat steps S130-S170 to optimize the target cost under the constraint of the preset target value, so that the target cost is closer to the preset target value.
[0082] Specifically, steps S130-S170 can represent the search and calculation process for the target cost and the target set.
[0083] Step S180: In response to the instruction to stop cost calculation, determine the current target cost as the settlement cost, and determine the sub-costs of the current target set as settlement cost details.
[0084] Specifically, during the search and calculation of the target cost and the target set, the system can respond to the instruction to stop cost calculation, determine the current target cost as the settlement cost, and determine the various sub-costs of the current target set as settlement cost details.
[0085] Understandably, since the various sub-costs in the cost set may not be able to reach the preset target value through any combination, and will always maintain a gap from the preset target value, the cost calculation will continue to loop indefinitely. Therefore, the user needs to provide a command to stop the cost calculation to terminate the current cost calculation. Upon receiving the command to stop the cost calculation, the current target cost can be determined as the settlement cost, and the various sub-costs in the current target set can be determined as the settlement cost details. The current target cost is the value that is closest to the preset target value (optimal value) in the entire cost calculation process; therefore, the current target set consists of the various sub-costs corresponding to the optimal value.
[0086] The cost settlement method provided in this embodiment obtains each sub-cost that constitutes the total cost, constructs a cost set based on each sub-cost, initializes a target cost with an initial value of 0, and an empty target set. An empty element set is also initialized, and an element selection set is constructed, which is the same as the cost set. Further, a budget cost is calculated, which is obtained by randomly selecting a sub-cost from the element selection set and adding it to the total amount of all sub-costs in the element set. Further, it is determined whether the budget cost is not greater than a preset target value. If so, the selected sub-cost from the element selection set is moved to the element set, resulting in a new element set. The system selects a new set of elements and returns to the step of calculating the budgeted cost. If the difference between the total amount of each sub-cost in the element set and the preset target value is less than the difference between the target cost and the preset target value, and the total amount of each sub-cost in the element set is not equal to the preset target value, the total amount of each sub-cost in the element set is taken as the new target cost, and the element set is taken as the new target set. The system then returns to the step of initializing an empty element set and constructing the element selection set. In response to the instruction to stop cost calculation, the system determines the current target cost as the settlement cost and the sub-costs of the current target set as the settlement cost details. Therefore, in a large cost set, it can automatically and randomly select several sub-costs multiple times for combination. Under the constraint of the preset target value, it can quickly find a better combination of sub-costs by approximating the target value, improving the accuracy of sub-cost combination under the preset target value constraint. This solves the difficulty for toll collectors to combine multiple sub-costs according to the preset target value, efficiently assists toll collectors in cost settlement, reduces the workload of toll collectors, and improves the efficiency of cost detail combination.
[0087] Considering the possibility that the total amount of each sub-fee in the element set may differ significantly from the preset target value, some embodiments of this application may further include the following fee settlement method:
[0088] If the budgeted cost is greater than the preset target value, and the difference between the total cost of each sub-cost in the element set and the preset target value is not less than the difference between the target cost and the preset target value, then return to step S130 of the above embodiment.
[0089] It is understandable that if the difference between the total amount of each sub-cost in the element set and the preset target value is not less than the difference between the target cost and the preset target value, it can be said that the current target cost is closer to the preset target value than the total amount of each sub-cost in the element set. In this case, the element set can be discarded (not as a new target cost) and the process can directly return to step S130 to determine a new set of elements.
[0090] Considering that during cost calculation, the total amount of each sub-cost in the element set may happen to equal the preset target value, the total amount of each sub-cost in the element set can be directly determined as the optimal value. Based on this, in some embodiments of this application, the cost settlement method may further include:
[0091] If the budgeted cost is greater than the preset target value, when the total amount of each sub-cost in the element set is equal to the preset target value, the total amount of each sub-cost in the element set is determined as the settlement cost, and each sub-cost in the element set is determined as the settlement cost details.
[0092] It is understandable that when the budgeted cost equals the preset target value, the total amount of each sub-cost in the element set is less than the preset target value. However, after adding an element to the selection set and selecting a sub-cost, the total amount of each sub-cost in the element set equals the budgeted cost equals the preset target value. Therefore, the total amount of each sub-cost in the element set can be directly determined as the settlement cost, and the details of each sub-cost in the element set can be determined as the settlement cost details.
[0093] Considering that patients and payers need to be absolutely certain about the amount they need to pay, and that the calculated target cost always differs from the preset target value, some embodiments of this application, after step S180, responding to the instruction to stop cost calculation, determining the current target cost as the settlement cost, and determining the various sub-costs of the current target set as settlement cost details, may further include a process for correcting the target cost. This process may include:
[0094] S1. Calculate the difference between the settlement fee and the preset target value.
[0095] Specifically, the difference is obtained by subtracting the settlement fee from the preset target value.
[0096] S2. In the cost set, determine each first target sub-cost other than the sub-costs in the target set.
[0097] Specifically, each first objective sub-cost can be a combination of sub-costs that have not participated in the preset objective value.
[0098] S3. Among the various first target sub-costs, select a second target sub-cost whose amount is greater than the difference.
[0099] Understandably, the difference needs to be added to the settlement cost so that the final settlement cost is exactly equal to the preset target value. Therefore, a second target sub-cost greater than the difference needs to be selected to break down the difference cost. Since the selected sub-cost cannot be the same as any sub-cost in the target set, the second target sub-cost needs to be selected from multiple first target sub-costs.
[0100] S4. Based on the difference, split the second target sub-cost to obtain a split cost equal to the difference.
[0101] S5. Add the splitting cost to the target set to obtain the modified target set.
[0102] Specifically, when adding the split cost to the target set, the quantity needs to be changed accordingly for the object type corresponding to the second target sub-cost.
[0103] The method for settling expenses provided in this embodiment selects a sub-expense greater than the difference from the sub-expenses in the target set to fill the gap, thereby correcting the total amount of the sub-expenses in the target set to a preset target value, thus ensuring that the target amount to be paid by the patient is accurate.
[0104] To visualize the fee settlement process and provide more convenient auxiliary functions for billing personnel, enabling them to grasp the target fee more efficiently, some embodiments of this application may include, after step S130 above—initializing the empty element set and constructing the element selection set—a process of maintaining the displayed fee calculation, which may include:
[0105] The cost calculation information will be displayed continuously.
[0106] The cost calculation information may include the preset target value, the current target cost, the difference between the current target cost and the preset target value, the total number of steps that have been returned to execute the initialization empty element set and construct the element selection set, and cost calculation time information.
[0107] For example Figure 2 The displayed target amount is the preset target value, the displayed current amount is the current target cost, the displayed difference amount is the difference between the current target cost and the preset target value, the displayed number of calculations is the total number of times the above embodiment's step S130 has been executed, and the displayed cumulative time is the cost calculation time information.
[0108] Furthermore, when the user / payer clicks on, such as Figure 2After clicking the "Stop" button, the sub-fees of the current target set are identified as settlement fee details. At this point, the fee categories and the fee amount for each fee category can be displayed to visualize the calculated fee settlement information for the user / charger.
[0109] Each sub-fee has a corresponding fee category, each fee category includes several sub-fees in the current target set, and the fee amount for each fee category is the total amount of all sub-fees included in that fee category.
[0110] The apparatus for implementing cost settlement provided in the embodiments of this application will be described below. The apparatus for implementing cost settlement described below can be referred to in correspondence with the method for implementing cost settlement described above.
[0111] See Figure 3 , Figure 3 This is a schematic diagram of a device structure for implementing fee settlement as disclosed in an embodiment of this application.
[0112] like Figure 3 As shown, the device may include:
[0113] Cost set construction unit 11 is used to obtain each sub-cost that constitutes the total cost and construct a cost set based on each sub-cost;
[0114] The target information initialization unit 12 is used to initialize the target cost with a value of 0 and an empty target set;
[0115] The element initialization unit 13 is used to initialize an empty set of elements and construct an element selection set, wherein the element selection set is the same as the cost set.
[0116] Budget cost calculation unit 14 is used to calculate budget cost, which is obtained by randomly selecting a sub-cost from the element selection set and adding it to the total amount of all sub-costs in the element set;
[0117] Budget overrun determination unit 15 is used to determine whether the budgeted expenses are not greater than the preset target value. If yes, the sub-expense transfer unit 16 is executed; if no, the target information update unit 17 is executed.
[0118] The sub-cost transfer unit 16 is used to move the sub-cost selected in the element selection set to the element set, obtain a new element set and a new element selection set, and return to execute the budget cost calculation unit.
[0119] The target information update unit 17 is configured to, if the difference between the total amount of each sub-cost in the element set and the preset target value is less than the difference between the target cost and the preset target value, and the total amount of each sub-cost in the element set is not equal to the preset target value, set the total amount of each sub-cost in the element set as the new target cost, set the element set as the new target set, and return to execute the calculation element initialization unit;
[0120] Settlement cost determination unit 18 is used to respond to the instruction to stop cost calculation, determine the current target cost as the settlement cost, and determine the various sub-costs of the current target set as settlement cost details.
[0121] Optionally, the device may also include:
[0122] The element set discard unit is used to return to the execution of the calculation element initialization unit if the budgeted cost is greater than the preset target value and the difference between the total amount of each sub-cost in the element set and the preset target value is not less than the difference between the target cost and the preset target value.
[0123] Optionally, the device may also include:
[0124] The settlement fee direct output unit is used to determine the total amount of each sub-fee in the element set as the settlement fee when the budgeted fee is greater than the preset target value and the total amount of each sub-fee in the element set is equal to the preset target value, and to determine each sub-fee in the element set as the settlement fee details.
[0125] Optionally, the device may also include:
[0126] The difference calculation unit is used to calculate the difference between the settlement cost and the preset target value after the settlement cost determination unit responds to the instruction to stop cost calculation, determines the current target cost as the settlement cost, and determines each sub-cost of the current target set as the settlement cost details.
[0127] The first target sub-cost determination unit is used to determine, in the cost set, each first target sub-cost other than each sub-cost in the target set;
[0128] The second target sub-cost determination unit is used to select a second target sub-cost whose amount is greater than the difference from the various first target sub-costs;
[0129] The cost splitting unit is used to split the second target sub-cost based on the difference to obtain a split cost equal to the difference.
[0130] The target set determination unit is used to add the splitting cost to the target set to obtain the modified target set.
[0131] Optionally, the device may also include:
[0132] A continuous display unit is used to continuously display cost calculation information after the calculation element initialization unit initializes an empty element set and constructs an element selection set. The cost calculation information includes the preset target value, the current target cost, the difference between the current target cost and the preset target value, the total number of times the steps of initializing the empty element set and constructing the element selection set have been returned, and cost calculation time information.
[0133] Optionally, the device may also include:
[0134] The display unit is used to display each expense category and the expense amount of each expense category after the settlement expense determination unit determines that each sub-expense of the current target set is a settlement expense detail. Each sub-expense has a corresponding expense category, each expense category includes several sub-expenses in the current target set, and the expense amount of each expense category is the total amount of the sub-expenses included in that expense category.
[0135] The fee settlement apparatus provided in this application embodiment can be applied to fee settlement devices, such as computers, servers, cloud computing, and HIS systems. Optionally, Figure 4 The hardware structure block diagram of the fee settlement equipment is shown, with reference to... Figure 4 The hardware structure of the fee settlement device may include: at least one processor 1, at least one communication interface 2, at least one memory 3, and at least one communication bus 4;
[0136] In this embodiment of the application, the number of processor 1, communication interface 2, memory 3, and communication bus 4 is at least one, and processor 1, communication interface 2, and memory 3 communicate with each other through communication bus 4;
[0137] Processor 1 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.
[0138] Memory 3 may include high-speed RAM, and may also include non-volatile memory, such as at least one disk storage device;
[0139] The memory stores a program, which the processor can call. The program is used for:
[0140] Obtain each sub-cost that makes up the total cost, and construct a cost set based on each sub-cost;
[0141] The target cost is initialized to 0, and the target set is empty;
[0142] Initialize an empty set of elements and construct an element selection set, which is the same as the cost set;
[0143] The budget cost is calculated by randomly selecting a sub-cost from the element selection set and adding it to the total amount of all sub-costs in the element set.
[0144] Determine whether the budgeted cost is not greater than the preset target value;
[0145] If so, the sub-cost selected in the element selection set is moved to the element set to obtain a new element set and a new element selection set, and the process returns to the step of calculating the budget cost.
[0146] If not, if the difference between the total amount of each sub-cost in the element set and the preset target value is less than the difference between the target cost and the preset target value, and the total amount of each sub-cost in the element set is not equal to the preset target value, then the total amount of each sub-cost in the element set is taken as the new target cost, and the element set is taken as the new target set. Then, the steps of initializing the empty element set and constructing the element selection set are returned.
[0147] In response to the instruction to stop cost calculation, determine the current target cost as the settlement cost, and determine the sub-costs of the current target set as settlement cost details.
[0148] Optionally, the refined and extended functions of the program can be found in the description above.
[0149] This application embodiment also provides a storage medium that can store a program suitable for execution by a processor, the program being used for:
[0150] Obtain each sub-cost that makes up the total cost, and construct a cost set based on each sub-cost;
[0151] The target cost is initialized to 0, and the target set is empty;
[0152] Initialize an empty set of elements and construct an element selection set, which is the same as the cost set;
[0153] The budget cost is calculated by randomly selecting a sub-cost from the element selection set and adding it to the total amount of all sub-costs in the element set.
[0154] Determine whether the budgeted cost is not greater than the preset target value;
[0155] If so, the sub-cost selected in the element selection set is moved to the element set to obtain a new element set and a new element selection set, and the process returns to the step of calculating the budget cost.
[0156] If not, if the difference between the total amount of each sub-cost in the element set and the preset target value is less than the difference between the target cost and the preset target value, and the total amount of each sub-cost in the element set is not equal to the preset target value, then the total amount of each sub-cost in the element set is taken as the new target cost, and the element set is taken as the new target set. Then, the steps of initializing the empty element set and constructing the element selection set are returned.
[0157] In response to the instruction to stop cost calculation, determine the current target cost as the settlement cost, and determine the sub-costs of the current target set as settlement cost details.
[0158] Optionally, the refined and extended functions of the program can be found in the description above.
[0159] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0160] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.
[0161] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for settling fees, characterized in that, include: Obtain each sub-cost that makes up the total cost, and construct a cost set based on each sub-cost; The target cost is initialized to 0, and the target set is empty. The target cost is used to record the total cost of the combination that is closest to the preset target value during the cost calculation process. The target set is used to record each sub-cost that makes up the total cost of the combination. Initialize an empty set of elements and construct an element selection set, which is the same as the cost set; The budget cost is calculated by randomly selecting a sub-cost from the element selection set and adding it to the total amount of all sub-costs in the element set. Determine whether the budgeted cost is not greater than the preset target value; If so, the sub-cost selected in the element selection set is moved to the element set to obtain a new element set and a new element selection set, and the process returns to the step of calculating the budget cost. If not, if the difference between the total amount of each sub-cost in the element set and the preset target value is less than the difference between the target cost and the preset target value, and the total amount of each sub-cost in the element set is not equal to the preset target value, then the total amount of each sub-cost in the element set is taken as the new target cost, and the element set is taken as the new target set. Then, the steps of initializing the empty element set and constructing the element selection set are returned. In response to the instruction to stop cost calculation, determine the current target cost as the settlement cost, and determine the sub-costs of the current target set as settlement cost details.
2. The method according to claim 1, characterized in that, Also includes: If the budgeted cost is greater than the preset target value, and the difference between the total cost of each sub-cost in the element set and the preset target value is not less than the difference between the target cost and the preset target value, then return to the step of initializing the empty element set and constructing the element selection set.
3. The method according to claim 1, characterized in that, Also includes: If the budgeted cost is greater than the preset target value, when the total amount of each sub-cost in the element set is equal to the preset target value, the total amount of each sub-cost in the element set is determined as the settlement cost, and each sub-cost in the element set is determined as the settlement cost details.
4. The method according to claim 1, characterized in that, After the instruction to stop calculating the response cost determines the current target cost as the settlement cost and determines the sub-costs of the current target set as settlement cost details, it also includes: Calculate the difference between the settlement fee and the preset target value; In the cost set, determine each first target sub-cost other than the sub-costs in the target set; Among the various first target sub-costs, select a second target sub-cost whose amount is greater than the difference; The second target sub-cost is split based on the difference to obtain a split cost equal to the difference; The splitting cost is added to the target set to obtain the modified target set.
5. The method according to claim 1, characterized in that, After initializing the empty element set and constructing the element selection set, the method further includes: The system continuously displays cost calculation information, which includes the preset target value, the current target cost, the difference between the current target cost and the preset target value, the total number of steps that have been returned to execute the initialization of the empty element set and construct the element selection set, and cost calculation time information.
6. The method according to claim 1, 2, 4 or 5, characterized in that, After determining the sub-fees of the current target set as the settlement fee details, the following is also included: Displays each cost category and the cost amount for each cost category. Each sub-cost has a corresponding cost category. Each cost category includes several sub-costs from the current target set. The cost amount for each cost category is the total amount of all sub-costs included in that cost category.
7. A device for fee settlement, characterized in that, include: The cost set construction unit is used to obtain each sub-cost that makes up the total cost and construct the cost set based on each sub-cost. The target information initialization unit is used to initialize the target cost with a value of 0 and an empty target set. The target cost is used to record the total cost of the combination that is closest to the preset target value during the cost calculation process. The target set is used to record each sub-cost that makes up the total cost of the combination. The calculation element initialization unit is used to initialize an empty element set and construct an element selection set, wherein the element selection set is the same as the cost set; A budget cost calculation unit is used to calculate budget costs, wherein the budget cost is obtained by randomly selecting a sub-cost from the element selection set and adding it to the total amount of all sub-costs in the element set; The budget overrun determination unit is used to determine whether the budgeted expenses are not greater than the preset target value. If yes, the sub-expense transfer unit is executed; if no, the target information update unit is executed. The sub-cost transfer unit is used to move the sub-cost selected in the element selection set to the element set, obtain a new element set and a new element selection set, and return to execute the budget cost calculation unit. The target information update unit is configured to, if the difference between the total amount of each sub-cost in the element set and the preset target value is less than the difference between the target cost and the preset target value, and the total amount of each sub-cost in the element set is not equal to the preset target value, set the total amount of each sub-cost in the element set as the new target cost, set the element set as the new target set, and return to execute the calculation element initialization unit; The settlement cost determination unit is used to respond to the instruction to stop cost calculation, determine the current target cost as the settlement cost, and determine the sub-costs of the current target set as settlement cost details.
8. The apparatus according to claim 7, characterized in that, Also includes: The element set discard unit is used to return to the execution of the calculation element initialization unit if the budgeted cost is greater than the preset target value and the difference between the total amount of each sub-cost in the element set and the preset target value is not less than the difference between the target cost and the preset target value.
9. A device for billing, characterized in that, Including memory and processor; The memory is used to store programs; The processor is configured to execute the program to implement the various steps of the method for fee settlement as claimed in any one of claims 1-6.
10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method for fee settlement as claimed in any one of claims 1-6.
Citation Information
Patent Citations
Enterprise resource allocation method and device thereof
CN108805324A
Data processing method and device, equipment and medium
CN111428276A