Anti-fraud prediction model training method and device, storage medium and electronic device

By constructing missing value features, counting features and sorting features, the problem of inaccurate anti-fraud prediction results caused by missing feature data in machine learning models is solved, and more accurate prediction results are achieved.

CN113344585BActive Publication Date: 2025-04-11BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110690104.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-22
Publication Date
2025-04-11
Estimated Expiration
2041-06-22

AI Technical Summary

Technical Problem

During the training process, the existing machine learning models have inaccurate anti-fraud prediction results due to improper feature engineering processing, especially due to the lack of feature data of business data.

Method used

By obtaining the original sample data, determining the number of missing feature data, and constructing missing value features, counting features and sorting features, adding them to the original sample data to form the target sample data, and then building an anti-fraud prediction model.

Benefits of technology

This method can effectively avoid the inaccuracy of model prediction results, improve the quality of the model, retain the data characteristics of the sample data, and thus improve the accuracy of anti-fraud prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113344585B_ABST
    Figure CN113344585B_ABST
Patent Text Reader

Abstract

The present invention provides a training method and device for an anti-fraud prediction model, a storage medium and an electronic device, the method comprising: obtaining each original sample data; determining the number of missing feature data in each original sample data; constructing the missing value feature of each original sample data based on the number of missing feature data in each original sample data, and constructing the counting feature and sorting feature of each original sample data based on the target feature data in each original sample data; the target feature data is feature data of numerical type; adding the missing value feature, counting feature and sorting feature of each original sample data to the original sample data to obtain the target sample data corresponding to the original sample data; and applying each target sample data to construct an anti-fraud prediction model. The data features of the sample data can be retained, thereby improving the quality of the model, and effectively avoiding inaccurate anti-fraud prediction results of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a training method and device for an anti-fraud prediction model, a storage medium and an electronic device. Background Art

[0002] With the rapid development of science and technology, there are more and more Internet-based transactions, and various types of fraudulent transactions are emerging in an endless stream. In order to ensure the security of transaction business, fraudulent transaction detection is necessary. In the process of fraudulent transaction detection, machine learning models are used to detect fraudulent transactions based on transaction business data, thereby ensuring transaction security.

[0003] At present, existing machine learning models often require feature engineering of business data during the training process. However, due to factors such as missing feature data of business data, the existing feature engineering processing methods often cannot accurately describe the relationship between the data characteristics of business data and the output results of the machine learning model, resulting in inaccurate anti-fraud prediction results of the machine learning model. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a training method for an anti-fraud prediction model, which can avoid inaccurate anti-fraud prediction results of a machine learning model.

[0005] The present invention also provides a training device for an anti-fraud prediction model to ensure the implementation and application of the above method in practice.

[0006] A method for training an anti-fraud prediction model, comprising:

[0007] Obtain each original sample data;

[0008] Determine the number of missing feature data in each of the original sample data;

[0009] constructing missing value features of each of the original sample data based on the number of missing feature data in each of the original sample data, and constructing counting features and sorting features of each of the original sample data based on target feature data in each of the original sample data; the target feature data is feature data of a numerical type;

[0010] Adding the missing value feature, the count feature, and the sort feature of each of the original sample data to the original sample data to obtain target sample data corresponding to the original sample data;

[0011] The target sample data are used to construct an anti-fraud prediction model.

[0012] In the above method, optionally, the application of each of the target sample data to construct an anti-fraud prediction model includes:

[0013] Dividing each of the target sample data to obtain a plurality of first target sample data, a plurality of second target sample data, and a plurality of third target sample data;

[0014] Setting a sample label for each of the first target sample data and each of the second target sample data;

[0015] Combining each of the first target sample data and the sample label of each of the first target sample data into a training sample set;

[0016] Combining each of the second target sample data and the sample label of each of the second target sample data into a test sample set;

[0017] Combining each of the third target sample data into a current unlabeled data set;

[0018] Applying each of the first target sample data in the training sample set and the sample label of each of the first target sample data to construct a first anti-fraud prediction model;

[0019] Applying the test sample set to test the first anti-fraud prediction model to obtain a model score of the first anti-fraud prediction model;

[0020] Applying the first anti-fraud prediction model to predict each third target sample data in the current unlabeled data set to obtain a prediction score for each third target sample data;

[0021] Based on the predicted score of each of the third target sample data, determining whether each of the third target sample data meets the current marking condition; the marking condition is that the predicted score is greater than a set first scoring threshold, or less than a set second scoring threshold;

[0022] If the third target sample data that meets the labeling condition exists, setting a sample label for the third target sample data;

[0023] Determine the third target sample data with set sample labels as the first target sample data, and migrate it to the training data set to update the training data set and the unlabeled data set;

[0024] Training the first anti-fraud prediction model based on the updated training data set to obtain a second anti-fraud prediction model;

[0025] Applying the test sample set to test the second anti-fraud prediction model to obtain a model score of the second anti-fraud prediction model;

[0026] Determining whether the model score of the second anti-fraud prediction model is greater than the model score of the first anti-fraud prediction model;

