Methods, apparatus, computer equipment, and storage media for generating transaction voucher return plans.

By generating transaction voucher return plans in financial installment and performance disposal business scenarios through a multi-dimensional weighted scoring algorithm, the problem of poor architectural scalability in existing technologies is solved, and the flexibility and stability are improved, making it suitable for diverse transaction voucher installment disposal business scenarios.

CN123118237APending Publication Date: 2026-11-17GUOHUI DASOUCHE (HANGZHOU) AUTOMOBILE SERVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611133471.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-28
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In financial installment and debt settlement business scenarios, existing technologies have poor architectural scalability when generating transaction voucher return plans. Adding new rules requires modifying the core code, making it difficult to achieve dynamic strategy adaptation according to actual needs, resulting in insufficient flexibility and stability.

Method used

A multidimensional weighted scoring algorithm is adopted to determine the target voucher amount calculation strategy from the candidate voucher amount calculation strategies based on the scheme configuration parameters and transaction voucher disposal parameters. The transaction voucher return plan is generated by combining the date rule type. The optimal strategy is intelligently screened and matched by the multidimensional weighted scoring algorithm in combination with the configuration and disposal parameters.

Benefits of technology

It enables flexible adaptation of differentiated amount calculation rules and date generation rules under different business configurations and processing scenarios, eliminating the need for manual strategy configuration and periodic accounting arrangement, improving the efficiency, adaptability and calculation accuracy of voucher return plan generation, and reducing operation and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123118237A_ABST
    Figure CN123118237A_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, computer device, and storage medium for generating a transaction voucher return plan. The method includes: obtaining a plan generation request; the plan generation request includes order information corresponding to the transaction voucher, scheme configuration parameters, and transaction voucher disposal parameters; determining a target voucher amount calculation strategy from candidate voucher amount calculation strategies using a multi-dimensional weighted scoring algorithm based on the scheme configuration parameters and transaction voucher disposal parameters; determining a target date calculation strategy from preset candidate date calculation strategies based on the date rule type in the scheme configuration parameters; and generating a target voucher return plan based on the target voucher amount calculation strategy, the target date calculation strategy, the order information, the scheme configuration parameters, and the transaction voucher disposal parameters. This solution improves the efficiency, adaptability, and calculation accuracy of voucher return plan generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, computer device, and storage medium for generating a transaction voucher return plan. Background Technology

[0002] In financial installment and debt settlement scenarios, it is necessary to automatically generate installment transaction voucher repayment plans based on order information, scheme configuration parameters, and transaction voucher disposal parameters, completing the calculation of the basic amount and incremental value for each period, and the calculation of the start and end dates of disposal. Existing technologies mostly adopt a hard-coded, fixed implementation method, deeply coupling the amount calculation rules, date generation rules, and business logic. They develop fixed logic separately for different ratio types, disposal modes, date calculation rules, and differentiated business constraints, and can only execute amount allocation and date arrangement according to preset rules. As business scenarios become more complex, various disposal modes, various date calculation rules, final share, basic amount for each period, and basic amount ratios emerge, resulting in differentiated constraints. Traditional fixed architectures have poor scalability; adding new rules requires modifying the core code and redeploying, making it difficult to achieve dynamic strategy adaptation according to actual needs. The generated transaction voucher repayment plans lack flexibility and stability. Summary of the Invention

[0003] Therefore, it is necessary to provide a method, apparatus, computer equipment, and storage medium for generating transaction voucher return plans that can improve the flexibility and stability of the transaction voucher return plan, in order to address the aforementioned technical problems.

[0004] Firstly, this application provides a method for generating a transaction certificate return plan, the method comprising:

[0005] Obtain a plan generation request; the plan generation request includes order information corresponding to the transaction voucher, scheme configuration parameters, and transaction voucher processing parameters.

[0006] Using a multi-dimensional weighted scoring algorithm, the target voucher amount calculation strategy is determined from the candidate voucher amount calculation strategies based on the scheme configuration parameters and transaction voucher processing parameters.

[0007] Based on the date rule type in the scheme configuration parameters, determine the target date calculation strategy from the preset candidate date calculation strategies;

[0008] A target voucher return plan is generated based on the target voucher amount calculation strategy, the target date calculation strategy, the order information, the scheme configuration parameters, and the transaction voucher disposal parameters.

[0009] In one embodiment, a multi-dimensional weighted scoring algorithm is used to determine the target voucher amount calculation strategy from candidate voucher amount calculation strategies based on scheme configuration parameters and transaction voucher processing parameters, including:

[0010] The scheme configuration code is determined based on the scheme configuration parameters, and the scheme configuration code is matched with the candidate voucher amount calculation strategy;

[0011] If a match is successful, the candidate voucher amount calculation strategy that matches the scheme configuration code is determined as the target voucher amount calculation strategy;

[0012] If a match fails, a multi-dimensional weighted scoring algorithm is used to determine the target voucher amount calculation strategy from the candidate voucher amount calculation strategies based on the business constraints and transaction voucher processing parameters corresponding to each candidate voucher amount calculation strategy.

[0013] In one embodiment, a multi-dimensional weighted scoring algorithm is used to determine the target voucher amount calculation strategy from the candidate voucher amount calculation strategies based on the business constraints and transaction voucher processing parameters corresponding to each candidate voucher amount calculation strategy, including:

[0014] The business constraints corresponding to the calculation strategy of each candidate voucher amount are read through the matcher in the multidimensional weighted scoring algorithm.

[0015] Based on the aforementioned business constraints, the target feature vector for strategy matching is extracted from the segmented information in the transaction certificate processing parameters by the feature extractor in the multidimensional weighted scoring algorithm.

[0016] The target feature vectors are weighted and summed to determine the comprehensive strategy score corresponding to each candidate voucher amount calculation strategy;

[0017] Based on the comprehensive strategy score, the target voucher amount calculation strategy is determined from the candidate voucher amount calculation strategies.

[0018] In one embodiment, determining the target voucher amount calculation strategy from the candidate voucher amount calculation strategies based on the comprehensive strategy score includes:

[0019] Based on the comprehensive strategy score, a comprehensive score sequence from high to low is determined. If the first comprehensive score in the comprehensive score sequence is greater than or equal to the first score threshold, and the difference between the first comprehensive score and the second comprehensive score is greater than or equal to the difference threshold, then the candidate voucher amount calculation strategy corresponding to the first comprehensive score is determined as the target voucher amount calculation strategy.

[0020] If the first comprehensive score in the comprehensive scoring sequence is less than the first scoring threshold, then a preset general voucher amount calculation strategy is obtained, and the general voucher amount calculation strategy is used as the target voucher amount calculation strategy.

[0021] In one embodiment, the above-mentioned method for generating a transaction certificate return plan further includes:

[0022] If the first comprehensive score in the comprehensive score sequence is greater than or equal to the first score threshold, the difference between the first comprehensive score and the second comprehensive score is less than the difference threshold, and the first comprehensive score and the second comprehensive score are not equal, then the candidate voucher amount calculation strategy corresponding to the first comprehensive score and the candidate voucher amount calculation strategy corresponding to the second comprehensive score are sent to the client.

[0023] Obtain the selection information input by the client, and use the selection information to determine the target voucher amount calculation strategy.

[0024] In one embodiment, the above-mentioned method for generating a transaction certificate return plan further includes:

[0025] Construct a strategy constraint matrix for calculating the amount of candidate vouchers; the strategy constraint matrix includes the candidate voucher amount calculation strategy, the constraint information corresponding to the candidate voucher amount calculation strategy, and the priority of the constraint information;

[0026] If the first comprehensive score in the comprehensive score sequence is greater than or equal to the first score threshold, and the first comprehensive score is the same as the second comprehensive score, then the target voucher amount calculation strategy is determined from the candidate voucher amount calculation strategies corresponding to the first comprehensive score and the candidate voucher amount calculation strategies corresponding to the second comprehensive score, based on the strategy constraint matrix, the business constraints of the candidate voucher amount calculation strategy corresponding to the first comprehensive score, and the business constraints of the candidate voucher amount calculation strategy corresponding to the second comprehensive score.

[0027] In one embodiment, a target voucher return plan is generated based on the target voucher amount calculation strategy, the target date calculation strategy, the order information, the scheme configuration parameters, and the transaction voucher disposal parameters, including:

[0028] Based on the target voucher amount calculation strategy, the basic amount and incremental amount to be repaid in each period are determined according to the order information, the scheme configuration parameters and the transaction voucher disposal parameters when repaying transaction vouchers in installments.

[0029] Using the target date calculation strategy, and based on the date rule type in the scheme configuration parameters, the start and end dates of each period of transaction voucher repayment are calculated when repaying transaction vouchers in installments;

[0030] By associating and binding the base amount, the incremental amount, the start date, and the end date, the corresponding transaction voucher repayment record for each period is determined when the transaction voucher is repaid in installments.

[0031] The transaction voucher return records for each period are integrated to determine the target voucher return plan.

[0032] Secondly, this application also provides a transaction certificate return plan generation device, the device comprising:

[0033] The plan generation request acquisition module is used to acquire plan generation requests; the plan generation request includes order information corresponding to the transaction voucher, scheme configuration parameters, and transaction voucher processing parameters;

[0034] The first calculation strategy determination module is used to determine the target voucher amount calculation strategy from the candidate voucher amount calculation strategies by using a multi-dimensional weighted scoring algorithm, based on the scheme configuration parameters and transaction voucher disposal parameters.

