Consumption loan credit calculation method and device based on XGBoost model, and storage medium

Through the consumer loan credit calculation method based on the XGBoost model, screening and optimizing features, combining decision trees and business rules, the problem of financial risk control model contrary to business in specific scenarios is solved, the accuracy and applicability of the model are improved, and the accuracy and applicability of the model are realized. Standard model templates are provided.

CN118941378AInactive Publication Date: 2024-11-12天创信用服务有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411040393.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-11-12
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Pure mathematical models in the field of financial risk control may be contrary to business in specific scenarios, and there is a lack of a unified method of establishing models based on different business scenarios, resulting in poor model reusability.

Method used

The consumer loan credit calculation method based on the XGBoost model is adopted. By obtaining multi-dimensional financial risk control data, filtering feature importance, generating decision trees, optimizing hyperparameters, adjusting feature sets in combination with business rules, and generating final prediction results to obtain consumer loan credit limit .

Benefits of technology

It improves the accuracy and business interpretability of the model, adapts to the business needs of specific scenarios, provides a standard model template, and simplifies the model deployment and application of the same scenario.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118941378A_ABST
    Figure CN118941378A_ABST
Patent Text Reader

Abstract

The invention relates to a consumption loan credit calculation method and device based on an XGBoost model and a storage medium, and is applied to the technical field of financial risk control, and the method comprises the steps: obtaining the financial risk control data of a multi-dimensional business scene as the input of the XGBoost model, screening a first input feature according to the contribution of the feature of each dimension to the target function of the XGBoost model, and obtaining a second input feature of the XGBoost model; the method comprises the following steps: selecting a decision tree, combining features which are not screened so as to generate a rule, respectively calculating the influence of the rule on the bad customer rate of the decision tree, fishing back the partial features which are not screened and adding the partial features into a first input feature, finally carrying out model parameter adjustment by utilizing the screened features, and judging the credit rating of a user through a model after parameter adjustment. On the basis of a pure mathematical model, the idea of an expert model is added, a standard model template of the scene is provided, when the standard model template is subsequently applied to the same scene, data ETL and feature calculation only need to be carried out according to constraints of the model, and cross-platform model files can also be rapidly deployed and applied.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of financial risk control technology, and in particular to a consumer loan credit calculation method, device and storage medium based on an XGBoost model. Background Art

[0002] In the field of financial lending, financial companies usually need to evaluate the user's loan amount based on the user's qualifications. If the amount exceeds the user's repayment range or ability, there is a problem that the loaned account cannot be recovered in time;