[0027] If the model score of the second anti-fraud model is greater than the model score of the first anti-fraud model, determine whether the second anti-fraud prediction model meets the preset training completion condition; if the second anti-fraud prediction model does not meet the training completion condition, determine the second anti-fraud prediction model as the new first anti-fraud prediction model, and return to execute the step of applying the first anti-fraud prediction model to predict each third target sample data in the current unlabeled data set to obtain the prediction score of each third target sample data; if the second anti-fraud prediction model meets the training completion condition, determine the second anti-fraud prediction model that meets the training completion condition as the anti-fraud prediction model;

[0028] If the model score of the second anti-fraud model is not greater than the model score of the first anti-fraud model, the first scoring threshold and / or the second scoring threshold in the labeling condition are adjusted, and the second anti-fraud prediction model is determined as the new first anti-fraud prediction model, and the step of applying the first anti-fraud prediction model to predict each third target sample data in the current unlabeled data set to obtain a prediction score for each of the third target sample data is returned.

[0029] In the above method, optionally, constructing the missing value feature of each of the original sample data based on the number of missing feature data in each of the original sample data includes:

[0030] Discretization is performed on the number of missing feature data in each of the original sample data to obtain missing value features of each of the original sample data.

[0031] The above method, optionally, after applying each of the target sample data to construct the anti-fraud prediction model, further comprises:

[0032] Obtain business data of transactions to be verified;

[0033] Determining the amount of missing feature data in the business data;

[0034] constructing missing value features of the business data based on the number of missing feature data in the business data, and constructing counting features and sorting features of the business data based on target business feature data in the business data; the target business feature data is feature data of a numerical type;

[0035] Adding the missing value feature, the counting feature, and the sorting feature of the business data to the business data to obtain target business data corresponding to the business data;

[0036] The anti-fraud prediction model is applied to predict the target business data to obtain a transaction fraud prediction result of the transaction to be verified.

[0037] The above method, optionally, after applying the anti-fraud prediction model to predict the target business data and obtaining the transaction fraud prediction result of the transaction to be verified, further comprises:

[0038] If the transaction fraud prediction result of the transaction to be verified indicates that there is a fraud risk in the transaction to be verified, the transaction to be verified is rejected.

[0039] A training device for an anti-fraud prediction model, comprising:

[0040] An acquisition unit, used for acquiring each original sample data;

[0041] A determination unit, used to determine the number of missing feature data in each of the original sample data;

[0042] A feature construction unit, configured to construct a missing value feature of each of the original sample data based on the number of missing feature data in each of the original sample data, and to construct a counting feature and a sorting feature of each of the original sample data based on target feature data in each of the original sample data; the target feature data is feature data of a numerical type;

[0043] A generating unit, configured to add the missing value feature, the counting feature, and the sorting feature of each of the original sample data to the original sample data to obtain target sample data corresponding to the original sample data;

[0044] The model building unit applies each of the target sample data to build an anti-fraud prediction model.

[0045] In the above device, optionally, the model building unit comprises:

[0046] A division subunit, used for dividing each of the target sample data to obtain a plurality of first target sample data, a plurality of second target sample data and a plurality of third target sample data;

[0047] A first execution subunit, configured to set a sample label for each of the first target sample data and each of the second target sample data;

[0048] A second execution subunit, configured to combine each of the first target sample data and a sample label of each of the first target sample data into a training sample set;

[0049] A third execution subunit, configured to combine each of the second target sample data and a sample label of each of the second target sample data into a test sample set;

[0050] A fourth execution subunit, configured to combine each of the third target sample data into a current unlabeled data set;

[0051] A construction subunit, configured to apply each of the first target sample data in the training sample set and a sample label of each of the first target sample data to construct a first anti-fraud prediction model;

[0052] A first testing subunit, configured to apply the test sample set to test the first anti-fraud prediction model to obtain a model score of the first anti-fraud prediction model;

[0053] A prediction subunit, configured to apply the first anti-fraud prediction model to predict each third target sample data in the current unlabeled data set to obtain a prediction score for each third target sample data;

[0054] A first determination subunit is used to determine whether each of the third target sample data meets a current marking condition based on a predicted score of each of the third target sample data; the marking condition is that the predicted score is greater than a set first scoring threshold, or less than a set second scoring threshold;

[0055] a label setting subunit, configured to set a sample label for the third target sample data if the third target sample data satisfies the labeling condition;

[0056] An updating subunit, configured to determine the third target sample data with set sample labels as the first target sample data, and migrate the data to the training data set, so as to update the training data set and the unlabeled data set;

[0057] A training subunit, configured to train the first anti-fraud prediction model based on the updated training data set to obtain a second anti-fraud prediction model;

[0058] A second testing subunit is used to apply the test sample set to test the second anti-fraud prediction model to obtain a model score of the second anti-fraud prediction model;

[0059] A judging subunit, used to judge whether the model score of the second anti-fraud prediction model is greater than the model score of the first anti-fraud prediction model;

[0060] a fifth execution subunit, for determining whether the second anti-fraud prediction model satisfies a preset training completion condition if the model score of the second anti-fraud model is greater than the model score of the first anti-fraud model; if the second anti-fraud prediction model does not meet the training completion condition, determining the second anti-fraud prediction model as a new first anti-fraud prediction model, and returning to trigger the prediction subunit; if the second anti-fraud prediction model meets the training completion condition, determining the second anti-fraud prediction model that meets the training completion condition as the anti-fraud prediction model;