[0035] The second calculation strategy determination module is used to determine the target date calculation strategy from the preset candidate date calculation strategies based on the date rule type in the scheme configuration parameters.

[0036] The voucher return plan generation module is used to generate a target voucher return plan based on the target voucher amount calculation strategy, the target date calculation strategy, the order information, the scheme configuration parameters, and the transaction voucher disposal parameters.

[0037] Thirdly, this application also provides a computer device, the computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0038] Obtain a plan generation request; the plan generation request includes order information corresponding to the transaction voucher, scheme configuration parameters, and transaction voucher processing parameters.

[0039] Using a multi-dimensional weighted scoring algorithm, the target voucher amount calculation strategy is determined from the candidate voucher amount calculation strategies based on the scheme configuration parameters and transaction voucher processing parameters.

[0040] Based on the date rule type in the scheme configuration parameters, determine the target date calculation strategy from the preset candidate date calculation strategies;

[0041] A target voucher return plan is generated based on the target voucher amount calculation strategy, the target date calculation strategy, the order information, the scheme configuration parameters, and the transaction voucher disposal parameters.

[0042] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0043] Obtain a plan generation request; the plan generation request includes order information corresponding to the transaction voucher, scheme configuration parameters, and transaction voucher processing parameters.

[0044] Using a multi-dimensional weighted scoring algorithm, the target voucher amount calculation strategy is determined from the candidate voucher amount calculation strategies based on the scheme configuration parameters and transaction voucher processing parameters.

[0045] Based on the date rule type in the scheme configuration parameters, determine the target date calculation strategy from the preset candidate date calculation strategies;

[0046] A target voucher return plan is generated based on the target voucher amount calculation strategy, the target date calculation strategy, the order information, the scheme configuration parameters, and the transaction voucher disposal parameters.

[0047] The aforementioned method, apparatus, computer equipment, and storage medium for generating transaction voucher return plans obtain a plan generation request. The plan generation request includes order information corresponding to the transaction voucher, scheme configuration parameters, and transaction voucher disposal parameters. Using a multi-dimensional weighted scoring algorithm, a target voucher amount calculation strategy is determined from candidate voucher amount calculation strategies based on the scheme configuration parameters and transaction voucher disposal parameters. A target date calculation strategy is determined from preset candidate date calculation strategies based on the date rule type in the scheme configuration parameters. A target voucher return plan is generated based on the target voucher amount calculation strategy, the target date calculation strategy, the order information, the scheme configuration parameters, and the transaction voucher disposal parameters. This solves the problems of poor architectural scalability, the need to modify core code and redeploy for new rules, difficulty in dynamically adapting strategies to actual needs, and insufficient flexibility and stability of the generated transaction voucher return plan when generating transaction voucher return plans in existing technologies. The above solution receives a plan generation request containing order information, plan configuration parameters, and transaction voucher processing parameters. It intelligently selects and matches the optimal target voucher amount calculation strategy using a multi-dimensional weighted scoring algorithm combined with configuration and processing parameters. Simultaneously, it adapts and selects the corresponding target date calculation strategy based on preset date rule types. Then, it comprehensively calls the selected voucher amount calculation strategy, date calculation strategy, order information, configuration parameters, and processing parameters to automatically generate a standardized target voucher return plan. This solution can flexibly adapt to differentiated amount calculation rules and date generation rules according to different business configurations and processing scenarios, eliminating the need for manual strategy configuration and periodic calculation and arrangement. This reduces manual maintenance costs and improves the efficiency, adaptability, and calculation accuracy of voucher return plan generation, making it compatible with diverse transaction voucher phased processing business scenarios. Attached Figure Description

[0048] Figure 1 This is an application environment diagram of a transaction voucher return plan generation method in one embodiment;

[0049] Figure 2 This is a flowchart illustrating a method for generating a transaction voucher return plan in one embodiment;

[0050] Figure 3 This is a structural block diagram of a transaction voucher return plan generation device in one embodiment;

[0051] Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0053] The transaction certificate return plan generation method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. Server 104 receives a plan generation request; the plan generation request includes order information corresponding to the transaction voucher, scheme configuration parameters, and transaction voucher disposal parameters; using a multi-dimensional weighted scoring algorithm, based on the scheme configuration parameters and transaction voucher disposal parameters, it determines the target voucher amount calculation strategy from candidate voucher amount calculation strategies; based on the date rule type in the scheme configuration parameters, it determines the target date calculation strategy from preset candidate date calculation strategies; based on the target voucher amount calculation strategy, the target date calculation strategy, the order information, the scheme configuration parameters, and the transaction voucher disposal parameters, it generates a target voucher return plan and sends the target voucher return plan to terminal 102 via the communication network. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0054] In one embodiment, such as Figure 2 As shown, a method for generating a transaction voucher return plan is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0055] S210, Obtain the plan generation request.

[0056] The plan to generate a request includes the order information corresponding to the transaction voucher, the scheme configuration parameters, and the transaction voucher processing parameters.

[0057] The plan generation request is a request issued by the user based on the client to generate a transaction voucher return plan. Order information, or the Order entity, includes a unique order identifier (OrderId), the associated transaction voucher code (ProductCode), the order creation time, the transaction voucher payer record information (PayerOrderBillInfo), and the transaction voucher receiver record information (ReceiverOrderBillInfo). Order information serves as the business context source for the transaction voucher return plan, containing information such as the interest accrual start date (DatedDate / ValueDate), segment information (SegmentInfos), and the value of the underlying asset, thus identifying the specific business entity served by the transaction voucher return plan and its resource flow. The scheme configuration parameters include: associated transaction voucher code, scheme configuration code, transaction voucher return node (RepayModelEnum, BOF beginning period / EOF ending period), annualized rate (AnnualRate), rate type (RateTypeEnum, annualized rate / monthly rate / daily rate), disposal cycle type, initial share ratio, final share configuration (TailPaymentRatio / TailPayment), amount generation strategy configuration enumeration (AmountGenerateConfigEnum), date generation strategy configuration enumeration (DateGenerateConfigEnum), other basic amount impact strategy configuration (OtherAmountEffectGenerateConfigEnum), and record form generation type configuration (BillGenerateTypeConfigEnum). These scheme configuration parameters are preset in the system and uniformly carried by the phased disposal plan generation configuration data transmission object (GenerateConfigDTO), which is bound to each transaction voucher return plan. GenerateConfigDTO is a data transfer object used to encapsulate configuration parameters for the bearer scheme. It is used to receive and encapsulate various configuration information in the plan generation request, including parameters such as date rule type, amount strategy configuration, business constraint configuration, ratio type, and disposal rule configuration.The transaction certificate processing parameters are GenerateBasicAmountEntryParam and Segment parameters. These parameters include: interest accrual start date (DatedDate), total basic amount of the segment (TotalPrincipal), remaining basic amount of the segment (RestPrincipal), current period number (TermNo), start term and end term of the segment (StartTerm), total number of periods of the segment (TotalTerm), total processing amount per period (PeriodAmount), segment ratio (SegmentRate), ratio type (SegmentRateType), last period share of the segment (SegmentTailPayment), processing method (RepayModel), basic amount ratio (PrincipalRatio), and other basic amounts per period (PeriodOtherFee). The transaction voucher processing parameters are dynamically constructed by the segment generator based on the segment information (Segment). Each call to the generation strategy generates a corresponding basic amount record (BasicAmountEntry) for one period within a segment. GenerateSegmentBasicAmountEntryStrategy is a dedicated calculation strategy that generates basic amount entries for each period based on business segmentation. The basic amount is the value of the transaction voucher itself that needs to be returned.

[0058] S220. Using a multi-dimensional weighted scoring algorithm, the target voucher amount calculation strategy is determined from the candidate voucher amount calculation strategies based on the scheme configuration parameters and transaction voucher disposal parameters.

[0059] Among them, the multidimensional weighted scoring algorithm refers to a quantitative matching algorithm that sets multiple fixed matching dimensions, configures fixed weights for each dimension, compares and scores business features with each strategy constraint one by one, and then sums them according to the weights to calculate the comprehensive score of each candidate strategy, thereby automatically filtering, sorting and selecting the optimal target voucher amount calculation strategy.

[0060] It should be noted that the transaction voucher return method defines the time point type for each period's transaction voucher return when returning vouchers in installments. The time point types include BOF (Begin of Period) and EOF (End of Period). BOF indicates that the transaction voucher return occurs at the beginning of each period, while EOF indicates that the transaction voucher return occurs at the end of each period. The above transaction voucher return method enumeration corresponds to determining the assignment rules of the `type` parameter in the IPMT (Interest Payment) and PPMT (Principal Payment) amount calculation functions. BOF corresponds to a value of 1, and EOF corresponds to a value of 0, directly participating in the mathematical calculation process of each period's incremental value and basic amount value. Simultaneously, at the business solution level, based on different combinations of handling models, including balanced installment, decreasing installment, and incremental-then-basic business models, different voucher amount calculation strategy implementation logics are formed. In installment calculation, IPMT is used to calculate the interest or incremental fee payable in each installment period. PPMT is the basic amount calculation function for each period, used to calculate the base amount to be repaid in each period in installment scenarios. The type parameter is a key parameter in the amount calculation function that distinguishes between beginning and end-of-period processing, and its value is directly determined by the transaction voucher repayment method enumeration BOF or EOF.

[0061] Different candidate voucher amount calculation strategies correspond to different voucher amount calculation strategy interfaces. The system uses the strategy pattern to uniformly organize and manage the various implementation classes of the voucher amount calculation strategy interfaces. Seven candidate voucher amount calculation strategies are predefined, including:

[0062] (1) IPMT-based equal installment basic amount entry generation strategy (IPMTEqualLoanPaymentGenerateTermBasicAmountEntryStrategy). This candidate voucher amount calculation strategy is a strategy for generating basic amount entries for each period based on the equal installment rule using the IPMT interest calculation function. The incremental value for each period is calculated using the IPMT formula, and the basic amount for the current period is calculated in combination with the disposal value for each period. For example, when the scheme configuration code is 1_IPMT, the equal installment calculation is implemented based on the Finance.ipmt() numerical calculation function. First, the monthly ratio is obtained by dividing the segment ratio by 12 and using 50-bit precision. Then, the incremental value for the current period is calculated using the IPMT formula. The basic amount for the current period is obtained by subtracting the incremental value for the current period from the disposal value for each period.

[0063] (2) PPMT-based equal installment basic amount entry generation strategy (PPMTEqualLoanPaymentGenerateTermBasicAmountEntryStrategy). This candidate voucher amount calculation strategy is based on the PPMT basic amount calculation function to implement the equal decreasing installment rule basic amount entry generation strategy. The basic amount share for the current period is calculated through the PPMT formula, and then the incremental value for the current period is obtained by subtracting the basic amount from the disposal value for each period. For example, when the scheme configuration code is 1_PPMT, the decreasing installment calculation is implemented based on the Finance.ppmt() numerical calculation function. First, the basic share to be disposed of in the current period is calculated through the PPMT formula, and the incremental value for the current period is obtained by subtracting the basic amount for the current period from the disposal value for each period.

[0064] (3) Default Equal LoanPaymentGenerateTermBasicAmountEntryStrategy. This candidate voucher amount calculation strategy is the default equal installment amount generation strategy based on the remaining basic amount. It calculates the incremental value for each period according to the ratio of the remaining basic amount to the monthly ratio, and then subtracts the incremental value from the disposal value of each period to obtain the basic amount for the current period. It also adapts to the special calculation rules of the basic amount and incremental value of the first period under the initial disposal mode. For example, when the scheme configuration code is rest_prin, a general calculation is performed based on the remaining basic amount. The incremental value of the current period is obtained by multiplying the remaining basic amount by the monthly ratio with 50-digit precision. The basic amount of the current period is obtained by subtracting the incremental value of the current period from the disposal value of each period. If the first period is the initial disposal mode, the basic amount of the first period is directly taken as the disposal value of each period and the incremental value is 0.

[0065] (4) MinusFeeIPMTEqualLoanPaymentGenerateTermBasicAmountEntryStrategy for Equal Loan Payments with Fee Deduction. This candidate voucher amount calculation strategy first deducts other basic amounts from the disposal value for each period to obtain the net disposal value for each period. Then, it uses the IPMT calculation function to calculate the incremental value for each period of equal loan payments and the basic amount value. This strategy is suitable for installment payment business scenarios that include additional fees such as service fees. For example, when the scheme configuration code is 1_IPMT_minus_fee, other basic amounts for each period are deducted first to obtain the net disposal value for each period. Then, the IPMT function is called based on the net disposal value for each period to complete the calculation. This strategy is suitable for business products that include service fees.

[0066] (5) InterestCompoundedDailyGenerateTermBasicAmountEntryStrategy. This candidate voucher amount calculation strategy adopts the daily interest calculation logic, calculating the current period's incremental value based on the total basic amount, the segmented daily ratio, and the number of days in each period, adapting to daily interest-based installment processing business scenarios. For example, when the scheme configuration code is 1_day, the daily incremental calculation method is adopted, and the current period's incremental value is obtained by multiplying the total basic amount by the segmented daily ratio and then by the number of days in the current period, which is suitable for daily interest-based business products.

[0067] (6) PrincipalRatioGenerateTermBasicAmountEntryStrategy. This candidate voucher amount calculation strategy allocates the basic amount for each period according to a preset basic amount ratio. The basic amount for each period is determined by multiplying the total basic amount by the basic amount ratio. The corresponding incremental value is calculated based on the remaining basic amount, the daily ratio, and the number of days in each period, thus realizing the phased amount accounting based on the basic amount ratio. For example, when the scheme configuration code is XXX, the basic amount ratio allocation method is adopted. The basic amount for each period is obtained by multiplying the basic amount for each period by the preset basic amount ratio, and the incremental value is obtained by multiplying the remaining basic amount by the daily ratio and then by the number of days in the current period.

[0068] (7) SingleTermGenerateTermBasicAmountEntryStrategy. This candidate certificate amount calculation strategy is applicable to disposal scenarios with only one period. It directly uses the total basic amount as the basic amount for the current period, sets the incremental value to zero, and realizes a one-time basic amount redemption for a single period without incremental fees. For example, when the scheme configuration code is single_term, it is a strategy dedicated to single-period disposal, generating only one period of disposal data, with the basic amount being the total basic amount and the incremental value being 0. The above disposal value is the share of transaction certificate returned.

[0069] It should be noted that there is no strict mapping relationship between the scheme configuration code and the target voucher amount calculation strategy. The system uses the generic interface StrategyRouter. <t>A three-tiered architecture consisting of an enumeration factory and a Spring container enables dynamic matching, selection, and instantiation of voucher amount calculation strategies during program runtime. Each candidate voucher amount calculation strategy implements a StrategyRouter. <generatetermbasicamountentrystrategy>The interface returns the corresponding specific amount strategy implementation class via the `findStrategy` method defined in the interface. The strategy selection business service class `StrategyChooseServiceImpl` obtains an instance of the target strategy type from the Spring Inversion of Control (IoC) container through the `getBean` method of the Spring application context, completing runtime strategy parsing and loading. `GenerateConfigDTO` serves as the configuration data carrier, associating and binding the business scheme configuration code with configuration parameters such as the amount strategy enumeration and the date strategy enumeration, ensuring accurate mapping and matching between the business configuration and the underlying strategy implementation. `StrategyRouter` is one such component. <generatetermbasicamountentrystrategy>The interface is StrategyRouter <t>The interface is a generic interface for strategy routing specifically used for calculating voucher amounts. The enumeration factory uses a candidate voucher amount calculation strategy enumeration as its carrier. Each candidate voucher amount calculation strategy's scheme configuration code is pre-bound to its corresponding strategy. By implementing the `findStrategy()` method of the `StrategyRouter` interface, a mapping relationship is formed between the scheme configuration code and the candidate voucher amount calculation strategy. The Spring container is a system-provided Bean instance management container, responsible for the unified creation, management, and maintenance of all candidate voucher amount calculation strategy instances. `GenerateConfigDTO` is a data carrier used to carry, encapsulate, and transmit all configuration information related to installment calculation. It packages multiple configuration items, such as scheme configuration code, candidate voucher amount calculation strategy, candidate date calculation strategy, transaction voucher return method, and segmentation information, and transmits them between various modules of the system.

[0070] Using a multi-dimensional weighted scoring algorithm, based on the scheme configuration parameters and transaction certificate processing parameters, the target certificate amount calculation strategy is determined from the candidate certificate amount calculation strategies, including:

[0071] S2201. Determine the scheme configuration code based on the scheme configuration parameters, and match the scheme configuration code with the candidate voucher amount calculation strategy.

[0072] It should be noted that a two-level cascaded selection algorithm is used to determine the target voucher amount calculation strategy from the candidate voucher amount calculation strategies. The first level determines the candidate voucher amount calculation strategy that matches the scheme configuration code based on the configuration table. When the first-level configuration mapping table does not match, i.e., when the scheme configuration code and candidate voucher amount calculation strategy fail to match, the system automatically downgrades to a multi-dimensional weighted scoring algorithm based on runtime annotation constraint declarations and scheme feature vectors to calculate the comprehensive compatibility score of each candidate strategy and output the confidence decision. The two levels complement each other to ensure that the configured products remain deterministically bound and that new schemes achieve automatic matching with zero configuration. The system relies on GenerateConfigDTO to encapsulate and carry the scheme code and multiple strategy configuration dimension information. Using the scheme code as the query keyword, it retrieves the pre-established configuration mapping table and matches the preset candidate voucher amount calculation strategy AmountGenerateConfigEnum. When the query matches the corresponding candidate voucher amount calculation strategy, it uses StrategyRouter to... <t>The unified strategy routing specification of the interface, combined with the strategy class mapping relationship of the enumeration factory, and then the Spring IoC container obtains the Bean instance of the matching strategy through the context container to complete the deterministic strategy loading and calling. This precise matching method can achieve an efficient strategy lookup effect with O(1) time complexity. At the same time, GenerateConfigDTO can also realize the unified collection and management of multi-dimensional strategy configuration, and configure and bind the candidate voucher amount calculation strategy AmountGenerateConfigEnum, the candidate date calculation strategy DateGenerateConfigEnum, the basic amount influence strategy OtherAmountEffectGenerateConfigEnum, and the record form generation type strategy BillGenerateTypeConfigEnum. The system supports orthogonal free combination configuration between N amount strategies, M date strategies, and K basic amount strategies, without having to define configuration codes separately for each combination scenario of each type of strategy, reducing configuration redundancy and improving the flexibility of strategy combination extension. N, M, and K are all positive integers. The configuration mapping table records the mapping relationship between the scheme configuration code and the candidate voucher amount calculation strategy.