[0003] With the rise of big models, models have been developed and applied in various fields. However, in the field of financial risk control, the models of most financial institutions are purely mathematical models. Although they are business interpretable, they may be contrary to the business in specific scenarios. This is because the machine learning model itself cannot understand the business meaning behind the data, and only accurately fits the correct numerical law from the mathematical dimension and the big data probability dimension (for example, age characteristics, the tree model may divide the age into '≥17 years old' and '<17 years old'. This division is obviously contrary to public knowledge, so pure mathematical models may not be suitable for specific business risk control model scenarios; and even though there are general modeling methodologies and workflows in the field of financial risk control, the reusability of data-driven machine learning models is still not well solved. From data sources to features, from algorithms to parameters, even similar scenarios must invest manpower and time to deal with individual problems in general steps, that is, there is no unified method to build models according to different business scenarios. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a consumer loan credit calculation method, device and storage medium based on the XGBoost model, so as to solve the problem that the pure mathematical model used in the field of financial risk control in the prior art has business interpretability, but may be contrary to the business in specific scenarios, and there is no unified method to establish models according to different business scenarios.

[0005] According to a first aspect of an embodiment of the present invention, a method for calculating consumer loan credit based on an XGBoost model is provided, the method comprising:

[0006] Acquire multi-dimensional financial risk control data of the user to be detected, and input the multi-dimensional features of the multi-dimensional financial risk control data of the user to be detected into a pre-built XGBoost model framework;

[0007] The pre-built XGBoost model framework outputs the importance of each feature to the objective function, and takes the features whose importance is greater than or equal to the preset importance threshold as the first input feature set;

[0008] Taking features whose importance is less than a preset importance threshold as a second input feature set; referencing the tree package to train and generate a decision tree for the second input feature set;

[0009] Combining multiple features in the second input feature set into a rule, sorting the bad customer rates corresponding to each rule in the decision tree, selecting features corresponding to multiple rules with the highest bad customer rates and adding them to the first input feature set until a preset termination condition is met;

[0010] Inputting all features in the first input feature set into a decision tree, iteratively optimizing hyperparameters of the decision tree until a preset number of iterations is met, and obtaining a final decision tree;

[0011] Input the first input feature set into each decision tree of the XGBoost model to obtain the final prediction result;

[0012] The consumer loan credit limit of the user to be detected is obtained according to the final prediction result.

[0013] Preferably,

[0014] The step of obtaining the consumer loan credit limit of the user to be detected according to the final prediction result includes:

[0015] Mapping the probability score of the final prediction result into a standard score, and obtaining the credit rating of the user to be detected through the standard score;

[0016] Obtain the net monthly income debt repayment ratio of the user to be tested according to the credit rating of the user to be tested;

[0017] Obtaining the net monthly income of the user to be detected, and obtaining the net monthly income level of the user to be detected according to the net monthly income of the user to be detected;

[0018] Obtain the credit factor of the user to be tested according to the credit rating and net monthly income level of the user to be tested;

[0019] The credit period of the user to be detected is set; and the consumer loan credit limit of the user to be detected is obtained according to the net monthly income, net monthly income debt repayment ratio, credit coefficient and credit period of the user to be detected.

[0020] Preferably;

[0021] The multi-dimensional financial risk control data of the user to be tested includes: People's Bank of China credit data, payment data and multi-head data.

[0022] Preferably,

[0023] The step of inputting the first input feature set into each decision tree of the XGBoost model to obtain a final prediction result includes:

[0024] All features in the first input feature set are input into each decision tree of the XGBoost model respectively, each decision tree generates a prediction weight for each feature at the corresponding node respectively, the prediction weights of all nodes of each decision tree are added together to obtain the prediction weight of each decision tree with respect to the input feature, the maximum prediction weight of all decision trees is selected as the prediction result of the input feature, the prediction results of all features in the first input feature set are added together to obtain the final prediction result.

[0025] Preferably,

[0026] The preset termination conditions include:

[0027] The features in the second input feature set are reduced by 10%, and the overall bad customer rate of the decision tree output is reduced by 3 times.

[0028] Preferably,

[0029] The combining of multiple features in the second input feature set into one rule, sorting the bad customer rates corresponding to each rule in the decision tree, selecting features corresponding to multiple rules with the highest bad customer rates and adding them to the first input feature set until a preset termination condition is met includes:

[0030] Acquire a combination rule for the second input feature set according to the visualization information of the decision tree to construct a rule combination extraction function to obtain a rule data set, wherein the rule data set includes multiple rules, and each rule is composed of a combination of features in multiple second input feature sets;

[0031] Obtaining the first rule with the highest bad customer rate in the decision tree in the rule data set by using the rule combination extraction function, deleting the first rule from the rule data set, and adding multiple features corresponding to the first rule to the first input feature set;

[0032] Reference the rule combination extraction function to obtain the second rule with the highest bad customer rate in the decision tree in the rule data set, delete the second rule from the rule data set, and add multiple features corresponding to the second rule to the first input feature set;

[0033] The rule combination extraction function is cyclically referenced until a preset termination condition is met.

[0034] Preferably,

[0035] The visualization information of the decision tree includes:

[0036] The generated decision tree is visualized using graphviz to obtain visualization information.

[0037] Preferably, it also includes:

[0038] Obtaining the upper limit of the consumer loan credit limit of the user to be detected according to the credit rating of the user to be detected;

[0039] If the obtained consumer loan credit limit of the user to be tested is greater than the user's consumer loan credit limit upper limit, the consumer loan credit limit upper limit of the user to be tested will be used as the consumer loan credit limit of the user to be tested this time.

[0040] According to a second aspect of an embodiment of the present invention, a consumer loan credit calculation device based on an XGBoost model is provided, the device comprising:

[0041] Multi-dimensional data acquisition module: used to obtain multi-dimensional financial risk control data of the user to be detected, and input the multi-dimensional features of the multi-dimensional financial risk control data of the user to be detected into the pre-built XGBoost model framework;

[0042] The first input feature acquisition module is used for the pre-built XGBoost model framework to output the importance of each feature to the objective function, and takes the features whose importance is greater than or equal to the preset importance threshold as the first input feature set;

[0043] A decision tree generation module: used to take features whose importance is less than a preset importance threshold as a second input feature set; and to train and generate a decision tree by referencing a tree package for the second input feature set;

[0044] A first input feature adding module is used to combine multiple features in the second input feature set into a rule, sort the bad customer rates corresponding to each rule in the decision tree, select features corresponding to multiple rules with the highest bad customer rates and add them to the first input feature set until a preset termination condition is met;

[0045] Model optimization module: used for inputting all features in the first input feature set into a decision tree, iteratively optimizing hyperparameters of the decision tree until a preset number of iterations is met, and obtaining a final decision tree;

[0046] Prediction module: used to input the first input feature set into each decision tree of the XGBoost model to obtain the final prediction result;

[0047] Credit limit acquisition module: used to obtain the consumer loan credit limit of the user to be detected based on the final prediction result.

[0048] According to a third aspect of an embodiment of the present invention, there is provided a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a main controller, each step in the above method is implemented.

[0049] The technical solution provided by the embodiments of the present invention may have the following beneficial effects:

[0050] This application obtains financial risk control data of multi-dimensional business scenarios as the input of the XGBoost model, selects the first input feature according to the contribution of the features of each dimension to the objective function of the XGBoost model, merges the features that are not selected to generate rules, calculates the impact of the rules on the bad customer rate of the decision tree, and retrieves some of the features that are not selected and adds them to the first input feature. In this process, the impact of the rules on the bad customer rate reflects the impact of business experience on the model output, that is, the idea of ​​adding expert models to pure mathematical models, which is more suitable for businesses in precise scenarios, so that the model has stronger accuracy in the use of rules and improves business interpretability. Finally, the selected features are used to adjust the model parameters, and the user's credit level is judged by the adjusted model. A standard model template for such scenarios is provided. When it is applied to the same scenario later, it is only necessary to perform data ETL and feature calculation according to the constraints of the model, and cross-platform model files can also be quickly deployed and applied.

[0051] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0053] Figure 1 is a flowchart of a method for calculating consumer loan credit based on an XGBoost model according to an exemplary embodiment;

[0054] Figure 2 is a system schematic diagram of a consumer loan credit calculation device based on an XGBoost model according to another exemplary embodiment;

[0055] In the accompanying drawings: 1- multi-dimensional data acquisition module, 2- first input feature acquisition module, 3- decision tree generation module, 4- first input feature addition module, 5- model optimization module, 6- prediction module, 7- credit limit acquisition module. DETAILED DESCRIPTION

[0056] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0057] Embodiment 1

[0058] Figure 1 is a flowchart of a method for calculating consumer loan credit based on an XGBoost model according to an exemplary embodiment. Figure 1 As shown, the method includes:

[0059] S1, obtaining multi-dimensional financial risk control data of the user to be detected, and inputting the multi-dimensional features of the multi-dimensional financial risk control data of the user to be detected into a pre-built XGBoost model framework;

[0060] S2, the pre-built XGBoost model framework outputs the importance of each feature to the objective function, and takes the features whose importance is greater than or equal to the preset importance threshold as the first input feature set;

[0061] S3, taking features whose importance is less than a preset importance threshold as a second input feature set; and referencing the tree package to train and generate a decision tree for the second input feature set;

[0062] S4, combining multiple features in the second input feature set into a rule, sorting the bad customer rates corresponding to each rule in the decision tree, selecting features corresponding to multiple rules with the highest bad customer rates and adding them to the first input feature set until a preset termination condition is met;

[0063] S5, inputting all features in the first input feature set into a decision tree, iteratively optimizing hyperparameters of the decision tree until a preset number of iterations is met, and obtaining a final decision tree;

[0064] S6, inputting the first input feature set into each decision tree of the XGBoost model to obtain a final prediction result;

[0065] S7, obtaining the consumer loan credit limit of the user to be detected according to the final prediction result;

[0066] It can be understood that this embodiment is an improvement based on the existing XGBoost model framework. In order to better understand this solution, the XGBoost model is a framework based on the gradient boosting decision tree. The deviation of the additive model is continuously reduced by fitting the deviation of the previous model tree by tree. It improves the definition of the objective function, adds regularization terms, optimizes measures, and supports parallel and distributed processing to improve the effect and performance of the model.

[0067] S1, obtain the multi-dimensional financial risk control data of the user to be tested, including:

[0068] (1) People’s Bank of China credit data:

[0069] a. Basic personal information: This is the basis of credit data, including personal name, ID number, age, gender, marital status, occupation, education and other basic information. This information is the basis for assessing personal credit. Banks or other financial institutions will refer to this information when approving loans, credit cards and other businesses.

[0070] b. Credit record: The credit record is the core part of the credit report, including personal credit information such as loans, credit cards, guarantees, etc. in various financial institutions. This information is highly detailed, including loan amount, loan term, repayment status, overdue record, etc. Banks or other financial institutions will use credit records to evaluate an individual's repayment ability and credit status.

[0071] c. Public records: Public records mainly include individual records in public departments such as taxation, courts, industry and commerce, and social security, such as tax records, litigation records, administrative penalty records, etc. These records can reflect an individual's law-abidingness and credit status.

[0072] d. Inquiry records: Inquiry records include the historical records of personal credit reports being inquired, such as the records of banks, credit card companies, guarantee companies and other financial institutions inquiring about personal credit reports when approving loans, credit cards and other businesses. Too many inquiry records may affect an individual's credit score.

[0073] e. Other data: In addition to the above main data dimensions, the credit report may also contain some other data, such as personal social relationships, consumption habits, online behavior, etc. These data can be used to evaluate the individual's credit status and risk level through big data analysis technology.

[0074] (2) Payment data:

[0075] a. User behavior data

[0076] The rise of mobile payments has made it possible to track and analyze users’ consumption behaviors and payment habits. Data such as the amount, frequency, and time of users’ payments can all be recorded and analyzed. These data provide in-depth insights into consumer behaviors and preferences, helping merchants with marketing and product development.

[0077] b. Transaction data

[0078] Mobile payment transaction data, including transaction amount, transaction type, transaction time, etc., are important indicators that reflect market dynamics and consumer demand. By analyzing these data, we can understand the consumption trends in the market and the consumption habits of different regions, age groups, and occupational groups.

[0079] c. Financial institution data

[0080] Mobile payment is closely related to financial institutions, so the data of financial institutions is also an important source of mobile payment analysis. These data include counterparty information, transaction risks, transaction compliance, etc., which are crucial to ensuring payment security and compliance.

[0081] (3) Multiple-loan data: refers to the behavior of users borrowing or attempting to borrow from multiple institutions at the same time within a period of time. Multiple-loan behavior contains a variety of negative information, such as a large funding gap that makes it difficult for one institution to meet the credit limit; insufficient cash flow, resulting in the inability to repay current debts, and thus using loans to support loans; poor qualifications and a small number of institutions that can approve loans, so multiple attempts are required. All of this negative information points in one direction - high overdue risk. Therefore, multiple loans are often shown to have good effects, strong monotony, and simple and straightforward business explanations in applications.

[0082] S2, XGBoost model training. Based on the objective function of the XGBoost model, the features of the above data dimensions are put into the model training. The model outputs the gain of the features of each dimension for the objective function of the model, that is, the importance of the features of each dimension for the objective function. By setting the importance threshold, the features greater than the importance threshold are used as the first input features of the model; at the same time, the "weight that the node should be given" of each feature is output;

[0083] S3, for features whose importance is less than the preset importance threshold, use them as the second input feature set, build a classification tree for discrete features and a regression tree for continuous features according to the business scenario of consumer loans, and reference the tree package to train and generate a decision tree, where X is the feature in the second input feature set and Y is the label;

[0084] The features in the second input feature set can be:

[0085] Characteristics of the PBOC credit data: including age, education background, consumer loan debt of our bank / other banks, credit card overdraft, number of recent PBOC inquiries, whether there are any due repayment bills of our bank / other banks in the near future, etc.

[0086] Payment data features: Include features such as consumption frequency in the past (3-6) months, maximum amount, non-repayment transaction type / repayment transaction type, etc.

[0087] Multiple data features: Add features such as the number of queries in the past (3-6) months, the number of query institutions, and the maximum number of days since the query product.

[0088] The generated decision tree is visualized using graphviz, and the meaning is explained as follows:

[0089] The number of colors in the generated visual tree structure indicates the number of categories, and the darker the color of each node, the higher the purity;

[0090] samples: the number of observations in the node. For example, the root node is 10000, which means the entire data set is 10,000.

[0091] Value: the sample size of the current node type;

[0092] Class: which category is more common in the current node (good is more common, bad is more common);

[0093] Gini: The Gini impurity of the node. This value must decrease as each node extends downward.

[0094] S4, according to the visualization information, obtain the combination rules of the features in the second input feature set, and construct a rule combination extraction function, which requires the use of binary tree traversal and backtracking algorithms to obtain a rule data set composed of multiple rules (a rule is composed of multiple features in the second input feature set), extract the rule that can find the most bad customers under the rule set, and add the features involved in the rule to the first input feature set mentioned above;

[0095] After extracting the first rule, remove the data that meets the rule, cyclically reference the rule combination extraction function to obtain the second rule, and repeat the above steps until the preset termination condition is met. The termination condition given in this embodiment is: 'remove 10% of the samples and the bad customer rate is reduced by 3 times'. At this time, all the new features selected are added to the above first input feature set;

[0096] S5, after obtaining the input features of the model, it is necessary to determine the conditions for dividing the left and right subtrees in the XGBoost model framework (for example, select feature A, the condition is A<7). In order to improve the efficiency of the algorithm (no need to try each feature one by one), use the "weighted quantile method" to calculate the split point (here the split point is obtained by the "feature value importance ranking function"), and the weight of the corresponding leaf node is given by the "weight that each leaf node should be given" in S2 above;

[0097] Model parameter adjustment: You can use grid search, random search, or heuristic search. Note that if the tree construction algorithm is for a large data set, set it to 'approx' directly, and for a small data set, set it to 'auto' directly. In addition, adjust the parameters one by one or by category to avoid adjusting all parameters together to make the model too complex. Therefore, parameter adjustment needs to be carried out in multiple steps, and a certain amount of values ​​are set for each type of parameter. A custom function is as follows:

[0098] The input is the parameter name, and the output is the parameter value and score. Specifically, you can specify the roc_auc parameter in GridSerachCV as the evaluation indicator in the function, set the cv value (for example, cv=5, then the returned average score is the average of the 5-fold cross-validation auc values), return each set of parameter combinations and scores, and take the parameter combination with the highest score.

[0099] Then, another set of parameters is changed and the above steps are repeated until the optimal values ​​of all hyperparameters in the XGBoost model are obtained or the preset number of iterations is reached; the final XGBoost model is obtained.

[0100] S6, input each feature in the above-mentioned first input feature set into each decision tree of XGBoost in turn, each decision tree generates a prediction weight for the corresponding node of the input feature, adds the prediction weights of all nodes of each tree, obtains the prediction weight of a decision tree with respect to the input feature, determines the size of the prediction weights of all decision trees with respect to the input feature, selects the largest prediction weight as the prediction result of the input feature, adds the prediction results of all input features, and obtains the final prediction result;

[0101] S7, the probability score of the prediction result is mapped into a standard score of 300-850, the standard score is equally spaced and binned, and the risk level and credit level are defined as shown in the following table:

[0102]

[0103] If the credit rating of the user to be tested is 'F-', the user's loan application will be directly rejected;

[0104] Obtain the monthly income of the user to be tested, and determine the net monthly income level of the user to be tested according to the monthly income of the user to be tested;

[0105] Take the maximum credit of 200,000 yuan as an example:

[0106] For those who can obtain the monthly income of customers, net monthly income = monthly income - monthly liabilities;

[0107] For those who cannot obtain the monthly income of customers, the net monthly income = the monthly basic salary of the current city;

[0108] The classification of net monthly income levels is shown in the following table:

[0109] Net monthly income level Amount 1 15000 2 12000 3 9000 4 6000 5 4500 6 3000 7 1000

[0110] The net monthly income debt repayment ratio of the user to be tested is obtained based on the credit rating. The relationship between the credit rating and the net monthly income debt repayment ratio is shown in the following table:

[0111] Credit rating Net monthly income debt service ratio A 1 B 0.8 C 0.7 D 0.6 F 0.5

[0112] The credit factor is determined based on the credit rating and net monthly income level, and the relationship is shown in the following table:

[0113]

[0114] At the same time, the upper limit of the credit amount of the user to be tested is determined according to the credit rating of the user to be tested, and the relationship is shown in the following table:

[0115] Credit rating Credit limit A 200000 B 150000 C 100000 D 50000 F 20000

[0116] According to the above content, the pre-credit amount of the user to be tested can be obtained as:

[0117] Pre-credit amount = net monthly income * net monthly income debt-paying ratio * credit factor * credit period, where the credit period can be freely set according to demand;

[0118] Credit amount = min (pre-credit amount, upper limit of credit amount), that is, if the calculated credit amount of the user to be tested exceeds the upper limit of credit amount corresponding to the credit level of the user to be tested, then the upper limit of credit amount of the user will be used as the final credit amount; if it does not exceed the upper limit of credit amount, then the pre-credit amount will be the final credit amount of the user to be tested.

[0119] Embodiment 2:

[0120] Figure 2 is a system schematic diagram of a consumer loan credit calculation device based on an XGBoost model according to another exemplary embodiment, the device comprising:

[0121] Multi-dimensional data acquisition module 1: used to obtain multi-dimensional financial risk control data of the user to be detected, and input the multi-dimensional features of the multi-dimensional financial risk control data of the user to be detected into the pre-built XGBoost model framework;

[0122] First input feature acquisition module 2: used for the pre-built XGBoost model framework to output the importance of each feature to the objective function, and taking the features whose importance is greater than or equal to the preset importance threshold as the first input feature set;

[0123] Decision tree generation module 3: used to take features whose importance is less than a preset importance threshold as a second input feature set; and train and generate a decision tree by referencing the tree package for the second input feature set;

[0124] The first input feature adding module 4 is used to combine multiple features in the second input feature set into a rule, sort the bad customer rates corresponding to each rule in the decision tree, select the features corresponding to multiple rules with the highest bad customer rates and add them to the first input feature set until a preset termination condition is met;

[0125] Model optimization module 5: used to input all features in the first input feature set into a decision tree, iteratively optimize hyperparameters of the decision tree until a preset number of iterations is met, and obtain a final decision tree;

[0126] Prediction module 6: used to input the first input feature set into each decision tree of the XGBoost model to obtain the final prediction result;

[0127] Credit limit acquisition module 7: used to obtain the consumer loan credit limit of the user to be detected according to the final prediction result.

[0128] Embodiment three:

[0129] This embodiment provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a main controller, each step in the above method is implemented;

[0130] It is understandable that the storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0131] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.

[0132] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "a small number of sparsely distributed" refers to at least two.

[0133] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code that includes one or less sparsely distributed executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present invention belong.

[0134] It should be understood that the various parts of the present invention can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiment, a small number of sparsely distributed steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0135] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0136] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0137] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0138] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or a small number of sparsely distributed embodiments or examples in a suitable manner.

[0139] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. The consumer loan credit calculation method based on the XGBoost model is characterized by: The method comprises: Acquire multi-dimensional financial risk control data of the user to be detected, and input the multi-dimensional features of the multi-dimensional financial risk control data of the user to be detected into a pre-built XGBoost model framework; The pre-built XGBoost model framework outputs the importance of each feature to the objective function, and takes the features whose importance is greater than or equal to the preset importance threshold as the first input feature set; Taking features whose importance is less than a preset importance threshold as a second input feature set; referencing the tree package to train and generate a decision tree for the second input feature set; Combining multiple features in the second input feature set into a rule, sorting the bad customer rates corresponding to each rule in the decision tree, selecting features corresponding to multiple rules with the highest bad customer rates and adding them to the first input feature set until a preset termination condition is met; Inputting all features in the first input feature set into a decision tree, iteratively optimizing hyperparameters of the decision tree until a preset number of iterations is met, and obtaining a final decision tree; Input the first input feature set into each decision tree of the XGBoost model to obtain the final prediction result; The consumer loan credit limit of the user to be detected is obtained according to the final prediction result.