[0061] The sixth execution unit is used to adjust the first scoring threshold and / or the second scoring threshold in the labeling condition if the model score of the second anti-fraud model is not greater than the model score of the first anti-fraud model, and determine the second anti-fraud prediction model as the new first anti-fraud prediction model, and return to trigger the prediction sub-unit.

[0062] The above-mentioned device, optionally, the training device of the anti-fraud prediction model further includes:

[0063] A first processing unit, used to obtain business data of the transaction to be verified;

[0064] A second processing unit, used to determine the amount of missing feature data in the business data;

[0065] A third processing unit is used to construct a missing value feature of the business data based on the number of missing feature data in the business data, and to construct a counting feature and a sorting feature of the business data based on target business feature data in the business data; the target business feature data is feature data of a numerical type;

[0066] A fourth processing unit, configured to add the missing value feature, the counting feature, and the sorting feature of the business data to the business data to obtain target business data corresponding to the business data;

[0067] A prediction unit is used to apply the anti-fraud prediction model to predict the target business data to obtain a transaction fraud prediction result of the transaction to be verified.

[0068] A storage medium includes storage instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the training method of the anti-fraud prediction model as described above.

[0069] An electronic device includes a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the anti-fraud prediction model training method as described above.

[0070] Compared with the prior art, the present invention has the following advantages:

[0071] The present invention provides a training method and device, storage medium and electronic device for an anti-fraud prediction model, the method comprising: obtaining each original sample data; determining the number of missing feature data in each of the original sample data; constructing the missing value feature of each of the original sample data based on the number of missing feature data in each of the original sample data, and constructing the counting feature and sorting feature of each of the original sample data based on the target feature data in each of the original sample data; the target feature data is feature data of numerical type; adding the missing value feature, the counting feature and the sorting feature of each of the original sample data to the original sample data to obtain the target sample data corresponding to the original sample data; and applying each of the target sample data to construct an anti-fraud prediction model. Applying the method provided by the present invention can retain the data features of the sample data, thereby improving the quality of the model, and can effectively avoid inaccurate anti-fraud prediction results of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0073] Figure 1 A method flow chart of a training method for an anti-fraud prediction model provided by the present invention;

[0074] Figure 2 A flowchart of a process of predicting a transaction to be verified by using an anti-fraud prediction model provided by the present invention;

[0075] Figure 3 A schematic diagram of the structure of a training device for an anti-fraud prediction model provided by the present invention;

[0076] Figure 4 The present invention provides a schematic structural diagram of an electronic device. DETAILED DESCRIPTION

[0077] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0078] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0079] The embodiment of the present invention provides a method for training an anti-fraud prediction model, which can be applied to electronic devices. The method flow chart of the method is as follows: Figure 1 As shown, specifically including:

[0080] S101: Acquire each original sample data.

[0081] In an embodiment of the present invention, the original sample data may be business data of the user's historical transactions, and the original sample data may include feature data of various preset feature dimensions, such as age characteristics, transaction amount characteristics, transaction method characteristics, card opening characteristics, and transaction frequency characteristics.

[0082] S102: Determine the number of missing feature data in each of the original sample data.

[0083] In the embodiment of the present invention, the missing feature data may be empty feature data.

[0084] S103: constructing missing value features for each of the original sample data based on the number of missing feature data in each of the original sample data, and constructing counting features and sorting features for each of the original sample data based on target feature data in each of the original sample data; the target feature data is feature data of a numerical type.

[0085] In an embodiment of the present invention, a feasible way to construct a missing value feature of each original sample data based on the number of missing feature data in each original sample data includes: discretizing the number of missing feature data in each of the original sample data to obtain the missing value feature of each of the original sample data; specifically, the number of missing feature data of each original sample data can be sorted to obtain a sorting number of the number of missing feature data of each original sample data, and the sorting number of each original sample data is used as the missing value feature of the original sample data, wherein the sorting method can be a sorting method from small to large, or a sorting method from large to small.

[0086] Another feasible way to construct the missing value feature of each original sample data may include: taking the number of missing feature data in each original sample data as the missing value feature of the original sample data.

[0087] In an embodiment of the present invention, the target feature data in the original sample data may be one or more, and the feature data of numerical type may include feature data of age feature dimension, feature data of transaction amount dimension, feature data of transaction frequency feature dimension, and feature data of asset dimension, etc.

[0088] Optionally, a feasible way to construct the counting feature of each original sample data based on the target feature data in each original sample data may be: grouping the original sample data to obtain original sample data groups; the target feature data of the original sample data in each original sample data group are the same; and taking the number of original sample data in each original sample data group as the counting feature of each original sample data in the original sample data group.

[0089] Optionally, a feasible way to construct a sorting feature of each original sample based on the target feature data in each original sample data may be: sort each target feature data in order from small to large or from large to small, obtain the sorting sequence number of the target feature data of each original sample data, and use the sorting sequence number of the target feature data of each original feature data as the sorting feature of the original sample data.

[0090] For example, among 4 original sample data, the target feature data of these 4 original sample data are 12, 4, 2 and 30 respectively. By sorting them in order from small to large, the sorting features of these 4 original sample data are 3, 2, 1 and 4 respectively.

