Credit product classification method and system, computer equipment and medium
By encoding the characteristics and classification codes of credit products and using a variety of classification models for training, the problem of low accuracy caused by traditional manual classification of credit products is solved, and high-accuracy automated classification of special categories of credit products is achieved. .
Patent Information
- Application Number
- CN202410812378.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-10-18
AI Technical Summary
Traditional credit product classification relies on manual experience, resulting in low accuracy of classification results, inability to identify financial market changes in a timely manner, and inability to cope with the classification needs of special categories of credit products.
By obtaining credit product characteristics and classification codes, integrating them into sample sets, and using multiple classification models for training, the target classification model is selected to realize automated classification of credit products to be classified.
It improves the accuracy of classification of special categories of credit products, reduces manual intervention, and improves the reliability of classification results.
Smart Images

Figure CN118797478A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of product classification, and in particular to a credit product classification method, system, computer equipment and medium. Background Art
[0002] In order to meet the needs of different customers, more flexible credit services are designed than traditional credit products. For example, some specific, non-standard special category credit products have attracted much attention in the industry. These special category credit products are roughly divided into five types, namely: down payment super credit type, term super credit type, payment frequency super credit type, unequal amount super credit type and one-by-one negotiation type.
[0003] However, in order to classify the above-mentioned special category credit products, the traditional classification method can only rely on manual product classification. However, since the manual classification method relies on manual experience and the financial market often presents incomplete regular changes, manual experience judgment will have a certain lag, resulting in the inability to identify market changes in a timely manner, and ultimately leading to misjudgment of classification results. Therefore, how to achieve a credit product classification method that does not rely on manual experience and can improve the accuracy of special category credit product classification results has become an urgent problem to be solved. Summary of the invention
[0004] Based on this, it is necessary to propose a credit product classification method, system, computer equipment and medium that does not rely on human experience for judgment and can improve the accuracy of classification results of special categories of credit products in response to the above problems.
[0005] In a first aspect, an embodiment of the present invention provides a credit product classification method, comprising:
[0006] S1. Obtaining a preset credit product feature and a classification code corresponding to the credit product feature, wherein the classification code is used to indicate the type of credit product to which the credit product feature belongs;
[0007] S2. Acquire characteristic variables corresponding to the characteristics of the credit product, and after marking the characteristic variables as characteristic codes, integrate the characteristic codes and the classification codes into a sample set;
[0008] S3, training each classification model in a preset classification model set according to the sample set to select a target classification model from the classification model set;
[0009] S4. Input the features corresponding to the credit products to be classified into the target classification model to obtain the classification results output by the target classification model.
[0010] Furthermore, the step S2 specifically includes:
[0011] S2a, integrating the credit product features and the feature codes corresponding to the same classification code into the same sample;
[0012] S2b, merging several of the samples to generate a sample set.
[0013] Furthermore, the classification model set includes several classification models of different types;
[0014] The step S3 specifically includes:
[0015] S3a, splitting the sample set according to a set ratio to generate a training sample set and a test sample set;
[0016] S3b, training each of the classification models according to the training sample set;
[0017] S3c, verifying each of the trained classification models according to the test sample set, and determining the classification model with the best verification result as the target classification model.
[0018] Furthermore, the setting ratio is 1:9.
[0019] Furthermore, the step S3c specifically includes:
[0020] S3e, obtaining preset evaluation indicators corresponding to each of the classification models according to the verification results of each of the classification models on the test sample set;
[0021] S3f, determining the classification model whose preset evaluation index meets the preset conditions as the target classification model.
[0022] Furthermore, after step S2b, the method further includes:
[0023] S2c, obtaining the number of missing features in each of the samples;
[0024] S2d: When the number is greater than a set number threshold, the corresponding sample is deleted from the sample set.
[0025] Furthermore, after step S2c, the method further includes:
[0026] S2e, when the number is less than or equal to the set number threshold, the missing classification code in the sample is recorded as a preset value, and the missing feature variable in the sample is set to the average value of all feature variables in the sample set.
[0027] In a second aspect, an embodiment of the present invention provides a credit product classification system, including:
[0028] A product acquisition unit, used to acquire a preset credit product feature and a classification code corresponding to the credit product feature, wherein the classification code is used to indicate the type of credit product to which the credit product feature belongs;
[0029] A feature acquisition unit, used for acquiring feature variables corresponding to the features of the credit product, and after marking the feature variables as feature codes, integrating the feature codes and the classification codes into a sample set;
[0030] A model training unit, used for training each classification model in a preset classification model set according to the sample set, so as to select a target classification model from the classification model set;
[0031] The model identification unit is used to input the features corresponding to the credit products to be classified into the target classification model to obtain the classification results output by the target classification model.
[0032] In a third aspect, an embodiment of the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps:
[0033] S1. Obtaining a preset credit product feature and a classification code corresponding to the credit product feature, wherein the classification code is used to indicate the type of credit product to which the credit product feature belongs;
[0034] S2. Acquire characteristic variables corresponding to the characteristics of the credit product, and after marking the characteristic variables as characteristic codes, integrate the characteristic codes and the classification codes into a sample set;
[0035] S3, training each classification model in a preset classification model set according to the sample set to select a target classification model from the classification model set;
[0036] S4. Input the features corresponding to the credit products to be classified into the target classification model, obtain the classification code output by the target classification model, and achieve the classification effect.
[0037] In a fourth aspect, an embodiment of the present invention provides a computer-readable medium storing a computer program, wherein when the computer program is executed by a processor, the processor performs the following steps:
[0038] S1. Obtaining a preset credit product feature and a classification code corresponding to the credit product feature, wherein the classification code is used to indicate the type of credit product to which the credit product feature belongs;
[0039] S2. Acquire characteristic variables corresponding to the characteristics of the credit product, and after marking the characteristic variables as characteristic codes, integrate the characteristic codes and the classification codes into a sample set;
[0040] S3, training each classification model in a preset classification model set according to the sample set to select a target classification model from the classification model set;
[0041] S4. Input the features corresponding to the credit products to be classified into the target classification model, obtain the classification code output by the target classification model, and achieve the classification effect.
[0042] The above-mentioned credit product classification method, system, computer equipment and medium, by encoding the preset credit product features, the product type and feature variables corresponding to the credit product features, to obtain the classification code and feature code, realizes the encoding processing of the credit product features so that it can meet the format of subsequent model training; by inputting the sample set composed of the credit product features, classification code and feature code into the preset classification model collection for training, a target classification model for classifying the credit products to be classified is generated, thereby realizing the encoding of each feature corresponding to the special category credit products to be classified, so that they can be input into the trained target classification model for classification, solving the problem in the prior art that the classification of special category credit products relies on manual work, resulting in low accuracy, and improving the accuracy of the classification of special category credit products. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0044] Figure 1 A method flow chart of a credit product classification method in one embodiment;
[0045] Figure 2 A schematic diagram showing a comparison of model classification effects in one embodiment;
[0046] Figure 3 A schematic diagram of the structure of a credit product system in an embodiment;
[0047] Figure 4 1 is a structural block diagram of a computer device in one embodiment. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] refer to Figure 1 The embodiment of the present invention provides a credit product classification method that does not rely on manual experience for judgment and can improve the accuracy of classification results of special category credit products. The method can be used to classify special category credit products. The method includes:
[0050] S1. Obtaining a preset credit product feature and a classification code corresponding to the credit product feature, wherein the classification code is used to indicate the type of credit product to which the credit product feature belongs;
[0051] It can be understood that the credit product features are all product features corresponding to the preset training credit products used for model training, and the preset training credit product sets are all taken from financial service companies, including a total of 16 credit product features commonly used to judge special types, including: payment method, business type, product line, customer type, whether the credit insurance covers the current exposure (US dollars), performance attribution country / region, customer rating, business method, financing platform, minimum product unit price, total purchase quantity, total contract amount, down payment installment period, down payment ratio, payment term (month), payment frequency unit, and the corresponding product type and classification code respectively include: down payment super credit type (1), term super credit type (2), payment frequency super credit type (3), unequal amount super credit type (4) and one-to-one negotiation type (5). It can be seen from this that in this embodiment, each of the credit product features will be matched with a corresponding classification code, thereby indicating the product type corresponding to the credit product feature, and at the same time achieving the effect of encoding each feature.
[0052] In addition, it can be understood that the executor of the above method can be an independent server or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), as well as basic cloud computing services such as big data and artificial intelligence platforms, and the present invention is not limited to this.
[0053] S2. Acquire characteristic variables corresponding to the characteristics of the credit product, and after marking the characteristic variables as characteristic codes, integrate the characteristic codes and the classification codes into a sample set;
[0054] Here, after obtaining the characteristic variables of each of the credit product characteristics, the characteristic variables can be coded to mark as characteristic codes. For example: determine whether the credit insurance corresponding to each of the credit product characteristics covers the current set exposure. If so, the characteristic code is 1; if not, it is 0. At the same time, the above-mentioned payment method characteristics can also be determined, divided into five types: full payment, letter of credit, installment, self-financing, and third-party financing, and coded respectively (full payment = 1, letter of credit = 2, installment = 3, self-financing = 4, third-party financing = 5). At this time, after obtaining each of the credit product characteristics and the corresponding characteristic codes, each of the characteristic codes is integrated into the sample set for subsequent model training. It can be understood that since the characteristic code actually contains the content corresponding to the credit product characteristics, it is only necessary to input each of the characteristic codes for training during the subsequent model training, and the classification code is reflected as a label in the training process during model training.
[0055] S3, training each classification model in a preset classification model set according to the sample set to select a target classification model from the classification model set;
[0056] As described in the above step S3, the sample set is input into the preset classification model collection for training. It can be understood that the classification model collection includes five types of classification models: XGboost, Logistic Regression, K-nearest Neighbor (KNN), Decision Tree (DT), and Gaussian Naive Bayes (Gaussian NB). The target classification model with the highest accuracy is selected from the above various algorithm models through the sample set.
[0057] S4. Input the features corresponding to the credit products to be classified into the target classification model, obtain the classification code output by the target classification model, and achieve the classification effect.
[0058] As described in the above step S4, the product features corresponding to the credit product to be classified are input into the target classification model for inference, so as to identify the corresponding classification code, thereby achieving the effect of identifying the product type of the credit product to be classified.
[0059] This embodiment uses the above method to encode the preset credit product features, the product types and feature variables corresponding to the credit product features, thereby obtaining the classification code and the feature code, so that the credit product features can be encoded. After that, the sample set composed of the credit product features, the classification code and the feature code is input into the preset classification model collection for training, thereby generating a target classification model for classifying the credit products to be classified. It is realized that each feature corresponding to the special category credit products to be classified can be encoded, so that it can be input into the trained target classification model for classification, which solves the problem in the prior art that the classification of special category credit products depends on manual work, resulting in low accuracy, and improves the accuracy of the classification of special category credit products.
[0060] In one embodiment, the step S2 specifically includes:
[0061] S2a, integrating the credit product features and the feature codes corresponding to the same classification code into the same sample;
[0062] S2b, merging several of the samples to generate a sample set.
[0063] As described in the above embodiment, since there may be multiple preset training credit products for model training, the credit product features and the feature codes corresponding to the same classification code may be integrated into the same sample, and finally the samples may be merged and recorded as the sample set, thereby ensuring that the sample set contains a sufficient number of features corresponding to the preset training credit products.
[0064] In one embodiment, the classification model set includes several classification models of different types;
[0065] The step S3 specifically includes:
[0066] S3a, splitting the sample set according to a set ratio to generate a training sample set and a test sample set;
[0067] S3b, training each of the classification models according to the training sample set;
[0068] S3c, verifying each of the trained classification models according to the test sample set, and determining the classification model with the best verification result as the target classification model.
[0069] As described in the above embodiment, the sample set is split according to a set ratio. It can be understood that the set ratio can be set by the user, so as to be split into the training sample set and the test sample set. It can be understood that the training sample set is used to train the different types of classification models contained in the classification model collection, so as to generate several different categories of models to be evaluated. After that, each model to be evaluated is verified through the test sample set, and the model to be evaluated with the best verification result is recorded as the target classification model.
[0070] In one embodiment, the setting ratio is 1:9.
[0071] As described in the above embodiment, the set ratio is 1:9, and the sample set is randomly split according to the ratio of 1:9, so as to generate the training sample set (9 / 10) and the test sample set (1 / 10). It can be understood that the purpose of splitting the sample set by the set ratio of 1:9 is to perform ten-fold cross-validation on each subsequent classification model. It can be understood that the ten-fold cross-validation (10-fold cross-validation) is a statistical method for evaluating the performance of a machine learning model (i.e., the classification model) on an independent data set. This is a model validation technique, the purpose of which is to ensure that the model performs well on unseen data, that is, has good generalization ability. Therefore, after the sample set is split into the training sample set (9 / 10) and the test sample set (1 / 10) according to the ratio of 1:9, cross-validation is performed on each type of the classification model according to the training sample set and the test sample set.
[0072] In one embodiment, the step S3c specifically includes:
[0073] S3e, obtaining preset evaluation indicators corresponding to each of the classification models according to the verification results of each of the classification models on the test sample set;
[0074] S3f, determining the classification model whose preset evaluation index meets the preset conditions as the target classification model.
[0075] As described in the above embodiment, the test sample set is input into the models to be evaluated of different categories for inference, so as to output the corresponding verification results and obtain the preset evaluation indicators corresponding to each classification model. It can be understood that in this embodiment, the verification results are the characteristic curves corresponding to the models, and the characteristic curve graphs corresponding to each characteristic curve can be referred to. Figure 2 ;
[0076] Understandably, Figure 2represents the true positive value (also called true positive rate) and the false positive value (also called false positive rate) corresponding to the ROC curve in the verification result, and the Figure 2 In the coordinate system of the embodied points, the X-axis refers to the false positive value of the ROC curve, and the Y-axis refers to the true positive value of the ROC curve;
[0077] Afterwards, the curve values corresponding to each of the characteristic curves are obtained. The model types corresponding to each of the models to be evaluated and the curve values can be referred to in the following Table 1:
[0078] Table 1
[0079]
[0080] When it is determined that the values of the curves corresponding to the characteristic curves of a certain model type are higher than the preset numerical threshold (i.e., the preset evaluation index), the corresponding model to be evaluated is recorded as the target classification model. For example, when it is determined that the values of the curves corresponding to the characteristic curves output by the XGBoost model are higher than the preset numerical threshold, the XGBoost model is recorded as the target classification model.
[0081] In one embodiment, after step S2b, the following further comprises:
[0082] S2c, obtaining the number of missing features in each of the samples;
[0083] S2d: When the number is greater than a set number threshold, the corresponding sample is deleted from the sample set.
[0084] As described in the above embodiment, it is determined whether there is default data in the sample set. If so, the background system obtains the quantity information of the missing features in each sample, and when the quantity information exceeds a set threshold, the sample is recorded as a training sample to be deleted, and the training sample to be deleted is deleted from the sample set, thereby preventing the default data from affecting subsequent model training.
[0085] In one embodiment, after step S2c, the following further comprises:
[0086] Furthermore, after step S2c, the method further includes:
[0087] S2e, when the number is less than or equal to the set number threshold, the missing classification code in the sample is recorded as a preset value, and the missing feature variable in the sample is set to the average value of all feature variables in the sample set.
[0088] As described in the above embodiment, when it is judged that the quantity information is greater than the set threshold, the classification code corresponding to the default data in the training sample to be deleted is recorded as 0, and then the average value of each feature variable in the sample set is calculated and recorded as the variable value to be filled, and then the missing feature variable in the sample is set to the average value of all feature variables in the sample set, so as to prevent the default data from affecting subsequent model training.
[0089] refer to Figure 3 The present invention also provides a credit product classification system, comprising:
[0090] A product acquisition unit 10 is used to acquire a preset credit product feature and a classification code corresponding to the credit product feature, wherein the classification code is used to indicate the type of credit product to which the credit product feature belongs;
[0091] A feature acquisition unit 20 is used to acquire feature variables corresponding to the features of the credit product, and after marking the feature variables as feature codes, integrate the feature codes and the classification codes into a sample set;
[0092] A model training unit 30, configured to train each classification model in a preset classification model set according to the sample set, so as to select a target classification model from the classification model set;
[0093] The model identification unit 40 is used to input the features corresponding to the credit products to be classified into the target classification model, obtain the classification code output by the target classification model, and achieve the classification effect.
[0094] The above-mentioned units are for implementing the credit product classification system and will not be introduced one by one here.
[0095] Figure 4 FIG. 1 shows an internal structure diagram of a computer device in an embodiment. The computer device may be a server, including but not limited to a high-performance computer and a high-performance computer cluster. Figure 4 As shown, the computer device includes a processor, a memory and a network interface connected via a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program, which, when executed by the processor, enables the processor to implement the credit product classification method. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to execute the credit product classification method.
[0096] In one embodiment, the credit product classification method provided by the present invention can be implemented in the form of a computer program. The computer program can be used in Figure 4The computer device shown in the figure is run. The memory of the computer device can store various program templates constituting the credit product classification system. For example: 10 - product acquisition unit, 20 - feature acquisition unit, 30 - model training unit, 40 - model recognition unit.
[0097] A computer device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0098] S1. Obtaining a preset credit product feature and a classification code corresponding to the credit product feature, wherein the classification code is used to indicate the type of credit product to which the credit product feature belongs;
[0099] S2. Acquire characteristic variables corresponding to the characteristics of the credit product, and after marking the characteristic variables as characteristic codes, integrate the characteristic codes and the classification codes into a sample set;
[0100] S3, training each classification model in a preset classification model set according to the sample set to select a target classification model from the classification model set;
[0101] S4. Input the features corresponding to the credit products to be classified into the target classification model, obtain the classification code output by the target classification model, and achieve the classification effect.
[0102] From the above embodiments, it can be seen that the greatest beneficial effect of the present invention is that by encoding the preset credit product features, the product types and feature variables corresponding to the credit product features, and thereby obtaining the classification codes and feature codes, the credit product features are coded so that they can meet the format of subsequent model training, and then the sample set composed of the credit product features, the classification codes and the feature codes is input into the preset classification model collection for training, thereby generating a target classification model for classifying the credit products to be classified, and the encoding of the various features corresponding to the special category credit products to be classified can be achieved, so that they can be input into the trained target classification model for classification, thereby solving the problem in the prior art that the classification of special category credit products relies on manual work, resulting in low accuracy, and improving the accuracy of the classification of special category credit products.
[0103] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be accomplished by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), and double data rate.
[0104] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0105] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A credit product classification method, characterized in that: include: S1. Obtaining a preset credit product feature and a classification code corresponding to the credit product feature, wherein the classification code is used to indicate the type of credit product to which the credit product feature belongs; S2. Acquire characteristic variables corresponding to the characteristics of the credit product, and after marking the characteristic variables as characteristic codes, integrate the characteristic codes and the classification codes into a sample set; S3, training each classification model in a preset classification model set according to the sample set to select a target classification model from the classification model set; S4. Input the features corresponding to the credit products to be classified into the target classification model to obtain the classification results output by the target classification model.
2. The credit product classification method according to claim 1, characterized in that: The step S2 specifically includes: S2a, integrating the classification code and the feature code corresponding to the same credit product into one sample; S2b, merging several of the samples to generate a sample set.
3. The credit product classification method according to claim 1, characterized in that: The classification model set includes several classification models of different types; The step S3 specifically includes: S3a, splitting the sample set according to a set ratio to generate a training sample set and a test sample set; S3b, training each of the classification models according to the training sample set; S3c, verifying each of the trained classification models according to the test sample set, and determining the classification model with the best verification result as the target classification model.
4. The credit product classification method according to claim 3, characterized in that: The setting ratio is 1:
9.
5. The credit product classification method according to claim 3, characterized in that: The step S3c specifically includes: S3e, obtaining preset evaluation indicators corresponding to each of the classification models according to the verification results of each of the classification models on the test sample set; S3f, determining the classification model whose preset evaluation index meets the preset conditions as the target classification model.
6. The credit product classification method according to claim 2, characterized in that: After step S2b, the method further includes: S2c, obtaining the number of missing features in each of the samples; S2d: When the number is greater than a set number threshold, the corresponding sample is deleted from the sample set.
7. The credit product classification method according to claim 6, characterized in that: After step S2c, the method further includes: S2e, when the number is less than or equal to the set number threshold, the missing classification code in the sample is recorded as a preset value, and the missing feature code in the sample is set to the average value of all feature codes in the sample set.
8. A credit product classification system, characterized in that: include: A product acquisition unit, used to acquire a preset credit product feature and a classification code corresponding to the credit product feature, wherein the classification code is used to indicate the type of credit product to which the credit product feature belongs; A feature acquisition unit, used for acquiring feature variables corresponding to the features of the credit product, and after marking the feature variables as feature codes, integrating the feature codes and the classification codes into a sample set; A model training unit, used for training each classification model in a preset classification model set according to the sample set, so as to select a target classification model from the classification model set; The model identification unit is used to input the features corresponding to the credit products to be classified into the target classification model to obtain the classification results output by the target classification model.
9. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the credit product classification method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the credit product classification method according to any one of claims 1 to 7 is implemented.
