Risk control model training, risk category prediction method and device
By adding scene features as category features to the training samples, and using decision trees and the LightGBM algorithm to build a risk control model, the problem of complex model systems in multiple scenarios is solved, achieving simplification and performance improvement, and supporting customized and generalized predictions in specific scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-14
- Publication Date
- 2026-04-17
AI Technical Summary
In existing technologies, multiple dedicated risk control models and general risk control models need to be trained for different business scenarios, resulting in a complex model system that requires a lot of manpower and is difficult to simplify and improve performance.
By adding scene features as category features to the training samples, a risk control model is constructed using decision trees to ensure that there is no relative ranking relationship between different scenes. The LightGBM algorithm is used to determine the splitting conditions, enabling rapid scene customization and multi-scene model aggregation.
It simplifies the complexity of the model system and improves the model's performance and prediction accuracy, enabling customized model invocation and scenario-generalized model invocation in specific scenarios.
Smart Images

Figure CN114997317B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to one or more embodiments in the field of computers, and more particularly to methods and apparatus for training risk control models and predicting risk categories applicable to multiple scenarios. Background Technology
[0002] Currently, risk control models are often used to predict the risk category of a business object based on its attribute characteristics. The risk category indicates whether the business object poses a business risk. The risk control model is built based on training samples with risky performance.
[0003] For various business scenarios with similar operations, the training samples in each scenario exhibit both differences and strong commonalities. Current technologies involve selecting training samples to train multiple dedicated risk control models applicable to different business scenarios, as well as a general-purpose risk control model suitable for all business scenarios. Dedicated risk control models, or dedicated models for short, demonstrate strong performance for their applicable business scenarios. General-purpose risk control models, or general-purpose models for short, achieve relatively average performance across various business scenarios and exhibit strong generalization capabilities. Because multiple risk control models need to be trained and deployed separately, the model system is highly complex and requires significant manpower.
[0004] Therefore, we hope to find an improved solution that can simplify the complexity of the model system and enable the model to have better performance. Summary of the Invention
[0005] This specification describes one or more embodiments of a method and apparatus for training risk control models and predicting risk categories applicable to multiple scenarios, which can simplify the complexity of the model system and enable the model to have better performance.
[0006] Firstly, a method for training risk control models applicable to multiple scenarios is provided, the method including:
[0007] Obtain each first training sample included in the first sample set, wherein each first training sample includes a first feature value corresponding to the attribute features of a single business object, and a category label indicating whether the business object has business risks;
[0008] Based on the business scenario in which a single business object is located, determine the second feature value corresponding to its scenario characteristics, and add the second feature value to the corresponding first training sample to form the second training sample.
[0009] Based on the second sample set formed by each second training sample, a first decision tree is constructed by splitting nodes. The process of splitting any current node includes: for any splitting condition among multiple candidate splitting conditions for the current node, splitting the current node according to the splitting purity of the splitting condition; wherein, during the splitting process, the scene features are regarded as category features.
[0010] Based on the first decision tree, a risk control model for classifying business objects is determined.
[0011] In one possible implementation, the process of splitting for any current node further includes:
[0012] Based on the first and second feature values of each business object in the current sample set falling into the current node, the multiple alternative splitting conditions are determined.
[0013] Furthermore, the attribute features include numerical multi-attribute features; determining the multiple candidate splitting conditions includes: enumerating the possible values of the multi-attribute features in the current sample set, discretizing each possible value into k integer values, and taking a combination of an attribute feature and an integer value of that attribute feature as a candidate splitting condition.
[0014] Furthermore, determining the plurality of candidate splitting conditions further includes:
[0015] Enumerate the possible values of the scene feature in the current sample set, combine at least two of the possible values to obtain several value sets, and use the combination of the scene feature and a value set as a candidate splitting condition.
[0016] In one possible implementation, the process of splitting for any current node further includes:
[0017] The splitting purity of the splitting condition is determined based on the sample purity of the current sample set corresponding to the current node and the sample purity of the two sample subsets corresponding to the two child nodes.
[0018] Furthermore, the purity of the sample is determined based on one of the following metrics: information entropy, Gini coefficient.
[0019] Furthermore, determining the splitting purity under this splitting condition specifically includes:
[0020] Using the ratio of the number of samples in each of the two sample subsets to the number of samples in the current sample set as their respective weights, the sample purity of the two sample subsets is weighted and summed to obtain a sum value;
[0021] The splitting purity of the splitting condition is determined based on the difference between the sample purity of the current sample set and the sum.
[0022] In one possible implementation, the business object includes one of the following: user, operation event, transaction, business application request.
[0023] In one possible implementation, the scene corresponding to the scene feature includes any of the following:
[0024] Credit scenarios for large and medium-sized enterprises, credit scenarios for small and micro enterprises, medium- and long-term credit scenarios, and short-term credit scenarios.
[0025] Secondly, a method for predicting risk categories is provided, including:
[0026] Obtain a target sample, wherein the target sample includes a first feature value corresponding to the attribute features of the target business object;
[0027] Based on the business scenario in which the target business object is located, determine the second feature value corresponding to its scenario characteristics;
[0028] The risk control model trained by the method described in the first aspect is trained by inputting the first feature value and the second feature value into the risk control model, and the risk control model outputs the risk category of the target business object, which is used to indicate whether the target business object has business risk.
[0029] In one possible implementation, the second feature value is either a feature value that participated in training the risk control model or a feature value that did not participate in training the risk control model.
[0030] Thirdly, a method for predicting risk categories is provided, including:
[0031] Obtain a target sample, wherein the target sample includes a first feature value corresponding to the attribute features of the target business object;
[0032] The first feature value is input into the risk control model trained by the method described in the first aspect, and the risk control model outputs the risk category of the target business object. The risk category is used to indicate whether the target business object has business risk.
[0033] Fourthly, a risk control model training device suitable for multiple scenarios is provided, the device comprising:
[0034] The acquisition unit is used to acquire each of the first training samples included in the first sample set, wherein each of the first training samples includes a first feature value corresponding to the attribute features of a single business object, and a category label indicating whether the business object has business risks.
[0035] The addition unit is used to determine the second feature value corresponding to the scenario feature of a single business object based on the business scenario in which the object is located, and add the second feature value to the first training sample obtained by the corresponding acquisition unit to form a second training sample.
[0036] The construction unit is used to construct a first decision tree by splitting nodes based on the second sample set formed by the second training samples obtained by the addition unit. The process of splitting any current node includes: splitting the current node according to the splitting purity of any splitting condition among multiple candidate splitting conditions for the current node; wherein, the scene features are regarded as category features during the splitting process.
[0037] The determining unit is used to determine a risk control model for classifying business objects based on the first decision tree obtained by the constructing unit.
[0038] Fifthly, an apparatus for predicting risk categories is provided, the apparatus comprising:
[0039] An acquisition unit is used to acquire a target sample, wherein the target sample includes a first feature value corresponding to the attribute features of a target business object;
[0040] The determining unit is used to determine the second feature value corresponding to the scenario feature of the target business object based on the business scenario in which the target business object is located;
[0041] The prediction unit is used to input the first feature value obtained by the acquisition unit and the second feature value determined by the determination unit into the risk control model trained by the device described in the fourth aspect, and output the risk category of the target business object through the risk control model. The risk category is used to indicate whether the target business object has business risk.
[0042] Sixthly, an apparatus for predicting risk categories is provided, the apparatus comprising:
[0043] An acquisition unit is used to acquire a target sample, wherein the target sample includes a first feature value corresponding to the attribute features of a target business object;
[0044] The prediction unit is used to input the first feature value obtained by the acquisition unit into the risk control model trained by the device described in the fourth aspect, and output the risk category of the target business object through the risk control model. The risk category is used to indicate whether the target business object has business risk.
[0045] In a seventh aspect, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the methods of the first aspect, the second aspect, or the third aspect.
[0046] Eighthly, a computing device is provided, including a memory and a processor, wherein executable code is stored in the memory, and the processor, when executing the executable code, implements the methods of the first aspect, the second aspect, or the third aspect.
[0047] The risk control model training method and apparatus applicable to multiple scenarios provided in the embodiments of this specification first obtain each first training sample included in the first sample set, wherein each first training sample includes a first feature value corresponding to the attribute features of a single business object, and a category label indicating whether the business object has business risk; then, based on the business scenario in which the single business object is located, a second feature value corresponding to its scenario feature is determined, and the second feature value is added to the corresponding first training sample to form a second training sample; next, based on the second sample set formed by each second training sample, a first decision tree is constructed by node splitting, wherein the process of splitting any current node includes: for any splitting condition among multiple candidate splitting conditions of the current node, splitting the current node according to the splitting purity of the splitting condition; wherein, during the splitting process, the scenario feature is regarded as a category feature; finally, based on the first decision tree, a risk control model for classifying business objects is determined. As can be seen from the above, in the embodiments of this specification, a feature field corresponding to the scene is added on the basis of the first training sample. This feature field is set as a category field when training the model to ensure that there is no relative ranking relationship between the scenes. By adopting this processing method of using scene features as category features, it is possible to quickly customize the scene and summarize the multi-scene models, which can simplify the complexity of the model system and make the model have better performance.
[0048] The method and apparatus for predicting risk categories provided in the embodiments of this specification first acquire a target sample, wherein the target sample includes a first feature value corresponding to the attribute characteristics of a target business object; then, based on the business scenario in which the target business object is located, a second feature value corresponding to its scenario characteristics is determined; finally, the first feature value and the second feature value are input into the risk control model trained by the method described in the first aspect, and the risk control model outputs the risk category of the target business object, wherein the risk category is used to indicate whether the target business object has business risk. As can be seen from the above, the risk control model trained by the method described in the first aspect of this specification can achieve rapid scenario customization and multi-scenario model aggregation, simplifying the complexity of the model system and enabling the model to have better performance. Therefore, in the prediction stage, for a prediction task of a specific scenario, adding the corresponding feature value corresponding to the scenario characteristics to the samples in that scenario can realize the invocation of a customized model for that specific scenario and achieve a high prediction accuracy.
[0049] Another method and apparatus for predicting risk categories provided in the embodiments of this specification first obtains a target sample, wherein the target sample includes a first feature value corresponding to the attribute characteristics of a target business object; then, the first feature value is input into the risk control model trained by the method described in the first aspect, and the risk control model outputs the risk category of the target business object, wherein the risk category is used to indicate whether the target business object has business risk. As can be seen from the above, the risk control model trained by the method described in the first aspect of this specification can achieve rapid scenario customization and multi-scenario model aggregation, simplifying the complexity of the model system and enabling the model to have better performance. Therefore, in the prediction stage, for general models, it is possible to choose not to input the feature value corresponding to the scenario characteristics, thus enabling the invocation of a scenario-generalized model with high prediction accuracy. Attached Figure Description
[0050] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This is a schematic diagram illustrating an implementation scenario of one embodiment disclosed in this specification;
[0052] Figure 2 A flowchart illustrating a risk control model training method applicable to multiple scenarios according to one embodiment is shown.
[0053] Figure 3 A schematic diagram illustrating the formation of a second training sample according to one embodiment is shown;
[0054] Figure 4 A schematic diagram illustrating the splitting conditions of a decision tree according to one embodiment is shown;
[0055] Figure 5 A flowchart illustrating a method for predicting risk categories according to one embodiment is shown;
[0056] Figure 6 A flowchart illustrating a method for predicting risk categories according to another embodiment is shown;
[0057] Figure 7 A schematic block diagram of a risk control model training apparatus suitable for multiple scenarios is shown according to one embodiment;
[0058] Figure 8 A schematic block diagram of an apparatus for predicting risk categories according to one embodiment is shown;
[0059] Figure 9 A schematic block diagram of an apparatus for predicting risk categories according to another embodiment is shown. Detailed Implementation
[0060] The solution provided in this specification will now be described with reference to the accompanying drawings.
[0061] Figure 1 This is a schematic diagram illustrating an implementation scenario of one embodiment disclosed in this specification. This implementation scenario involves training a risk control model applicable to multiple scenarios. The conventional approach involves selecting training samples to train multiple dedicated risk control models suitable for different business scenarios, as well as a general risk control model applicable to all business scenarios. This embodiment differs from the conventional approach by adding scenario-specific feature fields to the original training features of the training samples. The risk control model is trained by constructing a decision tree. The scenario field is set as a category field during model training, ensuring that there is no relative ranking relationship between scenarios. This approach, using scenario features as category features, enables rapid scenario customization and multi-scenario model aggregation, simplifies the complexity of the model system, and improves model performance.
[0062] Reference Figure 1 Assume there are three different business scenarios. The diagram shows training samples for these three scenarios. Training sample 1 includes features X, Code1, and Y1. Feature X represents the feature value of the attribute feature of business object 1, Code1 represents the feature value corresponding to the scenario feature of business object 1, and Y1 represents the category label of whether business object 1 has business risk. Training sample 2 includes features X, Code2, and Y2. Feature X represents the feature value of the attribute feature of business object 2, Code2 represents the feature value corresponding to the scenario feature of business object 2, and Y2 represents the category label of whether business object 2 has business risk. Training sample 3 includes features X, Code3, and Y3. Feature X represents the feature value of the attribute feature of business object 3, Code3 represents the feature value corresponding to the scenario feature of business object 3, and Y3 represents the category label of whether business object 3 has business risk. It is important to understand that training samples 1, 2, and 3 are merely illustrations of training samples in the sample set. In reality, the sample set typically includes a large number of training samples, and any two training samples may belong to the same or different business scenarios. Feature X may have multiple values. The simplified representation in the figure does not mean that the feature values of the attribute features of these training samples are the same. The category label can be represented by 0 or 1. For example, 0 means that the business object does not have business risk, and 1 means that the business object has business risk.
[0063] After training the risk control model using the aforementioned sample set, the trained model can be used to predict the risk category of the target sample, also known as the test sample. This target sample includes feature X and its corresponding Code. The corresponding Code can be any one of Code1, Code2, or Code3. When the corresponding Code is Code1, it's equivalent to calling a specialized model for the business scenario corresponding to Code1, resulting in a more accurate prediction. Alternatively, the corresponding Code may not be any of Code1, Code2, or Code3. When the corresponding Code is Code4 or null, it's equivalent to calling a general model applicable to various business scenarios, also resulting in a more accurate prediction.
[0064] Figure 2 This diagram illustrates a flowchart of a risk control model training method applicable to multiple scenarios, based on one embodiment. The method can be based on... Figure 1 The implementation scenario is shown. For example... Figure 2 As shown, the risk control model training method applicable to multiple scenarios in this embodiment includes the following steps: Step 21, obtaining each first training sample included in the first sample set, wherein any first training sample includes a first feature value corresponding to the attribute features of a single business object, and a category label indicating whether the business object has business risk; Step 22, determining the second feature value corresponding to the scenario features of a single business object based on the business scenario in which it is located, and adding the second feature value to the corresponding first training sample to form a second training sample; Step 23, constructing a first decision tree by node splitting based on the second sample set formed by each second training sample, wherein the process of splitting any current node includes: splitting the current node according to the splitting purity of any of the multiple alternative splitting conditions for the current node; wherein, the scenario features are regarded as category features during the splitting process; Step 24, determining the risk control model for classifying business objects based on the first decision tree. The specific execution method of each of the above steps is described below.
[0065] First, in step 21, the first training samples included in the first sample set are obtained. Each first training sample includes a first feature value corresponding to the attribute features of a single business object, and a category label indicating whether the business object has business risk. It is understood that the attribute features typically include multiple attribute features, and the first feature value is a combination of the feature values of each attribute feature.
[0066] In this embodiment, the first sample set contains a large number of samples. Any i-th sample in the first sample set can be denoted as (xi, yi), where xi represents the attribute feature of the business object corresponding to the i-th sample, and yi represents the category label of whether the business object has business risk. It should be understood that since a decision tree needs to be trained based on this first sample set, the items in the attribute features are usually numerical features, although categorical features may also exist. yi typically takes the value 0 or 1, indicating whether the business object has business risk. Generally, samples with business risk (e.g., samples with a label value yi of 1) are called positive samples, and the remaining samples are called negative samples.
[0067] In different embodiments, the business object corresponding to the above sample can be various business objects, such as users, operation events, transactions, business application requests, etc.
[0068] In a specific example, the business object is a user, which can be represented by their corresponding account. Correspondingly, category tags can be risky users or accounts, such as spam accounts, stolen accounts, users with credit risk, etc. User attributes can include basic attributes such as account registration duration, as well as attributes related to specific risk categories. For example, when used to assess credit risk, attributes such as the number of recent loans and the total amount of loans borrowed can also be included.
[0069] In another example, the business object is a transaction. Correspondingly, the category label could be a high-risk transaction, such as one suspected of fraud, cash-out schemes, or credit card theft. For transaction samples, attribute features could include, for example, transaction amount, transaction time, and transaction frequency in a recent period.
[0070] In another example, the business object is a business application request, such as a loan request or an insurance claim request. Correspondingly, the category label can be a high-risk application request, such as a claim request suspected of insurance fraud or an overdue loan request.
[0071] In other examples, the sample can also be other business objects, such as user actions, interaction events, etc. Different types of business objects have different attribute characteristics for different category labels, which will not be described in detail here.
[0072] Then, in step 22, based on the business scenario in which a single business object exists, the second feature value corresponding to its scenario characteristics is determined, and the second feature value is added to the corresponding first training sample to form the second training sample. It can be understood that this second feature value can also be called scenario encoding.
[0073] Figure 3 A schematic diagram illustrating the formation of a second training sample according to one embodiment is shown. (Refer to...) Figure 3 The first training sample includes features X and Y1. Feature X represents the feature value of the attribute feature of the business object, and Y1 represents the category label of whether the business object has business risk. The second training sample is obtained by adding the second feature value corresponding to the scenario feature of the business object on the basis of the first training sample. It can be understood that Code1 represents the aforementioned second feature value. The second training sample includes features X, Code1 and Y1, and Code1 is the feature value of the newly added feature field.
[0074] In one example, the scene feature corresponds to any of the following scenes:
[0075] Credit scenarios for large and medium-sized enterprises, credit scenarios for small and micro enterprises, medium- and long-term credit scenarios, and short-term credit scenarios.
[0076] In this example, all scenarios belong to the credit business domain. Therefore, the business objects in each scenario have many similar feature dimensions, but also some feature dimensions that differ significantly.
[0077] Next, in step 23, based on the second sample set formed by the various second training samples, a first decision tree is constructed through node splitting. The process of splitting any current node includes: for any of the multiple candidate splitting conditions for the current node, splitting the current node according to the splitting purity of that condition; wherein, during the splitting process, the scene features are treated as category features. It can be understood that a decision tree is a tree-like model with strong interpretability. A trained decision tree contains a root node, intermediate nodes, and leaf nodes, with each node except the leaf nodes corresponding to a splitting condition.
[0078] As those skilled in the art know, the sample set is input from the root node, and after passing through the splitting conditions of each node, it is divided into child nodes of the next level, until the leaf nodes. The process of training or building a decision tree is the process of splitting nodes starting from the root node by determining the splitting conditions corresponding to the nodes. Typically, the splitting condition of a node corresponds to a feature of the sample and a combination of feature values.
[0079] It should be understood that the aforementioned current node can be any node in the decision tree that needs to be split.
[0080] In one example, the process of splitting for any current node also includes:
[0081] Based on the first and second feature values of each business object in the current sample set falling into the current node, the multiple alternative splitting conditions are determined.
[0082] Furthermore, the attribute features include numerical multi-attribute features; determining the multiple candidate splitting conditions includes: enumerating the possible values of the multi-attribute features in the current sample set, discretizing each possible value into k integer values, and taking a combination of an attribute feature and an integer value of that attribute feature as a candidate splitting condition.
[0083] It is understandable that discretizing each possible value into k integer values, i.e., the feature binning process, allows for the storage of feature values in less memory and reduces computational cost.
[0084] Furthermore, determining the plurality of candidate splitting conditions further includes:
[0085] Enumerate the possible values of the scene feature in the current sample set, combine at least two of the possible values to obtain several value sets, and use the combination of the scene feature and a value set as a candidate splitting condition.
[0086] In the embodiments of this specification, scene features are regarded as category features, and their processing method differs from that of numerical features when determining alternative splitting conditions.
[0087] Figure 4 A schematic diagram illustrating the splitting conditions of a decision tree according to one embodiment is shown. (Refer to...) Figure 4 For user business objects, assuming the splitting condition of the root node is that an attribute feature is represented by 'a' with a value of 20, then user samples with 'a' greater than 20 will be assigned to the left child node of the root node, and user samples with 'a' less than or equal to 20 will be assigned to the right child node of the root node. This attribute feature is a numerical feature. For user business objects, the splitting condition of the intermediate node 1 is that the scenario feature is represented by 'class' with a value combination of (Code1, Code2), which is represented as ('1', '2'). Then, user samples with the scenario feature value of Code1 or Code2 will be assigned to the left child node of the intermediate node 1, and user samples with the scenario feature value of other values will be assigned to the right child node of the intermediate node 1. This scenario feature is a categorical feature.
[0088] In one example, the process of splitting for any current node also includes:
[0089] The splitting purity of the splitting condition is determined based on the sample purity of the current sample set corresponding to the current node and the sample purity of the two sample subsets corresponding to the two child nodes.
[0090] For example, we can determine the split purity Φ(s,t) for a given split condition (s,t), where s is the attribute feature selected for the split condition, and t is the feature value of that attribute feature used for splitting. The split purity Φ determines the information gain of the split condition for sample classification by measuring the change in sample purity φ of the node sample set before and after the split.
[0091] Furthermore, the purity of the sample is determined based on one of the following metrics: information entropy, Gini coefficient.
[0092] Furthermore, determining the splitting purity under this splitting condition specifically includes:
[0093] Using the ratio of the number of samples in each of the two sample subsets to the number of samples in the current sample set as their respective weights, the sample purity of the two sample subsets is weighted and summed to obtain a sum value;
[0094] The splitting purity of the splitting condition is determined based on the difference between the sample purity of the current sample set and the sum.
[0095] Thus, a decision tree is obtained by splitting any current node in the decision tree until a preset decision tree termination condition is met, referred to here as the first decision tree. The decision tree termination condition may include, for example, the depth reaching a certain threshold, the number of samples in a node being less than a certain threshold, and so on.
[0096] Finally, in step 24, a risk control model for classifying business objects is determined based on the first decision tree.
[0097] In one embodiment, the first decision tree is directly used as the final decision model. In this case, the decision model can be understood as containing the decision rules corresponding to each path formed from the root node to each leaf node in the first decision tree.
[0098] In one embodiment, each decision rule is also pruned to avoid overfitting caused by excessively long paths and overly complex rules.
[0099] This embodiment utilizes the Light Gradient Boosting Machine (LightGBM) algorithm's ability to handle categorical features. Scene-specific feature fields are added to the original training features, and these scene fields are set as category fields during model training, ensuring no relative ordering relationship between scenes. During model training, based on the training characteristics of the LightGBM algorithm, the tree model branches off at points with the highest information gain.
[0100] For categorical features, the LightGBM algorithm uses a many-vs-many splitting condition determination method instead of one-hot encoding. One-hot encoding requires a deeper imbalanced tree to achieve good results, while the many-vs-many method can combine multiple values in a single split, reducing the tree depth. The algorithm calculates the information gain statistics of samples corresponding to each feature value across each risk category; sorts the buckets from largest to smallest based on these statistics; and then performs cut-off point search within the sorted buckets. This approach to categorical features enables rapid scene customization and multi-scene model aggregation. It maintains a similar sample concentration ratio across different scenarios, preventing scene-specific categorical features from overshadowing other features.
[0101] The risk control model training method applicable to multiple scenarios provided in the embodiments of this specification first obtains each first training sample included in the first sample set, wherein each first training sample includes a first feature value corresponding to the attribute features of a single business object, and a category label indicating whether the business object has business risk; then, based on the business scenario in which the single business object is located, a second feature value corresponding to its scenario feature is determined, and the second feature value is added to the corresponding first training sample to form a second training sample; next, based on the second sample set formed by each second training sample, a first decision tree is constructed by node splitting, wherein the process of splitting any current node includes: for any splitting condition among multiple candidate splitting conditions of the current node, splitting the current node according to the splitting purity of the splitting condition; wherein, during the splitting process, the scenario feature is regarded as a category feature; finally, based on the first decision tree, a risk control model for classifying business objects is determined. As can be seen from the above, in the embodiments of this specification, a feature field corresponding to the scene is added on the basis of the first training sample. This feature field is set as a category field when training the model to ensure that there is no relative ranking relationship between the scenes. By adopting this processing method of using scene features as category features, it is possible to quickly customize the scene and summarize the multi-scene models, which can simplify the complexity of the model system and make the model have better performance.
[0102] Figure 5 This diagram illustrates a method for predicting risk categories according to one embodiment, which can be based on... Figure 1 The implementation scenario is shown. For example... Figure 5 As shown, the method for predicting risk categories in this embodiment includes the following steps: First, in step 51, a target sample is obtained, wherein the target sample includes a first feature value corresponding to the attribute characteristics of the target business object; then, in step 52, a second feature value corresponding to the scenario characteristics of the target business object is determined according to the business scenario in which the target business object is located; finally, in step 53, the first feature value and the second feature value are input... Figure 2 The risk control model trained by the method outputs the risk category of the target business object, and the risk category is used to indicate whether the target business object has business risk.
[0103] In one example, the second feature value is either a feature value that participated in training the risk control model or a feature value that did not participate in training the risk control model.
[0104] In the embodiments of this specification, during the prediction phase, for prediction tasks of a specific scenario, a corresponding scenario code is added to the samples in that scenario, which enables the invocation of the dedicated model corresponding to that scenario. For general models, scene codes that were not used in training can be selected as input, which enables the invocation of a scenario-generalized model.
[0105] Figure 6 This diagram illustrates a method for predicting risk categories according to another embodiment, which can be based on... Figure 1 The implementation scenario is shown. For example... Figure 6 As shown, the method for predicting risk categories in this embodiment includes the following steps: First, in step 61, a target sample is obtained, wherein the target sample includes a first feature value corresponding to the attribute characteristics of the target business object; then, in step 62, the first feature value is input... Figure 2 The risk control model trained by the method outputs the risk category of the target business object, and the risk category is used to indicate whether the target business object has business risk.
[0106] In the embodiments of this specification, during the prediction stage, for the general model, it is possible to choose not to pass in the scene code, which can achieve the calling of the scene generalization model.
[0107] According to another embodiment, a risk control model training device suitable for multiple scenarios is also provided, which is used to execute the training provided in the embodiments of this specification. Figure 2 The method shown. Figure 7 A schematic block diagram of a risk control model training apparatus suitable for multiple scenarios, according to one embodiment, is shown. Figure 7 As shown, the device 700 includes:
[0108] The acquisition unit 71 is used to acquire each of the first training samples included in the first sample set, wherein any first training sample includes a first feature value corresponding to the attribute features of a single business object, and a category label indicating whether the business object has business risks.
[0109] Adding unit 72 is used to determine the second feature value corresponding to the scenario feature of a single business object based on the business scenario in which the object is located, and add the second feature value to the first training sample obtained by the corresponding acquisition unit 71 to form a second training sample.
[0110] The construction unit 73 is used to construct a first decision tree by splitting nodes based on the second sample set formed by the second training samples obtained by the addition unit 72. The process of splitting any current node includes: splitting the current node according to the splitting purity of any splitting condition among multiple candidate splitting conditions of the current node; wherein, the scene features are regarded as category features during the splitting process.
[0111] The determining unit 74 is used to determine a risk control model for classifying business objects based on the first decision tree obtained by the constructing unit 73.
[0112] Optionally, as an example, the process of splitting for any current node further includes:
[0113] Based on the first and second feature values of each business object in the current sample set falling into the current node, the multiple alternative splitting conditions are determined.
[0114] Furthermore, the attribute features include numerical multi-attribute features; determining the multiple candidate splitting conditions includes: enumerating the possible values of the multi-attribute features in the current sample set, discretizing each possible value into k integer values, and taking a combination of an attribute feature and an integer value of that attribute feature as a candidate splitting condition.
[0115] Furthermore, determining the plurality of candidate splitting conditions further includes:
[0116] Enumerate the possible values of the scene feature in the current sample set, combine at least two of the possible values to obtain several value sets, and use the combination of the scene feature and a value set as a candidate splitting condition.
[0117] Optionally, as an example, the process of splitting for any current node further includes:
[0118] The splitting purity of the splitting condition is determined based on the sample purity of the current sample set corresponding to the current node and the sample purity of the two sample subsets corresponding to the two child nodes.
[0119] The risk control model training device applicable to multiple scenarios provided in the embodiments of this specification first acquires the first training samples included in the first sample set, wherein each first training sample includes a first feature value corresponding to the attribute features of a single business object, and a category label indicating whether the business object has business risk; then, the adding unit 72 determines the second feature value corresponding to the scenario feature of the single business object according to the business scenario in which it is located, and adds the second feature value to the corresponding first training sample to form a second training sample; next, the construction unit 73 constructs a first decision tree by splitting nodes based on the second sample set formed by the second training samples, wherein the process of splitting any current node includes: splitting the current node according to the splitting purity of any of the multiple alternative splitting conditions of the current node; wherein, the scenario feature is regarded as a category feature during the splitting process; finally, the determining unit 74 determines the risk control model for classifying business objects based on the first decision tree. As can be seen from the above, in the embodiments of this specification, a feature field corresponding to the scene is added on the basis of the first training sample. This feature field is set as a category field when training the model to ensure that there is no relative ranking relationship between the scenes. By adopting this processing method of using scene features as category features, it is possible to quickly customize the scene and summarize the multi-scene models, which can simplify the complexity of the model system and make the model have better performance.
[0120] According to another embodiment, an apparatus for predicting risk categories is also provided, the apparatus being used to perform the functions provided in the embodiments of this specification. Figure 5 The method shown. Figure 8 A schematic block diagram of an apparatus for predicting risk categories according to one embodiment is shown. Figure 8 As shown, the device 800 includes:
[0121] Acquisition unit 81 is used to acquire target samples, wherein the target samples include a first feature value corresponding to the attribute features of the target business object;
[0122] The determining unit 82 is used to determine the second feature value corresponding to the scenario feature of the target business object based on the business scenario in which the target business object is located.
[0123] Prediction unit 83 is used to input the first feature value acquired by acquisition unit 81 and the second feature value determined by determination unit 82 into the prediction unit 83. Figure 7 The risk control model trained by the device outputs the risk category of the target business object, and the risk category is used to indicate whether the target business object has business risks.
[0124] Optionally, as an embodiment, the second feature value is a feature value that participated in training the risk control model or a feature value that did not participate in training the risk control model.
[0125] According to the embodiments of this specification, a device for predicting risk categories first acquires a target sample, wherein the target sample includes a first feature value corresponding to the attribute characteristics of a target business object; then, a determining unit 82 determines a second feature value corresponding to the scenario characteristics of the target business object based on the business scenario in which the target business object is located; finally, a predicting unit 83 inputs the first feature value and the second feature value into the target business object. Figure 7 The risk control model trained by the device outputs a risk category for the target business object, which indicates whether the target business object has business risk. As can be seen from the above, this embodiment of the specification... Figure 7 The risk control model trained by the device can achieve rapid scenario customization and multi-scenario model aggregation, which can simplify the complexity of the model system and make the model have better performance. Therefore, in the prediction stage, for the prediction task of a specific scenario, the corresponding feature values of the scenario feature are added to the samples under the scenario, which can realize the calling of the customized model for the specific scenario and have a high prediction accuracy.
[0126] According to another embodiment, an apparatus for predicting risk categories is also provided, the apparatus being used to perform the functions provided in the embodiments of this specification. Figure 6 The method shown. Figure 9 A schematic block diagram of an apparatus for predicting risk categories according to another embodiment is shown. Figure 9 As shown, the device 900 includes:
[0127] Acquisition unit 91 is used to acquire target samples, wherein the target samples include a first feature value corresponding to the attribute features of the target business object;
[0128] Prediction unit 92 is used to input the first feature value obtained by acquisition unit 91 into the prediction unit 92. Figure 7 The risk control model trained by the device outputs the risk category of the target business object, and the risk category is used to indicate whether the target business object has business risks.
[0129] Another apparatus for predicting risk categories provided in the embodiments of this specification first acquires a target sample by an acquisition unit 91, wherein the target sample includes a first feature value corresponding to the attribute characteristics of a target business object; then the prediction unit 92 inputs the first feature value. Figure 7The risk control model trained by the device outputs a risk category for the target business object, which indicates whether the target business object has business risk. As can be seen from the above, this embodiment of the specification... Figure 7 The risk control model trained by the device can achieve rapid scenario customization and multi-scenario model aggregation, which can simplify the complexity of the model system and make the model have better performance. Therefore, in the prediction stage, for general models, it is possible to choose not to pass in the feature values corresponding to the scenario features, that is, to realize the calling of the scenario generalization model and have a high prediction accuracy.
[0130] According to another embodiment, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed in a computer, causes the computer to perform a combination Figure 2 , Figure 5 or Figure 6 The method described.
[0131] According to another embodiment, a computing device is also provided, including a memory and a processor, wherein executable code is stored in the memory, and when the processor executes the executable code, it implements a combination... Figure 2 , Figure 5 or Figure 6 The method described.
[0132] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in this invention can be implemented using hardware, software, firmware, or any combination thereof. When implemented in software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium.
[0133] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.
Claims
1. A risk control model training method applicable to multiple scenarios, the method comprising: Obtain each first training sample from multiple scenarios included in the first sample set, wherein each first training sample includes a first feature value corresponding to the attribute features of a single business object, and a category label indicating whether the business object has business risks. Based on the business scenario in which a single business object is located, a second feature value corresponding to its scenario characteristics is determined, and the second feature value is added to the corresponding first training sample to form a second training sample; the second feature value is used to indicate the business scenario. Based on the second sample set formed by each second training sample, a first decision tree is constructed by splitting nodes. The process of splitting any current node includes: determining multiple candidate splitting conditions based on the first and second feature values of each business object in the current sample set falling into the current node; for any splitting condition among the multiple candidate splitting conditions for the current node, splitting the current node according to the splitting purity of the splitting condition; wherein, during the splitting process, the scene features are regarded as category features to ensure that there is no relative ranking relationship between the scenes. Based on the first decision tree, a risk control model for classifying business objects is determined.
2. The method of claim 1, wherein, The attribute features include numerical multi-attribute features; Determining the multiple candidate splitting conditions includes: enumerating the possible values of the multiple attribute features in the current sample set, discretizing each possible value into k integer values, and taking a combination of an attribute feature and an integer value of that attribute feature as a candidate splitting condition.
3. The method of claim 1, wherein, The determination of the plurality of candidate splitting conditions further includes: Enumerate the possible values of the scene feature in the current sample set, combine at least two of the possible values to obtain several value sets, and use the combination of the scene feature and a value set as a candidate splitting condition.
4. The method of claim 1, wherein, The process of splitting any current node also includes: The splitting purity of the splitting condition is determined based on the sample purity of the current sample set corresponding to the current node, and the sample purity of the two sample subsets corresponding to the two child nodes of the current node.
5. The method of claim 4, wherein, The purity of the sample is determined based on one of the following metrics: information entropy, Gini coefficient.
6. The method of claim 4, wherein, Determining the splitting purity under this splitting condition specifically includes: Using the ratio of the number of samples in each of the two sample subsets to the number of samples in the current sample set as their respective weights, the sample purity of the two sample subsets is weighted and summed to obtain a sum value; The splitting purity of the splitting condition is determined based on the difference between the sample purity of the current sample set and the sum.
7. The method of any one of claims 1-6, wherein, The business objects include one of the following: users, operation events, transactions, and business application requests.
8. The method of any one of claims 1-6, wherein, The scene feature corresponds to any of the following scenarios: Credit scenarios for large and medium-sized enterprises, credit scenarios for small and micro enterprises, medium- and long-term credit scenarios, and short-term credit scenarios.
9. A method for predicting risk categories, the method comprising: Obtain a target sample, wherein the target sample includes a first feature value corresponding to the attribute features of the target business object; Based on the business scenario in which the target business object is located, a second feature value corresponding to its scenario characteristics is determined; the second feature value is used to indicate the business scenario. The first feature value and the second feature value are input into the risk control model trained by the method of claim 1, and the risk control model outputs the risk category of the target business object, wherein the risk category is used to indicate whether the target business object has business risk.
10. The method of claim 9, wherein, The second feature value is either a feature value that participated in training the risk control model or a feature value that did not participate in training the risk control model.
11. A method for predicting risk categories, the method comprising: Obtain a target sample, wherein the target sample includes a first feature value corresponding to the attribute features of the target business object; The first feature value is input into the risk control model trained by the method of claim 1, and the risk control model outputs the risk category of the target business object, wherein the risk category is used to indicate whether the target business object has business risk.
12. A risk control model training device suitable for multiple scenarios, the device comprising: The acquisition unit is used to acquire each of the first training samples of the multiple scenarios included in the first sample set, wherein any first training sample includes a first feature value corresponding to the attribute features of a single business object, and a category label indicating whether the business object has business risks. An adding unit is used to determine the second feature value corresponding to the scenario feature of a single business object based on the business scenario in which the object is located, and add the second feature value to the first training sample obtained by the corresponding acquisition unit to form a second training sample; the second feature value is used to indicate the business scenario. The construction unit is used to construct a first decision tree by splitting nodes based on the second sample set formed by the second training samples obtained by the addition unit. The process of splitting any current node includes: determining multiple candidate splitting conditions based on the first feature value and the second feature value of each business object in the current sample set falling into the current node; and splitting the current node according to the splitting purity of any one of the multiple candidate splitting conditions for the current node. In the splitting process, the scene features are regarded as category features to ensure that there is no relative ranking relationship between the scenes. The determining unit is used to determine a risk control model for classifying business objects based on the first decision tree obtained by the constructing unit.
13. The apparatus of claim 12, wherein, The attribute features include numerical multi-attribute features; Determining the multiple candidate splitting conditions includes: enumerating the possible values of the multiple attribute features in the current sample set, discretizing each possible value into k integer values, and taking a combination of an attribute feature and an integer value of that attribute feature as a candidate splitting condition.
14. The apparatus of claim 12, wherein, The determination of the plurality of candidate splitting conditions further includes: Enumerate the possible values of the scene feature in the current sample set, combine at least two of the possible values to obtain several value sets, and use the combination of the scene feature and a value set as a candidate splitting condition.
15. The apparatus of claim 12, wherein, The process of splitting any current node also includes: The splitting purity of the splitting condition is determined based on the sample purity of the current sample set corresponding to the current node, and the sample purity of the two sample subsets corresponding to the two child nodes of the current node.
16. An apparatus for predicting risk categories, the apparatus comprising: An acquisition unit is used to acquire a target sample, wherein the target sample includes a first feature value corresponding to the attribute features of a target business object; The determining unit is configured to determine a second feature value corresponding to the scenario characteristics of the target business object based on the business scenario in which the target business object is located; the second feature value is used to indicate the business scenario. The prediction unit is used to input the first feature value obtained by the acquisition unit and the second feature value determined by the determination unit into the risk control model trained by the device according to claim 12, and output the risk category of the target business object through the risk control model, wherein the risk category is used to indicate whether the target business object has business risk.
17. The apparatus of claim 16, wherein, The second feature value is either a feature value that participated in training the risk control model or a feature value that did not participate in training the risk control model.
18. An apparatus for predicting risk categories, the apparatus comprising: An acquisition unit is used to acquire a target sample, wherein the target sample includes a first feature value corresponding to the attribute features of a target business object; The prediction unit is used to input the first feature value obtained by the acquisition unit into the risk control model trained by the device according to claim 12, and output the risk category of the target business object through the risk control model. The risk category is used to indicate whether the target business object has business risk.
19. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method of any one of claims 1-11.
20. A computing device comprising a memory and a processor, wherein the memory stores executable code, and the processor, when executing the executable code, implements the method of any one of claims 1-11.
Citation Information
Patent Citations
Risk control method and device, medium and apparatus
CN110599004A
Risk determination method and device and electronic equipment
CN111047423A
Decision model training method and device for business object classification
CN112801231A