[0073] Specifically, a unique scheme configuration code corresponding to the current business scheme is determined. Based on a pre-set configuration mapping table, the scheme configuration code and the candidate credential amount calculation strategy are matched.

[0074] S2202. If a match is successful, the candidate voucher amount calculation strategy that matches the scheme configuration code is determined as the target voucher amount calculation strategy.

[0075] Specifically, if there is a candidate credential amount calculation strategy code that is completely consistent with the scheme configuration code, then the successfully matched candidate credential amount calculation strategy is determined as the target credential amount calculation strategy, and the strategy instance of the target credential amount calculation strategy is loaded based on the strategy routing mechanism.

[0076] S2203. If the matching fails, the target voucher amount calculation strategy shall be determined from the candidate voucher amount calculation strategies by using a multi-dimensional weighted scoring algorithm, based on the business constraints and transaction voucher processing parameters corresponding to each candidate voucher amount calculation strategy.

[0077] Among them, business constraints refer to the applicable business constraints declared by runtime annotations, i.e., @StrategyConstraint constraint rules. Business constraints can include installment interest calculation mode constraints, fee attribute constraints, period attribute constraints, disposal time constraints, and basic amount allocation rule constraints.

[0078] The installment interest calculation mode constraint statement declares whether the candidate voucher amount calculation strategy is compatible with different interest calculation rules such as equal-amount interest calculation, equal-decreasing interest calculation, interest calculation based on the remaining basic amount, and daily interest calculation, and defines the applicable scenarios of the core numerical calculation logic corresponding to the strategy; the fee attribute constraint statement declares whether the candidate voucher amount calculation strategy is compatible with business scenarios including service fees and basic amount deduction, and distinguishes the applicable scope of pure basic amount interest calculation and net amount calculation after deduction; the period attribute constraint statement declares whether the candidate voucher amount calculation strategy is compatible with period types such as multi-period installment and single-period one-time disposal, and limits the applicable conditions of period calculation of the strategy; the disposal time constraint statement declares whether the candidate voucher amount calculation strategy is compatible with BOF and EOF disposal modes, and adapts to the basic amount and incremental numerical calculation rules of different disposal times; the basic amount allocation rule constraint statement declares that the candidate voucher amount calculation strategy supports basic amount allocation methods such as fixed formula calculation, basic amount proportional allocation, and rolling calculation of the remaining basic amount, and matches the basic amount disposal logic of different businesses.

[0079] For example, if there is no candidate voucher amount calculation strategy code that matches the scheme configuration code, the multi-dimensional weighted scoring algorithm is started; the system performs adaptive scoring and ranking of each candidate voucher amount calculation strategy according to the preset business constraints of each candidate voucher amount calculation strategy and the transaction voucher processing parameters, and selects the candidate voucher amount calculation strategy with the highest comprehensive score as the target voucher amount calculation strategy.

[0080] The above solution uses a two-level cascaded selection algorithm to determine the target voucher amount calculation strategy from candidate voucher amount calculation strategies. First, it determines the scheme configuration code based on the scheme configuration parameters and matches it with the candidate voucher amount calculation strategies. When a match is successful, the target voucher amount calculation strategy can be quickly locked, ensuring the efficiency of strategy selection. When a match fails, a multi-dimensional weighted scoring algorithm is used to intelligently filter the suitable target voucher amount calculation strategy based on the business constraints of each candidate strategy and the transaction voucher processing parameters. This not only achieves fast and accurate strategy matching in conventional business scenarios, but also adapts to new and complex business scenarios without preset binding relationships. It eliminates the need for manual additional configuration of codes and strategy binding relationships, improving the flexibility, versatility, and scenario adaptability of voucher amount calculation strategy selection, while reducing system configuration and maintenance costs and enhancing business expansion adaptability.

[0081] For example, using a multi-dimensional weighted scoring algorithm, the target voucher amount calculation strategy is determined from the candidate voucher amount calculation strategies based on the business constraints and transaction voucher processing parameters corresponding to each candidate voucher amount calculation strategy, including:

[0082] The matching algorithm in the multidimensional weighted scoring algorithm reads the business constraints corresponding to the calculation strategies of each candidate voucher amount. Based on the business constraints, the feature extractor in the multidimensional weighted scoring algorithm extracts the target feature vector for strategy matching from the segmented information in the transaction voucher processing parameters. The target feature vector is weighted and summed to determine the comprehensive strategy score corresponding to each candidate voucher amount calculation strategy. Based on the comprehensive strategy score, the target voucher amount calculation strategy is determined from the candidate voucher amount calculation strategies.

[0083] Specifically, the matching unit in the multi-dimensional weighted scoring algorithm reads the business constraints corresponding to the calculation strategies of each candidate voucher amount. Based on these business constraints, the feature extractor in the multi-dimensional weighted scoring algorithm extracts candidate feature vectors for strategy matching from the segmented information in the transaction voucher disposal parameters. The candidate feature vectors include: ratio type matching, whether it is a single-period product, basic amount matching, basic amount ratio matching, end-period share compatibility, transaction voucher return time compatibility, and total number of periods. Six feature vectors—interest rate type matching, whether it is a single-period product, basic amount matching, basic amount ratio matching, end-period share compatibility, and transaction voucher return time compatibility—are selected from the candidate feature vectors as target feature vectors. The @StrategyConstraint constraint rules of each target feature vector are read, and the target feature vectors are weighted and summed based on these @StrategyConstraint constraint rules to determine the comprehensive strategy score corresponding to each candidate voucher amount calculation strategy. The @StrategyConstraint constraint rules include: (1) The constraint rule for ratio type matching is: the weight of ratio type matching is 0.3 and it is a hard constraint. If the actual ratio type of the product is not within the scope of strategy compatibility, the score of this item is 0 and the strategy is directly excluded; if it is a perfect match, it gets 1.0. (2) The constraint rule for whether it is a single-period product is: the weight of whether it is a single-period product is 0.25 and it is a hard constraint. If the strategy is single-period exclusive but the product is multi-period, the score of this item is 0 and it is directly excluded; if the strategy is not single-period exclusive but the product is single-period, it gets 0.50; otherwise, it gets 1.0. (3) The constraint rule for basic amount matching is: the weight of basic amount matching is 0.20 and it is a hard constraint. If the strategy requires a basic amount but the product is not configured, the score of this item is 0 and it is directly excluded; if the product has a basic amount and the strategy does not require it, it gets 1.0. (4) The weight of basic amount matching is 0.10 and is a hard constraint. If the strategy requires a basic amount ratio but the product does not have it, this item gets 0 and is directly excluded; if the product has a basic amount ratio and the strategy does not require it, it gets 0.50; otherwise, it gets 1.0. (5) The weight of end-of-term share compatibility is 0.10 and is a soft constraint. If the strategy requires an end-of-term share but the product does not have it, or if the product has an end-of-term share but the strategy does not support it, it gets 0; otherwise, it gets 1.0. (6) The weight of transaction certificate return time compatibility is 0.05 and is a soft constraint. It is matched according to the product's BOF / EOF disposal mode and the support capability of the candidate certificate amount calculation strategy. A complete match gets 1.0, and a partial match gets 0.50.

[0084] Furthermore, based on the formula: Weighted Total Score = Σ(Dimensional Score × Dimensional Weight), the target feature vector is weighted and summed, with the result rounded to four decimal places, to determine the comprehensive strategy score corresponding to each candidate voucher amount calculation strategy. Based on the comprehensive strategy score, the target voucher amount calculation strategy is determined from the candidate voucher amount calculation strategies.

[0085] The above solution can combine the inherent adaptation rules of the strategy with the characteristics of real-time transaction processing to achieve intelligent and refined strategy adaptation, improve the accuracy of voucher amount calculation strategy selection and scenario adaptability, flexibly adapt to various differentiated business processing scenarios, ensure the rationality and universality of the amount calculation logic adaptation, reduce system configuration and maintenance costs, and improve the flexibility and intelligence level of business expansion.

[0086] For example, based on the comprehensive strategy score, the target voucher amount calculation strategy is determined from the candidate voucher amount calculation strategies, including:

[0087] Based on the comprehensive strategy score, a comprehensive score sequence from high to low is determined. If the first comprehensive score in the comprehensive score sequence is greater than or equal to the first score threshold, and the difference between the first comprehensive score and the second comprehensive score is greater than or equal to the difference threshold, then the candidate voucher amount calculation strategy corresponding to the first comprehensive score is determined as the target voucher amount calculation strategy. If the first comprehensive score in the comprehensive score sequence is less than the first score threshold, then a preset general voucher amount calculation strategy is obtained and used as the target voucher amount calculation strategy.

[0088] The first scoring threshold can be set according to actual needs, for example, it can be 0.6. The difference threshold can also be set according to actual needs, for example, it can be 0.01. The general voucher amount calculation strategy DEFAULT=rest_prin does not rely on customized constraints such as special interest calculation rules, fee matching rules, and basic amount allocation rules. It uses the remaining outstanding basic amount in each period as the interest calculation base and uses the standard equal principal and interest repayment logic to complete the general accounting of installment interest, basic amount, and transaction voucher repayment amount in each period.

[0089] For example, if the first comprehensive score in the comprehensive score sequence is greater than or equal to 0.85, and the first comprehensive score is not equal to the second comprehensive score, the candidate voucher amount calculation strategy corresponding to the first comprehensive score can be directly used as the target voucher amount calculation strategy. The first score threshold is less than 0.85.

[0090] Specifically, a comprehensive score sequence from high to low is determined based on the comprehensive strategy score. If the first comprehensive score in the comprehensive score sequence is greater than or equal to 0.6, and the difference between the first comprehensive score and the second comprehensive score is greater than or equal to 0.01, then the candidate voucher amount calculation strategy corresponding to the first comprehensive score is determined as the target voucher amount calculation strategy. If the first comprehensive score in the comprehensive score sequence is less than the first score threshold, then a preset general voucher amount calculation strategy is obtained, and the general voucher amount calculation strategy is used as the target voucher amount calculation strategy.

[0091] The above solution can avoid business interruption caused by policy matching failure and lack of adapted policies, and ensure the normal execution of the transaction certificate return plan generation business in unconfigured scenarios.

[0092] For example, based on the above embodiments, if the first comprehensive score in the comprehensive scoring sequence is greater than or equal to the first scoring threshold, the difference between the first comprehensive score and the second comprehensive score is less than the difference threshold, and the first comprehensive score and the second comprehensive score are not equal, then the candidate voucher amount calculation strategy corresponding to the first comprehensive score and the candidate voucher amount calculation strategy corresponding to the second comprehensive score are sent to the client; the selection information input by the client is obtained, and the selection information is used to determine the target voucher amount calculation strategy.

[0093] Specifically, when the first comprehensive score reaches or exceeds a preset first score threshold, the difference between the first and second comprehensive scores is less than a set difference threshold, and the two scores are not exactly equal, the top two candidate strategies are determined to have similar suitability and no obvious optimal differentiation. At this point, the system no longer automatically selects the highest-scoring strategy by default. Instead, it pushes the candidate voucher amount calculation strategy corresponding to the first comprehensive score and the candidate voucher amount calculation strategy corresponding to the second comprehensive score to the client for manual intervention. Subsequently, the system receives and obtains the manually selected information from the client, and based on this selection information, finally determines the selected candidate strategy as the target voucher amount calculation strategy.

[0094] The above solution effectively avoids the adaptation bias that may arise from the algorithm automatically selecting the best option due to small differences, improves the accuracy and business controllability of the target voucher amount calculation strategy, and realizes the organic combination of intelligent algorithm automatic scoring and manual operation and maintenance decision-making.

[0095] For example, based on the above embodiments, a strategy constraint matrix for calculating the amount of candidate vouchers is constructed. The strategy constraint matrix includes the candidate voucher amount calculation strategy, the constraint information corresponding to the candidate voucher amount calculation strategy, and the priority of the constraint information. If the first comprehensive score in the comprehensive scoring sequence is greater than or equal to the first scoring threshold, and the first comprehensive score is the same as the second comprehensive score, then according to the strategy constraint matrix, the business constraint conditions of the candidate voucher amount calculation strategy corresponding to the first comprehensive score, and the business constraint conditions of the candidate voucher amount calculation strategy corresponding to the second comprehensive score, the target voucher amount calculation strategy is determined from the candidate voucher amount calculation strategy corresponding to the first comprehensive score and the candidate voucher amount calculation strategy corresponding to the second comprehensive score.

[0096] Specifically, a strategy constraint matrix corresponding to each candidate voucher amount calculation strategy is pre-constructed. This matrix, in a structured form, includes all candidate voucher amount calculation strategies, the corresponding business constraint information for each strategy, and the pre-defined priority order of each business constraint. After multi-dimensional weighted scoring, each candidate voucher amount calculation strategy is sorted by score to form a comprehensive score sequence. When the first comprehensive score in the sequence is not lower than a pre-defined first score threshold, and the first comprehensive score is equal to the second comprehensive score, making it impossible to distinguish the optimal strategy by weighted score, the pre-defined strategy constraint matrix is ​​retrieved. Based on the constraint information and priority rules recorded in the matrix, the differences in business constraint adaptation and priority between the candidate voucher amount calculation strategies corresponding to the first and second comprehensive scores are compared. This allows the determination of the target voucher amount calculation strategy from the two candidate strategies with the same score.

[0097] The above solution, by constructing a strategy constraint matrix that integrates candidate voucher amount calculation strategies, corresponding constraint information, and constraint priorities, can automatically select the target voucher amount calculation strategy based on standardized constraints and priority rules in scenarios where the two top-ranked candidate strategies have the same comprehensive score and cannot be selected by weighted scoring. This improves the automation and accuracy of voucher amount calculation strategy matching.

[0098] S230. Based on the date rule type in the scheme configuration parameters, determine the target date calculation strategy from the preset candidate date calculation strategies.

[0099] Specifically, based on the date rule type in the scheme configuration parameters, and the correspondence between the preset date rule type and the candidate date calculation strategy, the target date calculation strategy is determined from the preset candidate date calculation strategies.

[0100] The correspondence between the preset date rule types and candidate date calculation strategies includes:

[0101] (1) When the date rule type is end_last, the corresponding candidate date calculation strategy is LAST_DAY_OF_MONTH (LastDayOfMonthGenerateTermBoundedPeriodStrategy, the month-end rule period start and end date generation strategy), that is, the month-to-day rule is adopted. If the interest calculation start date is the last day of the month, the end date of each period is the last day of the corresponding month; otherwise, it is calculated according to the month-to-day rule.

[0102] (2) When the date rule type is end_min, the corresponding candidate date calculation strategy is LATEST_28_TH (Latest28thGenerateTermBoundedPeriodStrategy, a period start and end date generation strategy that is no later than the 28th of the month), that is, the rule of no later than the 28th is adopted, and the return date of each transaction voucher is no later than the 28th of the month. If the calculated date exceeds the 28th, it will be adjusted forward to the 28th.

[0103] (3) When the date rule type is end_next, the corresponding candidate date calculation strategy is SAME_END_DAY (SameEndDayGenerateTermBoundedPeriodStrategy, fixed date period generation strategy), that is, it adopts strict month-to-day rules, inherits the end-of-month date strategy and overrides the adjustment method, always calculates according to month-to-day, and does not perform special end-of-month processing.

[0104] (4) When the date rule type is next_1st, the corresponding candidate date calculation strategy is NEXT_MONTH_AFTER_28 (NextFirstDayAfter28thGenerateTermBoundedPeriodStrategy, the first day of the next month after 28 days to generate the installment date), that is, the rule of the first day of the next month after 28 days is adopted. If the interest calculation start date is more than 28 days, the end date of the first period will be set to the first day of the next month.

[0105] (5) When the date rule type is fixed, the corresponding candidate date calculation strategy is INCREASE_SPECIFIED_DAYS (IncreaseSpecifiedDaysGenerateTermBoundedPeriodStrategy, which specifies the incremental number of days for the periodic date generation strategy). That is, the fixed number of days incremental rule is adopted to generate the end date of each period by increasing by the specified number of days, which is suitable for the return period of transaction vouchers in fixed number of days.

[0106] (6) When the date rule type is start, the corresponding candidate date calculation strategy is TERM_START (TermStartGenerateTermBoundedPeriodStrategy, the generation strategy for the start and end dates of the period in the initial phase), that is, the initial phase mode is adopted, the end date of the first period is equal to the interest start date, and the start date is the interest start date minus one month plus one day, which is adapted to the BOF initial transaction certificate return method.

[0107] (7) When the date rule type is zero_day, the corresponding candidate date calculation strategy is ZERO_DAY (ZeroDayGenerateTermBoundedPeriodStrategy), which means that the zero-period mode is adopted, and the start date and end date are equal to the interest accrual start date. This is applicable to single-period or immediate transaction voucher return scenarios.

[0108] S240. Generate a target voucher return plan based on the target voucher amount calculation strategy, target date calculation strategy, order information, scheme configuration parameters, and transaction voucher disposal parameters.

[0109] For example, the target voucher return plan can be generated in the following ways:

[0110] Based on the target voucher amount calculation strategy, the base amount and incremental amount for each period of transaction voucher repayment are determined according to order information, scheme configuration parameters, and transaction voucher processing parameters. Based on the target date calculation strategy, the start and end dates for each period of transaction voucher repayment are calculated according to the date rule type in the scheme configuration parameters. The base amount, incremental amount, start date, and end date are then linked and bound to determine the corresponding transaction voucher repayment record for each period. Finally, the corresponding transaction voucher repayment records for each period are integrated to determine the target voucher repayment plan.

[0111] Specifically, based on the target voucher amount calculation strategy, order information, scheme configuration parameters, and transaction voucher processing parameters, the basic amount and incremental amount to be repaid in each period during the phased repayment of transaction vouchers are calculated. Using the target date calculation strategy, the start and end dates for each period of phased repayment are determined according to the date rule types preset in the scheme configuration parameters. The basic amount, incremental amount, start date, and end date for each period are then linked and bound together to generate a single-period transaction voucher repayment record. All transaction voucher repayment records for all periods are summarized and integrated to ultimately generate a complete and executable target voucher repayment plan.

[0112] The above scheme accurately calculates the basic amount, incremental value, and return start and end dates for each period by using target voucher amount calculation strategy and target date calculation strategy respectively. It also links and binds transaction voucher data with date data to generate a single period return record, and then integrates all period records to form a complete transaction voucher return plan, thereby improving the completeness and accuracy of the transaction voucher planning plan.

