Behavioral fraud prediction method and apparatus, and electronic device

By updating sample weights and training decision tree models in multiple rounds, joint rules are constructed, which solves the problems of high cost and low accuracy in screening high-risk groups in credit risk control business, and achieves efficient and accurate behavioral fraud prediction.

WO2025246462A1PCT designated stage Publication Date: 2025-12-04SHANGHAI ICEKREDIT INC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/077797
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-05-28
Filing Date
2025-02-18
Publication Date
2025-12-04

AI Technical Summary

Technical Problem

Existing technologies in credit risk control are costly and inaccurate in screening high-risk individuals, making it difficult to effectively identify customers who engage in behavioral fraud.

Method used

By acquiring sample labels and initial sample weights, updating sample weights, training the decision tree model in multiple rounds, filtering target behavior sample data, constructing joint rules for prediction, and optimizing the model to improve accuracy.

Benefits of technology

It reduces the screening cost of high-risk traffic, improves the accuracy and stability of behavioral fraud prediction, avoids complex modeling processes, and focuses on the automated processing of the characteristics of the samples themselves.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025077797_04122025_PF_FP_ABST
    Figure CN2025077797_04122025_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure relates to a behavioral fraud prediction method and apparatus, and an electronic device. The method comprises: acquiring historical behavior data having sample labels and initial sample weights; updating the initial sample weight on the basis of the sample label of each piece of historical behavior data, so as to obtain a reset sample weight; repeatedly performing multiple rounds of training on a decision tree model on the basis of the sample weights, and performing screening on training set samples by means of the trained decision tree model, so as to obtain target behavior sample data classified by a prediction result; calculating multiple indexes on the basis of the target behavior sample data and a sample set, and updating the reset sample weight on the basis of a calculated value of each index until a target decision tree model meeting a preset requirement is obtained; and selecting a decision tree model from iteration rounds before the target decision tree model is obtained, so as to construct a joint rule, and by means of the joint rule, performing prediction on acquired user behavior data, so as to obtain a behavioral fraud prediction result. Thus, high-risk users can be more accurately found.
Need to check novelty before this filing date? Find Prior Art

Description

Behavioral fraud prediction methods, devices and electronic equipment Technical Field

[0001] This disclosure relates to the field of data processing technology, and in particular to a method, apparatus and electronic device for predicting behavioral fraud. Background Technology

[0002] In existing credit risk control operations, scenarios such as anti-behavioral fraud and identity verification need to hit a portion of the target customer group with a low probability, while requiring that this portion of the target customer group belong to high-risk groups as much as possible, that is, to screen out the customers who are actually engaging in behavioral fraud as accurately as possible.

[0003] In relevant scenarios, historical personal behavior data and custom sample labels (e.g., whether behavioral fraud exists within a certain time range) are primarily used to create machine learning models, including common methods like logistic regression and XGBoost, for customer classification to screen for high-risk individuals. However, evaluating the effectiveness of high-risk screening typically focuses on the Lift metric, which reflects the strength of the predicted results for the screened samples compared to the normal (randomly selected) outcome. For models that only need to distinguish between high-risk and low-risk categories, the final prediction can be the expected value of a single sample as high-risk. A manually specified threshold is needed to determine which group is classified as high-risk. Often, the threshold is determined using the KS metric based on the machine learning model's prediction, but this method is likely to result in a large base of individuals classified as high-risk. The probability of the model predicting high-risk traffic is sorted from high to low, and the top percentage is directly divided as high-risk traffic. Generally, it is less than 150%. Although this method reduces the number of predicted high-risk traffic as much as possible, it still relies on the effect of the model itself to determine the lift index of the prediction result, which leads to a higher cost and the need to obtain a better model (evaluated by indicators such as AUC[3] and KS).

[0004] In relevant scenarios, rule-based feature specification screening can also be performed based on historical data of individual behavior. However, if rules are formulated based on feature values, and it is difficult to find highly discriminative features in the dataset itself, the accuracy of the prediction will be low. Summary of the Invention

[0005] To overcome the technical problems of high cost in classifying and distinguishing high-risk groups and low accuracy in rule-based screening of high-risk groups in related technologies, this disclosure provides a behavioral fraud prediction method, device and electronic device.

[0006] In a first aspect of this disclosure, a behavioral fraud prediction method is provided, the method comprising:

[0007] Obtain historical behavior data with sample labels representing the sample type to which the historical behavior data belongs, and the initial sample weight of each historical behavior data in the sample set composed of the historical behavior data;

[0008] Based on the sample label of each historical behavior data, the initial sample weight of each historical behavior data in the sample set is updated to obtain the reset sample weight of each historical behavior data.

[0009] The decision tree model is trained by repeating the process multiple times based on the sample weights of the historical behavior data. The trained decision tree model is then used to filter the training set samples in the sample set to select target behavior sample data that are classified according to the prediction results.

[0010] Multiple indicators are calculated based on the target behavior sample data and the sample set, and the reset sample weights of each historical behavior data are updated based on the calculated value of each indicator until a target decision tree model that meets the preset requirements is obtained.

[0011] From the iterations prior to obtaining the target decision tree model, select the trained decision tree model to construct joint rules, and use the joint rules to predict the acquired user behavior data to obtain the behavior fraud prediction result.

[0012] In one possible implementation, updating the initial sample weight of each historical behavior data in the sample set based on the sample label of each historical behavior data to obtain the reset sample weight of each historical behavior data includes:

[0013] Calculate the ratio of the historical behavioral data in the sample set whose sample labels represent negative samples to the historical behavioral data whose sample labels represent positive samples, and obtain an initial ratio value;

[0014] Based on the initial ratio and the initial error rate, calculate the first weight of the historical behavior data of each sample type (positive sample) and the second weight of the historical behavior data of each sample type (negative sample) in different sub-nodes of the sample set.

