E-commerce platform abnormal transaction identification model training method and system
By integrating transaction data and evaluating label accuracy using cross-verification, the performance degradation of the abnormal transaction identification model of e-commerce platform under label deviation is solved. Stage training and adaptive learning algorithms are adopted to improve the stability and recognition accuracy of the model ensures transaction security.
Patent Information
- Application Number
- CN202411569662.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The abnormal transaction identification model of existing e-commerce platforms is easily affected by labeling deviations during the data annotation process, resulting in a decline in model performance and the inability to accurately identify normal and abnormal transactions.
By integrating transaction data from different sources, cross-verification is used to judge the accuracy of transaction annotations, and divide transaction annotations into accurate annotations and inaccurate annotations. For performance unstable models, training is performed in stages. The first stage uses accurate labeled data for pre-training, the second stage introduces inaccurate labeled data, and the model is gradually adjusted using an adaptive learning algorithm.
It effectively reduces the negative impact of labeling deviation on model learning, improves the stability of the model during the training process and the identification accuracy in actual applications, reduces the probability of false alarms and missed reports, and ensures the transaction security of e-commerce platforms.
Smart Images

Figure CN119477464A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of e-commerce, and in particular to a training method and system for an abnormal transaction identification model of an e-commerce platform. Background Art
[0002] The training of abnormal transaction identification models on e-commerce platforms refers to collecting a large amount of historical transaction data, including normal and abnormal transactions, and using this data to learn machine learning models so that they can automatically identify and classify whether new transactions are abnormal. This process includes data collection, preprocessing, feature extraction, model selection and optimization, as well as model evaluation and deployment, with the goal of enabling the model to effectively detect and prevent potential fraud in practical applications and ensure the transaction security of the platform. However, in the data labeling process, it may rely solely on manual review or simple rule engines to identify abnormal transactions, which may cause some abnormal transactions to be incorrectly labeled as normal transactions, or vice versa. This labeling bias will directly affect the learning of the model and lead to a decline in the performance of the model. At the same time, labeling bias will cause the model to learn incorrect patterns during the training process and be unable to accurately distinguish between normal and abnormal transactions, resulting in a significant reduction in the effectiveness of the model in practical applications, and may even fail to identify new fraud methods. Summary of the invention
[0003] The purpose of the present invention is to provide a training method and system for an abnormal transaction identification model of an e-commerce platform to address the deficiencies in the background technology.
[0004] In order to achieve the above object, the present invention provides the following technical solution: a training method for an abnormal transaction identification model of an e-commerce platform, comprising the following steps:
[0005] S1: After integrating transaction data from different sources, cross-validation is used to determine the accuracy of transaction annotations, and transaction annotations are divided into accurate annotations and inaccurate annotations;
[0006] S2: When a transaction is inaccurately labeled, the model is used to identify the fluctuation in the proportion of samples affected by the labeling error, to determine the model's error recognition capability, and to calculate the ratio of the intersection and union of the model's predicted results to the actual results, and to evaluate the similarity of the intersection and union sets;
[0007] S3: Evaluate the performance stability of the model based on the model's error recognition ability and the similarity of the intersection and union sets, and divide it into a stable performance model and an unstable performance model;
[0008] S4; For models with stable performance, continue to use the labeled data set for model training. For models with unstable performance, divide the model training process into two stages. The first stage uses accurately labeled data for pre-training. The second stage introduces inaccurately labeled data and uses an adaptive learning algorithm to gradually adjust the model.
[0009] Preferably, in S1, cross-validation is used to determine the accuracy of transaction annotations, and the transaction annotations are divided into accurate annotations and inaccurate annotations, specifically:
[0010] Collect transaction data from multiple sources, integrate the data from different sources into a unified data set, divide the integrated data set into multiple subsets, and divide the data set into K parts. Use K-1 of them for training each time, and the remaining 1 for validation. In each fold of cross-validation, use the data of K-1 subsets to train the model. The model will learn the relationship between the characteristics of the transaction and the annotations. Use the remaining 1 subset to validate the performance of the model. Based on the performance of the model on the validation set, calculate the difference between the model prediction results and the annotations.
[0011] According to the results of cross-validation, transaction annotations are divided into two categories: accurate annotations and inaccurate annotations. Accurately labeled transactions are consistent with model predictions in cross-validation, while inaccurately labeled transactions are inconsistent with model predictions in multiple validation sets.
[0012] Preferably, in S2, a sample fluctuation range index is generated according to the fluctuation of the sample proportion affected by the labeling error identified by the model, and the error recognition ability of the model is judged according to the sample fluctuation range index. Then, the method for obtaining the sample fluctuation range index is:
[0013] Construct a Bayesian network model, the model expression is: In the formula, w is the weight parameter of the model, is the training dataset, is the posterior distribution under the given data set, is the likelihood function, which represents the probability of data under given weights, p(w) is the prior distribution of weights, is the marginal probability of the data; the samples affected by the labeling error are labeled as x i , through the Bayesian neural network, forward propagation is performed j times, each time sampling from the posterior distribution of the weight, and j prediction results are obtained. The prediction expression is: In the formula, is the sample x obtained by the jth sampling i The predicted value, w (j) is the weight obtained by sampling from the posterior distribution for the jth time, for sample x i The j-times prediction results are used to calculate the variance as a measure of sample prediction uncertainty. The expression is: is the sample x i The variance of the prediction result, J is the number of sampling times, is the mean of all prediction results, and the variance of the prediction results Normalized, we get the sample volatility index, which is expressed as: In the formula, For sample x i The maximum variance of the prediction results, SVI i is the sample volatility index.
[0014] Preferably, in S3, the ratio of the intersection and union of the calculation model prediction results and the actual results is recorded as the result overlap index, and the similarity of the intersection and union sets is evaluated according to the result overlap index. The method for obtaining the result overlap index is:
[0015] Define two sets, one is the actual result set A, and the other is the model prediction result set B. Calculate the intersection of sets A and B |A∩B|, that is, the number of samples correctly predicted by the model. The size of the intersection represents the number of samples whose model predictions are consistent with the actual results. Calculate the union of sets A and B |A∪B|, that is, the total number of samples of actual results and predicted results. The size of the union represents the number of samples that are actually marked or predicted as the target class. Divide the size of the intersection by the size of the union to calculate the result overlap index. The expression is: Where RE is the result overlap index, which ranges from 0 to 1.
[0016] Preferably, in S3, the performance stability of the model is evaluated according to the error recognition ability of the model and the similarity of the intersection and union sets, and the model is divided into a performance stable model and an performance unstable model;
[0017] The sample fluctuation amplitude index and the result overlap index are converted into the first eigenvector, and the first eigenvector is used as the input of the machine learning model. The machine learning model uses the performance stability value label of each group of first eigenvector prediction models as the prediction target, and takes minimizing the sum of prediction errors of the performance stability value labels of all models as the training target. The machine learning model is trained until the sum of prediction errors converges and the model training is stopped. The performance stability value of the model is determined according to the model output results, wherein the machine learning model is a polynomial regression model.
[0018] Preferably, the acquired performance stability value of the model is compared with a preset reference threshold of the performance stability value of the model; if the performance stability value of the model is greater than or equal to the preset reference threshold of the performance stability value of the model, the model performance stability is high, and a normal model performance signal is generated at this time, and no emergency adjustment is required; if the performance stability value of the model is less than the preset reference threshold of the performance stability value of the model, the model performance stability is low, and a model performance abnormality signal is generated at this time, indicating that the model needs to be checked, tuned, or even retrained.
[0019] Preferably, in S4, for the unstable performance model, the model training process is divided into two stages, the first stage uses accurate labeled data for pre-training, and the second stage introduces inaccurate labeled data and uses an adaptive learning algorithm to gradually adjust the model;
[0020] Filter out accurately labeled data from the labeled data set. These data will serve as the basis for model pre-training and initialize the model parameter w0, which is expressed as: Where w0 is the initial weight vector of the model, The mean is 0 and the variance is e 2 Normal distribution of
[0021] Use accurately labeled datasets Train the model and optimize the loss function L(w), expression: In the formula, w pre is the pre-trained model weight, Accurately labeling the dataset The loss function on , argmin w Indicates optimizing the model weight w to minimize the loss function; using some accurately labeled data as the validation set Evaluate the performance of the pre-trained model to ensure that it performs well on accurately labeled data. The expression is: Where, Accuracy pre is the accuracy of the pre-training phase, is the prediction result of the model, q i is the true label of sample i, is an indicator function that takes the value 1 when the prediction is correct and 0 otherwise.
[0022] Preferably, in the second stage, inaccurately labeled datasets are gradually introduced It is mixed with accurately labeled data sets, and the model parameters are adjusted using an adaptive learning algorithm. The stochastic gradient descent algorithm with momentum is used. The algorithm expression is: w t is the model weight at the tth iteration, η t is the adaptive learning rate, In a mixed data set The loss gradient on ; the error penalty mechanism is introduced to make the model adjust the deviation of inaccurately labeled data, and the weighted loss function is used to impose the minimum weight on samples with a high possibility of labeling errors. The expression is: α i is the weight coefficient of the i-th sample, is the standard loss function; after the adaptive learning phase, an independent test set D is used testEvaluate the model performance, focusing on checking the accuracy and stability of the model when processing noisy data, expressed as: Where, Accuracy final is the accuracy of the final model.
[0023] The present invention also provides a training system for an abnormal transaction identification model of an e-commerce platform, including a data annotation module, an error analysis and similarity evaluation module, a performance evaluation module and an optimization module;
[0024] Data labeling module: After integrating transaction data from different sources, cross-validation is used to determine the accuracy of transaction labels, and transaction labels are divided into accurate labels and inaccurate labels;
[0025] Error analysis and similarity assessment module: When a transaction is labeled inaccurately, the model identifies the fluctuation of the sample ratio affected by the labeling error, determines the model's error recognition ability, calculates the ratio of the intersection and union of the model's predicted results to the actual results, and evaluates the similarity of the intersection and union sets;
[0026] Performance evaluation module: evaluates the performance stability of the model based on the model's error recognition ability and the similarity of the intersection and union sets, and divides it into a stable performance model and an unstable performance model;
[0027] Optimization module: For models with stable performance, continue to use the labeled data set for model training. For models with unstable performance, divide the model training process into two stages. The first stage uses accurately labeled data for pre-training, and the second stage introduces inaccurately labeled data and uses an adaptive learning algorithm to gradually adjust the model.
[0028] In the above technical solution, the technical effects and advantages provided by the present invention are:
[0029] 1. The present invention uses cross-validation and model evaluation techniques to conduct in-depth analysis of multi-source transaction data, accurately identify and divide transaction samples with high and low labeling accuracy, thereby effectively reducing the negative impact of labeling bias on model learning. By introducing the sample volatility index and result overlap index, the scheme can dynamically evaluate the model's error recognition ability and the similarity of prediction results, ensuring the stability of the model during training. This strategy based on multi-index evaluation enables the model to more accurately identify and classify abnormal transactions in practical applications.
[0030] 2. The phased training method of the present invention. First, use accurate labeled data for pre-training to ensure that the model grasps the basic transaction characteristics, and then introduce an adaptive learning algorithm to process inaccurately labeled data, gradually optimize the model parameters, and enhance its adaptability to noise and deviation. This progressive training method not only improves the accuracy and stability of the model when processing noisy data, but also greatly reduces the probability of false positives and false negatives, ultimately ensuring the transaction security and user experience of the e-commerce platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0032] Figure 1 The present invention is a flow chart of the method.
[0033] Figure 2 It is a system module diagram of the present invention. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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.
[0035] Example 1, please refer to Figure 1 As shown, the training method of an abnormal transaction identification model of an e-commerce platform described in this embodiment includes the following steps:
[0036] S1: After integrating transaction data from different sources, cross-validation is used to determine the accuracy of transaction annotations, and transaction annotations are divided into accurate annotations and inaccurate annotations;
[0037] S2: When a transaction is inaccurately labeled, the model is used to identify the fluctuation in the proportion of samples affected by the labeling error, to determine the model's error recognition capability, and to calculate the ratio of the intersection and union of the model's predicted results to the actual results, and to evaluate the similarity of the intersection and union sets;
[0038] S3: Evaluate the performance stability of the model based on the model's error recognition ability and the similarity of the intersection and union sets, and divide it into a stable performance model and an unstable performance model;
[0039] S4; For models with stable performance, continue to use the labeled data set for model training. For models with unstable performance, divide the model training process into two stages. The first stage uses accurately labeled data for pre-training. The second stage introduces inaccurately labeled data and uses an adaptive learning algorithm to gradually adjust the model.
[0040] Among them, in S1, after integrating the transaction data from different sources, cross-validation is used to judge the accuracy of transaction annotations, and the transaction annotations are divided into accurate annotations and inaccurate annotations.
[0041] Collect transaction data from multiple sources (such as different payment gateways, user behavior logs, customer service systems, etc.). This data may include transaction amount, time, location, user information, device type, etc. Unify the data format and field names of different data sources, integrate data from different sources, and merge them into a unified data set. This step may require the use of database join operations (such as SQL JOIN) to ensure that all relevant information is correctly associated.
[0042] Divide the integrated dataset into multiple subsets for use in the cross-validation process. A common method is K-fold cross-validation (such as 5-fold and 10-fold), which is to divide the dataset into K parts, use K-1 of them for training each time, and use the remaining 1 for validation. Select a suitable model (such as logistic regression, random forest, support vector machine, etc.) as the basic model for judging the accuracy of annotations. The model needs to be able to handle the situation of class imbalance, because abnormal transactions are usually rare. In each fold of cross-validation, use the data of K-1 subsets to train the model. The model will learn the relationship between the characteristics of transactions and annotations. Use the remaining 1 subset to verify the performance of the model, paying special attention to the model's misidentification, that is, the model predicts normal transactions as abnormal, or predicts abnormal transactions as normal. Based on the performance of the model on the validation set, calculate the difference between the model's prediction results and the annotations. If the model's predictions for some samples are significantly inconsistent with the original annotations, these samples may have mislabeling.
[0043] Combining all cross-validation results, we can identify transactions that may be mislabeled. Based on the cross-validation results, we can classify transaction labels into two categories: accurate and inaccurate. Accurately labeled transactions are consistent with model predictions in cross-validation, while inaccurately labeled transactions are inconsistent with model predictions in multiple validation sets. For the identified inaccurately labeled samples, we can re-label them with manual review or more complex models. This step can use semi-supervised learning or active learning methods to prioritize high-risk transactions.
[0044] S2: When a transaction is inaccurately labeled, the model is used to identify the fluctuation in the proportion of samples affected by the labeling error, judge the model's error recognition ability, calculate the ratio of the intersection and union of the model's predicted results to the actual results, and evaluate the similarity of the intersection and union sets.
[0045] Among them, the sample fluctuation range index is generated according to the fluctuation of the sample proportion affected by the labeling error identified by the model, and the error recognition ability of the model is judged according to the sample fluctuation range index. The method for obtaining the sample fluctuation range index is:
[0046] Construct a Bayesian network model, the model expression is: In the formula, w is the weight parameter of the model, is the training dataset, is the posterior distribution under the given data set, is the likelihood function, which represents the probability of data under given weights, p(w) is the prior distribution of weights, is the marginal probability of the data; the samples affected by the labeling error are labeled as x i , through the Bayesian neural network, forward propagation is performed j times, each time sampling from the posterior distribution of the weight, and j prediction results are obtained. The prediction expression is: In the formula, is the sample x obtained by the jth sampling i The predicted value, w (j) is the weight obtained by sampling from the posterior distribution for the jth time, for sample x i The j-times prediction results are used to calculate the variance as a measure of sample prediction uncertainty. The expression is: is the sample x i The variance of the prediction result, J is the number of sampling times, is the mean of all prediction results, and the variance of the prediction results Normalized, we get the sample volatility index, which is expressed as: In the formula, For sample x i The maximum variance of the prediction results, SVI i is the sample volatility index.
[0047] The sample volatility index reflects the prediction uncertainty of the model when facing a certain sample. i A high value means that the model has poor error recognition ability. The sample may be unstable due to labeling errors or other noise factors, which requires further review or data labeling correction.
[0048] The ratio of the intersection and union of the calculation model prediction results and the actual results is recorded as the result overlap index. The similarity of the intersection and union sets is evaluated based on the result overlap index. The method for obtaining the result overlap index is:
[0049] Define two sets, one is the actual result set A, and the other is the model prediction result set B, where the actual result set A contains all actual samples marked as the target class (such as abnormal transactions). The model prediction result set B contains all samples predicted by the model as the target class (such as abnormal transactions).
[0050] Calculate the intersection of sets A and B |A∩B|, that is, the number of samples correctly predicted by the model. The size of the intersection represents the number of samples whose predictions by the model are consistent with the actual results.
[0051] Calculate the union of sets A and B |A∪B|, that is, the total number of samples of actual results and predicted results. The size of the union represents the number of samples that are actually marked or predicted as the target class. Divide the size of the intersection by the size of the union to calculate the overlap index of the result. The expression is: Where RE is the result overlap index, ranging from 0 to 1. RE = 1 means that the model prediction result is completely consistent with the actual result, with the highest similarity. RE = 0: It means that the model prediction result is completely inconsistent with the actual result, without any overlap.
[0052] According to the calculated result overlap index RE, the similarity of the intersection and union sets is evaluated: High RE: indicates that the model's predicted results are highly consistent with the actual results, and the model performance is good. Low RE: indicates that the model's predicted results are highly similar to the actual results, and the model may need further optimization.
[0053] S3: Based on the model's error recognition ability and the similarity of the intersection and union sets, the performance stability of the model is evaluated and divided into a stable performance model and an unstable performance model.
[0054] The sample fluctuation amplitude index and the result overlap index are converted into the first eigenvector, and the first eigenvector is used as the input of the machine learning model. The machine learning model uses the performance stability value label of each group of first eigenvector prediction models as the prediction target, and takes minimizing the sum of prediction errors of the performance stability value labels of all models as the training target. The machine learning model is trained until the sum of prediction errors converges and the model training is stopped. The performance stability value of the model is determined according to the model output results, wherein the machine learning model is a polynomial regression model.
[0055] The method for obtaining the performance stability value of the model is: from the first eigenvector training data of the trained machine learning model, obtain the corresponding function expression: CW = f1(SVI i,RE); where f1 is the output function of the model, SVI i is the sample fluctuation index, RE is the result overlap index, and CW is the performance stability of the model.
[0056] The obtained performance stability value of the model is compared with the preset reference threshold of the performance stability value of the model; if the performance stability value of the model is greater than or equal to the preset reference threshold of the performance stability value of the model, the model performance stability is high, indicating that the model can maintain good predictive ability under different circumstances. At this time, a normal model performance signal is generated, indicating that the model can continue to run and no emergency adjustment is required; if the performance stability value of the model is less than the preset reference threshold of the performance stability value of the model, the model performance stability is low and may perform poorly in certain circumstances, which may result in the inability to accurately identify abnormal transactions. At this time, a model performance abnormality signal is generated, indicating that the model needs to be checked and tuned, or even retrained.
[0057] It should be noted here that the performance stability value of the model is the performance stability value of the e-commerce platform abnormal transaction identification model, and the reference threshold of the performance stability value of the model is set by personnel in this field according to specific circumstances, which will not be elaborated here.
[0058] S4; For models with stable performance, continue to use the labeled data set for model training. For models with unstable performance, divide the model training process into two stages. The first stage uses accurately labeled data for pre-training. The second stage introduces inaccurately labeled data and uses an adaptive learning algorithm to gradually adjust the model.
[0059] For models with stable performance, it means that the model shows consistent prediction ability when facing different data sets or annotation errors, so the labeled data sets can continue to be used for model training. In this case, the labeled data sets have been verified to be high-quality and suitable for further learning of the model. By continuously training on these data sets, the model can consolidate existing recognition patterns and further optimize its ability to detect abnormal transactions. In addition, continuing to use these data sets helps maintain the robustness of the model, ensuring the stability and accuracy of the model in practical applications, so as to effectively cope with the complex transaction environment on the e-commerce platform.
[0060] Filter out accurately labeled data from the labeled dataset, which will serve as the basis for model pre-training. Ensure that the model learns high-quality patterns in the first stage and reduce the impact of labeling errors on the initial model training.
[0061] Initialize the model parameters w0 using random initialization or initialization based on prior knowledge. Where w0 is the initial weight vector of the model, The mean is 0 and the variance is e 2 The normal distribution of .
[0062] Use accurately labeled datasets Train the model and optimize the loss function L(w), expression: In the formula, w pre is the pre-trained model weight, Accurately labeling the dataset Loss function on (such as cross entropy loss), argmin w Indicates optimizing the model weight w to minimize the loss function;
[0063] Use some accurately labeled data as a validation set Evaluate the performance of the pre-trained model to ensure that it performs well on accurately labeled data. The expression is: Where, Accuracy pre is the accuracy of the pre-training phase, is the prediction result of the model, q i is the true label of sample i, is an indicator function that takes the value 1 when the prediction is correct and 0 otherwise.
[0064] In the second stage, inaccurately labeled datasets are gradually introduced And mixed with accurately labeled datasets, the model gradually adapts to the annotation noise and enhances its generalization ability in the real world.
[0065] Use an adaptive learning algorithm to adjust model parameters, such as the stochastic gradient descent algorithm with momentum. The algorithm expression is: w t is the model weight at the tth iteration, η t is an adaptive learning rate that may vary with the number of iterations, In a mixed data set The loss gradient on ;
[0066] The error penalty mechanism is introduced to make the model adjust the deviation of inaccurately labeled data to a certain extent. The weighted loss function is used to apply the minimum weight to samples with a high possibility of labeling errors. The expression is: α i is the weight coefficient of the i-th sample, which can be adjusted dynamically according to the uncertainty of the sample. is a standard loss function, such as cross entropy loss; during training, the stability of the model is continuously monitored, and the learning rate η is dynamically adjusted according to the model's adaptation to inaccurately labeled data t and sample weight α i, while ensuring that the model does not overfit to inaccurately labeled data, enabling it to process this data well.
[0067] After the adaptive learning phase, an independent test set D is used. test Evaluate the model performance, focusing on checking the accuracy and stability of the model when processing noisy data, expressed as: Where, Accuracy final is the accuracy of the final model, which is used to evaluate the effect of adaptive learning.
[0068] In this application, through two stages of training, the model can gradually adapt to the challenges of inaccurately labeled data based on higher-quality pre-training, and ultimately achieve performance that is more robust to noise and bias.
[0069] In this embodiment, transactions are first divided into accurately labeled and inaccurately labeled data by integrating transaction data from different sources and using cross-validation to determine the accuracy of data labeling. For inaccurately labeled data, the fluctuation of the proportion of samples affected by labeling errors in model recognition is analyzed, the intersection and union ratio of the model prediction results and the actual results are calculated, and their similarity is evaluated to determine the model's error recognition ability. Based on this, the performance stability of the model is evaluated, and the model is divided into two categories: stable performance and unstable performance. For stable performance models, the labeled data set is directly used for training; for unstable performance models, a phased training strategy is adopted. In the first phase, accurately labeled data is used for pre-training, and inaccurately labeled data is introduced in the second phase. The model is gradually adjusted through an adaptive learning algorithm to enhance its robustness under noisy data.
[0070] Example 2, please refer to Figure 2 As shown, the training system of an abnormal transaction identification model of an e-commerce platform described in this embodiment includes a data annotation module, an error analysis and similarity evaluation module, a performance evaluation module and an optimization module;
[0071] Data labeling module: After integrating transaction data from different sources, cross-validation is used to determine the accuracy of transaction labels, and transaction labels are divided into accurate labels and inaccurate labels;
[0072] Error analysis and similarity assessment module: When a transaction is labeled inaccurately, the model identifies the fluctuation of the sample ratio affected by the labeling error, determines the model's error recognition ability, calculates the ratio of the intersection and union of the model's predicted results to the actual results, and evaluates the similarity of the intersection and union sets;
[0073] Performance evaluation module: evaluates the performance stability of the model based on the model's error recognition ability and the similarity of the intersection and union sets, and divides it into a stable performance model and an unstable performance model;
[0074] Optimization module: For models with stable performance, continue to use the labeled data set for model training. For models with unstable performance, divide the model training process into two stages. The first stage uses accurately labeled data for pre-training, and the second stage introduces inaccurately labeled data and uses an adaptive learning algorithm to gradually adjust the model.
[0075] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0076] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0077] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0078] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0079] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0080] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A training method for an abnormal transaction recognition model on an e-commerce platform, characterized by: The steps include: S1: After integrating transaction data from different sources, cross-validation is used to determine the accuracy of transaction annotations, and transaction annotations are divided into accurate annotations and inaccurate annotations; S2: When a transaction is inaccurately labeled, the model is used to identify the fluctuation in the proportion of samples affected by the labeling error, to determine the model's error recognition capability, and to calculate the ratio of the intersection and union of the model's predicted results to the actual results, and to evaluate the similarity of the intersection and union sets; S3: Evaluate the performance stability of the model based on the model's error recognition ability and the similarity of the intersection and union sets, and divide it into a stable performance model and an unstable performance model; S4; For models with stable performance, continue to use the labeled data set for model training. For models with unstable performance, divide the model training process into two stages. The first stage uses accurately labeled data for pre-training. The second stage introduces inaccurately labeled data and uses an adaptive learning algorithm to gradually adjust the model.
2. The training method of an abnormal transaction identification model for an e-commerce platform according to claim 1, characterized in that: In S1, cross-validation is used to determine the accuracy of transaction annotations, and transaction annotations are divided into accurate annotations and inaccurate annotations, specifically: Collect transaction data from multiple sources, integrate the data from different sources into a unified data set, divide the integrated data set into multiple subsets, and divide the data set into K parts. Use K-1 of them for training each time, and the remaining 1 for validation. In each fold of cross-validation, use the data of K-1 subsets to train the model. The model will learn the relationship between the characteristics of the transaction and the annotations. Use the remaining 1 subset to validate the performance of the model. Based on the performance of the model on the validation set, calculate the difference between the model prediction results and the annotations. According to the results of cross-validation, transaction annotations are divided into two categories: accurate annotations and inaccurate annotations. Accurately labeled transactions are consistent with model predictions in cross-validation, while inaccurately labeled transactions are inconsistent with model predictions in multiple validation sets.
3. The training method of an abnormal transaction identification model for an e-commerce platform according to claim 1, characterized in that: In S2, the sample fluctuation index is generated according to the fluctuation of the sample proportion affected by the labeling error identified by the model, and the error recognition ability of the model is judged according to the sample fluctuation index. The method for obtaining the sample fluctuation index is: Construct a Bayesian network model, the model expression is: In the formula, w is the weight parameter of the model, is the training dataset, is the posterior distribution under the given data set, is the likelihood function, which represents the probability of data under given weights, p(w) is the prior distribution of weights, is the marginal probability of the data; the samples affected by the labeling error are labeled as x i , through the Bayesian neural network, forward propagation is performed j times, each time sampling from the posterior distribution of the weight, and j prediction results are obtained. The prediction expression is: In the formula, is the sample x obtained by the jth sampling i The predicted value, w (j) is the weight obtained by sampling from the posterior distribution for the jth time, for sample x i The j-times prediction results are used to calculate the variance as a measure of sample prediction uncertainty. The expression is: is the sample x i The variance of the prediction result, J is the number of sampling times, is the mean of all prediction results, and the variance of the prediction results Normalized, we get the sample volatility index, which is expressed as: In the formula, For sample x i The maximum variance of the prediction results, SVI i is the sample volatility index.
4. The training method of an abnormal transaction identification model for an e-commerce platform according to claim 3 is characterized by: In S3, the ratio of the intersection and union of the calculation model prediction results and the actual results is recorded as the result overlap index. The similarity of the intersection and union sets is evaluated based on the result overlap index. The method for obtaining the result overlap index is: Define two sets, one is the actual result set A, and the other is the model prediction result set B. Calculate the intersection of sets A and B |A∩B|, that is, the number of samples correctly predicted by the model. The size of the intersection represents the number of samples whose model predictions are consistent with the actual results. Calculate the union of sets A and B |A∪B|, that is, the total number of samples of actual results and predicted results. The size of the union represents the number of samples that are actually marked or predicted as the target class. Divide the size of the intersection by the size of the union to calculate the result overlap index. The expression is: Where RE is the result overlap index, which ranges from 0 to 1.
5. The training method of an abnormal transaction identification model for an e-commerce platform according to claim 4 is characterized in that: In S3, the performance stability of the model is evaluated based on the model's error recognition ability and the similarity of the intersection and union sets, and it is divided into a stable performance model and an unstable performance model; The sample fluctuation amplitude index and the result overlap index are converted into the first eigenvector, and the first eigenvector is used as the input of the machine learning model. The machine learning model uses the performance stability value label of each group of first eigenvector prediction models as the prediction target, and takes minimizing the sum of prediction errors of the performance stability value labels of all models as the training target. The machine learning model is trained until the sum of prediction errors converges and the model training is stopped. The performance stability value of the model is determined according to the model output results, wherein the machine learning model is a polynomial regression model.
6. The training method of an abnormal transaction identification model for an e-commerce platform according to claim 5, characterized in that: Compare the obtained performance stability value of the model with a preset reference threshold value of the performance stability value of the model; If the performance stability value of the model is greater than or equal to the preset reference threshold of the performance stability value of the model, the model performance stability is high, and a normal model performance signal is generated at this time, and no emergency adjustment is required; If the performance stability value of the model is less than the preset reference threshold of the performance stability value of the model, the model performance stability is low. At this time, a model performance abnormality signal is generated, indicating that the model needs to be checked, tuned, or even retrained.
7. The training method of an abnormal transaction identification model for an e-commerce platform according to claim 1, characterized in that: In S4, for models with unstable performance, the model training process is divided into two stages. In the first stage, accurate labeled data is used for pre-training, and in the second stage, inaccurate labeled data is introduced and the model is gradually adjusted using an adaptive learning algorithm; Filter out accurately labeled data from the labeled data set. These data will serve as the basis for model pre-training and initialize the model parameter w0, which is expressed as: Where w0 is the initial weight vector of the model, The mean is 0 and the variance is e 2 Normal distribution of Use accurately labeled datasets Train the model and optimize the loss function L(w), expression: In the formula, w pre is the pre-trained model weight, Accurately labeling the dataset The loss function on , argmin w Indicates optimizing the model weight w to minimize the loss function; using some accurately labeled data as the validation set Evaluate the performance of the pre-trained model to ensure that it performs well on accurately labeled data. The expression is: Where, Accuracy pre is the accuracy of the pre-training phase, is the prediction result of the model, q i is the true label of sample i, is an indicator function that takes the value 1 when the prediction is correct and 0 otherwise.
8. The training method of an abnormal transaction identification model for an e-commerce platform according to claim 7, characterized in that: In the second stage, inaccurately labeled datasets are gradually introduced It is mixed with accurately labeled data sets, and the model parameters are adjusted using an adaptive learning algorithm. The stochastic gradient descent algorithm with momentum is used. The algorithm expression is: w t is the model weight at the tth iteration, η t is the adaptive learning rate, In a mixed data set The loss gradient on ; the error penalty mechanism is introduced to make the model adjust the deviation of inaccurately labeled data, and the weighted loss function is used to impose the minimum weight on samples with a high possibility of labeling errors. The expression is: α i is the weight coefficient of the i-th sample, is the standard loss function; after the adaptive learning phase, an independent test set D is used test Evaluate the model performance, focusing on checking the accuracy and stability of the model when processing noisy data, expressed as: Where, Accuracy final is the accuracy of the final model.
9. A training system for an abnormal transaction identification model of an e-commerce platform, used to implement a training method for an abnormal transaction identification model of an e-commerce platform according to any one of claims 1 to 8, characterized in that: It includes data annotation module, error analysis and similarity evaluation module, performance evaluation module and optimization module; Data labeling module: After integrating transaction data from different sources, cross-validation is used to determine the accuracy of transaction labels, and transaction labels are divided into accurate labels and inaccurate labels; Error analysis and similarity assessment module: When a transaction is labeled inaccurately, the model identifies the fluctuation of the sample ratio affected by the labeling error, determines the model's error recognition ability, calculates the ratio of the intersection and union of the model's predicted results to the actual results, and evaluates the similarity of the intersection and union sets; Performance evaluation module: evaluates the performance stability of the model based on the model's error recognition ability and the similarity of the intersection and union sets, and divides it into a stable performance model and an unstable performance model; Optimization module; For models with stable performance, we continue to use labeled data sets for model training. For models with unstable performance, we divide the model training process into two stages. The first stage uses accurately labeled data for pre-training. The second stage introduces inaccurately labeled data and uses an adaptive learning algorithm to gradually adjust the model.
Citation Information
Cited By
Natural resource field large model evaluation set generation method
CN119721511A
Method for constructing true and adulterated wine discrimination model
CN119808010A
Remote sensing data high-quality sample screening method and system and storage medium
CN120747663A