[0091] S104: Add the missing value feature, the counting feature, and the sorting feature of each of the original sample data to the original sample data to obtain target sample data corresponding to the original sample data.

[0092] In an embodiment of the present invention, the missing value feature, count feature and sort feature of the original sample data are added to the original sample data, that is, features of a new feature dimension are added to the original sample data, and the original sample data with the missing value feature, count feature and sort feature added are determined as the target sample data.

[0093] S105: Using each of the target sample data to construct an anti-fraud prediction model.

[0094] In an embodiment of the present invention, a training set is constructed based on each target sample data, and the training set is used to train an anti-fraud prediction model.

[0095] Among them, the anti-fraud prediction model can be used to predict the business data of the transaction to be verified, and the prediction result of the transaction to be verified can be obtained. The prediction result can indicate whether the transaction to be verified is a fraudulent transaction.

[0096] By applying the method provided in the embodiment of the present invention, an anti-fraud prediction model is constructed through target sample data, which can construct the relationship between the number of missing features and the output label of the model, and can retain the data characteristics of the sample data, thereby improving the quality of the model and effectively avoiding inaccurate anti-fraud prediction results of the model.

[0097] In an embodiment provided by the present invention, based on the above implementation process, specifically, the process of applying each of the target sample data to construct an anti-fraud prediction model specifically includes:

[0098] S201: Divide each of the target sample data to obtain a plurality of first target sample data, a plurality of second target sample data, and a plurality of third target sample data.

[0099] In the embodiment of the present invention, each target sample data may be randomly divided into a first target sample data set constituting a training set, a second target sample data set constituting a test set, and a third target sample data set constituting an unlabeled data set.

[0100] S202: Set a sample label for each of the first target sample data and each of the second target sample data.

[0101] The sample label of each target sample data may be a positive sample label or a negative sample label.

[0102] S203: Combining each of the first target sample data and the sample label of each of the first target sample data into a training sample set.

[0103] S204: Combining each of the second target sample data and each sample label of the second target sample data into a test sample set.

[0104] S205: Combining the third target sample data into a current unlabeled data set.

[0105] Among them, each third target sample data in the unlabeled data set has no sample label set.

[0106] S206: Apply each of the first target sample data in the training sample set and the sample label of each of the first target sample data to construct a first anti-fraud prediction model.

[0107] Among them, the training sample set can be used to train the initial anti-fraud prediction model to obtain the first anti-fraud prediction model. Specifically, lightGBM with fast data fitting can be selected for model training to obtain the first anti-fraud prediction model.

[0108] S207: Using the test sample set to test the first anti-fraud prediction model to obtain a model score of the first anti-fraud prediction model.

[0109] The model score may be various types of model scores, such as an AUC score.

[0110] S208: Apply the first anti-fraud prediction model to predict each third target sample data in the current unlabeled data set to obtain a prediction score for each third target sample data.

[0111] In an embodiment of the present invention, each third target sample data in the unlabeled data set can be input into the first anti-fraud prediction model respectively to obtain a prediction score for each third target sample data output by the anti-fraud prediction model, and the prediction score can characterize the probability that the transaction to which the third target sample data belongs is a fraudulent transaction.

[0112] S209: Based on the predicted score of each of the third target sample data, determine whether each of the third target sample data meets the current marking condition; the marking condition is that the predicted score is greater than the set first scoring threshold, or less than the set second scoring threshold.

[0113] S210: If there is no third target sample data satisfying the marking condition, the first scoring threshold of the marking condition may be lowered and / or the second scoring threshold may be raised, and the process returns to S209.

[0114] In the implementation of the present invention, when there is no third target sample data satisfying the marking condition, the first scoring threshold may be lowered or the second scoring threshold may be increased, so as to obtain the third target sample data satisfying the marking condition.

[0115] In a feasible manner, if there is no third target sample data that meets the labeling condition, the first anti-fraud prediction model can be determined as the anti-fraud prediction model.

[0116] S211: If the third target sample data that meets the labeling condition exists, set a sample label for the third target sample data.

[0117] In an embodiment of the present invention, if the predicted score is greater than the set first scoring threshold, a positive sample label can be set for the third target sample data; if the predicted score is less than the set second scoring threshold, a negative sample label can be set for the third target sample data.

[0118] S212: Determine the third target sample data with set sample labels as the first target sample data, and migrate it to the training data set to update the training data set and the unlabeled data set.

[0119] S213: Training the first anti-fraud prediction model based on the updated training data set to obtain a second anti-fraud prediction model.

[0120] S214: Apply the test sample set to test the second anti-fraud prediction model to obtain a model score of the second anti-fraud prediction model.

[0121] S215: Determine whether the model score of the second anti-fraud prediction model is greater than the model score of the first anti-fraud prediction model. If so, execute S216; if not, execute S217.

[0122] Optionally, when the judgment result in S215 is yes, the number of iterations is increased by one.

[0123] S216: Determine whether the second anti-fraud prediction model meets the pre-set training completion condition. If the second anti-fraud prediction model does not meet the training completion condition, determine the second anti-fraud prediction model as the new first anti-fraud prediction model, and return to execute S208 to apply the first anti-fraud prediction model to predict each third target sample data in the current unlabeled data set to obtain a prediction score for each of the third target sample data; if the second anti-fraud prediction model meets the training completion condition, determine the second anti-fraud prediction model that meets the training completion condition as the anti-fraud prediction model.

[0124] The training completion condition may be that the number of iterations is greater than a preset number threshold, or the model score of the second anti-fraud prediction model is greater than a preset score threshold.

[0125] S217: Adjust the first scoring threshold and / or the second scoring threshold in the labeling condition, and determine the second anti-fraud prediction model as the new first anti-fraud prediction model, and return to execute S208 to apply the first anti-fraud prediction model to predict each third target sample data in the current unlabeled data set to obtain a prediction score for each of the third target sample data.

[0126] In an embodiment of the present invention, the unlabeled data set is predicted by the first anti-fraud prediction model, and each third target sample data in the unlabeled data set is labeled. This can effectively utilize the unlabeled data, avoid data waste, and improve data utilization. Moreover, by continuously iterating the training model, the performance of the model can be effectively improved.

[0127] In the embodiment of the present invention, based on the above implementation process, specifically, after the anti-fraud prediction model is constructed by applying each of the target sample data, the anti-fraud prediction model is used to predict the transaction to be verified. The specific process is as follows: Figure 2 As shown, it also includes:

[0128] S301: Obtain the business data of the transaction to be verified.

[0129] The transaction to be verified may be any type of transaction, for example, a transfer transaction, and the characteristic dimension of the business data is consistent with the characteristic dimension of the original sample data mentioned above.

[0130] S302: Determine the amount of missing feature data in the business data.

[0131] The missing feature data may be empty feature data.

[0132] S303: constructing missing value features of the business data based on the number of missing feature data in the business data, and constructing counting features and sorting features of the business data based on target business feature data in the business data; the target business feature data may be feature data of a numerical type;

[0133] In an embodiment of the present invention, a feasible way to construct a missing value feature for each business data includes: sorting the number of missing feature data in the target business feature data and the number of missing feature data in each original sample data to obtain a sorting sequence number of the target business feature data, and using the sorting sequence number of the business data as the missing value feature of the business data, wherein the sorting method can be a sorting method from small to large or a sorting method from large to small.

[0134] Another feasible way to construct the missing value feature of each original sample data may include: taking the number of missing feature data of the business data as the missing value feature of the business data.

[0135] In the embodiment of the present invention, the target service characteristic data may be one or more.

[0136] Optionally, a feasible way to construct a counting feature of business data may be to determine the original sample data group to which the business data belongs; and use the number of original sample data in the original sample data group as the counting feature of the business data, wherein the target business feature data of the business data is consistent with the target feature data in the original sample data group.

[0137] Optionally, a feasible way to construct a sorting feature of business data may be: sort the target business data and each target feature data in order from small to large or from large to small, obtain the sorting sequence number of the target business feature data, and use the sorting sequence number of the target business feature data as the sorting feature of the business data.

[0138] S304: Add the missing value feature, the counting feature, and the sorting feature of the business data to the business data to obtain target business data corresponding to the business data.

[0139] S305: Apply the anti-fraud prediction model to predict the target business data to obtain a transaction fraud prediction result of the transaction to be verified.

[0140] In an embodiment of the present invention, the transaction fraud prediction result can label whether the transaction to be verified has a fraud risk.

[0141] In the embodiment of the present invention, based on the above implementation process, specifically, after applying the anti-fraud prediction model to predict the target business data and obtaining the transaction fraud prediction result of the transaction to be verified, it also includes:

[0142] If the transaction fraud prediction result of the transaction to be verified indicates that the transaction to be verified has a fraud risk, rejecting the transaction to be verified;

[0143] If the transaction fraud prediction result of the transaction to be verified indicates that there is no fraud risk in the transaction to be verified, the transaction to be verified is allowed.

[0144] and Figure 1 Corresponding to the method described above, the embodiment of the present invention also provides a training device for an anti-fraud prediction model, for Figure 1 In the specific implementation of the method, the training device of the anti-fraud prediction model provided in the embodiment of the present invention can be applied to an electronic device, and its structural diagram is shown in FIG. Figure 3As shown, specifically including:

[0145] An acquisition unit 401 is used to acquire each original sample data;

[0146] A determination unit 402 is used to determine the number of missing feature data in each of the original sample data;

[0147] A feature construction unit 403 is used to construct a missing value feature of each of the original sample data based on the number of missing feature data in each of the original sample data, and to construct a counting feature and a sorting feature of each of the original sample data based on target feature data in each of the original sample data; the target feature data is feature data of a numerical type;

[0148] A generating unit 404 is used to add the missing value feature, the counting feature and the sorting feature of each of the original sample data to the original sample data to obtain target sample data corresponding to the original sample data;

[0149] The model building unit 405 is used to apply each of the target sample data to build an anti-fraud prediction model.

[0150] In an embodiment provided by the present invention, based on the above solution, specifically, the model building unit 405 includes:

[0151] A division subunit, used for dividing each of the target sample data to obtain a plurality of first target sample data, a plurality of second target sample data and a plurality of third target sample data;

[0152] A first execution subunit, configured to set a sample label for each of the first target sample data and each of the second target sample data;

[0153] A second execution subunit, configured to combine each of the first target sample data and a sample label of each of the first target sample data into a training sample set;

[0154] A third execution subunit, configured to combine each of the second target sample data and a sample label of each of the second target sample data into a test sample set;

[0155] A fourth execution subunit, configured to combine each of the third target sample data into a current unlabeled data set;

[0156] A construction subunit, configured to apply each of the first target sample data in the training sample set and a sample label of each of the first target sample data to construct a first anti-fraud prediction model;

[0157] A first testing subunit, configured to apply the test sample set to test the first anti-fraud prediction model to obtain a model score of the first anti-fraud prediction model;

[0158] A prediction subunit, configured to apply the first anti-fraud prediction model to predict each third target sample data in the current unlabeled data set to obtain a prediction score for each third target sample data;

[0159] A first determination subunit is used to determine whether each of the third target sample data meets a current marking condition based on a predicted score of each of the third target sample data; the marking condition is that the predicted score is greater than a set first scoring threshold, or less than a set second scoring threshold;

[0160] a label setting subunit, configured to set a sample label for the third target sample data if the third target sample data satisfies the labeling condition;

[0161] An updating subunit, configured to determine the third target sample data with set sample labels as the first target sample data, and migrate the data to the training data set, so as to update the training data set and the unlabeled data set;

[0162] A training subunit, configured to train the first anti-fraud prediction model based on the updated training data set to obtain a second anti-fraud prediction model;

[0163] A second testing subunit is used to apply the test sample set to test the second anti-fraud prediction model to obtain a model score of the second anti-fraud prediction model;

[0164] A judging subunit, used to judge whether the model score of the second anti-fraud prediction model is greater than the model score of the first anti-fraud prediction model;

[0165] a fifth execution subunit, for determining whether the second anti-fraud prediction model satisfies a preset training completion condition if the model score of the second anti-fraud model is greater than the model score of the first anti-fraud model; if the second anti-fraud prediction model does not meet the training completion condition, determining the second anti-fraud prediction model as a new first anti-fraud prediction model, and returning to trigger the prediction subunit; if the second anti-fraud prediction model meets the training completion condition, determining the second anti-fraud prediction model that meets the training completion condition as the anti-fraud prediction model;

[0166] The sixth execution unit is used to adjust the first scoring threshold and / or the second scoring threshold in the labeling condition if the model score of the second anti-fraud model is not greater than the model score of the first anti-fraud model, and determine the second anti-fraud prediction model as the new first anti-fraud prediction model, and return to trigger the prediction sub-unit.

[0167] In an embodiment provided by the embodiment of the present invention, based on the above scheme, specifically, the training device of the anti-fraud prediction model further includes:

[0168] A first processing unit, used to obtain business data of the transaction to be verified;

[0169] A second processing unit, used to determine the amount of missing feature data in the business data;

[0170] A third processing unit is used to construct a missing value feature of the business data based on the number of missing feature data in the business data, and to construct a counting feature and a sorting feature of the business data based on target business feature data in the business data; the target business feature data is feature data of a numerical type;

[0171] A fourth processing unit, configured to add the missing value feature, the counting feature, and the sorting feature of the business data to the business data to obtain target business data corresponding to the business data;

[0172] A prediction unit is used to apply the anti-fraud prediction model to predict the target business data to obtain a transaction fraud prediction result of the transaction to be verified.

[0173] In an embodiment provided by the present invention, based on the above solution, optionally, the feature construction unit 403 includes:

[0174] Discretization is performed on the number of missing feature data in each of the original sample data to obtain missing value features of each of the original sample data.

[0175] In an embodiment provided by the present invention, based on the above solution, optionally, the training device of the anti-fraud prediction model further includes: a transaction processing unit;

[0176] The transaction processing unit is used to reject the transaction to be verified if the transaction fraud prediction result of the transaction to be verified indicates that the transaction to be verified has a fraud risk.

[0177] The specific principles and execution processes of each unit and module in the anti-fraud prediction model training device disclosed in the above-mentioned embodiment of the present invention are the same as the anti-fraud prediction model training method disclosed in the above-mentioned embodiment of the present invention. Please refer to the corresponding parts of the anti-fraud prediction model training method provided in the above-mentioned embodiment of the present invention, and will not be repeated here.

[0178] An embodiment of the present invention also provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned anti-fraud prediction model training method.

[0179] The embodiment of the present invention further provides an electronic device, the structural diagram of which is shown in FIG. Figure 4 As shown, it specifically includes a memory 501 and one or more instructions 502, wherein the one or more instructions 502 are stored in the memory 501 and are configured to be executed by one or more processors 503 to perform the following operations:

[0180] Obtain each original sample data;

[0181] Determine the number of missing feature data in each of the original sample data;

[0182] constructing missing value features of each of the original sample data based on the number of missing feature data in each of the original sample data, and constructing counting features and sorting features of each of the original sample data based on target feature data in each of the original sample data; the target feature data is feature data of a numerical type;

[0183] Adding the missing value feature, the count feature, and the sort feature of each of the original sample data to the original sample data to obtain target sample data corresponding to the original sample data;

[0184] The target sample data are used to construct an anti-fraud prediction model.

[0185] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0186] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0187] For the convenience of description, the above device is described as being divided into various units according to their functions. Of course, when implementing the present invention, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0188] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention or certain parts of the embodiments.

[0189] The above is a detailed introduction to the training method of an anti-fraud prediction model provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A training method for an anti-fraud prediction model, characterized in that: include: Obtain each original sample data; Determine the number of missing feature data in each of the original sample data; constructing a missing value feature of each of the original sample data based on the number of missing feature data in each of the original sample data, and constructing a counting feature and a sorting feature of each of the original sample data based on the target feature data in each of the original sample data; The target feature data is feature data of numerical type; Adding the missing value feature, the count feature, and the sort feature of each of the original sample data to the original sample data to obtain target sample data corresponding to the original sample data; Using each of the target sample data to build an anti-fraud prediction model; The process of constructing the counting feature of each of the original sample data based on the target feature data in each of the original sample data is as follows: grouping the original sample data to obtain the original sample data groups, wherein the target feature data of the original sample data in each of the original sample data groups are the same; and taking the number of the original sample data in each of the original sample data groups as the counting feature of each of the original sample data in the original sample data group; The process of constructing a sorting feature of each of the original sample data based on the target feature data in each of the original sample data includes: sorting each of the target feature data in order from small to large or from large to small, obtaining a sorting sequence number of the target feature data of each of the original sample data, and using the sorting sequence number of the target feature data of each of the original sample data as the sorting feature of the original sample data.

2. The method according to claim 1, characterized in that The application of each of the target sample data to construct an anti-fraud prediction model includes: Dividing each of the target sample data to obtain a plurality of first target sample data, a plurality of second target sample data, and a plurality of third target sample data; Setting a sample label for each of the first target sample data and each of the second target sample data; Combining each of the first target sample data and the sample label of each of the first target sample data into a training sample set; Combining each of the second target sample data and the sample label of each of the second target sample data into a test sample set; Combining each of the third target sample data into a current unlabeled data set; Applying each of the first target sample data in the training sample set and the sample label of each of the first target sample data to construct a first anti-fraud prediction model; Applying the test sample set to test the first anti-fraud prediction model to obtain a model score of the first anti-fraud prediction model; Applying the first anti-fraud prediction model to predict each third target sample data in the current unlabeled data set to obtain a prediction score for each third target sample data; Based on the predicted score of each of the third target sample data, determining whether each of the third target sample data meets the current marking condition; the marking condition is that the predicted score is greater than a set first scoring threshold, or less than a set second scoring threshold; If the third target sample data that meets the labeling condition exists, setting a sample label for the third target sample data; Determine the third target sample data with set sample labels as the first target sample data, and migrate it to the training sample set to update the training sample set and the unlabeled data set; Training the first anti-fraud prediction model based on the updated training sample set to obtain a second anti-fraud prediction model; Applying the test sample set to test the second anti-fraud prediction model to obtain a model score of the second anti-fraud prediction model; Determining whether the model score of the second anti-fraud prediction model is greater than the model score of the first anti-fraud prediction model; If the model score of the second anti-fraud prediction model is greater than the model score of the first anti-fraud prediction model, determine whether the second anti-fraud prediction model meets the preset training completion condition; if the second anti-fraud prediction model does not meet the training completion condition, determine the second anti-fraud prediction model as the new first anti-fraud prediction model, and return to execute the step of applying the first anti-fraud prediction model to predict each third target sample data in the current unlabeled data set to obtain the prediction score of each third target sample data; if the second anti-fraud prediction model meets the training completion condition, determine the second anti-fraud prediction model that meets the training completion condition as the anti-fraud prediction model; If the model score of the second anti-fraud prediction model is not greater than the model score of the first anti-fraud prediction model, the first scoring threshold and / or the second scoring threshold in the labeling condition are adjusted, and the second anti-fraud prediction model is determined as the new first anti-fraud prediction model, and the step of returning to apply the first anti-fraud prediction model to predict each third target sample data in the current unlabeled data set to obtain a prediction score for each of the third target sample data is executed.

3. The method according to claim 1, characterized in that The constructing the missing value feature of each of the original sample data based on the number of missing feature data in each of the original sample data includes: Discretization is performed on the number of missing feature data in each of the original sample data to obtain missing value features of each of the original sample data.

4. The method according to claim 1, characterized in that: After applying each of the target sample data to build the anti-fraud prediction model, the method further includes: Obtain business data of transactions to be verified; Determining the amount of missing feature data in the business data; constructing missing value features of the business data based on the number of missing feature data in the business data, and constructing counting features and sorting features of the business data based on target business feature data in the business data; the target business feature data is feature data of a numerical type; Adding the missing value feature, the counting feature, and the sorting feature of the business data to the business data to obtain target business data corresponding to the business data; The anti-fraud prediction model is applied to predict the target business data to obtain a transaction fraud prediction result of the transaction to be verified.

5. The method according to claim 4, characterized in that After applying the anti-fraud prediction model to predict the target business data and obtaining the transaction fraud prediction result of the transaction to be verified, the method further includes: If the transaction fraud prediction result of the transaction to be verified indicates that there is a fraud risk in the transaction to be verified, the transaction to be verified is rejected.

6. A training device for an anti-fraud prediction model, characterized in that: include: An acquisition unit, used for acquiring each original sample data; A determination unit, used to determine the number of missing feature data in each of the original sample data; A feature construction unit, configured to construct a missing value feature of each of the original sample data based on the number of missing feature data in each of the original sample data, and to construct a count feature and a sorting feature of each of the original sample data based on the target feature data in each of the original sample data; The target feature data is feature data of numerical type; A generating unit, configured to add the missing value feature, the counting feature, and the sorting feature of each of the original sample data to the original sample data to obtain target sample data corresponding to the original sample data; The model building unit applies each of the target sample data to build an anti-fraud prediction model; The feature construction unit for constructing the counting feature of each of the original sample data based on the target feature data in each of the original sample data is specifically used to group the original sample data to obtain the original sample data groups, wherein the target feature data of the original sample data in each of the original sample data groups are the same; and the number of the original sample data in each of the original sample data groups is used as the counting feature of each of the original sample data in the original sample data group; A feature construction unit for constructing a sorting feature of each of the original sample data based on the target feature data in each of the original sample data, specifically for sorting each of the target feature data in an order from small to large or from large to small, to obtain a sorting sequence number of the target feature data of each of the original sample data, and to use the sorting sequence number of the target feature data of each of the original sample data as the sorting feature of the original sample data.

7. The device according to claim 6, characterized in that The model building unit comprises: A division subunit, used for dividing each of the target sample data to obtain a plurality of first target sample data, a plurality of second target sample data and a plurality of third target sample data; A first execution subunit, configured to set a sample label for each of the first target sample data and each of the second target sample data; A second execution subunit, configured to combine each of the first target sample data and a sample label of each of the first target sample data into a training sample set; A third execution subunit, configured to combine each of the second target sample data and a sample label of each of the second target sample data into a test sample set; A fourth execution subunit, configured to combine each of the third target sample data into a current unlabeled data set; A construction subunit, configured to apply each of the first target sample data in the training sample set and a sample label of each of the first target sample data to construct a first anti-fraud prediction model; A first testing subunit, configured to apply the test sample set to test the first anti-fraud prediction model to obtain a model score of the first anti-fraud prediction model; A prediction subunit, configured to apply the first anti-fraud prediction model to predict each third target sample data in the current unlabeled data set to obtain a prediction score for each third target sample data; A first determination subunit is used to determine whether each of the third target sample data meets a current marking condition based on a predicted score of each of the third target sample data; the marking condition is that the predicted score is greater than a set first scoring threshold, or less than a set second scoring threshold; a label setting subunit, configured to set a sample label for the third target sample data if the third target sample data satisfies the labeling condition; An updating subunit, configured to determine the third target sample data with set sample labels as the first target sample data, and migrate the data to the training sample set, so as to update the training sample set and the unlabeled data set; A training subunit, configured to train the first anti-fraud prediction model based on the updated training sample set to obtain a second anti-fraud prediction model; A second testing subunit is used to apply the test sample set to test the second anti-fraud prediction model to obtain a model score of the second anti-fraud prediction model; A judging subunit, used to judge whether the model score of the second anti-fraud prediction model is greater than the model score of the first anti-fraud prediction model; a fifth execution subunit, for determining whether the second anti-fraud prediction model satisfies a preset training completion condition if the model score of the second anti-fraud prediction model is greater than the model score of the first anti-fraud prediction model; if the second anti-fraud prediction model does not meet the training completion condition, determining the second anti-fraud prediction model as a new first anti-fraud prediction model, and returning to trigger the prediction subunit; if the second anti-fraud prediction model meets the training completion condition, determining the second anti-fraud prediction model that meets the training completion condition as the anti-fraud prediction model; The sixth execution unit is used to adjust the first scoring threshold and / or the second scoring threshold in the labeling condition if the model score of the second anti-fraud prediction model is not greater than the model score of the first anti-fraud prediction model, and determine the second anti-fraud prediction model as the new first anti-fraud prediction model, and return to trigger the prediction sub-unit.

8. The device according to claim 6, characterized in that The training device of the anti-fraud prediction model also includes: A first processing unit, used to obtain business data of the transaction to be verified; A second processing unit, used to determine the amount of missing feature data in the business data; A third processing unit is used to construct a missing value feature of the business data based on the number of missing feature data in the business data, and to construct a counting feature and a sorting feature of the business data based on target business feature data in the business data; the target business feature data is feature data of a numerical type; A fourth processing unit, configured to add the missing value feature, the counting feature, and the sorting feature of the business data to the business data to obtain target business data corresponding to the business data; A prediction unit is used to apply the anti-fraud prediction model to predict the target business data to obtain a transaction fraud prediction result of the transaction to be verified.

9. A storage medium, characterized in that: The storage medium includes storage instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the training method of the anti-fraud prediction model as described in any one of claims 1 to 5.

10. An electronic device, characterized in that: It includes a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the anti-fraud prediction model training method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Transformer area data missing value completion method and device based on machine learning

    CN110991866A

  • Anti-fraud model training method and device

    CN111104978A