[0015] Based on the first weight and the second weight, the initial sample weight of each historical behavior data in the sample set is updated to obtain the reset sample weight of each historical behavior data.

[0016] In one possible implementation, updating the initial sample weight of each historical behavior data in the sample set according to the first weight and the second weight to obtain the reset sample weight of each historical behavior data includes:

[0017] The total sample weights of the historical behavior data in the sample set are obtained by summing the first weight and the second weight.

[0018] Based on the total sample weights, the first weights representing the historical behavior data of the sample type positive samples by the sample labels are normalized, and the initial sample weights representing the historical behavior data of the sample type positive samples by the sample labels in the sample set are updated according to the normalized first weights, so as to obtain the reset sample weights representing the historical behavior data of the sample type positive samples by the sample labels.

[0019] Based on the total sample weights, the second weights representing the historical behavior data of the sample type negative samples are normalized according to the sample labels, and the initial sample weights representing the historical behavior data of the sample type negative samples in the sample set are updated according to the normalized second weights, so as to obtain the reset sample weights representing the historical behavior data of the sample type negative samples.

[0020] In one possible implementation, calculating the first weight of the historical behavior data of each sample type (positive sample) and the second weight of the historical behavior data of each sample type (negative sample) in different sub-nodes of the sample set, based on the initial ratio value and the initial error rate, includes:

[0021] Calculate the difference between 1 and the initial error rate to obtain the second weight of the historical behavior data of each sample type negative sample in different sub-nodes of the sample set;

[0022] The difference is used as the product of the initial ratio value and the difference to obtain the first weight of the historical behavior data of each sample type positive sample in different sub-nodes of the sample set.

[0023] In one possible implementation, the calculation of multiple indicators based on the target behavior sample data and the sample set includes:

[0024] The target behavior sample data is divided into different leaf nodes. The ratio of the fifth number of first behavior sample data that is predicted to belong to the target sample type in different leaf nodes to the sixth number of target behavior sample data in that leaf node is determined to determine the first node sample ratio in this round.

[0025] Determine the ratio of the fifth number of first-row sample data predicting the target sample type in different leaf nodes to the first number of target-row sample data, and determine the second node sample ratio for this round.

[0026] Determine the ratio of the sixth quantity of the target behavior sample data to the first quantity of the target behavior sample data in different leaf nodes, and determine the third node sample ratio for this round;

[0027] Determine the ratio of the second number of first behavior sample data predicted to belong to the target sample type to the seventh number of second behavior sample data predicted not to belong to the target sample type in the target behavior sample data, and obtain the calculated ratio value;

[0028] The update error rate is obtained by determining the ratio of the second number of first behavior sample data predicted to belong to the target sample type in the target behavior sample data to the first number of target behavior sample data.

[0029] In one possible implementation, updating the reset sample weights of each historical behavior data point based on the calculated value of each of the obtained indicators includes:

[0030] For the first behavior sample data predicted to belong to the target sample type in the historical behavior data, the sample weights are reset and updated according to the sample ratio of the first node, the sample ratio of the second node, the sample ratio of the third node, the calculated ratio value, and the update error rate;

[0031] For the second behavior sample data in the historical behavior data that is predicted not to belong to the target sample type, the sample weights are reset and updated according to the sample ratio of the first node, the sample ratio of the second node, the sample ratio of the third node, and the update error rate.

[0032] In one possible implementation, the step of selecting the trained decision tree model from the iterations preceding the acquisition of the target decision tree model to construct joint rules includes:

[0033] The improvement is obtained in each round of calculating the indicator, wherein the improvement is determined based on the first number of target behavior sample data, the second number of first behavior sample data in the target behavior sample data that is predicted to belong to the target sample type, the third number of second behavior sample data in the sample set whose sample labels represent that belong to the target sample type, and the fourth number of historical behavior data in the sample set.

[0034] The maximum value of the lift is determined to be the target lift.

[0035] From the iterations preceding the target decision tree model, select the decision tree models corresponding to the iterations preceding the iteration corresponding to the target lift to construct the joint rule.

[0036] In one possible implementation, the lift is calculated as follows:

[0037] Calculate the ratio of the second number of first behavior sample data predicted to belong to the target sample type in the target behavior sample data to the third number of second behavior sample data in the sample set whose sample labels represent that they belong to the target sample type, and obtain the first ratio.

[0038] Calculate the ratio of the first number of the target behavior sample data to the fourth number of the historical behavior data in the sample set to obtain the second ratio;

[0039] The lift is obtained by calculating the ratio of the first ratio to the second ratio.

[0040] In a second aspect of this disclosure, a behavioral fraud prediction apparatus is provided, the apparatus comprising:

[0041] The acquisition module is configured to acquire historical behavior data with sample labels representing the sample type to which the historical behavior data belongs, and the initial sample weight of each historical behavior data in the sample set consisting of the historical behavior data.

[0042] The update module is configured to update the initial sample weight of each historical behavior data in the sample set according to the sample label of each historical behavior data, so as to obtain the reset sample weight of each historical behavior data.

[0043] The iterative module is configured to repeatedly execute multiple rounds of training the decision tree model based on the sample weights of the historical behavior data, filter the training set samples in the sample set using the trained decision tree model, filter out the target behavior sample data classified according to the prediction results, calculate multiple indicators based on the target behavior sample data and the sample set, and update the reset sample weights of each historical behavior data according to the calculated value of each indicator, until a target decision tree model that meets the preset requirements is obtained.

[0044] The prediction module is configured to select the trained decision tree model from the iterations prior to obtaining the target decision tree model to construct joint rules, and use the joint rules to predict the acquired user behavior data to obtain the behavior fraud prediction result.

