CN117009873A - Method for generating payment risk identification model, and method and device for payment risk identification - Google Patents

Method for generating payment risk identification model, and method and device for payment risk identification Download PDF

Info

Publication number
CN117009873A
CN117009873A CN202311079876.5A CN202311079876A CN117009873A CN 117009873 A CN117009873 A CN 117009873A CN 202311079876 A CN202311079876 A CN 202311079876A CN 117009873 A CN117009873 A CN 117009873A
Authority
CN
China
Prior art keywords
payment
classifier
training sample
training
risk identification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311079876.5A
Other languages
Chinese (zh)
Inventor
周璟
刘京
金宏
王维强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202311079876.5A priority Critical patent/CN117009873A/en
Publication of CN117009873A publication Critical patent/CN117009873A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/20Ensemble learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/042Knowledge-based neural networks; Logical representations of neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/096Transfer learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Business, Economics & Management (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Accounting & Taxation (AREA)
  • Software Systems (AREA)
  • Evolutionary Biology (AREA)
  • Computing Systems (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Mathematical Physics (AREA)
  • Computer Security & Cryptography (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Medical Informatics (AREA)
  • Image Analysis (AREA)

Abstract

One or more embodiments of the present specification disclose a method for generating a payment risk identification model, including: acquiring a first training sample and setting a first label, wherein the first training sample is a preset payment event under different payment scenes; setting a classifier for each payment scene respectively, and training the classifier based on the first training sample and the first label; selecting at least one payment scene, and taking a training sample of the payment scene as a second training sample; inputting the second training sample into a classifier of the payment scene, and taking the obtained prediction result as a second label; performing integrated training on other classifiers based on the second training sample and a second label; and integrating the trained classifier into the payment risk identification model. Correspondingly, the specification also discloses a payment risk identification method and a payment risk identification device.

Description

Method for generating payment risk identification model, and method and device for payment risk identification
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a generation method of a payment risk identification model, a payment risk identification method and a device.
Background
In order to ensure the fund safety, in the process of online payment by a user, fund risk identification is often required, and different models are usually required to be built for different scenes and risk distribution is usually required to be performed respectively. In the problem of fund risk identification, there are many payment scenes, specific transactions often correspond to different scenes, and event logic and data distribution behind the scenes are greatly different. The scheme of carrying out fund risk identification by adopting independent modeling of scenes is very high in cost.
Disclosure of Invention
One or more embodiments of the present disclosure describe a method for generating a payment risk identification model, a payment risk identification method and a device, which can adapt to risk identification problems in different payment scenarios, and realize green wind control.
According to a first aspect, there is provided a method for generating a payment risk identification model, comprising:
acquiring a first training sample and setting a first label, wherein the first training sample is a preset payment event under different payment scenes;
setting a classifier for each payment scene respectively, and training the classifier based on the first training sample and the first label;
selecting at least one payment scene, and taking a training sample of the payment scene as a second training sample; inputting the second training sample into a classifier of the payment scene, and taking the obtained prediction result as a second label; performing integrated training on other classifiers based on the second training sample and a second label;
And integrating the trained classifier into the payment risk identification model.
As an optional implementation manner of the method of the first aspect, training the classifier based on the first training sample and the first label specifically includes:
inputting the first training sample into a feature extraction network to obtain first sample features;
inputting the first sample characteristics into the classifier to obtain a first prediction result;
determining a first loss function based on the first prediction result and the first tag;
updating the classifier based on the first loss function.
As an optional implementation manner of the method of the first aspect, the performing integrated training on the other classifiers based on the second training samples and the second labels specifically includes:
inputting the second training sample into a feature extraction network to obtain a second sample feature;
respectively inputting the second sample characteristics into the other classifiers to obtain a second prediction result;
determining an integrated prediction result of the other classifier based on the second prediction result of the other classifier;
determining a second loss function based on the integrated prediction results of the other classifiers and the second label;
Updating the other classifiers based on the second loss function.
As an optional implementation manner of the method of the first aspect, before integrating the classifier into the payment risk identification model, the method further includes:
acquiring a third training sample under a target payment scene;
selecting a payment scene closest to sample distribution of the target payment scene from the payment scenes;
inputting the third training sample into a classifier of the payment scene, and taking the obtained prediction result as a third label;
and based on the third training sample and the third label, performing integrated training on the classifier of the different payment scenes.
Specifically, based on the third training sample and the third label, performing integrated training on the classifier of the different payment scenes specifically includes:
inputting the third training sample into a feature extraction network to obtain a third sample feature;
respectively inputting the third sample characteristics into classifiers of different payment scenes to obtain a third prediction result;
determining an integrated prediction result based on a third prediction result of the classifier of the different payment scenario;
determining a third loss function based on the integrated prediction result and the third tag;
Updating the classifier of the different payment scenario based on the third loss function.
Specifically, the feature extraction network includes:
the characterization layer is used for projecting the input payment event to a feature space and carrying out semantic alignment to obtain a first feature vector;
the processing layer is used for carrying out feature extraction and feature interaction of the first feature vector at different depths to obtain a second feature vector;
and the combination layer is used for splicing the second feature vectors to obtain third feature vectors.
According to a second aspect, there is provided a payment risk identification method comprising:
acquiring a payment event to be identified;
inputting the payment event into a payment risk identification model; the payment risk identification model is generated by adopting any one of the generation methods of the payment risk identification model;
and determining a risk result of the payment event based on the prediction result of each classifier in the payment model.
According to a third aspect, there is provided a generation apparatus of a payment risk identification model, comprising:
the first data acquisition module is configured to acquire a first training sample and a first label, wherein the first training sample is a preset payment event under different payment scenes;
The first processing module is configured to set a classifier for each payment scene respectively, and train the classifier based on the first training sample and the first label;
the second processing module is configured to select at least one payment scene, and takes a training sample of the payment scene as a second training sample; inputting the second training sample into a classifier of the payment scene, and taking the obtained prediction result as a second label; performing integrated training on other classifiers based on the second training sample and a second label;
and the generation module is configured to integrate the trained classifier into the payment risk identification model.
As an optional implementation manner of the method according to the third aspect, the apparatus further includes a feature extraction module configured to input training samples into the feature extraction network to obtain sample features.
Specifically, the feature extraction network includes:
the characterization layer is used for projecting the input payment event to a feature space and carrying out semantic alignment to obtain a first feature vector;
the processing layer is used for carrying out feature extraction and feature interaction of the first feature vector at different depths to obtain a second feature vector;
And the combination layer is used for splicing the second feature vectors to obtain third feature vectors.
As an optional implementation manner of the method of the third aspect, the first data obtaining module is further configured to obtain a third training sample in the target payment scenario; the apparatus further comprises a third processing module;
the third processing module is configured to select a payment scene closest to sample distribution of the target payment scene from the payment scenes; inputting the third training sample into a classifier of the payment scene, and taking the obtained prediction result as a third label; and based on the third training sample and the third label, performing integrated training on the classifier of the different payment scenes.
According to a fourth aspect, there is provided a payment risk identification device comprising:
a second data acquisition module configured to acquire a payment event to be identified;
the risk identification module is configured to input the payment event into a payment risk identification model, and determine a risk result of the payment event based on a prediction result of each classifier in the payment model; the payment risk identification model is generated by adopting any one of the generation methods of the payment risk identification model.
According to a fifth aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of generating a payment risk identification model of any of the above.
According to a sixth aspect, there is provided an electronic device comprising:
one or more processors; and
a memory associated with the one or more processors, the memory for storing program instructions that, when read for execution by the one or more processors, perform the steps of any of the methods of generating a payment risk identification model described above.
According to a seventh aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a payment risk identification method as described above.
According to an eighth aspect, there is provided an electronic device comprising:
one or more processors; and
a memory associated with the one or more processors, the memory for storing program instructions that, when read for execution by the one or more processors, perform the steps of the payment risk identification method as described above.
According to the generation method of the payment risk identification model, provided by one or more embodiments of the specification, the risk identification accuracy under each payment scene can be improved by training the classifier corresponding to the payment scene independently; aiming at each classifier, through the integrated learning of other classifiers on the payment scene corresponding to the classifier, the knowledge migration across the scenes can be realized, and the common knowledge and the proprietary knowledge among the scenes can be fully learned, so that the generalization capability of the obtained payment risk identification model is improved, and the domain generalization problem is solved. In addition, aiming at the target payment scene, the nearest known payment scene is selected as a label, and the classifier corresponding to other payment scenes is integrated and trained, so that the domain self-adaption problem can be solved. The obtained payment risk identification model has higher accuracy, identification efficiency and reusability and wide application range, and can be applied to the payment risk identification method provided by the embodiment of the specification.
The generation device of the payment risk identification model and the payment risk identification device provided by one or more embodiments of the present specification also have the above-mentioned beneficial effects.
Drawings
For a clearer description of one or more embodiments of the present description or of the solutions of the prior art, the drawings that are necessary for the description of the embodiments or of the prior art will be briefly described, it being apparent that the drawings in the description that follow are only some of the embodiments described in the description, from which, for a person skilled in the art, other drawings can be obtained without inventive faculty.
Fig. 1 is a flowchart of a method for generating a payment risk identification model according to one or more embodiments of the present disclosure.
Fig. 2 schematically shows a workflow diagram of a payment risk identification model provided in one or more embodiments of the present disclosure in one scenario.
Fig. 3 schematically illustrates a data format of a payment event in one or more embodiments of the present description.
Fig. 4 is a flowchart of a payment risk identification method provided in one or more embodiments of the present disclosure.
Fig. 5 is a block diagram of a device for generating a payment risk identification model according to one or more embodiments of the present disclosure.
Fig. 6 is a block diagram of a payment risk identification device provided in one or more embodiments of the present disclosure.
Fig. 7 is a schematic diagram of a payment risk identification system provided in one or more embodiments of the present disclosure.
Fig. 8 is a schematic diagram of another payment risk identification system provided in one or more embodiments of the present disclosure.
Fig. 9 is a block diagram of an electronic device provided in one or more embodiments of the present disclosure.
Detailed Description
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
In order to facilitate understanding of the aspects of the present specification, some technical terms related to the embodiments of the present specification are explained below.
(1) Fund risk: refers to actions found during payment of a transaction that pose a threat to funds security, including but not limited to theft, fraud, etc.
(2) Green wind control: ESG (Environmental, society, and Governance) is a method of comprehensively evaluating an enterprise to measure its performance in terms of environment, society, and corporate Governance, thereby providing information about its sustainability and risk. In the context of ESG, the purpose of green wind control is to prevent waste of resources, promoting sustainable development of economy, society and environment.
(3) Domain Adaptation (DA): the problem of domain self-adaptive research is that in an actual application scene, the effect of the same model in different fields is different due to the special properties of different fields, and the problem of the decline of the generalization performance of the model due to the difference between a data source domain and a target domain is solved. In domain adaptation, the model is trained with data from the source domain and the target domain, but there is a distribution difference between the source domain and the target domain, which makes the model trained on the target domain likely not to generalize well to new data distributions. Therefore, the domain adaptive method is designed for processing the target domain with perceivable data distribution but imperceptible label distribution in the training stage, and adapting the knowledge of the source domain to the scene of the target domain so as to improve the generalization performance of the model.
(4) Domain generalization (Domain Generalization, DG): the domain generalization research has the problem that a model with strong generalization capability is learned from a plurality of data source domains with different data distributions so as to obtain a better effect on an unknown test set, and the model can be used for processing domains with imperceptible data distribution and label distribution in a training stage. For example, the concept of the domain may simply correspond to the payment scenario, and the data of scenario a, scenario b, scenario c, scenario d, and scenario e currently exist, and this is taken as the training set, so that the objective of model optimization not only includes that the above 5 scenarios can obtain a better result, but also needs to satisfy sufficient generalization, and the model produced by training can be adapted under the data distribution of the newly appearing scenario x.
(5) Ensemble learning (Ensemble Learning): for machine learning concepts, better predictive performance than a single model is achieved by combining multiple individual models. The integrated learning can improve the prediction capability and robustness of the model, can reduce the overfitting risk of the model, and can be applied to various machine learning tasks.
Currently, online payment has become a mainstream transaction mode, the user group involved is quite wide, and in order to protect the fund security of users, a transaction platform needs to perform risk analysis in the process of each transaction event. Typically, a transaction event involves risks including, but not limited to, theft, fraud, etc. In practical applications, a transaction often corresponds to different payment scenarios, and event logic and data distribution behind the payment scenarios are greatly different.
The traditional data modeling mode is to build different models for different payment scenes, and risk distribution is respectively carried out. The green wind control advocated by the ESG is prone to using a more generalized model, and risks can be effectively identified in all payment scenes, so that a mode that the scenes are originally required to be modeled respectively is replaced, resource waste can be prevented, and the goal of green wind control is achieved.
In different payment scenarios, the edge probability distribution P (X) of the data differs from the conditional probability distribution P (y|x). The concept of domains may simply correspond to payment scenarios, some typical examples being transfer to accounts, transfer to cards, online app physical transactions, off-site instant check-out, etc., where both the data distribution and tag distribution of these domains may be perceived during the training phase of the payment risk recognition model. In actual green wind control, a domain which is imperceptible in both data distribution and label distribution in a training stage exists, and the problem can be solved through domain generalization; the domain with the data distribution being known and the label distribution being imperceptible in the training stage can be solved through domain self-adaption; as transaction activities develop into domains that are added after training, these domains may include the various types of domains described above, requiring processing in combination with domain generalization and domain adaptation.
On one hand, the traditional generalization scheme is generally designed for the problem of the computer vision field, has low suitability in terms of payment risk identification, and therefore needs to consider the requirements of payment risk identification tasks; on the other hand, the traditional scheme separately models the scene of domain generalization and domain self-adaption, and is difficult to meet the requirement of green wind control.
Therefore, a new payment risk identification scheme is needed, which can show stronger risk identification capability in different payment scenes, and uniformly solve the domain self-adaptation problem and the domain generalization problem so as to realize green wind control.
It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than described in this specification. Furthermore, individual steps described in this specification, in other embodiments, may be described as being split into multiple steps; while various steps described in this specification may be combined into a single step in other embodiments.
The method for generating the payment risk identification model, the method for identifying the payment risk and the device according to the embodiments of the present disclosure will be described in further detail below with reference to the accompanying drawings and specific embodiments of the present disclosure, but the detailed description does not limit the embodiments of the present disclosure.
In some embodiments, a method for generating a payment risk identification model is provided, please refer to fig. 1, including steps S100-S106.
S100: and acquiring a first training sample and setting a first label, wherein the first training sample is a preset payment event under different payment scenes.
The payment scenario may refer to a scenario in which both parties of a transaction perform funds transaction through various platforms, for example, performing a payment event through platforms such as online app, bank transfer, code scanning, etc. A payment event may be understood as payment data formed during a payment process. The present embodiment does not limit the payment event or the platform on which the payment body is located. In addition, both parties to the transaction are not limited, and can be individual users or can be the transactions between the individual users and online merchants. Specifically, payment scenarios may include transfer to an account, transfer to a card, online app physical transaction, off-site instant check-out, and so forth. It should be noted that, different payment scenarios corresponding to the first training sample are known fields of known data distribution and label distribution.
The first tag is used for identifying risk situations of payment events in the corresponding payment scene.
In some more specific embodiments, the first tag may be used to comprehensively characterize whether a corresponding payment event is at risk, and then the payment risk under the scenario is identified as a classification problem, where the identification result includes that the payment event is at risk or that the payment event is not at risk. Thus, whether the risk exists can be judged simply and quickly.
In other embodiments, the first tag may also be used to characterize a risk type of a corresponding payment event, and embody a specific risk meaning, so that the payment risk in the scenario is identified as a multi-classification problem, and the identification result is that the payment event has a risk of a type such as theft, fraud or credibility. Thus, more specific risk information can be obtained, and effective implementation of subsequent risk treatment work is facilitated.
S102: and setting a classifier for each payment scene respectively, and training the classifier based on the first training sample and the first label.
Each payment scene has respective data distribution characteristics, and in order to ensure that the payment risk identification model has relatively accurate risk identification capability for each different payment scene, a specific classifier can be trained for each payment scene, wherein the parameters of each classifier are independently shared by the corresponding payment scene. Each classifier is trained to have a higher risk recognition capability for the corresponding payment scenario than for other payment scenarios.
Alternatively, the classifier may be constructed based on a structure of a multi-layer fully connected network, where the input is a feature of the first training sample, and the risk identification classification result of the first training sample is output.
By setting the classifier for each payment scene in the payment risk identification model, the risk identification accuracy of the payment risk identification model for different payment scenes can be improved, and the universality of the model is realized.
In some embodiments, training the classifier based on the first training samples and the first labels specifically includes:
inputting the first training sample into a feature extraction network to obtain first sample features;
inputting the first sample characteristics into a classifier to obtain a first prediction result;
determining a first loss function based on the first prediction result and the first label;
the classifier is updated based on the first loss function.
The process of training the classifier is traditional classification task learning, specifically, for each classifier, feature extraction is carried out on a first training sample under a corresponding payment scene through a general feature extraction network, so as to obtain first sample features; classifying by using a corresponding classifier according to the first sample characteristics to obtain a risk identification result, namely a first prediction result; then determining a first loss function by calculating the difference between the first prediction result and the first label, and calculating the loss; the classifier is trained with the goal of loss minimization.
Specifically, the first loss function may be determined by calculating a cross entropy between the first prediction result and the first label, calculating a cross entropy loss, and training the classifier with the cross entropy loss minimized as a target. Through this loss, the risk identification accuracy of each classifier for a specific payment scenario can be ensured.
Optionally, the feature extraction network comprises:
the characterization layer is used for projecting the input payment event into the feature space and carrying out semantic alignment to obtain a first feature vector;
the processing layer is used for carrying out feature extraction and feature interaction of the first feature vector at different depths to obtain a second feature vector;
and the combination layer is used for splicing the second feature vectors to obtain third feature vectors.
The characterization layer is specifically configured to project an input payment event to a feature space, respectively align features of the same type in the payment event to corresponding embedded vectors, and form a first feature vector by all obtained embedded vectors; the processing layer performs feature extraction and feature interaction with corresponding depth on different embedded vectors in the first feature vector based on a specific processing mode, and optionally, the processing mode may include a residual neural network, deep feature intersection, shallow feature intersection or any effective combination of the three, and a specific implementation method will be described in the following embodiments; the combination layer is specifically used for splicing the second feature vectors obtained after being processed by different processing modes, and the obtained third feature vector can be used as a first sample feature to be input into the classifier for risk identification.
It should be noted that the parameters of the feature extraction network may be shared by all payment scenarios.
The semantic alignment of the payment event features can comprehensively grasp the different types of features of the payment event, and the characterization capability of the obtained feature vector can be improved through feature extraction and feature interaction with different depths, so that the risk identification result of the classifier is more accurate.
S104: selecting at least one payment scene, and taking a training sample of the payment scene as a second training sample; inputting a second training sample into a classifier of the payment scene, and taking the obtained prediction result as a second label; and performing integrated training on other classifiers based on the second training samples and the second labels.
Aiming at each specific payment scene, the classification result output by the classifier corresponding to the scene is used as a pseudo tag, so that samples can be constructed for the situation that data distribution and tag distribution are unknown, and the classifier corresponding to other payment scenes is trained to conduct integrated learning on the payment scene, so that knowledge migration across the scenes is realized, shared knowledge and proprietary knowledge among different payment scenes are fully learned, the overall recognition effect of the payment risk recognition model is improved, the generalization capability of the payment risk recognition model is improved, and the domain generalization problem is solved.
In some embodiments, based on the second training sample and the second label, performing integrated training on the other classifiers specifically includes:
inputting the second training sample into a feature extraction network to obtain second sample features;
respectively inputting the second sample characteristics into other classifiers to obtain a second prediction result;
determining an integrated prediction result of the other classifier based on the second prediction result of the other classifier;
determining a second loss function based on the integrated prediction results of the other classifiers and the second label;
based on the second loss function, the other classifiers are updated.
Specifically, for each payment scene, firstly, performing feature extraction on a second training sample under the payment scene through a general feature extraction network to obtain second sample features; classifying by using other classifiers according to the second sample characteristics to obtain a risk identification result, namely a second prediction result, and integrating the prediction results of all other classifiers to obtain an integrated prediction result; then determining a second loss function by calculating the difference between the integrated prediction result and a second label, and calculating the loss, wherein the second label is the prediction result of the classifier corresponding to the payment scene aiming at a second training sample; training other classifiers than the classifier corresponding to the payment scenario with the goal of loss minimization.
In particular, the integrated prediction result may be determined by calculating an average value of the second prediction results of all other classifiers.
More specifically, the second loss function may be determined by calculating a mean square error between the integrated prediction result and the second label, calculating a mean square error loss, and training other classifiers except for the classifier corresponding to the payment scene with the aim of minimizing the mean square error loss. Through the loss calculation, the risk identification effect of each classifier on non-corresponding payment scenes can be improved, the generalization capability of a payment risk identification model is improved, and the domain generalization problem is solved.
It should be noted that the feature extraction network with the same structure as that in step S202 may be directly used for feature extraction, so details of the feature extraction network are not described herein.
S106: and integrating the trained classifier into a payment risk identification model.
The payment risk identification model finally obtained consists of a general feature extraction network and a plurality of classifiers. After the training sample input into the model is extracted to sample characteristics through a characteristic extraction network, the model identifies a payment scene corresponding to the training sample, and if the payment scene is known, the sample characteristics are input into a corresponding classifier to carry out risk identification; if the payment scene is unknown, integrating all classifiers to obtain a recognition result.
In some embodiments, prior to integrating the classifier into the payment risk identification model, further comprising:
acquiring a third training sample under a target payment scene;
selecting a payment scene closest to sample distribution of a target payment scene from the payment scenes;
inputting a third training sample into a classifier of the payment scene, and taking the obtained prediction result as a third label;
and based on the third training sample and the third label, carrying out integrated training on the classifier of different payment scenes.
In this embodiment, the data distribution under the target payment scenario corresponding to the third training sample is known, and the tag distribution is unknown, so that the payment scenario closest to the target payment scenario is selected from the payment scenarios with known data distribution and tag distribution, and the prediction result obtained by the classifier corresponding to the payment scenario for the third training sample is used as a pseudo tag, namely the third tag, so as to construct the sample. And then training all classifiers to perform integrated learning on the payment scene, so that the difference between the data distribution of the target payment scene and the data distribution of the known payment scene can be overcome, and the domain self-adaption problem is solved.
Optionally, selecting a payment scene closest to the sample distribution of the target payment scene, specifically, for each known payment scene and its corresponding classifier, inputting the third training sample and the training sample under the payment scene into the corresponding classifier, performing vector dot product calculation on the obtained two prediction results, and selecting the payment scene with the largest dot product value as the payment scene closest to the sample distribution of the target payment scene.
Specifically, based on the third training sample and the third label, the classifier of the different payment scenes is integrated and trained, which specifically includes:
inputting the third training sample into a feature extraction network to obtain a third sample feature;
respectively inputting the third sample characteristics into classifiers of different payment scenes to obtain a third prediction result;
determining an integrated prediction result based on third prediction results of classifiers of different payment scenes;
determining a third loss function based on the integrated prediction result and the third tag;
based on the third loss function, the classifier for the different payment scenario is updated.
Specifically, feature extraction is performed on a third training sample in a target payment scene through a general feature extraction network to obtain a third sample feature; classifying by using all classifiers according to the third sample characteristics to obtain risk identification results, namely third prediction results, and integrating the prediction results of all the classifiers to obtain integrated prediction results; then determining a third loss function by calculating the difference between the integrated prediction result and a third label, and calculating the loss, wherein the third label is the prediction result of a classifier corresponding to a payment scene closest to the target payment scene aiming at a third training sample; all classifiers corresponding to different payment scenarios are trained with the goal of loss minimization.
Specifically, the integrated prediction result may be determined by calculating an average value of the third prediction results of all the classifiers.
More specifically, the third loss function may be determined by calculating a cross entropy between the integrated prediction result and the third tag, calculating a cross entropy loss, and then integrating and training all classifiers corresponding to different payment scenarios with the cross entropy loss minimized as a target. The problem of difference between the data distribution of the target payment scene and the data distribution of the known payment scene can be well solved through the loss calculation, and the risk identification result of the target payment scene is inferred by utilizing the known payment scene, so that the domain self-adaption problem is solved.
It should be noted that the feature extraction network with the same structure as that in step S202 may be directly used for feature extraction, so details of the feature extraction network are not described herein.
According to the generation method of the payment risk identification model, which is disclosed by the embodiment of the description, the risk identification accuracy rate under each payment scene can be improved by independently training the classifier corresponding to the payment scene; aiming at each classifier, through the integrated learning of other classifiers on the payment scene corresponding to the classifier, the knowledge migration across the scenes can be realized, and the common knowledge and the proprietary knowledge among the scenes can be fully learned, so that the generalization capability of the obtained payment risk identification model is improved, and the domain generalization problem is solved. In addition, aiming at the target payment scene, the nearest known payment scene is selected as a label, and the classifier corresponding to other payment scenes is integrated and trained, so that the domain self-adaption problem can be solved.
Fig. 2 schematically shows a workflow diagram of a payment risk identification model provided in one or more embodiments of the present disclosure in one scenario.
In some specific embodiments, referring to FIG. 2, the process layer includes a residual neural network module (ResMLP), a deep-head-feature-intersection module (Multi-head-intersection), and a shallow-feature-intersection module (FM).
The characterization layer projects the input payment event into a feature space, divides the obtained feature vector into m fields according to different types of features, and projects each field onto corresponding m embedded vectors to obtain a first feature vector.
The processing layer extracts the features of the first feature vector at different depths and performs feature interaction through the residual neural network module, the deep feature crossing module and the shallow feature crossing module.
More specifically, in the residual neural network module, all the connection layers are connected in a residual manner, and the following formula is adopted:
H(x)=F(x)+x
wherein H (x) represents the output of the latter layer in the fully connected layer; f (x) represents the output of the layer before H (x) in the fully connected layer; x represents the original input of the residual neural network module, i.e. the first eigenvector.
In the deep feature intersection module, multi-head Attention (Multi-head Attention) is an Attention mechanism for processing sequence data, and the Multi-head Attention mechanism is utilized to obtain different heads through a plurality of different linear mappings of an input first feature vector, then Attention calculation is carried out, and finally output is obtained by splicing.
In the shallow feature crossing module, a factorizer (Factorization Machine, FM) is used for performing second-order feature crossing operation, as follows:
wherein d e Representing the number of fields;parameters of a factoring machine; />Representing the embedded vector corresponding to the i-th field.
The combination layer is used for splicing the second feature vectors which are respectively processed by the residual neural network module, the deep feature crossing module and the shallow feature crossing module, and inputting the third feature vector serving as the first sample feature into the classifier for risk identification.
The encoder in the backbone network of the payment risk identification model may be implemented based on the structure of the feature extraction network described above and the encoder parameters are shared for all classifiers.
In the scene, after extracting a feature vector from each training sample, the feature vector of the training sample is input into a classifier corresponding to the payment scene according to the payment scene information in the feature vector, and a prediction result is output by the classifier.
For purposes of illustration, the methods of generating the payment risk identification model described in one or more embodiments of the present disclosure are defined as follows.
Task I: acquiring a first training sample and setting a first label, wherein the first training sample is a preset payment event under different payment scenes; and setting a classifier for each payment scene respectively, and training the classifier based on the first training sample and the first label.
Task II: selecting at least one payment scene, and taking a training sample of the payment scene as a second training sample; inputting a second training sample into a classifier of the payment scene, and taking the obtained prediction result as a second label; and performing integrated training on other classifiers based on the second training samples and the second labels.
Task III: acquiring a third training sample under a target payment scene; selecting a payment scene closest to sample distribution of a target payment scene from the payment scenes; inputting a third training sample into a classifier of the payment scene, and taking the obtained prediction result as a third label; and based on the third training sample and the third label, carrying out integrated training on the classifier of different payment scenes.
The task I is classified training of the classifier aiming at the payment scene corresponding to the classifier, and belongs to basic training tasks; task II is integrated training of the classifier aiming at payment scenes except the payment scene corresponding to the classifier; task III is migration training of all classifiers given the data distribution of the known target payment scenario.
In an application scenario, facing a payment scenario where data distribution and tag distribution are unknown, corresponding to the domain generalization problem, training of task i and task ii is required to be performed on a classifier before a payment risk recognition model is generated, and the specific steps are as follows:
S200: acquiring a first training sample and setting a first label, wherein the first training sample is a preset payment event under different payment scenes; and setting a classifier for each payment scene respectively, and training the classifier based on the first training sample and the first label.
S202: selecting at least one payment scene, and taking a training sample of the payment scene as a second training sample; inputting a second training sample into a classifier of the payment scene, and taking the obtained prediction result as a second label; and performing integrated training on other classifiers based on the second training samples and the second labels.
S202: and integrating the trained classifier into a payment risk identification model.
For payment scenes with unknown data distribution and label distribution, selecting the payment scenes by the method in S302 to construct samples, and providing corresponding pseudo labels, so that other classifiers are integrated to learn knowledge in the payment scenes, and the trained models have strong generalization capability and can embody higher risk identification accuracy in the face of the unknown payment scenes.
In another application scenario, in the face of a target payment scenario with known data distribution and unknown label distribution, corresponding to the above domain adaptation problem, training of task i and task iii is required to be performed on the classifier before generating the payment risk identification model, and the specific steps are as follows:
S300: acquiring a first training sample and setting a first label, wherein the first training sample is a preset payment event under different payment scenes; and setting a classifier for each payment scene respectively, and training the classifier based on the first training sample and the first label.
S302: acquiring a third training sample under a target payment scene; selecting a payment scene closest to sample distribution of a target payment scene from the payment scenes; inputting a third training sample into a classifier of the payment scene, and taking the obtained prediction result as a third label; and based on the third training sample and the third label, carrying out integrated training on the classifier of different payment scenes.
S304: and integrating the trained classifier into a payment risk identification model.
And selecting a payment scene closest to the target payment scene from payment scenes with known data distribution and label distribution by the task III, and taking a prediction result obtained by a classifier corresponding to the payment scene aiming at a third training sample as a pseudo label, namely the third label, so as to construct the sample. And then training all classifiers to perform migration learning on the payment scene, so that the difference between the data distribution of the target payment scene and the data distribution of the known payment scene can be overcome, and the domain self-adaption problem is solved.
In another preferred application scenario, as the transaction activity progresses, some unknown payment scenarios are newly added, and the payment scenarios may be known payment scenarios with known data distribution and tag distribution, or may be unknown payment scenarios with known data distribution and tag distribution, or may be target payment scenarios with unknown data distribution and tag distribution, so that the domain generalization and domain adaptation problems need to be uniformly solved, and training of task i, task ii and task iii is performed on the classifier before the generation of the payment risk identification model, which specifically includes the following steps:
s400: acquiring a first training sample and setting a first label, wherein the first training sample is a preset payment event under different payment scenes; and setting a classifier for each payment scene respectively, and training the classifier based on the first training sample and the first label.
S402: selecting at least one payment scene, and taking a training sample of the payment scene as a second training sample; inputting a second training sample into a classifier of the payment scene, and taking the obtained prediction result as a second label; and performing integrated training on other classifiers based on the second training samples and the second labels.
S404: acquiring a third training sample under a target payment scene; selecting a payment scene closest to sample distribution of a target payment scene from the payment scenes; inputting a third training sample into a classifier of the payment scene, and taking the obtained prediction result as a third label; and based on the third training sample and the third label, carrying out integrated training on the classifier of different payment scenes.
S406: and integrating the trained classifier into a payment risk identification model.
Specifically, the loss function utilized in performing the conventional classification training of task i may be a cross entropy loss function, and the loss corresponding to each classifier is calculated and then averaged, as shown in the following formula:
wherein K represents the number of payment scenes; i represents an index of a current payment scene; d (D) i A data distribution representing an ith payment scenario; h represents a cross entropy loss function; e (E) i Classifier output results representing the ith payment scenario; x is x i Features representing an ith payment scenario; y (x) i ) Represents x i Is a label of (2); a represents a data enhancement operation (e.g., in-domain Mixup, etc.), removable.
The loss function utilized in the integrated training of task ii may be a mean square error loss function, and in each payment scenario, the mean square error between the prediction result obtained by the training sample input corresponding classifier and the prediction result obtained by the other classifier is calculated, and then the average value of all payment scenarios is calculated, as shown in the following formula:
Wherein K represents the number of payment scenes, and K-1 represents a payment scene domain except the current payment scene; j represents an index of a payment scene other than the current payment scene; a represents a data enhancement operation (e.g., intra-domain Mixup, etc.), removable.
The loss function used in training task III may be a cross entropy loss function, and the classifier corresponding to the payment scene closest to the target payment scene is selected first, and then the loss is determined according to the prediction result of the classifier on the training sample and the prediction results of other classifiers, as shown in the following formula:
wherein t represents a target payment scenario; d (D) T Representing a data distribution of a T-th payment scenario, i.e., a target payment scenario; p is p i* Representing a similarity between the target payment scenario and the known payment scenario; max represents the maximum function; the E represents a super-parameter;represents x t Is a pseudo tag of (2); />Representing an average value of the classifier output; h represents the cross entropy loss function.
In summary, in the classifier training process in the payment risk recognition model, the overall loss function is as follows:
wherein alpha, beta and gamma respectively represent super parameters, and technicians manually debug according to specific scenes or experiences; by adjusting α, β, γ, the obtained payment risk recognition model may be also more suitable for domain generalization or domain adaptation problems, for example, task iii is not involved in the training process when dealing with domain generalization problems, so γ value may be set to 0.
It should be noted that, the training samples may be extracted from K payment scenarios with known data distribution and label distribution in the data set, and classification training and integrated training of the classifier itself are performed inside the K known payment scenarios, so as to fully simulate payment risk recognition tasks in different scenarios, thereby facilitating generalization to a real unknown payment scenario.
In some specific scenarios, each payment event to be identified may be set in a data format as shown in fig. 3, i.e., [ event_id, label, feature, domain ], during the training phase, please refer to fig. 3.
Wherein event_id represents an identity credential (e.g., id) of the current payment event; label represents a label of the current payment event, 0 represents no risk, 1 represents risk, or may represent whether a specific risk type exists; feature represents the characteristics of the current payment event; domain represents the payment scenario to which the current payment event belongs.
In some embodiments, there is also provided a payment risk identification method, as shown in fig. 4, including:
s500: and acquiring a payment event to be identified.
S502: inputting a payment event into a payment risk identification model; the payment risk identification model is generated by adopting any one of the generation methods of the payment risk identification model.
S504: and determining a risk result of the payment event based on the prediction result of each classifier in the payment model.
The payment event may include a payment scenario corresponding to the payment event, or information such as an identity credential of the payment event.
Specifically, corresponding to the existing payment scenario in the model training stage, the method for risk prediction by the payment risk identification model is as follows:
a. if the payment event belongs to a known payment scene with known data distribution and label distribution, determining a risk result of the payment event directly according to a prediction result of a classifier corresponding to the payment scene;
b. if the payment event belongs to an unknown payment scene with unknown data distribution and label distribution, and corresponds to a domain generalization problem, a prediction result output after the integrated learning of all the classifiers can be taken as a risk result of the payment event, for example, an average value of output results of all the classifiers can be taken;
c. if the payment event belongs to a target payment scene with known data distribution and unknown label distribution, a prediction result of a classifier corresponding to the known payment scene closest to the target payment scene is taken, and a risk result of the payment event is determined.
And corresponding to a newly added payment scene after the training stage is finished, for example, a payment scene which is newly added along with the expansion of transaction activities or the change of risk situation, firstly, classifying risk identification tasks according to the definition of domain generalization and domain self-adaption, and then outputting a risk result according to specific task types.
Corresponding to the above method, an embodiment of the present disclosure further provides a device for generating a payment risk identification model, referring to fig. 5, where the device includes:
the first data obtaining module 60 is configured to obtain a first training sample and a first tag, where the first training sample is a preset payment event under different payment scenarios;
a first processing module 62 configured to set a classifier for each payment scenario, respectively, the classifier being trained based on the first training sample and the first tag;
a second processing module 64 configured to select at least one payment scenario, and take a training sample of the payment scenario as a second training sample; inputting a second training sample into a classifier of the payment scene, and taking the obtained prediction result as a second label; performing integrated training on other classifiers based on the second training sample and the second label;
The generation module 66 is configured to integrate the trained classifier into a payment risk identification model.
In some embodiments, the apparatus further comprises a feature extraction module configured to input training samples into the feature extraction network to obtain sample features.
Specifically, the feature extraction network includes:
the characterization layer is used for projecting the input payment event into the feature space and carrying out semantic alignment to obtain a first feature vector;
the processing layer is used for carrying out feature extraction and feature interaction of the first feature vector at different depths to obtain a second feature vector;
and the combination layer is used for splicing the second feature vectors to obtain third feature vectors.
In some embodiments, the first processing module further comprises: inputting the first training sample into a feature extraction module to obtain first sample features; inputting the first sample characteristics into a classifier to obtain a first prediction result; determining a first loss function based on the first prediction result and the first label; the classifier is updated based on the first loss function.
In some embodiments, the second processing module further comprises: inputting the second training sample into a feature extraction module to obtain second sample features; respectively inputting the second sample characteristics into other classifiers to obtain a second prediction result; determining an integrated prediction result of the other classifier based on the second prediction result of the other classifier; determining a second loss function based on the integrated prediction results of the other classifiers and the second label; based on the second loss function, the other classifiers are updated.
In some embodiments, the first data acquisition module is further configured to acquire a third training sample in the target payment scenario; the apparatus further comprises a third processing module;
the third processing module is configured to select a payment scene closest to sample distribution of the target payment scene from the payment scenes; inputting a third training sample into a classifier of the payment scene, and taking the obtained prediction result as a third label; and based on the third training sample and the third label, carrying out integrated training on the classifier of different payment scenes.
Specifically, the third processing module further includes: inputting the third training sample into a feature extraction module to obtain a third sample feature; respectively inputting the third sample characteristics into classifiers of different payment scenes to obtain a third prediction result; determining an integrated prediction result based on third prediction results of classifiers of different payment scenes; determining a third loss function based on the integrated prediction result and the third tag; based on the third loss function, the classifier for the different payment scenario is updated.
In some embodiments, there is also provided a payment risk identification device, as shown in fig. 6, including:
a second data acquisition module 70 configured to acquire payment events to be identified;
A risk identification module 72 configured to input a payment event into the payment risk identification model, determine a risk result of the payment event based on the predicted results of the classifiers in the payment model; the payment risk identification model is generated by adopting any one of the generation methods of the payment risk identification model.
Fig. 7 exemplarily shows a payment risk identification system, which may be used to implement the generation method of the payment risk identification model and the payment risk identification method in the above embodiments. It should be noted that, the method for generating the payment risk identification model and the method for identifying the payment risk according to one or more embodiments of the present application may be implemented by a payment risk identification system shown in fig. 7, but is not limited to the payment risk identification system.
As shown in fig. 7, the payment risk identification system includes a payment terminal and an identification terminal, and in this embodiment, the payment terminal and the identification terminal may be disposed in two terminal devices respectively. The payment terminal is connected with the identification terminal through a communication link, and the communication link can be a wired network or a wireless network. For example, the payment terminal may establish communication connection with the identification terminal by using WIFI, bluetooth, infrared, and other communication methods. Or, the payment terminal may also establish communication connection with the identification terminal through a mobile network, where the network system of the mobile network may be any one of 2G (GSM), 2.5G (GPRS), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4g+ (lte+), wiMax, and the like.
The payment terminal may be a terminal device capable of conducting an online transaction, such as a cell phone, tablet, notebook, personal computer, etc., configured to be used to perform the transaction by a user. The trained payment risk recognition model is deployed in the recognition end, transaction data of a user when the user conducts a transaction at the payment terminal can be obtained through a communication link, the transaction data is input into the payment risk recognition model to recognize risk, a recognition result is output, and the recognition result is returned to the payment terminal to inform the user. The identification end may be any apparatus, device, platform, cluster of devices with computing, processing capabilities. In this embodiment, the implementation form of the identification end is not limited, for example, the identification end may be a single server or may be a server cluster formed by a plurality of servers, and the identification end may also be a cloud server, also referred to as a cloud computing server or a cloud host, which is a host product in a cloud computing service system. The payment risk recognition model can be trained in a recognition terminal or a payment terminal, and can also be trained in one or more other servers.
Fig. 8 illustrates another payment risk identification system, in which the payment terminal and the identification terminal may be deployed in the same terminal device in the form of a payment module and an identification module, and as shown in fig. 8, the terminal device may include a user device 82, a user device 84, and a user device 86, each of which may individually complete a transaction and perform risk identification under the operation of the user. Specifically, each user device may use the data in the data storage system 80 to train the payment risk identification model, or train the payment risk identification model by using other servers or devices, store the trained model in the form of program codes in the data storage system 80, and invoke the program codes in the data storage system 80 by the user device to implement the payment risk identification method provided in the embodiments of the present specification.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or a plurality of modules or steps in them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
In correspondence to the above-described generation method of the payment risk identification model, the present embodiment further provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described generation method of the payment risk identification model.
In correspondence with the above-described payment risk identification method, the present embodiment also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described payment risk identification method.
In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer-readable media include both permanent and non-permanent, removable and non-removable media, and information storage may be implemented by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, read only compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by the computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
Corresponding to the generation method of the payment risk identification model, the embodiment further provides an electronic device, which includes:
one or more processors; and
a memory associated with the one or more processors, the memory for storing program instructions that, when read for execution by the one or more processors, perform the steps of the method of generating a payment risk identification model described above.
Corresponding to the payment risk identification method, the embodiment further provides an electronic device, including:
one or more processors; and
a memory associated with the one or more processors, the memory for storing program instructions that, when read for execution by the one or more processors, perform the steps of the payment risk identification method described above.
Referring to fig. 9, fig. 9 is a hardware configuration diagram of an electronic device 900 in which a distributed transaction apparatus is located in an exemplary embodiment.
At the hardware level, the apparatus includes a processor 902, a computer-readable storage medium 904, a memory 906, a data interface 908, a network interface 910, and possibly other hardware required for the service. One or more embodiments of the present description may be implemented in a software-based manner, such as by the processor 902 reading a corresponding computer program from the computer-readable storage medium 904 into the memory 906 and then running. Of course, in addition to software implementation, one or more embodiments of the present disclosure do not exclude other implementation manners, such as a logic device or a combination of software and hardware, etc., that is, the execution subject of the above processing procedure is not limited to each logic unit, but may also be hardware or a logic device.
It should be understood that the structures illustrated in the embodiments of the present specification do not constitute a particular limitation on the systems of the embodiments of the present specification. In other embodiments of the specification, the system may include more or fewer components than shown, or certain components may be combined, or certain components may be separated, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments in part.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
It should be noted that the above-mentioned embodiments are merely examples of the present invention, and it is obvious that the present invention is not limited to the above-mentioned embodiments, and many similar variations are possible. All modifications attainable or obvious from the present disclosure set forth herein should be deemed to be within the scope of the present disclosure.

Claims (16)

1. A method of generating a payment risk identification model, comprising:
acquiring a first training sample and setting a first label, wherein the first training sample is a preset payment event under different payment scenes;
setting a classifier for each payment scene respectively, and training the classifier based on the first training sample and the first label;
selecting at least one payment scene, and taking a training sample of the payment scene as a second training sample; inputting the second training sample into a classifier of the payment scene, and taking the obtained prediction result as a second label; performing integrated training on other classifiers based on the second training sample and a second label;
and integrating the trained classifier into the payment risk identification model.
2. The method of claim 1, training the classifier based on the first training samples and the first labels, comprising:
Inputting the first training sample into a feature extraction network to obtain first sample features;
inputting the first sample characteristics into the classifier to obtain a first prediction result;
determining a first loss function based on the first prediction result and the first tag;
updating the classifier based on the first loss function.
3. The method of claim 1, based on the second training samples and second labels, performing integrated training on other classifiers, specifically comprising:
inputting the second training sample into a feature extraction network to obtain a second sample feature;
respectively inputting the second sample characteristics into the other classifiers to obtain a second prediction result;
determining an integrated prediction result of the other classifier based on the second prediction result of the other classifier;
determining a second loss function based on the integrated prediction results of the other classifiers and the second label;
updating the other classifiers based on the second loss function.
4. The method of claim 1, further comprising, prior to integrating the classifier into the payment risk identification model:
acquiring a third training sample under a target payment scene;
Selecting a payment scene closest to sample distribution of the target payment scene from the payment scenes;
inputting the third training sample into a classifier of the payment scene, and taking the obtained prediction result as a third label;
and based on the third training sample and the third label, performing integrated training on the classifier of the different payment scenes.
5. The method of claim 4, based on the third training sample and the third tag, performing integrated training on the classifier of the different payment scenario, specifically comprising:
inputting the third training sample into a feature extraction network to obtain a third sample feature;
respectively inputting the third sample characteristics into classifiers of different payment scenes to obtain a third prediction result;
determining an integrated prediction result based on a third prediction result of the classifier of the different payment scenario;
determining a third loss function based on the integrated prediction result and the third tag;
updating the classifier of the different payment scenario based on the third loss function.
6. The method of any of claims 2 to 5, the feature extraction network comprising:
the characterization layer is used for projecting the input payment event to a feature space and carrying out semantic alignment to obtain a first feature vector;
The processing layer is used for carrying out feature extraction and feature interaction of the first feature vector at different depths to obtain a second feature vector;
and the combination layer is used for splicing the second feature vectors to obtain third feature vectors.
7. A payment risk identification method, comprising:
acquiring a payment event to be identified;
inputting the payment event into a payment risk identification model; the payment risk identification model is generated using the method of any one of claims 1 to 6;
and determining a risk result of the payment event based on the prediction result of each classifier in the payment model.
8. A generation device of a payment risk identification model, comprising:
the first data acquisition module is configured to acquire a first training sample and a first label, wherein the first training sample is a preset payment event under different payment scenes;
the first processing module is configured to set a classifier for each payment scene respectively, and train the classifier based on the first training sample and the first label;
the second processing module is configured to select at least one payment scene, and takes a training sample of the payment scene as a second training sample; inputting the second training sample into a classifier of the payment scene, and taking the obtained prediction result as a second label; performing integrated training on other classifiers based on the second training sample and a second label;
And the generation module is configured to integrate the trained classifier into the payment risk identification model.
9. The apparatus of claim 8, further comprising a feature extraction module configured to input training samples into a feature extraction network to obtain sample features.
10. The apparatus of claim 9, the feature extraction network comprising:
the characterization layer is used for projecting the input payment event to a feature space and carrying out semantic alignment to obtain a first feature vector;
the processing layer is used for carrying out feature extraction and feature interaction of the first feature vector at different depths to obtain a second feature vector;
and the combination layer is used for splicing the second feature vectors to obtain third feature vectors.
11. The apparatus of claim 8, the first data acquisition module further to acquire a third training sample in a target payment scenario; the apparatus further comprises a third processing module;
the third processing module is configured to select a payment scene closest to sample distribution of the target payment scene from the payment scenes; inputting the third training sample into a classifier of the payment scene, and taking the obtained prediction result as a third label; and based on the third training sample and the third label, performing integrated training on the classifier of the different payment scenes.
12. A payment risk identification device, comprising:
a second data acquisition module configured to acquire a payment event to be identified;
the risk identification module is configured to input the payment event into a payment risk identification model, and determine a risk result of the payment event based on a prediction result of each classifier in the payment model; the payment risk identification model is generated using the method of any one of claims 1 to 6.
13. A computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any of claims 1 to 6.
14. An electronic device, comprising:
one or more processors; and
a memory associated with the one or more processors for storing program instructions that, when read for execution by the one or more processors, perform the steps of the method of any of claims 1 to 6.
15. A computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of claim 7.
16. An electronic device, comprising:
One or more processors; and
a memory associated with the one or more processors for storing program instructions that, when read for execution by the one or more processors, perform the steps of the method of claim 7.
CN202311079876.5A 2023-08-24 2023-08-24 Method for generating payment risk identification model, and method and device for payment risk identification Pending CN117009873A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311079876.5A CN117009873A (en) 2023-08-24 2023-08-24 Method for generating payment risk identification model, and method and device for payment risk identification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311079876.5A CN117009873A (en) 2023-08-24 2023-08-24 Method for generating payment risk identification model, and method and device for payment risk identification

Publications (1)

Publication Number Publication Date
CN117009873A true CN117009873A (en) 2023-11-07

Family

ID=88561826

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311079876.5A Pending CN117009873A (en) 2023-08-24 2023-08-24 Method for generating payment risk identification model, and method and device for payment risk identification

Country Status (1)

Country Link
CN (1) CN117009873A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117557272A (en) * 2023-11-22 2024-02-13 深圳市中磁计算机技术有限公司 Payment environment safety detection method, system and medium for pos machine

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117557272A (en) * 2023-11-22 2024-02-13 深圳市中磁计算机技术有限公司 Payment environment safety detection method, system and medium for pos machine

Similar Documents

Publication Publication Date Title
Zhuang et al. UIA-ViT: Unsupervised inconsistency-aware method based on vision transformer for face forgery detection
CN111784502A (en) Abnormal transaction account group identification method and device
EP4085369A1 (en) Forgery detection of face image
CN112598045A (en) Method for training neural network, image recognition method and image recognition device
WO2022051856A9 (en) Method and system for training a neural network model using adversarial learning and knowledge distillation
CN110032551B (en) Model generation system, method and prediction system
CN117009873A (en) Method for generating payment risk identification model, and method and device for payment risk identification
CN111507262A (en) Method and apparatus for detecting living body
Vašata et al. Image inpainting using Wasserstein generative adversarial imputation network
CN112418345B (en) Method and device for quickly identifying small targets with fine granularity
CN112329735A (en) Training method of face recognition model and online education system
CN116823428A (en) Anti-fraud detection method, device, equipment and storage medium
EP3588441B1 (en) Imagification of multivariate data sequences
US11989733B2 (en) Multi-model system for electronic transaction authorization and fraud detection
CN115457365A (en) Model interpretation method and device, electronic equipment and storage medium
CN116152542A (en) Training method, device, equipment and storage medium for image classification model
CN112801960B (en) Image processing method and device, storage medium and electronic equipment
CN109740646B (en) Image difference comparison method and system and electronic device
CN116205726B (en) Loan risk prediction method and device, electronic equipment and storage medium
CN112766156B (en) Riding attribute identification method and device and storage medium
Haas et al. Neural network compression through shunt connections and knowledge distillation for semantic segmentation problems
US10824917B2 (en) Transformation of electronic documents by low-resolution intelligent up-sampling
CN113688944B (en) Image identification method based on meta-learning
US20230222676A1 (en) Image registration performance assurance
CN116310419A (en) Image recognition method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination