Method for solving MCKP problem and program product
By converting the lending risk control model into MCKP form, combining dominance theory and greedy algorithm optimization selection strategy, combined with integer planning and vectorization operations, the problem of high difficulty and low efficiency in solving the MCKP problem in the lending risk control field is solved, and fast and accurate lending combination selection is achieved.
Patent Information
- Application Number
- CN202510098309.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-07-01
AI Technical Summary
When the prior art deals with the multi-choice backpack problem (MCKP), especially in the field of lending risk control, there are problems such as high difficulty, low efficiency and uncontrollable solution, especially in large-scale data, which is difficult to deal with complex and dynamically changing credit environments.
Linear relaxation technology and penalty term technology are used to convert the lending risk control model into MCKP form, combined with dominance theory to exclude non-dominance solutions, use optimal slope parameters and greedy algorithm to solve within O(n^2) complexity, and combine integer programming theory and vectorization operations to accelerate data processing to ensure the accuracy and risk tolerance of the solution.
Significantly reduce the scale of the problem, improve the solution efficiency and accuracy, and quickly find the optimal solution on super-large-scale MCKP problems, satisfying the controllable risks while improving the efficiency and accuracy of lending risk control.
Smart Images

Figure CN120235690A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular, to a method and program product for solving the MCKP problem. Background Art
[0002] The Multiple-Choice Knapsack Problem (MCKP) is a classic optimization problem of making selections among multiple groups of items. Different from the traditional knapsack problem, the MCKP requires that one item must be selected from each group, and the total weight of the selected items cannot exceed the capacity limit of the knapsack. The goal is to maximize the total value of the selected items under these constraints. Due to its complex solution space and constraints, the MCKP problem belongs to the NP-hard problem, with extremely high difficulty in solving, and widely exists in fields such as resource allocation, portfolio optimization, and logistics planning.
[0003] In the field of lending risk control, the risk assessment of loan applications is a key task, which involves the problem of selecting the optimal solution from multiple alternative solutions. Specifically, a lending risk control system usually needs to make the best choice from various dimensions such as different lending products, customer groups, credit scoring models, etc., and maximize the benefits of financial institutions under the premise of controllable risks. This decision-making process can be abstracted as the "item selection" process in the MCKP problem, where each "item" represents the selection of a lending product or customer group, and each group corresponds to different decision-making dimensions.
[0004] However, due to the NP-hard nature of the MCKP problem, traditional exact solution methods (such as the branch and bound method) have significant limitations when facing large-scale data. The non-polynomial complexity and implicit traversal solution method of the branch and bound method lead to its low efficiency in dealing with complex risk control decisions involving a large number of loan products and customer groups, facing the problem of combinatorial explosion, with slow and uncontrollable solution speed. Therefore, risk control models based on exact solutions are often difficult to handle complex and dynamically changing credit environments in practical applications.
[0005] Therefore, there is an urgent need for a method and program product for solving the MCKP problem. Summary of the Invention
[0006] The present invention provides a method and program product for solving the MCKP problem to solve the above problems existing in the prior art.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] A method for solving the MCKP problem, comprising:
[0009] S101: Based on the linear relaxation technique and the penalty term technique, perform relaxation processing on the lending risk control model, and convert the lending risk control model into a Multiple Choice Knapsack Problem (MCKP);
[0010] S102: Based on the dominance theory, preprocess the converted MCKP problem, exclude non-dominated solutions within the quadratic complexity O(n^2), and determine the optimal slope parameter, where the optimal slope parameter is used to optimize the selection strategy of the lending portfolio;
[0011] S103: Based on the split theory, use the optimal slope parameter to find the minimum solution space and the maximum solution space in the solution space of the lending portfolio, and solve the final solution of the lending portfolio within the linear complexity O(n) through the greedy algorithm;
[0012] S104: Based on the linear relaxation theory and the integer programming theory, calculate the accuracy control result of the final solution, and determine whether the selected lending portfolio satisfies the predetermined risk tolerance while maximizing the return;
[0013] S105: When the predetermined risk tolerance is satisfied, use vectorized operations to accelerate data processing during the lending risk control process.
[0014] Furthermore, step S101 also includes:
[0015] S1011: Based on the linear relaxation technique, perform relaxation processing on the initial constraint conditions of the lending risk control model to determine the relaxation variables;
[0016] S1012: Apply the penalty term technique to perform constraint control on the relaxation variables, so that while expanding the solution space, the solution after relaxation processing does not deviate from the actual business requirements, and introduce the penalty term into the objective function and adjust the weight;
[0017] S1013: After completing the relaxation processing, redefine the variables and constraints of the MCKP problem, map the core objectives and limiting conditions of the lending risk control model to the standard structure of the MCKP, and output the identifier after model conversion.
[0018] Furthermore, step S102 includes:
[0019] S1021: According to the preprocessing, analyze the dominance relationship of each lending option, compare the return and cost of each solution, and generate a simplified problem set that only includes effective dominant solutions;
[0020] S1022: Analyze the simplified problem by applying the slope optimization method, calculate the return-cost ratio of each solution, determine the optimal slope parameter for optimizing the lending portfolio selection, and mark the slope range with potential optimal returns;
[0021] S1023: Sort each borrowing and lending option in the simplified problem set based on the optimal slope parameter, and perform a step-by-step screening operation to generate a list of candidate borrowing and lending combinations, ensuring that all candidate combinations meet the slope optimization criteria.
[0022] Further, step S103 includes:
[0023] Based on the split theory, extract the initial solution space from the solution space of the borrowing and lending combination, use the optimal slope parameter to determine the minimum solution space and the maximum solution space in the initial solution space, and output the identifier of the solution space.
[0024] Determine all possible sub-combinations in the borrowing and lending combination, and calculate the objective function value under the optimal slope parameter in each sub-combination. Judge whether the sub-combination is the minimum solution space or the maximum solution space according to the obtained results.
[0025] Control the output of the calculation results at each step, and determine the identifier of the solution space required for the next calculation until all sub-combinations are traversed.
[0026] During the traversal process, apply the greedy algorithm to gradually update the optimal solution in the current solution space to ensure finding the final solution of the borrowing and lending combination within the O(n) linear complexity.
[0027] Further, step S104 includes:
[0028] Based on the linear relaxation theory, control the extraction of the linear relaxation solution from the initial solution space of the borrowing and lending combination, and determine the identifier of the solution space of the relaxation solution.
[0029] Apply the integer programming theory to integerize the linear relaxation solution, gradually adjust the values of each variable in the solution space to meet the constraints of the integer programming, and output the identifier of the adjusted solution space.
[0030] During the adjustment process, calculate the change in the solution space generated by each adjustment, determine the impact on the accuracy of the final solution, and perform real-time control on the accuracy of the solution, and output the intermediate results of the accuracy control.
[0031] Control that after each adjustment, apply the accuracy evaluation function to calculate the difference between the integer solution and the linear relaxation solution in the current solution space to ensure that the accuracy of the final solution meets the predetermined requirements.
[0032] Based on the intermediate results of the accuracy control, generate an integer solution that meets the accuracy requirements, and determine the identifier of the borrowing and lending combination corresponding to the integer solution.
[0033] Summarize the results of all calculation steps, generate a list of final solutions of the borrowing and lending combination, and determine the final solution that maximizes the profit and meets the predetermined risk tolerance.
[0034] Further, step S105 includes:
[0035] Perform an initialization operation on the vectorization operation module through the control system, and input the initial data from the first-step data processing task;
[0036] Determine the vectorization processing path of the data processing task. Among them, the vectorization processing path includes the vectorization decomposition of the operations of each step of the processing task, and corresponding operation instructions are generated;
[0037] Perform vectorization operations on each data processing task, determine the optimal resource configuration and parallel processing strategy required during the operation, and ensure that the execution efficiency of each processing task meets the preset target execution efficiency;
[0038] Real-time monitor the execution status of each step of vectorization operation, analyze the possible bottleneck information during the operation, and dynamically adjust the operation parameters according to the bottleneck information and execution status to ensure that all operations are executed at the theoretically fastest speed;
[0039] After the operation is completed, collect and organize the result data of all vectorization operations, generate a processing report, and output an instruction set for the next-step data processing task;
[0040] Repeat the above steps until all data processing tasks are completed;
[0041] Update the parameter configuration of the vectorization operation module based on the execution efficiency and result data of each data processing task.
[0042] Further, determining the optimal slope parameter for optimizing the borrowing and lending portfolio selection includes:
[0043] Receive and import the simplified borrowing and lending problem set, and initialize the parameters and characteristics of the borrowing and lending portfolio;
[0044] For each borrowing and lending portfolio, determine the corresponding revenue and cost data;
[0045] For each borrowing and lending portfolio, apply the slope optimization method to calculate the revenue-to-cost ratio of the borrowing and lending portfolio. Among them, the calculation formula for the revenue-to-cost ratio is:
[0046]
[0047] Generate the slope parameter of each borrowing and lending portfolio according to the calculated revenue-to-cost ratio;
[0048] Sort the slope parameters of all borrowing and lending portfolios and mark the interval where the slope value is located;
[0049] Determine the slope range with potential optimal revenue through the analysis of the slope parameter sorting results;
[0050] Based on the analysis results, determine the optimal slope parameter within the slope range, and optimize the selection of the lending and borrowing portfolio through the optimal slope parameter;
[0051] Output the lending and borrowing portfolio marked with the optimal slope parameter and the corresponding return - to - cost ratio.
[0052] Further, determine whether the sub - portfolio is the minimum solution space or the maximum solution space according to the obtained results, including:
[0053] For each sub - portfolio in the lending and borrowing portfolio, calculate the objective function value under the optimal slope parameter of the sub - portfolio. The objective function calculation formula is:
[0054]
[0055] where ω i represents the weight of the i - th item, R i represents the return of the i - th item, and C i represents the cost of the i - th item;
[0056] According to the calculation results, obtain the return - to - cost ratio of each solution and record the ratio value;
[0057] Judge whether the objective function value of each sub - portfolio reaches the criteria of the minimum solution space or the maximum solution space under the optimal slope parameter;
[0058] Based on the calculation results of all sub - portfolios, generate a list containing the objective function values and return - to - cost ratios under the optimal slope parameters of each sub - portfolio, and output the list;
[0059] According to the results in the list, judge whether the sub - portfolio belongs to the minimum solution space or the maximum solution space, and generate the final solution space identifier;
[0060] Output the solution space identifier to complete the judgment process.
[0061] Further, determine the vectorized processing path of the data processing task, including:
[0062] Determine the matrix representation form D0 of the data and generate the corresponding vectorized processing instructions;
[0063] Perform vectorized decomposition on the initial data D0 to determine the operation matrix M i for each step of the processing task T i , and generate a vectorized operation path through the calculation formula V i = M i ×D0, where V i represents the vectorized result of the current processing task;
[0064] Based on the vectorized operation path, perform the operations of each data processing task in sequence, and use the vectorization result V of each step i as the input for the next processing task, and update the data matrix D i+1 = V i ;
[0065] Control the vectorization operation module to perform parallel operations on each step in the processing path to generate the final data processing result D n , and output the corresponding vectorization processing path identifier;
[0066] Based on the final vectorization processing path, generate and output a task processing result list.
[0067] Among them, a program product for solving the MCKP problem includes computer instructions, and when the computer instructions are executed by a processor, the steps of the method for solving the MCKP problem described in any one of the above are implemented.
[0068] Compared with the prior art, the present invention has the following advantages:
[0069] A method and program product for solving the MCKP problem include: based on the linear relaxation technology and penalty term technology, perform relaxation processing on the lending risk control model, and convert the lending risk control model into the form of the multiple-choice knapsack problem MCKP; based on the dominance theory, perform preprocessing on the converted MCKP problem, exclude non-dominated solutions within the complexity of O(n^2) to significantly reduce the problem scale, and on this basis, determine the optimal slope parameter of the problem for optimizing the selection strategy of the lending portfolio; based on the split theory, use the optimal slope parameter to find the minimum solution space and the maximum solution space in the solution space of the lending portfolio, and solve the final solution of the lending portfolio within the linear complexity of O(n) through the greedy algorithm to achieve effective risk control processing of lending applications; based on the linear relaxation theory and integer programming theory, calculate the accuracy control result of the final solution to ensure that the selected lending portfolio maximizes the return while meeting the predetermined risk tolerance; throughout the process, vectorized operations are used to accelerate data processing to ensure that each operation reaches the theoretically fastest speed, thereby improving the efficiency and accuracy of lending risk control processing. It is applicable to the rapid solution of ultra-large-scale MCKP problems and solves the problem of combinatorial explosion; it has high and controllable accuracy, and its accuracy performance is particularly excellent in ultra-large-scale MCKP problems.
[0070] Other features and advantages of the present invention will be described in the subsequent specification, and some of them will become obvious from the specification or be understood by implementing the present invention.
[0071] The technical solution of the present invention will be further described in detail below through the drawings and embodiments. Description of the Drawings
[0072] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the present invention, but do not constitute a limitation to the present invention. In the accompanying drawings:
[0073] Figure 1 is a flowchart of a method for solving the MCKP problem in an embodiment of the present invention;
[0074] Figure 2 is a flowchart of relaxation processing for a lending risk control model in an embodiment of the present invention;
[0075] Figure 3 is a flowchart of determining the optimal slope parameter of the problem in an embodiment of the present invention. Detailed implementation manners
[0076] The following describes the preferred embodiments of the present invention with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to explain and illustrate the present invention, and are not used to limit the present invention.
[0077] An embodiment of the present invention provides a method and program product for solving the MCKP problem, including:
[0078] S101: Based on the linear relaxation technique and the penalty term technique, perform relaxation processing on the lending risk control model to convert the lending risk control model into the form of a multi-choice knapsack problem MCKP;
[0079] S102: Based on the dominance theory, preprocess the converted MCKP problem, exclude non-dominated solutions within the complexity of O(n^2) to significantly reduce the problem scale, and on this basis, determine the optimal slope parameter of the problem to optimize the selection strategy of the lending portfolio;
[0080] S103: Based on the split theory, use the optimal slope parameter to find the minimum solution space and the maximum solution space in the solution space of the lending portfolio, and solve the final solution of the lending portfolio within the linear complexity of O(n) through the greedy algorithm to achieve effective risk control processing of lending applications;
[0081] S104: Based on the linear relaxation theory and the integer programming theory, calculate the accuracy control result of the final solution to ensure that the selected lending portfolio maximizes the profit while meeting the predetermined risk tolerance;
[0082] S105: Vectorized operations are adopted throughout the process to accelerate data processing, ensuring that each operation reaches the theoretically fastest speed, thereby improving the efficiency and accuracy of lending risk control processing.
[0083] The working principle of the above technical solution is as follows: The lending risk control model usually involves multiple constraints and objective functions and needs to be solved in a large-scale data environment. When facing high-dimensional and large numbers of variables, traditional solution methods are prone to the problem of combinatorial explosion, that is, as the number of variables increases, the number of possible combinations grows exponentially, leading to a sharp increase in the difficulty of solving. To solve this problem, linear relaxation technology is adopted, that is, some discrete constraints are relaxed into continuous forms, and combined with penalty term technology to ensure that the relaxed solution can converge quickly through optimization algorithms on the premise of meeting certain accuracy requirements. Finally, this step transforms the complex lending risk control problem into a multiple-choice knapsack problem (MCKP), laying a foundation for the rapid solution of the subsequent steps.
[0084] In the MCKP problem, the dominance theory is an important tool for solving the combinatorial explosion problem. By comparing the dominance relationships between different solutions, the dominance theory can effectively exclude non-dominated solutions within the complexity of O(n^2), thus significantly reducing the problem scale. Through this preprocessing technology, the number of solutions that need to be further calculated is greatly reduced, enabling the control of the problem complexity. At the same time, based on the dominance preprocessing, the optimal slope parameter is determined, which plays a crucial role in the subsequent selection strategy and helps to quickly lock the optimal solution or sub-optimal solution among multiple choices.
[0085] In the process of solving the MCKP problem, the split theory is used to divide the solution space and determine the boundary between the minimum solution space and the maximum solution space. Combining with the optimal slope parameter determined in the previous step, the greedy algorithm is used to complete the solution of the lending portfolio within the linear complexity of O(n). The advantage of the greedy algorithm is that it can gradually construct the solution, starting from the current local optimum, and quickly find the global optimum or approximate global optimum while ensuring global constraints. This algorithm is applicable to large-scale data sets and can effectively process a large number of lending applications and make timely decisions in the scenario of lending risk control.
[0086] Although the greedy algorithm and linear relaxation technology can quickly find solutions, in order to ensure the accuracy of the solutions and the risk control effect, the integer programming and precision control technology are introduced in step S104. Through these technologies, the accuracy of the final solutions can be evaluated and adjusted to ensure that the solutions not only meet the goal of maximizing profits but also conform to the preset risk tolerance. The precision control results provide a reliable guarantee for lending risk control and avoid potential risks caused by algorithm approximation.
[0087] In the whole solving process, vectorized operation technology is widely used. Vectorized operation can make full use of the hardware advantages of modern computers to accelerate data processing and calculation to the theoretically fastest speed. This not only improves the solving efficiency but also ensures the timeliness and stability of calculation when dealing with ultra-large-scale MCKP problems.
[0088] O(n^2): It represents a quadratic time complexity. That is to say, as the input size n increases, the running time of the algorithm will increase in proportion to n 2 squared. Specifically, O(n^2) means that the number of operations is the square of the size of the input data. For relatively large datasets, algorithms with quadratic complexity tend to become very slow.
[0089] Dominance theory: Screen out inappropriate solutions through the dominance relationship to reduce the search space.
[0090] Split theory: Optimize the search process by splitting the solution space, and combine the optimal slope parameter to find a suitable solution interval.
[0091] O(n): It represents linear complexity, that is, as the input size n increases, the running time of the algorithm will increase in a linear proportion. Algorithms with O(n) complexity are usually very efficient.
[0092] The beneficial effects of the above technical solutions are as follows: By transforming the complex loan risk control problem into an MCKP problem and combining the preprocessing of the dominance theory, the solution space is significantly reduced, successfully avoiding the problem of combinatorial explosion; The combination of the greedy algorithm and the split theory enables the problem to be solved with a complexity of O(n), ensuring high efficiency on large-scale datasets. In actual tests, a single-constraint and constraint-effective MCKP problem with 50,000 variables was solved within 0.04 minutes, demonstrating the high efficiency of the algorithm; Through the application of integer programming and precision control techniques, the final solution not only performs excellently in terms of maximizing revenue but also ensures the controllability of risks. Especially for ultra-large-scale MCKP problems, it shows excellent precision performance; The whole process of vectorized operation ensures the high efficiency of each calculation step, maximizing the speed and stability of the overall algorithm. In the test with more than 50 million variables, the algorithm completed the solution within half an hour.
[0093] Through the combination and optimization of these technologies, the processing process of the entire loan risk control model becomes faster, more accurate and efficient, providing strong technical support for the processing of large-scale financial data in practical applications.
[0094] In another embodiment, the S101 step includes:
[0095] S1011: Based on the linear relaxation technique, perform relaxation processing on the initial constraint conditions of the loan risk control model, and expand the solution space by introducing relaxation variables to adapt to the diversity of loan data;
[0096] S1012: Apply the penalty term technique to perform constraint control on the slack variables. While expanding the solution space, ensure that the solution after relaxation does not deviate from the actual business requirements. Introduce the penalty term into the objective function and adjust the weight to achieve the purpose of balancing the quality of the solution and the computational efficiency;
[0097] S1013: After completing the relaxation process, convert the processed lending risk control model into the form of MCKP. By redefining the variables and constraints, map the core objectives and limiting conditions of the lending risk control model to the standard structure of MCKP, and output the identifier after model conversion.
[0098] Among them, introducing the penalty term into the objective function and adjusting the weight includes:
[0099] Introduce the penalty term into the objective function. The penalty term is used to limit the value range of the slack variables and prevent the solution after relaxation from deviating too much from the actual business objectives;
[0100] Set the weight λ of the penalty term in the objective function. The penalty term weight is used to balance the quality of the solution and the computational efficiency, so that while relaxing the constraint conditions, the computational efficiency is optimized;
[0101] By adjusting the weight λ of the penalty term, control the deviation degree of the slack variables, so as to ensure that the final lending risk control model can find the optimal solution in a wider solution space on the basis of meeting the constraint conditions.
[0102] The working principle of the above technical solution is as follows: The lending risk control model usually contains complex constraint conditions, such as the upper limit of the loan amount, repayment ability, credit score, etc. These constraint conditions make the solution space too narrow, making it difficult to find a suitable solution. In this case, the linear relaxation technique is used to relax some constraints. By introducing slack variables, the original discrete constraints are transformed into continuous constraints, thereby expanding the solution space. In this way, the algorithm can explore more potential solutions to better adapt to the diversity of lending data and actual business requirements.
[0103] Let the original constraint be a i ≤b i , where a i is a variable related to the loan application, and b i is the corresponding constraint threshold. By introducing the slack variable ∈ i ≥0, the constraint is relaxed to a i ≤b i +∈ i . In this way, the solution space after relaxation contains additional solutions that were originally restricted by strict constraint conditions.
[0104] Although slack variables expand the solution space, unrestricted addition of slack variables causes the solution to deviate from actual business requirements and reduces the feasibility of the solution. To address this issue, the penalty term technique needs to be introduced. By adding a penalty term to the objective function, the value of the slack variable is restricted to ensure that while the constraints are relaxed, the solution does not deviate excessively from the actual business objectives. The weight λ of the penalty term is used to balance the quality of the solution (i.e., the degree of meeting business requirements) and computational efficiency.
[0105] Assume the objective function is f(x), and the form of the objective function after introducing the penalty term is:
[0106]
[0107] where λ is the weight of the penalty term, used to control the influence size of the slack variable ∈ i . The setting of the weight needs to be adjusted according to actual requirements.
[0108] MCKP (Multiple Choice Knapsack Problem) is a classical combinatorial optimization problem, suitable for solving the optimal selection problem with multiple choices and constraints. After the relaxation process of the lending risk control model, the original constraints and objective function may no longer be directly applicable. Therefore, it is necessary to remap these processed constraints and objectives into the standard structure of MCKP. This transformation helps to apply mature MCKP solving algorithms and further optimize the decision-making process of lending risk control.
[0109] For each choice or decision variable x i in the relaxed lending risk control model, as well as the corresponding constraint a i ≤ b i + ∈ i they are transformed into decision variables and constraints in MCKP. Generally, the standard form of MCKP is:
[0110]
[0111]
[0112] where c i represents the revenue, ω i represents the resource consumption, and W represents the total amount of resources. The revenue, risk, and slack variables of the lending risk control model are correspondingly mapped to c i and ω i , and W is adjusted to conform to the structure of the MCKP problem.
[0113] The beneficial effects of the above technical solution are as follows: Through the linear relaxation technique, the model after relaxation processing has a larger solution space, can better adapt to the diversity of different lending data, and improve the applicability of the model; By introducing the penalty term technique, while expanding the solution space, the model effectively controls the influence of the relaxation variables, ensuring that the final solution does not deviate too much from the actual requirements. The process of adjusting the penalty term weight provides a flexible means of balancing the solution quality and computational efficiency; Converting the relaxed model into the MCKP form and using the mature MCKP solving algorithm realizes the further optimization of the lending risk control decision-making process, reduces the solving difficulty, and improves the solving speed and interpretability of the solution at the same time; Through the above processing, the lending risk control model can not only be applied under a wider range of data conditions, but also improve the processing efficiency by using the standardized MCKP solving method, which has obvious advantages in dealing with large-scale lending data.
[0114] In another embodiment, step S102 includes:
[0115] S1021: Based on the dominance theory, perform initial preprocessing on the converted MCKP. By analyzing the dominance relationship of each lending option, comparing the benefits and costs of each solution, identify and exclude all non-dominated solutions within the complexity of O(n^2), and generate a simplified problem set that only includes effective dominated solutions;
[0116] S1022: Analyze the simplified problem set, apply the slope optimization method, calculate the benefit-cost ratio of each solution, determine the optimal slope parameter for optimizing the lending portfolio selection, and mark the slope range with potential optimal benefits;
[0117] S1023: Based on the optimal slope parameter, sort each lending option in the simplified problem set and perform a step-by-step screening operation to generate a list of candidate lending portfolios, ensuring that all candidate portfolios meet the slope optimization criteria.
[0118] Among them, generating a simplified problem set that only includes effective dominated solutions includes:
[0119] Perform dominance relationship analysis on each lending option, and based on the comparison of benefits and costs, determine whether there is a dominance relationship;
[0120] For any pair of lending options (x i , x j ), if the benefit c i ≥c j and the cost ω i ≤ω j , then the solution x j is dominated by x i , and x j can be excluded;
[0121] For each pair of borrowing and lending options, perform a similar comparison and iterate through all pairs of borrowing and lending options to identify all dominance relationships within O(n2) complexity and eliminate non-dominated solutions, ultimately generating a simplified problem set that only contains valid dominant solutions;
[0122] This simplified problem set is used as input for subsequent multi-dimensional knapsack problem solving, thereby reducing computational complexity and improving the solving efficiency.
[0123] The comparison step includes the following specific operations:
[0124] Obtain the benefit value c i , c j and the cost value ω i , ω j ;
[0125] Compare the benefits and costs of each pair of borrowing and lending options. If c i ≥ c j and ω i ≤ ω j , then the solution x j is considered to be dominated by x i ;
[0126] For each pair of borrowing and lending options, perform the above comparison operation and eliminate all dominated solutions.
[0127] Among them, the step of judging the dominance relationship within O(n2) complexity is specifically as follows:
[0128] For each pair of borrowing and lending options (x i , x j ), perform the following judgment: If the benefit of the solution x j is less than or equal to the benefit of the solution (x i ), and the cost of the solution x j is greater than or equal to the cost of the solution (x i ), then the solution x j is dominated by the solution (x i ) and should be excluded;
[0129] This process iterates through all pairs of borrowing and lending options, ultimately excluding all non-dominated solutions and generating a simplified problem set that only contains valid dominant solutions.
[0130] The generated simplified problem set is used for subsequent solving processes. The simplified problem set only contains those solutions whose benefits are greater than or equal to those of other solutions and whose costs are not greater than those of other solutions, thereby reducing the impact of invalid solutions on the calculation and improving the solving efficiency.
[0131] By identifying and eliminating all non-dominated solutions within O(n2) complexity, the solution space can be effectively reduced in large-scale MCKP problems, thereby improving the overall efficiency and accuracy of problem-solving.
[0132] Through the operation of judging and eliminating non-dominated solutions by dominance relationship, it is possible to eliminate one by one those solutions that do not have advantages in terms of benefits and costs for each lending option pair, thereby ensuring that the final output of the simplified problem set only contains the optimal solutions.
[0133] The working principle of the above technical solution is as follows: In the Multiple Choice Knapsack Problem (MCKP), each lending option (or solution) may have different benefits and costs. The Dominance theory is used to analyze and compare the advantages and disadvantages of different solutions. A solution is said to "dominate" another solution when it has lower costs under the same or higher benefits, or higher benefits under the same or lower costs. By identifying and eliminating these dominated solutions, the problem set can be simplified, the computational complexity can be reduced, and the efficiency of subsequent problem-solving can be improved.
[0134] For each pair of lending options (x i , x j ), compare the corresponding benefits c i , c j and costs ω i , ω j . If c i ≥ c j and ω i ≤ ω j , then the solution x j is dominated by x i , and x j can be excluded. This process is performed for each pair of lending options, with a time complexity of O(n 2 ), and finally a simplified problem set containing only valid dominant solutions is generated.
[0135] Among them, x i , x j represent two different lending options. Suppose we have a set of lending options, and each lending option can be identified by an index, such as x1, x2,..., x n . Among them, x i represents the i-th lending option, and x j represents the j-th lending option. c i , c j represent the benefits associated with the lending options, c i is the benefit of the i-th lending option, and c j is the benefit of the j-th lending option. ω i , ω jRepresents the costs associated with borrowing options. The costs include the risks and fees of borrowing, ω i is the cost of the i-th borrowing option, ω j is the cost of the j-th borrowing option.
[0136] In the simplified problem set, there are still multiple potential optimal solutions. To further optimize the borrowing portfolio selection, the slope optimization method can be used. Slope optimization determines which solution provides the highest benefit-cost ratio by calculating the ratio of the benefit to the cost (i.e., the slope) of each solution, thereby identifying the optimal choice.
[0137] For each borrowing option x i , calculate the ratio of its benefit to the cost (slope) Then, sort based on these slopes to determine the optimal slope parameter θ for optimizing the borrowing portfolio * . This process also marks the slope range with potential optimal benefits, i.e., the solutions within this range are most likely to provide the best balance between benefits and costs.
[0138] To finally determine the optimal borrowing portfolio, based on the optimal slope parameter determined in the previous step, sort the solutions in the simplified problem set and generate a list of candidate combinations through step-by-step screening. This step ensures that all generated candidate combinations meet the slope optimization criteria, thereby improving the accuracy and reliability of the overall decision-making.
[0139] Sort the borrowing options in the simplified problem set according to their slope θ i from high to low. Then, gradually screen out the borrowing portfolios that meet the optimal slope parameter θ * . The screening operation includes excluding solutions that do not meet the slope criteria or preferentially selecting solutions with high slopes under the constraint conditions. Finally, a list of candidate borrowing portfolios is generated, and these combinations meet the slope optimization criteria and achieve an optimal balance between benefits and costs.
[0140] The beneficial effects of the above technical solutions are as follows: By applying the dominance theory, non-dominated solutions are initially screened out, effectively simplifying the problem set and reducing the complexity and computational cost of subsequent solutions; The slope optimization method can more accurately identify the optimal borrowing options through the analysis of the benefit-cost ratio, which provides a scientific decision-making basis for the final borrowing portfolio selection; Sorting and screening operations based on the optimal slope parameter further reduce the number of combinations to be evaluated, improve the solution efficiency, and ensure the optimal balance between benefits and costs of the selected combinations; Through these optimization steps, the borrowing risk control model can more flexibly adapt to different business scenarios and data changes, improving the applicability and effectiveness of the model in practical applications.
[0141] In another embodiment, step S103 includes:
[0142] Based on the split theory, extract the initial solution space from the solution space of the lending portfolio, use the optimal slope parameter to determine the minimum solution space and the maximum solution space in the initial solution space, and output the identifier of this solution space;
[0143] Determine all possible sub - portfolios in the lending portfolio, calculate the objective function value under the optimal slope parameter in each sub - portfolio, and judge whether this sub - portfolio is the minimum solution space or the maximum solution space according to the obtained result;
[0144] Control the output of the calculation results at each step, and determine the identifier of the solution space required for the next calculation until all sub - portfolios are traversed;
[0145] During the traversal process, apply the greedy algorithm to gradually update the optimal solution in the current solution space to ensure finding the final solution of the lending portfolio within the O(n) linear complexity.
[0146] The working principle of the above - mentioned technical solution is as follows: The Split theory is used to divide the complex solution space into smaller subsets for more efficient solution. By extracting the initial solution space from the solution space of the lending portfolio and using the optimal slope parameter, the solution space can be divided into two parts: the minimum solution space and the maximum solution space. This process helps to analyze and solve more precisely within a smaller range and reduce the computational complexity.
[0147] First, divide the solution space of the entire lending portfolio according to the optimal slope parameter and extract the initial solution space. Then, determine the boundaries of the minimum solution space and the maximum solution space in this initial solution space. These two solution spaces respectively contain possible optimal solutions and sub - optimal solutions. Finally, output the identifiers of these solution spaces for subsequent calculations.
[0148] To comprehensively explore all possible combinations in the solution space, a full - combination analysis of the lending portfolio is required. This process can ensure that no possible optimal solution is missed. At the same time, by calculating the objective function value (such as revenue or cost) in each sub - portfolio, it can be judged whether this sub - portfolio belongs to the minimum or maximum solution space divided previously, thereby further optimizing the solution process. Generate all possible sub - portfolios, and then calculate the objective function value under the optimal slope parameter for each sub - portfolio. According to the calculation results, judge whether this sub - portfolio meets the criteria of the minimum solution space or the maximum solution space. If it meets the criteria, mark this sub - portfolio and record its identifier for subsequent optimization operations.
[0149] Gradually outputting the calculation results and solution space identifiers helps to track and control the calculation progress of each step. By determining the solution space identifier required for the next calculation, unnecessary calculations can be effectively reduced, further improving the solution efficiency. After each step of calculation, output the current calculation result and the corresponding solution space identifier, and determine which solution space needs to be analyzed for the next calculation. This process continues until all sub-combinations are traversed.
[0150] The greedy algorithm gradually approaches the global optimal solution through local optimal selection. Since the solution space has been preprocessed by split and slope optimization, the optimal solution in the current solution space can be found by the greedy algorithm within the linear complexity of O(n), thus quickly obtaining the final borrowing and lending combination. During the traversal process, each time the optimal solution in the current solution space is updated, the locally optimal sub-combination is selected (i.e., the combination with the current optimal slope value or the highest ratio of revenue to cost). Through gradual updates, the optimal solution in the entire solution space is finally found, and this solution is output as the final borrowing and lending combination.
[0151] The beneficial effects of the above technical solutions are as follows: Through the extraction of the initial solution space of the split theory and the application of the greedy algorithm, the solution space can be efficiently reduced and the solution process can be optimized in each step, so as to find the final solution within the linear complexity of O(n). By gradually outputting the calculation results and solution space identifiers to control the calculation process, unnecessary repeated calculations are avoided, and the use of computing resources is optimized. By traversing and analyzing all possible sub-combinations and combining slope optimization and the greedy algorithm, it is ensured that the globally optimal borrowing and lending combination solution can be found. This method can adapt to larger-scale borrowing and lending combination solving problems, and can be adjusted and optimized according to different business scenarios, improving the practicality and flexibility of the algorithm.
[0152] In another embodiment, step S104 includes:
[0153] Based on the linear relaxation theory, control the extraction of the linear relaxation solution from the initial solution space of the borrowing and lending combination, and determine the solution space identifier of this relaxation solution;
[0154] Apply the integer programming theory to integerize the linear relaxation solution, gradually adjust the values of each variable in the solution space to meet the constraints of integer programming, and output the adjusted solution space identifier;
[0155] During the adjustment process, calculate the change in the solution space generated by each adjustment step, determine the impact on the accuracy of the final solution, and perform real-time control on the accuracy of the solution, and output the intermediate results of accuracy control;
[0156] After each adjustment, the accuracy evaluation function is applied to calculate the difference between the integer solution and the linear relaxation solution in the current solution space to ensure that the accuracy of the final solution meets the predetermined requirements;
[0157] Based on the intermediate results of the aforementioned accuracy control, an integer solution that meets the accuracy requirements is generated, and the borrowing and lending portfolio identifier corresponding to this solution is determined;
[0158] Summarize the results of all calculation steps to generate the final solution list of the borrowing and lending portfolio, ensuring that while maximizing the return, the predetermined risk tolerance is met.
[0159] The working principle of the above technical solution is as follows: First, the borrowing and lending portfolio problem is represented by an integer programming model. The goal of this problem is usually to maximize the return of the borrowing and lending portfolio while meeting certain risk control conditions (such as volatility, default probability, etc.). The form of the integer programming problem is as follows:
[0160]
[0161] where, r i represents the expected return of the i-th borrowing and lending item, and x i represents the decision variable for selecting the i-th borrowing and lending item (0 or 1, indicating whether to select the item).
[0162] The constraint conditions include:
[0163]
[0164] In linear relaxation, we relax the integer constraint x i ∈ {0, 1} into a continuous constraint (0 ≤ x i ≤ 1). Therefore, the original problem becomes a linear programming problem, and the solution objective is:
[0165]
[0166] And the constraint conditions become:
[0167]
[0168] Although the linear relaxation solution can obtain a reasonable approximate solution, due to the relaxation of the integer constraint, it cannot directly meet the exact requirements of the integer programming. Therefore, it is necessary to convert the relaxation solution into an integer solution through integerization processing.
[0169] In this process, the greedy algorithm is adopted for gradual adjustment:
[0170] First, extract the item closest to 1 from the linear relaxation solution as the integer solution. For example, if x1 = 1 and x2 = 1, the first two items are selected according to the return size.
[0171] For the remaining part, a threshold strategy is used. For example, when x3 = 0.5, x3 or other items can be selected through a greedy strategy.
[0172] In this process, we gradually adjust the values of various variables in the solution space to ensure that each adjustment gets closer to the target solution.
[0173] During the integerization adjustment process, each adjustment will cause changes in the solution space, and these changes will affect the accuracy of the final solution. To control the accuracy of the solution, an accuracy evaluation function is used to calculate the difference between the current solution and the linear relaxation solution:
[0174]
[0175] where represents the integer solution, represents the linear relaxation solution.
[0176] After each adjustment of the solution, the difference between the current integer solution and the relaxation solution is calculated to evaluate its accuracy. If the difference is too large, it may be necessary to backtrack and try other solution adjustment strategies.
[0177] Through the above adjustment process, we will finally generate an integer solution that satisfies the integer programming constraints, and the accuracy of this solution has been controlled, and the error meets the predetermined requirements.
[0178] Finally, after the above steps, the integer solution we obtain will form the final lending and borrowing portfolio.
[0179] The beneficial effects of the above technical solution are as follows: The integer variable constraints in the original problem are relaxed to continuous variables, and linear programming algorithms such as the simplex method are used to solve the relaxed problem, obtaining a linear relaxation solution and its corresponding solution space. Linear relaxation can reduce the complexity of the problem and provide a good starting point for subsequent integerization. Linear programming problems are easier to solve than integer programming problems, and their optimal solutions are upper bounds of the optimal solutions of integer programming problems. The purpose of this step is to transform the linear relaxation solution into a solution that satisfies integer constraints. Starting from the linear relaxation solution, gradually round the variables; use integer programming algorithms such as the branch and bound method; check the integer constraints at each step and adjust the variable values accordingly; output the solution space that satisfies the integer constraints. Integer programming theory provides a series of methods to handle discrete optimization problems. Through gradual adjustment, the continuous solution can be transformed into an integer solution while maintaining the feasibility of the problem. Define a precision evaluation function, such as the difference between the objective function value and the linear relaxation solution; calculate the precision of the current solution after each adjustment; set a precision threshold to control the integerization process; output the intermediate results of precision control. Precision control can balance the integerity and optimality of the solution. By monitoring the quality of the solution in real time, high-quality integer solutions can be obtained within a reasonable calculation time. Map the final integer solution to specific lending decision variables; generate the identification and detailed information of the lending portfolio; summarize the results of all calculation steps; output the final lending portfolio list.
[0180] In another embodiment, step S105 includes:
[0181] Initialize the vectorization operation module through the control system and input the initial data from the first-step data processing task;
[0182] Determine the vectorization processing path of the data processing task, including the vectorization decomposition of the operations of each step of the processing task, and generate corresponding operation instructions;
[0183] Perform vectorization operations on each data processing task, determine the optimal resource configuration and parallel processing strategy required during the operation, and ensure the execution efficiency of each processing task;
[0184] Monitor the execution of each step of vectorization operation in real time, analyze the possible bottlenecks during the operation, and dynamically adjust the operation parameters to ensure that all operations are executed at the theoretically fastest speed;
[0185] After the operation is completed, collect and organize the result data of all vectorization operations, generate a processing report, and output the instruction set for the next-step data processing task;
[0186] Repeat the above steps until all data processing tasks are completed;
[0187] Update the parameter configuration of the vectorized operation module based on the execution efficiency and result data of each data processing task to optimize the processing speed and accuracy of subsequent tasks.
[0188] The working principle of the above technical solution is as follows: The vectorized operation module needs to be initialized before data processing. This process includes loading necessary libraries, configuring hardware resources (such as SIMD instruction sets, GPU cores, etc.), and preparing appropriate caches and registers for vector operations.
[0189] Suppose we want to process a large-scale image dataset. The initialization operations include:
[0190] Configure the number of computing cores of the GPU and determine the workload of each GPU core.
[0191] Set the SIMD instruction set (such as AVX, NEON, etc.) to ensure that the CPU can efficiently process multiple data points in parallel.
[0192] Initialize the image data cache, load the image data into memory and preprocess it according to vectorization requirements to ensure that the data can be efficiently transferred to the GPU or other computing devices.
[0193] The system will analyze the data processing tasks and determine the vectorized decomposition strategy for each processing step. The vectorized processing path is the parallel operation method for each task, and the goal is to process each data point in parallel as much as possible and reduce serial computing.
[0194] Taking the image processing task as an example, the tasks include:
[0195] Image grayscale conversion: The RGB values of each pixel point need to be converted to grayscale values. This can be accomplished through vectorized operations, that is, processing multiple pixels at a time.
[0196] Image filtering: For example, applying a Gaussian blur operation. Gaussian filtering needs to process the neighborhood around each pixel, which can be accelerated by performing parallel calculations on multiple pixels at once.
[0197] In this step, the system will generate vectorized instructions for the operation, such as using SIMD instructions to process the RGB-to-grayscale conversion of multiple pixels at a time.
[0198] When performing vectorized operations, the system needs to select the most suitable resource configuration, including:
[0199] How to allocate computing cores (CPU, GPU cores, etc.).
[0200] How to allocate data blocks to achieve efficient memory access.
[0201] Determine the parallel computing strategy and utilize multiple processing units to process multiple data blocks simultaneously.
[0202] For the image grayscale task, assume the image is 1024×1024 pixels. The system divides the image data into multiple small blocks, and each processing unit (such as a GPU core) processes all the pixels of one image block simultaneously. In this way, the RGB to grayscale value conversion of each pixel can be processed in parallel on multiple cores.
[0203] If the system detects uneven load on a certain GPU core during processing, it will dynamically adjust the resource configuration and reallocate tasks to the less loaded computing cores to ensure maximum efficiency.
[0204] During the vectorization operation process, the system needs to monitor the execution of each step in real time. By monitoring the bottlenecks in the operation process (such as insufficient memory bandwidth, overloaded computing cores, etc.), the system can dynamically adjust the operation parameters to optimize the performance.
[0205] During the image filtering process, assume that the memory bandwidth becomes the bottleneck, resulting in a slow processing speed. At this time, the system can automatically reduce the granularity of parallel computing, avoid loading too much data into the memory at one time, or split the task into more small blocks for calculation, thereby alleviating the memory bandwidth pressure.
[0206] After the task is completed, the system will collect all the results of the vectorization operations and organize them into a report. These result data not only include the operation results but also important information such as the task execution time and resource usage. These data will provide a basis for generating instructions for the next task.
[0207] For the image processing task, the system will:
[0208] Output the processed image data (such as the image after grayscaling or filtering).
[0209] Collect the time data during the processing and generate a report, such as "Image grayscaling time: 10 milliseconds".
[0210] Generate an instruction set for the next task, such as performing edge detection on the processed image.
[0211] After all data processing tasks are completed, the system will update the parameter configuration of the vectorization operation module based on the execution efficiency and result data of each task. The goal of this step is to continuously optimize the execution strategy of the vectorization task through learning and feedback, improving the processing speed and accuracy of subsequent tasks.
[0212] After completing the image processing, the system finds that the computational efficiency of some processing steps is low (such as the filtering stage), and it will update the parameters of the vectorization operation module according to the execution results of these tasks, such as:
[0213] Modify the task allocation strategy to make the load of computing cores more balanced.
[0214] Adjust the usage strategy of memory cache to improve data access efficiency.
[0215] The beneficial effects of the above technical solutions are as follows: Through vectorization and parallel processing, the system can process a large amount of data simultaneously, significantly reducing the overall processing time. For example, an image dataset that originally took several hours to process can be completed within a few minutes; dynamic resource allocation ensures the efficient use of computing resources. This not only improves processing efficiency but also may reduce energy consumption, which is particularly important for large-scale data centers; real-time monitoring and dynamic adjustment mechanisms ensure the high quality of processing results. The vectorization processing method makes the system more adaptable to new hardware architectures, such as more powerful GPUs or dedicated AI chips, thus improving the scalability of the system.
[0216] In another embodiment, determining the optimal slope parameter for optimizing the selection of lending portfolios includes:
[0217] Receive and import the simplified lending problem set, and initialize the parameters and characteristics of the lending portfolio;
[0218] For each lending portfolio, determine the corresponding revenue and cost data;
[0219] For each lending portfolio, apply the slope optimization method to calculate the revenue-to-cost ratio of the lending portfolio, where the calculation formula for the revenue-to-cost ratio is:
[0220]
[0221] Generate the slope parameter for each lending portfolio according to the calculated revenue-to-cost ratio;
[0222] Sort the slope parameters of all lending portfolios and mark the intervals where the slope values are located;
[0223] Determine the slope range with potential optimal revenue through the analysis of the sorting results of the slope parameters;
[0224] Based on the analysis results, determine the optimal slope parameter from the slope range for optimizing the selection of lending portfolios;
[0225] Output the lending portfolio marked with the optimal slope parameter and the corresponding revenue-to-cost ratio.
[0226] The working principle of the above technical solution is as follows: Receive and import the simplified loan problem set, and initialize the parameters and characteristics of the loan portfolio: Read the loan problem set from the data source (such as a database or a file), parse the data, extract the key parameters of each loan portfolio (such as loan amount, interest rate, term, etc.), and initialize the data structure (such as a dictionary in Python or a pandas DataFrame) to store these parameters. This step lays the foundation for subsequent analysis, ensuring that all necessary data is correctly loaded and organized. The structured storage of data facilitates subsequent efficient processing and analysis.
[0227] For each loan portfolio, determine the corresponding revenue and cost data: Traverse each loan portfolio, calculate the total revenue of each portfolio (such as interest income), and calculate the total cost of each portfolio (such as cost of funds, operating costs, expected losses, etc.); accurately calculating revenue and cost is the key to evaluating the effectiveness of loan portfolios. This may involve complex financial models, such as the discounted cash flow model or the risk-adjusted return model.
[0228] For each loan portfolio, apply the slope optimization method to calculate the revenue-to-cost ratio of the loan portfolio: Use the formula: Revenue-to-cost ratio = Total revenue of the portfolio / Total cost of the portfolio, and apply this formula to each loan portfolio. The revenue-to-cost ratio is an important efficiency indicator, which reflects the revenue generated per unit of cost. The higher this ratio, the higher the efficiency of the loan portfolio.
[0229] Based on the calculated revenue-to-cost ratio, generate the slope parameter for each loan portfolio: Treat the revenue-to-cost ratio as the slope and assign a unique slope parameter to each loan portfolio; the slope parameter is actually the revenue-to-cost ratio, which represents the efficiency of the loan portfolio. In a graphical representation, the steeper this slope, the higher the efficiency.
[0230] Sort the slope parameters of all loan portfolios and mark the intervals where the slope values are located: Use a sorting algorithm (such as quicksort) to sort the slope parameters in descending order, determine the distribution range of the slope values, and divide the slope values into several intervals (such as the quartile method); sorting helps to intuitively see which loan portfolios are the most efficient, and interval division helps to understand the distribution of slope parameters, providing a basis for subsequent analysis.
[0231] Through the analysis of the sorted results of the slope parameters, determine the slope range with potential optimal revenue: Analyze the distribution characteristics of the slope parameters (such as mean, median, standard deviation, etc.), identify the concentrated area of the slope parameters, and determine a slope range that includes high-efficiency loan portfolios; this step aims to narrow down the search range for the optimal solution. Through statistical analysis, we can find a slope interval that contains the optimal solution, rather than blindly searching all possibilities.
[0232] Based on the analysis results, determine the optimal slope parameter within the slope range for optimizing the selection of lending and borrowing portfolios: conduct a fine search within the determined slope range, considering other constraints (such as risk limits, capital limits, etc.), and select the parameter with the highest slope that meets all conditions as the optimal slope parameter; this step involves multi-objective optimization theory, and we need to consider not only efficiency (slope) but also other practical constraints to find the optimal solution in actual operations.
[0233] Output the lending and borrowing portfolios marked with the optimal slope parameter and the corresponding benefit-cost ratio: screen the corresponding lending and borrowing portfolios according to the optimal slope parameter, generate a report containing the detailed information of these portfolios, and output the report, which may include visual displays (such as scatter plots, heat maps, etc.); this step transforms the analysis results into actionable information and provides clear guidance for decision-makers. The visual display helps to intuitively understand the optimization results.
[0234] The beneficial effects of the above technical solution are as follows: through a systematic analysis and optimization process, decision-makers can quickly identify the most potential lending and borrowing portfolios, greatly improving the decision-making efficiency. By optimizing the benefit-cost ratio, the system helps financial institutions maximize their benefits at a given risk level. Although mainly focusing on the benefit-cost ratio, risk factors are also considered in the optimization process, which helps to balance benefits and risks.
[0235] In another embodiment, determine whether the sub-portfolio is the minimum solution space or the maximum solution space according to the obtained results, including:
[0236] For each sub-portfolio in the lending and borrowing portfolio, calculate the objective function value under the optimal slope parameter of the sub-portfolio. The objective function calculation formula is:
[0237]
[0238] where ω i represents the weight of the i-th item, Ri represents the benefit of the i-th item, and Ci represents the cost of the i-th item;
[0239] According to the calculation results, calculate the benefit-cost ratio of each solution and record the ratio value;
[0240] Judge whether the objective function value of each sub-portfolio reaches the criteria of the minimum solution space or the maximum solution space under the optimal slope parameter;
[0241] Based on the calculation results of all sub-portfolios, generate a list containing the objective function values and benefit-cost ratios under the optimal slope parameters of each sub-portfolio, and output the list;
[0242] According to the results in the list, judge whether the sub-portfolio belongs to the minimum solution space or the maximum solution space, and generate the final solution space identifier;
[0243] Output the solution space identifier to complete the judgment process.
[0244] The working principle of the above technical solution is as follows: Calculate the ratio of revenue to cost for each sub - combination and record it. This ratio can intuitively reflect the efficiency of the sub - combination; Compare the objective function value of each sub - combination with the preset minimum and maximum solution space criteria to determine whether the optimum is reached. This step can screen out the best - performing sub - combinations. Based on the previous calculations, generate a list containing all sub - combination information, including the objective function value, revenue - cost ratio, etc. This list provides a comprehensive comparison view.
[0245] According to the list results, determine whether each sub - combination belongs to the minimum or maximum solution space and give the corresponding identifier. This step clarifies the optimization degree of each sub - combination. Finally, output the solution space identifier to complete the entire judgment process. This provides a clear conclusion for decision - making.
[0246] The beneficial effects of the above technical solution are as follows: By identifying the minimum solution space, the lending risk can be effectively controlled; By identifying the maximum solution space, the maximization of revenue can be achieved.
[0247] In another embodiment, determining the vectorized processing path of the data processing task includes:
[0248] Determine the matrix representation form D0 of the data and generate the corresponding vectorized processing instructions;
[0249] Perform vectorized decomposition on the initial data D0 to determine the operation matrix M i for each processing task T i , and generate the vectorized operation path through the calculation formula V i = M i ×D0, where V i represents the vectorized result of the current processing task;
[0250] Based on the vectorized operation path, sequentially execute the operations of each data processing task, and transfer the vectorized result V i of each step to the input of the next processing task to update the data matrix D i+1 = V i ;
[0251] Control the vectorized operation module to perform parallel operations on each step of the operation in the processing path to generate the final data processing result D n , and output the corresponding vectorized processing path identifier;
[0252] Generate a task processing result list and output it based on the final vectorized processing path.
[0253] The working principle of the above technical solution is as follows: Data matrix representation and instruction generation: Convert the initial data into matrix form D0. This representation method can better adapt to vectorized operations. Based on D0, generate corresponding vectorized processing instructions. These instructions will guide subsequent vectorized operations.
[0254] Vectorized decomposition and operation path generation: Decompose the entire data processing task into a series of subtasks T i ; For each subtask T i Determine an operation matrix M i . Use the formula V i = M i ×D0 to calculate the vectorized result of each subtask. The multiplication here is matrix multiplication. Through these calculations, generate a complete vectorized operation path.
[0255] Sequential execution of processing tasks: According to the generated operation path, sequentially execute each data processing task. The output V of each step i is used as the input for the next step to update the data matrix: D i+1 = V i , this way ensures the continuity and consistency of data processing.
[0256] Parallel operation control: Use the vectorized operation module to perform parallel calculations on each step of the operation. This parallel processing significantly improves the operation efficiency and finally generates the data processing result D n , and output the corresponding processing path identifier.
[0257] Result list generation: Based on the final vectorized processing path, generate a detailed task processing result list; this list contains the key information of the entire processing process.
[0258] The beneficial effects of the above technical solution are as follows: Vectorized operations allow multiple data elements to be processed simultaneously, greatly improving the calculation speed; Parallel operations further accelerate the processing speed, especially for large-scale data; Matrix-form data representation helps to more effectively utilize memory and cache; Vectorized operations can usually reduce rounding errors and improve calculation accuracy.
[0259] In another embodiment, a program product for solving the MCKP problem includes computer instructions that, when executed by a processor, implement the steps of the method for solving the MCKP problem described in any one of the above.
[0260] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these changes and modifications.
Claims
1. A method for solving the MCKP problem, characterized in that: include: S101: Based on linear relaxation technology and penalty term technology, the loan risk control model is relaxed and converted into a multi-choice knapsack MCKP problem; S102: Preprocess the converted MCKP problem based on dominance theory, eliminate non-dominated solutions within the quadratic complexity O(n^2), and determine the optimal slope parameter, where the optimal slope parameter is used to optimize the selection strategy of the loan portfolio; S103: Based on the split theory, using the optimal slope parameter, find the minimum solution space and the maximum solution space in the solution space of the loan combination, and solve the final solution of the loan combination within the linear complexity O(n) through the greedy algorithm; S104: Based on the linear relaxation theory and integer programming theory, the precision control result of the final solution is calculated to determine whether the selected loan portfolio meets the predetermined risk tolerance while maximizing the return; S105: When the preset risk tolerance is met, vectorized computing is used to accelerate data processing during the loan risk control process.
2. A method for solving the MCKP problem according to claim 1, characterized in that: Step S101 also includes: S1011: Based on the linear relaxation technology, the initial constraints of the loan risk control model are relaxed to determine the relaxation variables; S1012: Apply penalty term technology to constrain the slack variables so that while expanding the solution space, the relaxed solution will not deviate from the actual business needs. The penalty term is introduced into the objective function and the weight is adjusted. S1013: After completing the relaxation process, redefine the variables and constraints of the MCKP problem, map the core objectives and constraints of the loan risk control model to the standard structure of MCKP, and output the converted model identifier.
3. A method for solving the MCKP problem according to claim 1, characterized in that: Step S102 includes: S1021: Analyze the dominance relationship of various lending options based on preprocessing, compare the benefits and costs of each solution, and generate a simplified problem set that only includes valid dominance solutions; S1022: Analyze the simplified problem by applying the slope optimization method, calculate the benefit-cost ratio of each solution, determine the optimal slope parameter for optimizing the loan portfolio selection, and mark the slope range with potential optimal benefits; S1023: Based on the optimal slope parameter, sort the various lending options in the simplified problem set, and perform a step-by-step screening operation to generate a list of candidate lending combinations to ensure that all candidate combinations meet the slope optimization standard.
4. A method for solving the MCKP problem according to claim 1, characterized in that: Step S103 includes: Based on the split theory, the initial solution space is extracted from the solution space of the loan combination, and the minimum solution space and the maximum solution space in the initial solution space are determined by using the optimal slope parameter, and the identification of the solution space is output; Determine all possible sub-combinations in the loan portfolio, and calculate the objective function value under the optimal slope parameter in each sub-combination, and determine whether the sub-combination is the minimum solution space or the maximum solution space based on the obtained results; Control the output of the calculation results of each step and determine the solution space identifier required for the next calculation until the traversal of all sub-combinations is completed; During the traversal process, a greedy algorithm is applied to gradually update the optimal solution in the current solution space to ensure that the final solution of the loan combination is found within O(n) linear complexity.
5. A method for solving the MCKP problem according to claim 1, characterized in that: Step S104 includes: Based on the linear relaxation theory, the control extracts the linear relaxation solution from the initial solution space of the loan portfolio and determines the solution space identifier of the relaxation solution; Applying integer programming theory, performing integer processing on the linear relaxation solution, gradually adjusting the values of each variable in the solution space to meet the constraints of the integer programming, and outputting the adjusted solution space identifier; During the adjustment process, the solution space changes caused by each adjustment step are calculated to determine the impact on the accuracy of the final solution, and the accuracy of the solution is controlled in real time, and the intermediate results of the accuracy control are output; After each adjustment, the control applies an accuracy evaluation function to calculate the difference between the integer solution and the linear relaxation solution in the current solution space to ensure that the accuracy of the final solution meets the predetermined requirements; Based on the intermediate results of precision control, an integer solution that meets the precision requirements is generated, and the debit and credit combination identifier corresponding to the integer solution is determined; Summarize the results of all calculation steps, generate a final solution list for the loan portfolio, and determine the final solution that maximizes returns and meets the predetermined risk tolerance.
6. A method for solving the MCKP problem according to claim 1, characterized in that: Step S105 includes: Initialize the vectorized operation module through the control system and input the initial data from the first step of data processing task; Determine a vectorized processing path for the data processing task, wherein the vectorized processing path includes vectorized decomposition of operations for each step of the processing task and generates corresponding operation instructions; Perform vectorized operations on each data processing task, determine the optimal resource configuration and parallel processing strategy required during the operation, and ensure that the execution efficiency of each processing task meets the preset target execution efficiency; Monitor the execution status of each step of vectorized operation in real time, analyze the bottleneck information that may appear during the operation, and dynamically adjust the operation parameters according to the bottleneck information and execution status to ensure that all operations are executed at the fastest theoretical speed; After the operation is completed, collect and organize the result data of all vectorized operations, generate a processing report, and output the instruction set for the next data processing task; Repeat the above steps until all data processing tasks are completed; Based on the execution efficiency and result data of each data processing task, update the parameter configuration of the vectorized operation module.
7. A method for solving the MCKP problem according to claim 3, characterized in that: Determine the optimal slope parameters for optimizing loan portfolio selection, including: Receive and import the simplified loan problem set, and initialize the parameters and characteristics of the loan combination; For each loan portfolio, determine the corresponding income and cost data; For each loan portfolio, the slope optimization method is applied to calculate the benefit-cost ratio of the loan portfolio, where the calculation formula of the benefit-cost ratio is: Generate the slope parameter of each loan portfolio based on the calculated benefit-cost ratio; Sort the slope parameters of all loan combinations and mark the intervals where the slope values are located; By analyzing the ranking results of slope parameters, the slope range with the potential optimal return is determined; Based on the analysis results, the optimal slope parameter is determined from the slope range, and the selection of the loan portfolio is optimized through the optimal slope parameter; Output the loan portfolio marked with the optimal slope parameter and the corresponding benefit-cost ratio.
8. A method for solving the MCKP problem according to claim 4, characterized in that: According to the obtained results, whether the sub-combination is the minimum solution space or the maximum solution space is determined, including: For each sub-portfolio in the loan portfolio, calculate the objective function value under the optimal slope parameter of the sub-portfolio. The objective function calculation formula is: Among them, ω i represents the weight of the i-th item, R i represents the revenue of item i, C i represents the cost of the i-th item; According to the calculation results, obtain the benefit-to-cost ratio of each solution and record the ratio value; Determine whether the objective function value of each sub-combination reaches the minimum solution space or maximum solution space standard under the optimal slope parameter; Based on the calculation results of all sub-combinations, a list containing the objective function values and the benefit-to-cost ratios under the optimal slope parameters of each sub-combination is generated, and the list is output; According to the results in the list, determine whether the sub-combination belongs to the minimum solution space or the maximum solution space, and generate the final solution space identifier; Output the solution space identifier to complete the judgment process.
9. A method for solving the MCKP problem according to claim 6, characterized in that: Determine the vectorized processing path for data processing tasks, including: Determine the matrix representation form D0 of the data and generate corresponding vectorized processing instructions; Vectorize and decompose the initial data D0 to determine the processing task T for each step i The operation matrix M i , by calculating the formula V i =M i ×D0 generates a vectorized operation path, where V i Indicates the vectorization result of the current processing task; Based on the vectorized operation path, the operations of each data processing task are executed in sequence, and the vectorized result V of each step is converted into i Pass the input to the next processing task and update the data matrix D i+1 =V i ; The vectorized operation module is controlled to perform parallel operations on each step in the processing path to generate the final data processing result D n , and output the corresponding vector processing path identifier; Based on the final vectorized processing path, a task processing result list is generated and output.
10. A program product for solving the MCKP problem, comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the method for solving the MCKP problem described in any one of claims 1 to 9 are implemented.