[0045] In a third aspect of this disclosure, an electronic device is provided, comprising:

[0046] processor;

[0047] Memory used to store processor-executable instructions;

[0048] The processor is configured to execute executable instructions in the memory to implement the method described in any one of the first aspects.

[0049] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0050] The process involves: acquiring historical behavior data with sample labels representing the sample type of the historical behavior data, and obtaining the initial sample weights for each historical behavior data in the sample set; updating the initial sample weights for each historical behavior data in the sample set based on its sample label to obtain reset sample weights; repeating this process multiple times to train a decision tree model based on the sample weights of the historical behavior data; filtering the training set samples in the sample set using the trained decision tree model to select target behavior sample data for classification based on the prediction results; calculating various indicators based on the target behavior sample data and the sample set, and updating the reset sample weights for each historical behavior data based on the calculated value of each indicator, until a target decision tree model that meets the preset requirements is obtained; selecting the trained decision tree model from the iterations before obtaining the target decision tree model to construct joint rules, and using the joint rules to predict the acquired user behavior data to obtain the behavior fraud prediction result. This approach utilizes a decision tree model to formulate single-round rules, with multiple rounds of rules implemented sequentially. In each round, a specific strategy is used to select samples for the next round of rule development. The weights of the next round's input samples are updated based on the current model's results. Iteration continues until the required number of iterations is reached or the effect no longer improves. This avoids complex modeling processes (including parameter tuning, feature selection, etc.), focusing more on the samples themselves. The simple decision tree model automatically integrates low-discrimination features to formulate more interpretable joint rules. Furthermore, the lift metric is used to optimize the model, resulting in fewer and more accurate screenings of high-risk traffic.

[0051] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

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

[0053] Figure 1 is a flowchart illustrating a behavioral fraud prediction method according to an exemplary embodiment.

[0054] Figure 2 is a flowchart illustrating an implementation of step S12 in Figure 1 according to an exemplary embodiment.

[0055] Figure 3 is a flowchart illustrating a target decision tree model training method according to an exemplary embodiment.

[0056] Figure 4 is a flowchart illustrating an implementation of step S15 in Figure 1 according to an exemplary embodiment.

[0057] Figure 5 is a block diagram illustrating a behavioral fraud prediction device according to an exemplary embodiment. Detailed Implementation

[0058] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0059] The behavioral fraud prediction method disclosed herein aims to avoid the phenomenon of overgeneralization from sample data, which could lead to significant deviations in the overall behavioral fraud prediction, thereby improving the accuracy of the overall big data quality assessment.

[0060] Furthermore, Figure 1 is a flowchart illustrating a behavioral fraud prediction method according to an exemplary embodiment. As shown in Figure 1, the method includes the following steps.

[0061] In step S11, historical behavior data with sample labels representing the sample type to which the historical behavior data belongs, and the initial sample weight of each historical behavior data in the sample set composed of the historical behavior data are obtained.

[0062] Historical behavior data consists of user behavior records collected over a past period, potentially including information on overdue payments, defaults, and other behavioral issues. Sample labels identify the sample type of historical behavior data, such as "fraudulent" or "normal." Sample weights, used in machine learning, adjust the influence of different samples during model training. Initial sample weights are typically uniform, but may be updated according to certain rules in subsequent steps.

[0063] In this embodiment of the disclosure, historical user behavior data with sample tags can be obtained from text files or databases. The sample tags indicate whether the corresponding sample is high-risk traffic. Generally, high-risk samples are positive samples, and low-risk samples are negative samples.

[0064] In step S12, the initial sample weight of each historical behavior data in the sample set is updated according to the sample label of each historical behavior data to obtain the reset sample weight of each historical behavior data.

[0065] The initial sample weights are adjusted based on the sample labels and certain rules (such as sample imbalance). For example, if there are few fraudulent samples, the weight of fraudulent samples might be increased so that the model pays more attention to them. If the number of fraudulent samples is found to be far less than the number of normal samples, in order to improve the model's ability to identify fraudulent behavior, it is decided to increase the weight of fraudulent samples, for example, by increasing the weight of fraudulent samples to 5, while the weight of normal samples remains unchanged.

[0066] In step S13, the decision tree model is trained by repeating the process multiple times based on the sample weights of the historical behavior data. The trained decision tree model is then used to filter the training set samples in the sample set to select target behavior sample data that are classified according to the prediction results.

[0067] The decision tree model is trained using weighted historical behavioral data. After training, the model is used to filter the sample set, selecting samples whose predictions meet specific conditions (e.g., samples predicted as fraud). In multiple iterations, the weighted transaction records are used to train the decision tree model. After each training round, the model is used to predict transaction records, selecting those predicted as fraudulent for further analysis.

[0068] In step S14, multiple indicators are calculated based on the target behavior sample data and the sample set, and the reset sample weight of each historical behavior data is updated based on the calculated value of each indicator until a target decision tree model that meets the preset requirements is obtained.

[0069] The process involves calculating various performance metrics (such as accuracy and recall) based on target behavior sample data and the entire sample set. Then, sample weights are adjusted based on these metrics to optimize model performance. This process is repeated until a preset stopping condition is met (e.g., performance reaches a certain threshold or the number of iterations reaches its limit). After each iteration, the decision tree model's accuracy and recall in predicting fraudulent transactions are calculated. Based on these metrics, the weights of transaction records are adjusted to further optimize the model in the next iteration. This process continues until the model's performance reaches a preset requirement, such as an accuracy exceeding 95%. This dynamic adjustment of sample weights ultimately results in more accurate joint rules, improving the accuracy of behavioral fraud predictions.