[0113] In the above-mentioned method for generating a transaction voucher return plan, a plan generation request is obtained. This request includes order information corresponding to the transaction voucher, scheme configuration parameters, and transaction voucher disposal parameters. A multi-dimensional weighted scoring algorithm is used to determine the target voucher amount calculation strategy from candidate voucher amount calculation strategies based on the scheme configuration parameters and transaction voucher disposal parameters. The target date calculation strategy is determined from preset candidate date calculation strategies based on the date rule type in the scheme configuration parameters. A target voucher return plan is generated based on the target voucher amount calculation strategy, the target date calculation strategy, the order information, the scheme configuration parameters, and the transaction voucher disposal parameters. This method solves the problems of poor architectural scalability, the need to modify core code and redeploy for new rules, difficulty in dynamically adapting strategies to actual needs, and insufficient flexibility and stability of the generated transaction voucher return plan when generating transaction voucher return plans in existing technologies. The above solution receives a plan generation request containing order information, plan configuration parameters, and transaction voucher processing parameters. It intelligently selects and matches the optimal target voucher amount calculation strategy using a multi-dimensional weighted scoring algorithm combined with configuration and processing parameters. Simultaneously, it adapts and selects the corresponding target date calculation strategy based on preset date rule types. Then, it comprehensively calls the selected voucher amount calculation strategy, date calculation strategy, order information, configuration parameters, and processing parameters to automatically generate a standardized target voucher return plan. This solution can flexibly adapt to differentiated amount calculation rules and date generation rules according to different business configurations and processing scenarios, eliminating the need for manual strategy configuration and periodic calculation and arrangement. This reduces manual maintenance costs and improves the efficiency, adaptability, and calculation accuracy of voucher return plan generation, making it compatible with diverse transaction voucher phased processing business scenarios.

[0114] For example, based on the above embodiments, the method for generating a transaction voucher return plan includes:

[0115] Obtain the plan generation request. The plan generation request includes the order information corresponding to the transaction voucher, the scheme configuration parameters, and the transaction voucher processing parameters. The strategy pattern is used to uniformly organize and manage the various implementation classes of the voucher amount calculation strategy interface.

[0116] Seven candidate voucher amount calculation strategies are predefined. These strategies include: IPMT-based equal installment basic amount entry generation strategy, PPMT-based equal installment basic amount entry generation strategy, default equal installment basic amount entry generation strategy, fee-deducted IPMT equal installment basic amount entry generation strategy, daily interest-based basic amount entry generation strategy, basic amount proportional allocation strategy, and single-period mode basic amount entry generation strategy.

[0117] The system uses the generic interface StrategyRouter <t>A three-tiered architecture consisting of an enumeration factory and a Spring container enables dynamic matching, selection, and instantiation of voucher amount calculation strategies during program runtime. Each candidate voucher amount calculation strategy implements a StrategyRouter. <generatetermbasicamountentrystrategy>The interface returns the corresponding specific amount strategy implementation class via the `findStrategy` method defined in the interface. The strategy selection business service class `StrategyChooseServiceImpl` obtains an instance object of the target strategy type from the Spring Inversion of Control (IoC) container through the `getBean` method of the Spring application context, completing runtime strategy parsing and loading. `GenerateConfigDTO` serves as the configuration data carrier, associating and binding the business scheme configuration code with configuration parameters such as the amount strategy enumeration and the date strategy enumeration, ensuring accurate mapping and matching between the business configuration and the underlying strategy implementation.

[0118] A two-level cascaded selection algorithm is used to determine the target voucher amount calculation strategy from candidate voucher amount calculation strategies. The first level determines the candidate voucher amount calculation strategy that matches the scheme configuration code based on the configuration table. When the first-level configuration mapping table does not match, i.e., the scheme configuration code and candidate voucher amount calculation strategy fail to match, the system automatically degrades to a multi-dimensional weighted scoring algorithm based on runtime annotation constraint declarations and scheme feature vectors to calculate the comprehensive compatibility score of each candidate strategy and output the confidence decision. The two levels complement each other to ensure that configured products maintain deterministic binding and new schemes achieve automatic matching with zero configuration. The system relies on GenerateConfigDTO to encapsulate and carry scheme codes and multi-strategy configuration dimension information. Using the scheme code as the query keyword, it retrieves the pre-established configuration mapping table and matches the preset candidate voucher amount calculation strategy AmountGenerateConfigEnum. When the query matches the corresponding candidate voucher amount calculation strategy, it uses StrategyRouter. <t>The unified strategy routing specification of the interface, combined with the strategy class mapping relationship of the enumeration factory, and then the Spring IoC container obtains the Bean instance of the matching strategy through the context container to complete the deterministic strategy loading and calling. This precise matching method can achieve an efficient strategy lookup effect with O(1) time complexity. At the same time, GenerateConfigDTO can also realize the unified collection and management of multi-dimensional strategy configuration, and configure and bind the candidate voucher amount calculation strategy AmountGenerateConfigEnum, the candidate date calculation strategy DateGenerateConfigEnum, the basic amount influence strategy OtherAmountEffectGenerateConfigEnum, and the record form generation type strategy BillGenerateTypeConfigEnum. The system supports orthogonal free combination configuration between N amount strategies, M date strategies, and K basic amount strategies, without having to define configuration codes separately for each combination scenario of each type of strategy, reducing configuration redundancy and improving the flexibility of strategy combination extension. N, M, and K are all positive integers. The configuration mapping table records the mapping relationship between the scheme configuration code and the candidate voucher amount calculation strategy.

[0119] A unique scheme configuration code corresponding to the current business scheme is determined. Based on a pre-set configuration mapping table, the scheme configuration code and candidate voucher amount calculation strategies are matched. If a candidate voucher amount calculation strategy code that is completely consistent with the scheme configuration code exists, the successfully matched candidate voucher amount calculation strategy is determined as the target voucher amount calculation strategy, and the strategy instance of the target voucher amount calculation strategy is loaded based on the strategy routing mechanism.

[0120] If no candidate voucher amount calculation strategy code matches the scheme configuration code, the business constraints corresponding to each candidate voucher amount calculation strategy are read through the matcher in the multi-dimensional weighted scoring algorithm. Based on the business constraints, the feature extractor in the multi-dimensional weighted scoring algorithm extracts candidate feature vectors for strategy matching from the segmented information in the transaction voucher disposal parameters. The candidate feature vectors include: ratio type matching, whether it is a single-period product, basic amount matching, basic amount ratio matching, end-period share compatibility, transaction voucher return time compatibility, and total number of periods. Six feature vectors are selected from the candidate feature vectors: interest rate type matching, whether it is a single-period product, basic amount matching, basic amount ratio matching, end-period share compatibility, and transaction voucher return time compatibility, as target feature vectors. The @StrategyConstraint constraint rules of each target feature vector are read, and the target feature vectors are weighted and summed based on the @StrategyConstraint constraint rules to determine the comprehensive strategy score corresponding to each candidate voucher amount calculation strategy.

[0121] Based on the comprehensive strategy score, a comprehensive score sequence from high to low is determined. If the first comprehensive score in the sequence is greater than or equal to 0.6, and the difference between the first and second comprehensive scores is greater than or equal to 0.01, then the candidate voucher amount calculation strategy corresponding to the first comprehensive score is determined as the target voucher amount calculation strategy. If the first comprehensive score in the sequence is less than a first score threshold, then a preset general voucher amount calculation strategy is obtained and used as the target voucher amount calculation strategy. When the first comprehensive score reaches or exceeds the preset first score threshold, the difference between the first and second comprehensive scores is less than a set difference threshold, and the two scores are not completely equal, the top two candidate strategies are deemed to have similar fit and no obvious optimal differentiation. In this case, the system no longer automatically selects the highest score strategy by default, but instead pushes the candidate voucher amount calculation strategy corresponding to the first comprehensive score and the candidate voucher amount calculation strategy corresponding to the second comprehensive score to the client for manual intervention. Subsequently, the system receives and obtains the manual selection information entered by the client, and finally determines the selected candidate strategy as the target voucher amount calculation strategy based on this selection information. A strategy constraint matrix is ​​pre-constructed to correspond to the calculation strategies for each candidate voucher amount. This matrix, in a structured format, includes all candidate voucher amount calculation strategies, the corresponding business constraint information for each strategy, and the pre-defined priority order of these constraints. After multi-dimensional weighted scoring, each candidate voucher amount calculation strategy is sorted by score to form a comprehensive score sequence. When the first comprehensive score in the sequence is not lower than a pre-defined first score threshold, and the first comprehensive score is equal to the second comprehensive score, making it impossible to distinguish the optimal strategy by weighted scores, the pre-defined strategy constraint matrix is ​​retrieved. Based on the constraint information and priority rules recorded in the matrix, the differences in the business constraint conditions and the priority levels of the candidate voucher amount calculation strategies corresponding to the first and second comprehensive scores are compared. This allows the determination of the target voucher amount calculation strategy from the two candidate strategies with the same score.

[0122] Based on the date rule type in the scheme configuration parameters, and the correspondence between the preset date rule type and the candidate date calculation strategy, the target date calculation strategy is determined from the preset candidate date calculation strategies.

[0123] Based on the target voucher amount calculation strategy, order information, scheme configuration parameters, and transaction voucher processing parameters, the basic amount and incremental amount to be repaid in each period during the phased repayment of transaction vouchers are calculated. Using the target date calculation strategy, the start and end dates for each period of phased repayment are determined according to the date rule types preset in the scheme configuration parameters. The basic amount, incremental amount, start date, and end date for each period are then linked and bound to generate a single-period transaction voucher repayment record. All transaction voucher repayment records for all periods are summarized and integrated to ultimately generate a complete and executable target voucher repayment plan.