2. The method according to claim 1, characterized in that The step of obtaining the consumer loan credit limit of the user to be detected according to the final prediction result includes: Mapping the probability score of the final prediction result into a standard score, and obtaining the credit rating of the user to be detected through the standard score; Obtain the net monthly income debt repayment ratio of the user to be tested according to the credit rating of the user to be tested; Obtaining the net monthly income of the user to be detected, and obtaining the net monthly income level of the user to be detected according to the net monthly income of the user to be detected; Obtain the credit factor of the user to be tested according to the credit rating and net monthly income level of the user to be tested; The credit period of the user to be detected is set; and the consumer loan credit limit of the user to be detected is obtained according to the net monthly income, net monthly income debt repayment ratio, credit coefficient and credit period of the user to be detected.

3. The method according to claim 2, characterized in that The multi-dimensional financial risk control data of the user to be tested includes: People's Bank of China credit data, payment data and multi-head data.

4. The method according to claim 3, characterized in that The step of inputting the first input feature set into each decision tree of the XGBoost model to obtain a final prediction result includes: All features in the first input feature set are input into each decision tree of the XGBoost model respectively, each decision tree generates a prediction weight for each feature at the corresponding node respectively, the prediction weights of all nodes of each decision tree are added together to obtain the prediction weight of each decision tree with respect to the input feature, the maximum prediction weight of all decision trees is selected as the prediction result of the input feature, the prediction results of all features in the first input feature set are added together to obtain the final prediction result.

5. The method according to claim 1, characterized in that The preset termination conditions include: The features in the second input feature set are reduced by 10%, and the overall bad customer rate of the decision tree output is reduced by 3 times.

6. The method according to claim 5, characterized in that The combining of multiple features in the second input feature set into one rule, sorting the bad customer rates corresponding to each rule in the decision tree, selecting features corresponding to multiple rules with the highest bad customer rates and adding them to the first input feature set until a preset termination condition is met includes: Acquire a combination rule for the second input feature set according to the visualization information of the decision tree to construct a rule combination extraction function to obtain a rule data set, wherein the rule data set includes multiple rules, and each rule is composed of a combination of features in multiple second input feature sets; Obtaining the first rule with the highest bad customer rate in the decision tree in the rule data set by using the rule combination extraction function, deleting the first rule from the rule data set, and adding multiple features corresponding to the first rule to the first input feature set; Reference the rule combination extraction function to obtain the second rule with the highest bad customer rate in the decision tree in the rule data set, delete the second rule from the rule data set, and add multiple features corresponding to the second rule to the first input feature set; The rule combination extraction function is cyclically referenced until a preset termination condition is met.

7. The method according to claim 6, characterized in that The visualization information of the decision tree includes: The generated decision tree is visualized using graphviz to obtain visualization information.

8. The method according to claim 2, characterized in that: Also includes: Obtaining the upper limit of the consumer loan credit limit of the user to be detected according to the credit rating of the user to be detected; If the obtained consumer loan credit limit of the user to be tested is greater than the user's consumer loan credit limit upper limit, the consumer loan credit limit upper limit of the user to be tested will be used as the consumer loan credit limit of the user to be tested this time.

9. A consumer loan credit calculation device based on the XGBoost model, characterized in that: The device comprises: Multi-dimensional data acquisition module: used to obtain multi-dimensional financial risk control data of the user to be detected, and input the multi-dimensional features of the multi-dimensional financial risk control data of the user to be detected into the pre-built XGBoost model framework; The first input feature acquisition module is used for the pre-built XGBoost model framework to output the importance of each feature to the objective function, and takes the features whose importance is greater than or equal to the preset importance threshold as the first input feature set; A decision tree generation module: used to take features whose importance is less than a preset importance threshold as a second input feature set; and to train and generate a decision tree by referencing a tree package for the second input feature set; A first input feature adding module is used to combine multiple features in the second input feature set into a rule, sort the bad customer rates corresponding to each rule in the decision tree, select features corresponding to multiple rules with the highest bad customer rates and add them to the first input feature set until a preset termination condition is met; Model optimization module: used for inputting all features in the first input feature set into a decision tree, iteratively optimizing hyperparameters of the decision tree until a preset number of iterations is met, and obtaining a final decision tree; Prediction module: used to input the first input feature set into each decision tree of the XGBoost model to obtain the final prediction result; Credit limit acquisition module: used to obtain the consumer loan credit limit of the user to be detected based on the final prediction result.

10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the main controller, each step in the consumer loan credit calculation method based on the XGBoost model as described in any one of claims 1 to 8 is implemented.