[0070] In step S15, a joint rule is constructed by selecting the trained decision tree model from the iterations prior to obtaining the target decision tree model, and the obtained user behavior data is predicted using the joint rule to obtain the behavior fraud prediction result.

[0071] In this process, several high-performing decision tree models from previous iterations are selected to construct a joint rule. This joint rule combines the advantages of multiple models, improving the accuracy and stability of predictions. Finally, this joint rule is used to predict new user behavior data, yielding predictions of fraudulent behavior. During training, the decision tree models obtained in each iteration are saved. After obtaining models that meet the requirements, several high-performing decision tree models are selected from these saved models to construct the joint rule. This joint rule can be a simple voting mechanism or a more complex ensemble learning algorithm, such as a random forest or gradient boosting tree.

[0072] The joint rule, which combines the predictions of multiple models, can reduce the overfitting or underfitting problems that may exist in a single model, thereby improving the overall prediction performance. Each model has its own characteristics and advantages; by integrating them, these advantages can be fully utilized to obtain more stable and accurate prediction results.

[0073] For example, in an anti-fraud system, three of the best-performing models from a previously stored decision tree model set are selected to construct a joint rule. This joint rule employs a voting mechanism: a transaction is considered fraudulent if at least two models predict it is fraudulent. This joint rule is then used to predict new transaction records, yielding the final fraud prediction result.

[0074] In this embodiment, a decision tree model is used to formulate single-round rules, with multiple rounds of rules implemented sequentially. In each round, a certain strategy is used to select samples to enter the next round of the rule model, and the weights of the samples entering the next round are updated based on the results of the current model. The model iteration stops when the required number of iterations is reached or the effect no longer improves. The final combined rule is determined by combining the lift index and the estimated high-risk amount.

[0075] The above technical solution acquires historical behavior data with sample labels representing the sample type to which the historical behavior data belongs, and the initial sample weight of each historical behavior data in the sample set composed of historical behavior data; updates the initial sample weight of each historical behavior data in the sample set according to the sample label of each historical behavior data to obtain the reset sample weight of each historical behavior data; repeats multiple rounds of execution to train the decision tree model according to the sample weight of the historical behavior data, and filters the training set samples in the sample set through the trained decision tree model to select target behavior sample data classified according to the prediction results; calculates multiple indicators based on the target behavior sample data and the sample set, and updates the reset sample weight of each historical behavior data according to the calculated value of each indicator until a target decision tree model that meets the preset requirements is obtained; selects the trained decision tree model from the iteration rounds before obtaining the target decision tree model to construct joint rules, and uses the joint rules to predict the acquired user behavior data to obtain the behavior fraud prediction result. This approach utilizes a decision tree model to formulate single-round rules, with multiple rounds of rules implemented sequentially. In each round, a specific strategy is used to select samples for the next round of rule development. The weights of the next round's input samples are updated based on the current model's results. Iteration continues until the required number of iterations is reached or the effect no longer improves. This avoids complex modeling processes (including parameter tuning, feature selection, etc.), focusing more on the samples themselves. The simple decision tree model automatically integrates low-discrimination features to formulate more interpretable joint rules. Furthermore, the lift metric is used to optimize the model, resulting in fewer and more accurate screenings of high-risk traffic.

[0076] In one possible implementation, referring to Figure 2, in step S12, updating the initial sample weight of each historical behavior data in the sample set according to the sample label of each historical behavior data to obtain the reset sample weight of each historical behavior data includes:

[0077] In step S121, the ratio of the historical behavioral data in the sample set whose sample label represents the sample type as negative to the historical behavioral data whose sample label represents the sample type as positive is calculated to obtain an initial ratio value;

[0078] Negative samples are those that do not belong to the target category or do not meet specific conditions. For example, in fraud detection, normal transaction records might be considered negative samples. Conversely, positive samples are those that belong to the target category or meet specific conditions. In fraud detection, fraudulent transaction records are positive samples.

[0079] In step S122, based on the initial ratio value and the initial error rate, the first weight of the historical behavior data of each sample type positive sample in different sub-nodes of the sample set and the second weight of the historical behavior data of each sample type negative sample are calculated.

[0080] Split nodes are internal nodes in the tree, used to divide samples into different subtrees based on the value of a certain feature.

[0081] Since the number of positive samples is small, but fraud detection is very important, the system decides to increase the weight of positive samples and decrease the weight of negative samples. Assuming an initial error rate of 10%, based on the ratio and error rate, it can be calculated that in different nodes of the decision tree, the first weight of positive samples is 2 (increased weight), and the second weight of negative samples is 0.5 (decreased weight).

[0082] In step S123, the initial sample weights of each historical behavior data in the sample set are updated according to the first weight and the second weight to obtain the reset sample weights of each historical behavior data.

[0083] The system updates the initial sample weights based on the calculated first and second weights. The weights of all positive samples (fraudulent transactions) increase from 1 to 2, while the weights of all negative samples (normal transactions) decrease from 1 to 0.5. This ensures that positive samples have a greater impact during subsequent model training, allowing the model to focus more on learning how to identify fraudulent transactions.

[0084] Through the above steps, the sample weights were adjusted according to the sample type and the initial error rate to better handle imbalanced datasets during model training and improve the accuracy of fraud detection.

[0085] In one possible implementation, step S123, updating the initial sample weight of each historical behavior data in the sample set according to the first weight and the second weight to obtain the reset sample weight of each historical behavior data, includes:

[0086] The total sample weights of the historical behavior data in the sample set are obtained by summing the first weight and the second weight.

[0087] Based on the total sample weights, the first weights representing the historical behavior data of the sample type positive samples by the sample labels are normalized, and the initial sample weights representing the historical behavior data of the sample type positive samples by the sample labels in the sample set are updated according to the normalized first weights, so as to obtain the reset sample weights representing the historical behavior data of the sample type positive samples by the sample labels.