[0124] For example, the definition method of the date strategy interface (GenerateTermBoundedPeriodStrategy) is: Map<Integer, BoundedPeriod> The `generate(Segment segment, ZonedDateTimelastSegmentDatedDate, ZonedDateTime datedDate)` method receives segment information (`Segment`) and context date parameters, and outputs a key-value pair mapping set with the period number as the key and the period start and end interval object (`BoundedPeriod`) as the value. The abstract base class `AbstractGenerateTermBoundedPeriodStrategy` adopts the template method design pattern. Inside its `generate` method, it iterates through each period corresponding to the current segment and uses the template method `generateBoundedPeriod` to schedule different period types: for the first period, it calls the first period interval generation method `generateFirstTermBoundedPeriod(datedDate)`; for ordinary periods, it calls the regular period interval generation method `generateGeneralTermBoundedPeriod(lastTermEnd, datedDate, termNo)`. Each specific date generation strategy only needs to implement its own generation logic for the first period interval and the regular period interval, without needing to concern itself with the loop traversal of segment periods and the unified scheduling process.

[0125] For example, the calculation method for the start and end dates of the transaction voucher return date includes: the return time interval of each transaction voucher is encapsulated and represented by a BoundedPeriod value object, which contains a start date (start) and an end date (end). Both are implemented with time zone storage using the ZonedDateTim type, and the end date is forcibly verified during the object construction phase to ensure that the date interval is valid. The specific calculation logic is as follows: The start date of the first period is taken from the calculation start date (DatedDate), that is, the delivery date of the subject matter or the interest / disposal start date agreed upon in the business. This date is obtained from the order record information (OrderBillInfo) in the Order entity; the end date of the first period is generated by the generateFirstTermBoundedPeriod (detailDate) method of the currently selected date strategy. For example, under the end-of-month rule strategy, the date adjustment is completed by adjustTermEnd (detailDate, 1); the intermediate period, that is, the second period to the N-1th period, starts by adding one day to the end date of the previous period, that is, lastTermEnd.plusDays(1), to ensure that the time intervals of each period are continuous, non-overlapping and uninterrupted; the end date of the intermediate period is generated by the generateGeneralTermBoundedPeriod (lastTermEnd, detailDate, termNo) method of the currently selected date strategy, which internally calls adjustTermEnd (detailDate, The `termNo` method calculates the date corresponding to the execution period; the end date of the last period is determined based on the end date of each segment. The date calculation logic is consistent with that of the intermediate periods to ensure overall rule uniformity. The above date calculation methods are uniformly scheduled and executed by the `AbstractGenerateTermBoundedPeriodStrategy` abstract base class through template methods. Its `generate` method returns a segmented date mapping Map with the period number as the key and `BoundedPeriod` as the value.<Integer, BoundedPeriod> The business caller, RepayPlanInitDomainServiceImpl, merges the mapping results returned by each segment to form a unified date range mapping set for the entire period.

[0126] The above solution involves obtaining a plan generation request, which includes order information corresponding to the transaction voucher, plan configuration parameters, and transaction voucher processing parameters. Using a multi-dimensional weighted scoring algorithm, a target voucher amount calculation strategy is determined from candidate voucher amount calculation strategies based on the plan configuration parameters and transaction voucher processing parameters. A target date calculation strategy is determined from preset candidate date calculation strategies based on the date rule type in the plan configuration parameters. A target voucher return plan is generated based on the target voucher amount calculation strategy, the target date calculation strategy, the order information, the plan configuration parameters, and the transaction voucher processing parameters. This solution addresses the problems of poor architectural scalability, the need to modify core code and redeploy for new rules, difficulty in dynamically adapting strategies to actual needs, and insufficient flexibility and stability of the generated transaction voucher return plan when generating transaction voucher return plans in existing technologies. The above solution receives a plan generation request containing order information, plan configuration parameters, and transaction voucher processing parameters. It intelligently selects and matches the optimal target voucher amount calculation strategy using a multi-dimensional weighted scoring algorithm combined with configuration and processing parameters. Simultaneously, it adapts and selects the corresponding target date calculation strategy based on preset date rule types. Then, it comprehensively calls the selected voucher amount calculation strategy, date calculation strategy, order information, configuration parameters, and processing parameters to automatically generate a standardized target voucher return plan. This solution can flexibly adapt to differentiated amount calculation rules and date generation rules according to different business configurations and processing scenarios, eliminating the need for manual strategy configuration and periodic calculation and arrangement. This reduces manual maintenance costs and improves the efficiency, adaptability, and calculation accuracy of voucher return plan generation, making it compatible with diverse transaction voucher phased processing business scenarios.

[0127] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0128] Based on the same inventive concept, this application also provides a transaction voucher return plan generation apparatus for implementing the transaction voucher return plan generation method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations of the one or more transaction voucher return plan generation apparatus embodiments provided below can be found in the limitations of the transaction voucher return plan generation method described above, and will not be repeated here.

[0129] In one embodiment, such as Figure 3 As shown, a transaction voucher return plan generation device is provided, comprising: a plan generation request acquisition module 301, a first calculation strategy determination module 302, a second calculation strategy determination module 303, and a voucher return plan generation module 304, wherein:

[0130] The plan generation request acquisition module 301 is used to acquire a plan generation request; the plan generation request includes order information, scheme configuration parameters, and transaction voucher processing parameters corresponding to the transaction voucher.

[0131] The first calculation strategy determination module 302 is used to determine the target voucher amount calculation strategy from the candidate voucher amount calculation strategies by using a multi-dimensional weighted scoring algorithm, based on the scheme configuration parameters and transaction voucher disposal parameters.

[0132] The second calculation strategy determination module 303 is used to determine the target date calculation strategy from the preset candidate date calculation strategies according to the date rule type in the scheme configuration parameters.

[0133] The voucher return plan generation module 304 is used to generate a target voucher return plan based on the target voucher amount calculation strategy, the target date calculation strategy, the order information, the scheme configuration parameters, and the transaction voucher disposal parameters.

[0134] For example, the first calculation strategy determination module 302 is specifically used for:

[0135] The scheme configuration code is determined based on the scheme configuration parameters, and the scheme configuration code is matched with the candidate voucher amount calculation strategy;

[0136] If a match is successful, the candidate voucher amount calculation strategy that matches the scheme configuration code is determined as the target voucher amount calculation strategy;

[0137] If a match fails, a multi-dimensional weighted scoring algorithm is used to determine the target voucher amount calculation strategy from the candidate voucher amount calculation strategies based on the business constraints and transaction voucher processing parameters corresponding to each candidate voucher amount calculation strategy.

[0138] For example, the first calculation strategy determination module 302 is further specifically used for:

[0139] The business constraints corresponding to the calculation strategy of each candidate voucher amount are read through the matcher in the multidimensional weighted scoring algorithm.

[0140] Based on the aforementioned business constraints, the target feature vector for strategy matching is extracted from the segmented information in the transaction certificate processing parameters by the feature extractor in the multidimensional weighted scoring algorithm.

[0141] The target feature vectors are weighted and summed to determine the comprehensive strategy score corresponding to each candidate voucher amount calculation strategy;

[0142] Based on the comprehensive strategy score, the target voucher amount calculation strategy is determined from the candidate voucher amount calculation strategies.

[0143] For example, the first calculation strategy determination module 302 is further specifically used for:

[0144] Based on the comprehensive strategy score, a comprehensive score sequence from high to low is determined. If the first comprehensive score in the comprehensive score sequence is greater than or equal to the first score threshold, and the difference between the first comprehensive score and the second comprehensive score is greater than or equal to the difference threshold, then the candidate voucher amount calculation strategy corresponding to the first comprehensive score is determined as the target voucher amount calculation strategy.

[0145] If the first comprehensive score in the comprehensive scoring sequence is less than the first scoring threshold, then a preset general voucher amount calculation strategy is obtained, and the general voucher amount calculation strategy is used as the target voucher amount calculation strategy.

[0146] For example, the first calculation strategy determination module 302 is further specifically used for:

[0147] If the first comprehensive score in the comprehensive score sequence is greater than or equal to the first score threshold, the difference between the first comprehensive score and the second comprehensive score is less than the difference threshold, and the first comprehensive score and the second comprehensive score are not equal, then the candidate voucher amount calculation strategy corresponding to the first comprehensive score and the candidate voucher amount calculation strategy corresponding to the second comprehensive score are sent to the client.

[0148] Obtain the selection information input by the client, and use the selection information to determine the target voucher amount calculation strategy.

[0149] For example, the first calculation strategy determination module 302 is further specifically used for:

[0150] Construct a strategy constraint matrix for calculating the amount of candidate vouchers; the strategy constraint matrix includes the candidate voucher amount calculation strategy, the constraint information corresponding to the candidate voucher amount calculation strategy, and the priority of the constraint information;

[0151] If the first comprehensive score in the comprehensive score sequence is greater than or equal to the first score threshold, and the first comprehensive score is the same as the second comprehensive score, then the target voucher amount calculation strategy is determined from the candidate voucher amount calculation strategies corresponding to the first comprehensive score and the candidate voucher amount calculation strategies corresponding to the second comprehensive score, based on the strategy constraint matrix, the business constraints of the candidate voucher amount calculation strategy corresponding to the first comprehensive score, and the business constraints of the candidate voucher amount calculation strategy corresponding to the second comprehensive score.