[0088] The method involves normalizing the ratio of the first weight of the historical behavior data representing the sample type as a positive sample to the sum of the total sample weights.

[0089] Based on the total sample weights, the second weights representing the historical behavior data of the sample type negative samples are normalized according to the sample labels, and the initial sample weights representing the historical behavior data of the sample type negative samples in the sample set are updated according to the normalized second weights, so as to obtain the reset sample weights representing the historical behavior data of the sample type negative samples.

[0090] Specifically, the ratio of the second weight representing the historical behavioral data of the sample label, which is a negative sample, to the sum of the total sample weights is normalized.

[0091] The weights of each sample are normalized by dividing the weight of each sample by the sum of the total sample weights. The weight of each sample is initialized to w0.

[0092] In one possible implementation, in step S122, calculating the first weight of the historical behavior data of each sample type (positive sample) and the second weight of the historical behavior data of each sample type (negative sample) in different sub-nodes of the sample set, based on the initial ratio value and the initial error rate, includes:

[0093] Calculate the difference between 1 and the initial error rate to obtain the second weight of the historical behavior data of each sample type negative sample in different sub-nodes of the sample set;

[0094] The difference is used as the product of the initial ratio value and the difference to obtain the first weight of the historical behavior data of each sample type positive sample in different sub-nodes of the sample set.

[0095] In this embodiment of the disclosure, the ratio of negative samples to positive samples in the entire sample set can be calculated to obtain an initial ratio value r. The initial error rate e can be 0. The weight of each sample is calculated, where the weight of all positive samples is r*(1-e); and the weight of each negative sample is (1-e).

[0096] In one possible implementation, the calculation of multiple indicators based on the target behavior sample data and the sample set includes:

[0097] The target behavior sample data is divided into different leaf nodes. The ratio of the fifth number of first behavior sample data that is predicted to belong to the target sample type in different leaf nodes to the sixth number of target behavior sample data in that leaf node is determined to determine the first node sample ratio in this round.

[0098] Referring to Figure 3, in this embodiment of the disclosure, the decision tree divides different samples into different leaf nodes (nodes that are no longer further divided) based on the feature values. Each leaf node may contain samples with both positive and negative true labels. As shown in the figure, the value of a node represents the ratio of negative to positive samples. For a single leaf node, the proportion of true positive samples can be calculated, which is the number of samples with positive true labels in that leaf node divided by the total number of samples in that leaf node. The resulting proportion is s. a .

[0099] Determine the ratio of the fifth number of first-row sample data predicting the target sample type in different leaf nodes to the first number of target-row sample data, and determine the second node sample ratio for this round.

[0100] Referring to Figure 3, in this embodiment of the disclosure, the proportion of positive samples on each leaf node of the decision tree in the current round of screening is calculated to the total number of positive samples in all screened samples. Specifically, for a single leaf node, the proportion is calculated by dividing the number of samples with positive true labels in that leaf node by the number of samples with positive true labels in the screened samples. The resulting proportion is s. b .

[0101] Determine the ratio of the sixth quantity of the target behavior sample data to the first quantity of the target behavior sample data in different leaf nodes, and determine the third node sample ratio for this round;

[0102] Referring to Figure 3, in this embodiment of the disclosure, the proportion of the total number of samples on each leaf node of the decision tree in the current round of screening to the total number of screened samples is calculated. That is, for a single leaf node, the proportion value s is obtained by dividing the total number of samples in that leaf node by the total number of screened samples. c .

[0103] Determine the ratio of the second number of first behavior sample data predicted to belong to the target sample type to the seventh number of second behavior sample data predicted not to belong to the target sample type in the target behavior sample data, and obtain the calculated ratio value;

[0104] Referring to Figure 3, in this embodiment of the disclosure, the ratio of the total negative samples to the positive samples in the current round of screening is calculated to obtain the ratio value d.

[0105] The update error rate is obtained by determining the ratio of the second number of first behavior sample data predicted to belong to the target sample type in the target behavior sample data to the first number of target behavior sample data.

[0106] Referring to Figure 3, in this embodiment of the disclosure, the error rate of the selected samples in this round is calculated. Since the selected samples are the part of the samples that the model predicts to be positive, the samples with negative true labels are actually incorrectly predicted. The proportion of these samples is calculated to obtain the error rate e.

[0107] In one possible implementation, updating the reset sample weights of each historical behavior data point based on the calculated value of each of the obtained indicators includes:

[0108] For the first behavior sample data predicted to belong to the target sample type in the historical behavior data, the sample weights are reset and updated according to the sample ratio of the first node, the sample ratio of the second node, the sample ratio of the third node, the calculated ratio value, and the update error rate;

[0109] In this embodiment of the disclosure, the weighting formula for predicting the first behavioral sample data belonging to the target sample type from the historical behavioral data is as follows: w i 1 = s a ×log e (1+s b )÷s c ×(1-e)×d

[0110] For the second behavior sample data in the historical behavior data that is predicted not to belong to the target sample type, the sample weights are reset and updated according to the sample ratio of the first node, the sample ratio of the second node, the sample ratio of the third node, and the update error rate.

[0111] In this embodiment of the disclosure, the weighting formula for predicting second behavioral sample data that does not belong to the target sample type from the historical behavioral data is as follows: w i 2 = s a ×log e (1+s b )÷s c×(1-e)×1

[0112] In one possible implementation, referring to Figure 4, step S15, which involves selecting the trained decision tree model from the iterations preceding the acquisition of the target decision tree model to construct joint rules, includes:

[0113] In step S151, the lift is obtained in each round of calculating the indicator, wherein the lift is determined based on the first number of target behavior sample data, the second number of first behavior sample data in the target behavior sample data that is predicted to belong to the target sample type, the third number of second behavior sample data in the sample set whose sample labels represent that belong to the target sample type, and the fourth number of historical behavior data in the sample set.

[0114] In step S152, the maximum value of the lift is determined to be the target lift.

[0115] In step S153, the decision tree model corresponding to the iteration before the iteration corresponding to the target lift is selected from the iterations before the target decision tree model to construct the joint rule.

[0116] Among them, the target behavior sample data can be positive samples.

[0117] The above technical solution, based on all the lift metrics stored during the process, can obtain the iteration number corresponding to the maximum lift metric. All decision tree model branches before this iteration are then grouped into a joint rule, and the set of positive samples selected in this iteration is the optimal prediction result. Generally, this joint rule is the optimal prediction rule. If it is believed that the number of predicted positive samples in the current iteration exceeds the required proportion, several subsequent model rules can be appropriately added to reduce the total number of predicted positive samples.

[0118] In one possible implementation, the lift is calculated as follows:

[0119] Calculate the ratio of the second number of first behavior sample data predicted to belong to the target sample type in the target behavior sample data to the third number of second behavior sample data in the sample set whose sample labels represent that they belong to the target sample type, and obtain the first ratio.

[0120] Calculate the ratio of the first number of the target behavior sample data to the fourth number of the historical behavior data in the sample set to obtain the second ratio;

[0121] The lift is obtained by calculating the ratio of the first ratio to the second ratio.

[0122] Wherein, the sample set is the set of samples predicted as positive by the model, and the number of samples with positive true labels is denoted as left_positive, while the number of samples with positive true labels in the original full sample set is denoted as all_positive. The number of samples selected is denoted as left, and the number of samples in the original full sample set is denoted as all. In this embodiment, the lift can be calculated using the following formula:

[0123] The technical solution disclosed herein focuses on increasing the weight of target samples and reducing the weight of misclassified samples to update model rules. The business challenge lies not in model optimization, but in the weighting of samples. Therefore, it is more likely to focus the prediction target on a small number of samples with positive true labels. The weight metrics updated during the process are all based on the lift value of the target, and the lift metric typically better reflects the business objective effect of this patent. Combining the changes in the lift metric during the iteration process helps to find the optimal model iteration rounds and obtain more accurate joint rules.

[0124] This disclosure also provides a behavioral fraud prediction device, as shown in FIG5, the device comprising:

[0125] The acquisition module 510 is configured to acquire historical behavior data with sample labels representing the sample type to which the historical behavior data belongs, and the initial sample weight of each historical behavior data in the sample set composed of the historical behavior data.

[0126] The update module 520 is configured to update the initial sample weight of each historical behavior data in the sample set according to the sample label of each historical behavior data, so as to obtain the reset sample weight of each historical behavior data.

[0127] The iteration module 530 is configured to repeatedly execute multiple rounds of training the decision tree model based on the sample weights of the historical behavior data, filter the training set samples in the sample set using the trained decision tree model, filter out the target behavior sample data classified according to the prediction results, calculate multiple indicators based on the target behavior sample data and the sample set, and update the reset sample weights of each historical behavior data according to the calculated value of each indicator, until a target decision tree model that meets the preset requirements is obtained.

[0128] The prediction module 540 is configured to select the trained decision tree model from the iterations before obtaining the target decision tree model to construct joint rules, and use the joint rules to predict the acquired user behavior data to obtain the behavior fraud prediction result.

[0129] In one possible implementation, the update module 520 is configured as follows:

[0130] Calculate the ratio of the historical behavioral data in the sample set whose sample labels represent negative samples to the historical behavioral data whose sample labels represent positive samples, and obtain an initial ratio value;

[0131] Based on the initial ratio and the initial error rate, calculate the first weight of the historical behavior data of each sample type (positive sample) and the second weight of the historical behavior data of each sample type (negative sample) in different sub-nodes of the sample set.

[0132] Based on the first weight and the second weight, the initial sample weight of each historical behavior data in the sample set is updated to obtain the reset sample weight of each historical behavior data.

[0133] In one possible implementation, the update module 520 is configured as follows:

[0134] The total sample weights of the historical behavior data in the sample set are obtained by summing the first weight and the second weight.

[0135] Based on the total sample weights, the first weights representing the historical behavior data of the sample type positive samples by the sample labels are normalized, and the initial sample weights representing the historical behavior data of the sample type positive samples by the sample labels in the sample set are updated according to the normalized first weights, so as to obtain the reset sample weights representing the historical behavior data of the sample type positive samples by the sample labels.

[0136] Based on the total sample weights, the second weights representing the historical behavior data of the sample type negative samples are normalized according to the sample labels, and the initial sample weights representing the historical behavior data of the sample type negative samples in the sample set are updated according to the normalized second weights, so as to obtain the reset sample weights representing the historical behavior data of the sample type negative samples.

[0137] In one possible implementation, the update module 520 is configured as follows:

[0138] Calculate the difference between 1 and the initial error rate to obtain the second weight of the historical behavior data of each sample type negative sample in different sub-nodes of the sample set;

[0139] The difference is used as the product of the initial ratio value and the difference to obtain the first weight of the historical behavior data of each sample type positive sample in different sub-nodes of the sample set.

[0140] In one possible implementation, the iteration module 530 is configured as follows:

[0141] The target behavior sample data is divided into different leaf nodes. The ratio of the fifth number of first behavior sample data that is predicted to belong to the target sample type in different leaf nodes to the sixth number of target behavior sample data in that leaf node is determined to determine the first node sample ratio in this round.

[0142] Determine the ratio of the fifth number of first-row sample data predicting the target sample type in different leaf nodes to the first number of target-row sample data, and determine the second node sample ratio for this round.

[0143] Determine the ratio of the sixth quantity of the target behavior sample data to the first quantity of the target behavior sample data in different leaf nodes, and determine the third node sample ratio for this round;

[0144] Determine the ratio of the second number of first behavior sample data predicted to belong to the target sample type to the seventh number of second behavior sample data predicted not to belong to the target sample type in the target behavior sample data, and obtain the calculated ratio value;

[0145] The update error rate is obtained by determining the ratio of the second number of first behavior sample data predicted to belong to the target sample type in the target behavior sample data to the first number of target behavior sample data.

[0146] In one possible implementation, the iteration module 530 is configured as follows:

[0147] For the first behavior sample data predicted to belong to the target sample type in the historical behavior data, the sample weights are reset and updated according to the sample ratio of the first node, the sample ratio of the second node, the sample ratio of the third node, the calculated ratio value, and the update error rate;

[0148] For the second behavior sample data in the historical behavior data that is predicted not to belong to the target sample type, the sample weights are reset and updated according to the sample ratio of the first node, the sample ratio of the second node, the sample ratio of the third node, and the update error rate.

[0149] In one possible implementation, the prediction module 540 is configured as follows:

[0150] The improvement is obtained in each round of calculating the indicator, wherein the improvement is determined based on the first number of target behavior sample data, the second number of first behavior sample data in the target behavior sample data that is predicted to belong to the target sample type, the third number of second behavior sample data in the sample set whose sample labels represent that belong to the target sample type, and the fourth number of historical behavior data in the sample set.

[0151] The maximum value of the lift is determined to be the target lift.

[0152] From the iterations preceding the target decision tree model, select the decision tree models corresponding to the iterations preceding the iteration corresponding to the target lift to construct the joint rule.

[0153] In one possible implementation, the prediction module 540 is configured to calculate the lift by the following method:

[0154] Calculate the ratio of the second number of first behavior sample data predicted to belong to the target sample type in the target behavior sample data to the third number of second behavior sample data in the sample set whose sample labels represent that they belong to the target sample type, and obtain the first ratio.

[0155] Calculate the ratio of the first number of the target behavior sample data to the fourth number of the historical behavior data in the sample set to obtain the second ratio;

[0156] The lift is obtained by calculating the ratio of the first ratio to the second ratio.

[0157] This disclosure also provides an electronic device, including:

[0158] processor;

[0159] Memory used to store processor-executable instructions;

[0160] The processor is configured to execute executable instructions in the memory to implement the behavioral fraud prediction method described in any of the foregoing embodiments.

[0161] Other embodiments of this disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practice of this disclosure. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only.

[0162] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.

Claims

1. A behavior fraud prediction method, characterized by, The method comprises: acquiring historical behavior data with sample labels representing sample types to which the historical behavior data belongs, and initial sample weights of each historical behavior data in a sample set composed of the historical behavior data; updating the initial sample weights of each historical behavior data in the sample set according to the sample labels of each historical behavior data, to obtain reset sample weights of each historical behavior data; repeating multiple rounds of training a decision tree model according to sample weights of the historical behavior data, screening training set samples in the sample set by the trained decision tree model, and screening target behavior sample data classified by a prediction result; performing multiple index calculations according to the target behavior sample data and the sample set, and updating the reset sample weights of each historical behavior data according to calculated values of each index obtained, until a target decision tree model meeting preset requirements is obtained; selecting a trained decision tree model from iteration rounds before the target decision tree model is obtained to construct a joint rule, and predicting user behavior data obtained by the joint rule to obtain a behavior fraud prediction result; wherein the multiple index calculations according to the target behavior sample data and the sample set comprise: dividing the target behavior sample data into different leaf nodes, determining a ratio of a fifth number of first behavior sample data predicted to belong to a target sample type to a sixth number of the target behavior sample data in each leaf node, and determining a first node sample ratio of the current round; determining a ratio of the fifth number of first behavior sample data predicted to belong to the target sample type to a first number of the target behavior sample data in each leaf node, and determining a second node sample ratio of the current round; determining a ratio of the sixth number of the target behavior sample data in each leaf node to the first number of the target behavior sample data, and determining a third node sample ratio of the current round, wherein the sixth number is a total number of samples in each decision tree leaf node in the screened samples of the current round, and the first number is a number of all screened samples; determining a ratio of a second number of first behavior sample data predicted to belong to the target sample type to a seventh number of second behavior sample data predicted not to belong to the target sample type in the target behavior sample data, to obtain a calculation ratio value; determining a ratio of the second number of first behavior sample data predicted to belong to the target sample type to the first number of the target behavior sample data in the target behavior sample data, to obtain an update error rate; wherein the updating of the reset sample weights of each historical behavior data according to the calculated values of each index obtained comprises: for first behavior sample data predicted to belong to the target sample type in the historical behavior data, updating the reset sample weights according to the first node sample ratio, the second node sample ratio, the third node sample ratio, the calculation ratio value, and the update error rate. For the second behavior sample data in the historical behavior data which is predicted not to belong to the target sample type, the initial sample weight of each historical behavior data in the sample set is updated according to the first node sample proportion, the second node sample proportion, the third node sample proportion and the updated error rate.

2. The method of claim 1, wherein, The updating of the initial sample weight of each historical behavior data in the sample set according to the sample label of each historical behavior data comprises: calculating a proportion of the historical behavior data in the sample set whose sample label represents the sample type as negative samples to the historical behavior data whose sample label represents the sample type as positive samples, to obtain an initial proportion value; calculating a first weight of the historical behavior data of each sample type as positive samples and a second weight of the historical behavior data of each sample type as negative samples in different sub-nodes in the sample set according to the initial proportion value and an initial error rate; updating the initial sample weight of each historical behavior data in the sample set according to the first weight and the second weight to obtain a reset sample weight of each historical behavior data.