[0152] For example, the voucher return plan generation module 304 is specifically used for:

[0153] Based on the target voucher amount calculation strategy, the basic amount and incremental amount to be repaid in each period are determined according to the order information, the scheme configuration parameters and the transaction voucher disposal parameters when repaying transaction vouchers in installments.

[0154] Using the target date calculation strategy, and based on the date rule type in the scheme configuration parameters, the start and end dates of each period of transaction voucher repayment are calculated when repaying transaction vouchers in installments;

[0155] By associating and binding the base amount, the incremental amount, the start date, and the end date, the corresponding transaction voucher repayment record for each period is determined when the transaction voucher is repaid in installments.

[0156] The transaction voucher return records for each period are integrated to determine the target voucher return plan.

[0157] The modules in the aforementioned transaction voucher return plan generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0158] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a method for generating a transaction voucher return plan. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or a key vector, trackball, or touchpad set on the computer device casing, or an external key vector disk, touchpad, or mouse, etc.

[0159] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0160] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0161] Step 1: Obtain the plan generation request; the plan generation request includes the order information corresponding to the transaction voucher, the scheme configuration parameters, and the transaction voucher processing parameters;

[0162] Step 2: Using a multi-dimensional weighted scoring algorithm, determine the target voucher amount calculation strategy from the candidate voucher amount calculation strategies based on the scheme configuration parameters and transaction voucher processing parameters;

[0163] Step 3: Based on the date rule type in the scheme configuration parameters, determine the target date calculation strategy from the preset candidate date calculation strategies;

[0164] Step 4: Generate a target voucher return plan based on the target voucher amount calculation strategy, the target date calculation strategy, the order information, the scheme configuration parameters, and the transaction voucher disposal parameters.

[0165] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0166] Step 1: Obtain the plan generation request; the plan generation request includes the order information corresponding to the transaction voucher, the scheme configuration parameters, and the transaction voucher processing parameters;

[0167] Step 2: Using a multi-dimensional weighted scoring algorithm, determine the target voucher amount calculation strategy from the candidate voucher amount calculation strategies based on the scheme configuration parameters and transaction voucher processing parameters;

[0168] Step 3: Based on the date rule type in the scheme configuration parameters, determine the target date calculation strategy from the preset candidate date calculation strategies;

[0169] Step 4: Generate a target voucher return plan based on the target voucher amount calculation strategy, the target date calculation strategy, the order information, the scheme configuration parameters, and the transaction voucher disposal parameters.

[0170] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0171] Step 1: Obtain the plan generation request; the plan generation request includes the order information corresponding to the transaction voucher, the scheme configuration parameters, and the transaction voucher processing parameters;

[0172] Step 2: Using a multi-dimensional weighted scoring algorithm, determine the target voucher amount calculation strategy from the candidate voucher amount calculation strategies based on the scheme configuration parameters and transaction voucher processing parameters;

[0173] Step 3: Based on the date rule type in the scheme configuration parameters, determine the target date calculation strategy from the preset candidate date calculation strategies;

[0174] Step 4: Generate a target voucher return plan based on the target voucher amount calculation strategy, the target date calculation strategy, the order information, the scheme configuration parameters, and the transaction voucher disposal parameters.

[0175] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0176] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0177] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0178] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.< / t> < / generatetermbasicamountentrystrategy> < / t> < / t> < / t> < / generatetermbasicamountentrystrategy> < / generatetermbasicamountentrystrategy> < / t>

Claims

1. A transaction voucher redemption program generation method characterized by, include: Get the plan generation request; The plan generation request includes the order information corresponding to the transaction voucher, the scheme configuration parameters, and the transaction voucher processing parameters; Using a multi-dimensional weighted scoring algorithm, the target voucher amount calculation strategy is determined from the candidate voucher amount calculation strategies based on the scheme configuration parameters and transaction voucher processing parameters. Based on the date rule type in the scheme configuration parameters, determine the target date calculation strategy from the preset candidate date calculation strategies; A target voucher return plan is generated based on the target voucher amount calculation strategy, the target date calculation strategy, the order information, the scheme configuration parameters, and the transaction voucher disposal parameters.

2. The method of claim 1, wherein, Using a multi-dimensional weighted scoring algorithm, based on the scheme configuration parameters and transaction certificate processing parameters, the target certificate amount calculation strategy is determined from the candidate certificate amount calculation strategies, including: The scheme configuration code is determined based on the scheme configuration parameters, and the scheme configuration code is matched with the candidate voucher amount calculation strategy; If a match is successful, the candidate voucher amount calculation strategy that matches the scheme configuration code is determined as the target voucher amount calculation strategy; If a match fails, a multi-dimensional weighted scoring algorithm is used to determine the target voucher amount calculation strategy from the candidate voucher amount calculation strategies based on the business constraints and transaction voucher processing parameters corresponding to each candidate voucher amount calculation strategy.

3. The method of claim 2, wherein, Using a multi-dimensional weighted scoring algorithm, the target voucher amount calculation strategy is determined from the candidate voucher amount calculation strategies based on the business constraints and transaction voucher processing parameters corresponding to each candidate voucher amount calculation strategy. This includes: The business constraints corresponding to the calculation strategy of each candidate voucher amount are read through the matcher in the multidimensional weighted scoring algorithm. Based on the aforementioned business constraints, the target feature vector for strategy matching is extracted from the segmented information in the transaction certificate processing parameters by the feature extractor in the multidimensional weighted scoring algorithm. The target feature vectors are weighted and summed to determine the comprehensive strategy score corresponding to each candidate voucher amount calculation strategy; Based on the comprehensive strategy score, the target voucher amount calculation strategy is determined from the candidate voucher amount calculation strategies.

4. The method according to claim 3, characterized in that, Based on the comprehensive strategy score, the target voucher amount calculation strategy is determined from the candidate voucher amount calculation strategies, including: Based on the comprehensive strategy score, a comprehensive score sequence from high to low is determined. If the first comprehensive score in the comprehensive score sequence is greater than or equal to the first score threshold, and the difference between the first comprehensive score and the second comprehensive score is greater than or equal to the difference threshold, then the candidate voucher amount calculation strategy corresponding to the first comprehensive score is determined as the target voucher amount calculation strategy. If the first comprehensive score in the comprehensive scoring sequence is less than the first scoring threshold, then a preset general voucher amount calculation strategy is obtained, and the general voucher amount calculation strategy is used as the target voucher amount calculation strategy.

5. The method according to claim 4, characterized in that, Also includes: If the first comprehensive score in the comprehensive score sequence is greater than or equal to the first score threshold, the difference between the first comprehensive score and the second comprehensive score is less than the difference threshold, and the first comprehensive score and the second comprehensive score are not equal, then the candidate voucher amount calculation strategy corresponding to the first comprehensive score and the candidate voucher amount calculation strategy corresponding to the second comprehensive score are sent to the client. Obtain the selection information input by the client, and use the selection information to determine the target voucher amount calculation strategy.

6. The method according to claim 4, characterized in that, Also includes: Construct a strategy constraint matrix for calculating the amount of candidate vouchers; the strategy constraint matrix includes the candidate voucher amount calculation strategy, the constraint information corresponding to the candidate voucher amount calculation strategy, and the priority of the constraint information; If the first comprehensive score in the comprehensive score sequence is greater than or equal to the first score threshold, and the first comprehensive score is the same as the second comprehensive score, then the target voucher amount calculation strategy is determined from the candidate voucher amount calculation strategies corresponding to the first comprehensive score and the candidate voucher amount calculation strategies corresponding to the second comprehensive score, based on the strategy constraint matrix, the business constraints of the candidate voucher amount calculation strategy corresponding to the first comprehensive score, and the business constraints of the candidate voucher amount calculation strategy corresponding to the second comprehensive score.

7. The method according to claim 1, characterized in that, Based on the target voucher amount calculation strategy, the target date calculation strategy, the order information, the scheme configuration parameters, and the transaction voucher processing parameters, a target voucher return plan is generated, including: Based on the target voucher amount calculation strategy, the basic amount and incremental amount to be repaid in each period are determined according to the order information, the scheme configuration parameters and the transaction voucher disposal parameters when repaying transaction vouchers in installments. Using the target date calculation strategy, and based on the date rule type in the scheme configuration parameters, the start and end dates of each period of transaction voucher repayment are calculated when repaying transaction vouchers in installments; By associating and binding the base amount, the incremental amount, the start date, and the end date, the corresponding transaction voucher repayment record for each period is determined when the transaction voucher is repaid in installments. The transaction voucher return records for each period are integrated to determine the target voucher return plan.

8. A device for generating a transaction voucher return plan, characterized in that, The transaction voucher return plan generation device includes: The plan generation request acquisition module is used to acquire plan generation requests; the plan generation request includes order information corresponding to the transaction voucher, scheme configuration parameters, and transaction voucher processing parameters; The first calculation strategy determination module is used to determine the target voucher amount calculation strategy from the candidate voucher amount calculation strategies by using a multi-dimensional weighted scoring algorithm, based on the scheme configuration parameters and transaction voucher disposal parameters. The second calculation strategy determination module is used to determine the target date calculation strategy from the preset candidate date calculation strategies based on the date rule type in the scheme configuration parameters. The voucher return plan generation module is used to generate a target voucher return plan based on the target voucher amount calculation strategy, the target date calculation strategy, the order information, the scheme configuration parameters, and the transaction voucher disposal parameters.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable 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 according to any one of claims 1 to 7.