3. The method of claim 2, wherein, The updating of the initial sample weight of each historical behavior data in the sample set according to the first weight and the second weight to obtain a reset sample weight of each historical behavior data comprises: summing the first weight and the second weight according to the first weight and the second weight to obtain a total sample weight sum of the historical behavior data in the sample set; normalizing the first weight of the historical behavior data whose sample label represents the sample type as positive samples according to the total sample weight sum, and updating the initial sample weight of the historical behavior data whose sample label represents the sample type as positive samples in the sample set according to the normalized first weight to obtain a reset sample weight of the historical behavior data whose sample label represents the sample type as positive samples; normalizing the second weight of the historical behavior data whose sample label represents the sample type as negative samples according to the total sample weight sum, and updating the initial sample weight of the historical behavior data whose sample label represents the sample type as negative samples in the sample set according to the normalized second weight to obtain a reset sample weight of the historical behavior data whose sample label represents the sample type as negative samples.

4. The method of claim 2, wherein, The calculation of the first weight of the historical behavior data of each sample type as positive samples and the second weight of the historical behavior data of each sample type as negative samples in different sub-nodes in the sample set according to the initial proportion value and an initial error rate comprises: calculating a difference between 1 and the initial error rate to obtain the second weight of the historical behavior data of each sample type as negative samples in different sub-nodes in the sample set; calculate a product of the initial proportion value and the difference value to obtain a first weight of the historical behavior data of each sample type being a positive sample in different sub-nodes in the sample set.

5. The method of claim 1, wherein, The joint rule is constructed by selecting the decision tree model trained in the iteration round before the target decision tree model is obtained, including: obtain an improvement degree in the process of calculating the index in each round, wherein the improvement degree is determined according to a first quantity of the target behavior sample data, a second quantity of the first behavior sample data in the target behavior sample data predicted to belong to a target sample type, a third quantity of the second behavior sample data in the sample set represented by the sample label to belong to the target sample type, and a fourth quantity of the historical behavior data in the sample set; determine a maximum value of the improvement degree as a target improvement degree; select the decision tree model corresponding to the iteration round before the iteration round corresponding to the target improvement degree to construct the joint rule before the target decision tree model is obtained.

6. The method of claim 5, wherein, The improvement degree is calculated by the following method: calculate a ratio of the second quantity of the first behavior sample data in the target behavior sample data predicted to belong to the target sample type to the third quantity of the second behavior sample data in the sample set represented by the sample label to belong to the target sample type to obtain a first ratio; calculate a ratio of the first quantity of the target behavior sample data to the fourth quantity of the historical behavior data in the sample set to obtain a second ratio; calculate a ratio of the first ratio to the second ratio to obtain the improvement degree.

7. A behavioral fraud prediction apparatus, characterized by, The device includes: an obtaining module configured to obtain historical behavior data having a sample label representing a sample type to which the historical behavior data belongs, and an initial sample weight of each historical behavior data in a sample set composed of the historical behavior data; an updating module configured to update the initial sample weight of each historical behavior data in the sample set according to the sample label of each historical behavior data to obtain a reset sample weight of each historical behavior data; an iteration module configured to repeatedly perform, for multiple rounds, training of a decision tree model according to the sample weight of the historical behavior data, filtering of training set samples in the sample set by the decision tree model trained, filtering out of target behavior sample data classified by a prediction result, and multiple index calculations according to the target behavior sample data and the sample set, and updating of the reset sample weight of each historical behavior data according to a calculated value of each index until a target decision tree model meeting a preset requirement is obtained; a prediction module configured to construct a joint rule by selecting the decision tree model trained in the iteration round before the target decision tree model is obtained, and to obtain a behavior fraud prediction result by predicting user behavior data obtained through the joint rule; wherein the updating module is configured to: dividing the target behavior sample data into different leaf nodes, determining a ratio of a fifth number of first behavior sample data predicted to belong to a target sample type in different leaf nodes to a sixth number of the target behavior sample data in the leaf node, and determining a first node sample ratio of the current round; determining a ratio of the fifth number of first behavior sample data predicted to belong to the target sample type in different leaf nodes to a first number of the target behavior sample data, and determining a second node sample ratio of the current round; determining a ratio of the sixth number of the target behavior sample data in different leaf nodes to the first number of the target behavior sample data, and determining a third node sample ratio of the current round, wherein the sixth number is a total number of samples in each decision tree leaf node in the current round of screening samples, and the first number is a number of all screening samples; determining a ratio of a second number of first behavior sample data predicted to belong to the target sample type to a seventh number of second behavior sample data predicted not to belong to the target sample type in the target behavior sample data, to obtain a calculation ratio value; determining a ratio of the second number of first behavior sample data predicted to belong to the target sample type to the first number of the target behavior sample data in the target behavior sample data, to obtain an update error rate; The update module is configured to: for first behavior sample data predicted to belong to the target sample type in the historical behavior data, resetting and updating sample weights according to the first node sample ratio, the second node sample ratio, the third node sample ratio, the calculation ratio value, and the update error rate; for second behavior sample data predicted not to belong to the target sample type in the historical behavior data, resetting and updating sample weights according to the first node sample ratio, the second node sample ratio, the third node sample ratio, and the update error rate.

8. An electronic device, comprising: comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the executable instructions in the memory to implement the method of any one of claims 1-6.

Citation Information

Patent Citations

  • Machine learning sample weight adjustment method and device and storage medium

    CN112052900A

  • Risk state determination method and device and electronic equipment

    CN115270137A

  • Behavior fraud prediction method and device and electronic equipment

    CN118247046A

  • Fraud detection by profiling aggregate customer anonymous behavior

    US20190073647A1