CN116228421A - Training method, device, equipment and medium of transaction risk prediction model - Google Patents

Training method, device, equipment and medium of transaction risk prediction model Download PDF

Info

Publication number
CN116228421A
CN116228421A CN202310188570.7A CN202310188570A CN116228421A CN 116228421 A CN116228421 A CN 116228421A CN 202310188570 A CN202310188570 A CN 202310188570A CN 116228421 A CN116228421 A CN 116228421A
Authority
CN
China
Prior art keywords
data
sample
transaction
prediction model
risk prediction
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
CN202310188570.7A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310188570.7A priority Critical patent/CN116228421A/en
Publication of CN116228421A publication Critical patent/CN116228421A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The disclosure provides a training method, device, equipment and medium for a transaction risk prediction model, which can be applied to the technical field of computers and the technical field of artificial intelligence. The training method of the transaction risk prediction model comprises the following steps: responding to the acquired data use permission operation, and acquiring a transaction data sample set of a sample user; training an initial transaction risk prediction model by utilizing the ith sample data and the (i+1) th sample data in the transaction data sample set in sequence to obtain an ith loss function value corresponding to the ith sample data and an (i+1) th loss function value corresponding to the (i+1) th sample data; determining an i+1th learning rate according to the difference between the i-th loss function value and the i+1th loss function value; and updating model parameters of the initial transaction risk prediction model according to the i+1th learning rate to obtain a trained transaction risk prediction model.

Description

Training method, device, equipment and medium of transaction risk prediction model
Technical Field
The present disclosure relates to the field of computer technology and artificial intelligence technology, and more particularly, to a training method, apparatus, device, and medium for a transaction risk prediction model.
Background
With the development of internet financial technology and artificial intelligence technology, the method for auditing the artificial intelligence is assisted in addition to the artificial audit when the materials of the online borrowing and lending products are audited. In the related art, a method for predicting lending risk of a user is mainly based on a statistical method, a machine learning method, and a method of combining a plurality of statistical methods and artificial intelligence methods.
In the process of implementing the disclosed concept, the inventor finds that at least the following problems exist in the related art: the existing loan risk prediction method has lower precision in evaluating the loan overdue risk of the user, so that the evaluation safety is lower.
Disclosure of Invention
In view of this, the present disclosure provides a training method, device, equipment and medium for a transaction risk prediction model.
One aspect of the present disclosure provides a training method of a transaction risk prediction model, including:
responding to the acquired data use permission operation, acquiring a transaction data sample set of a sample user, wherein the transaction data sample in the transaction data sample set comprises attribute information and transaction characteristic information of the sample user;
Training an initial transaction risk prediction model by utilizing the ith sample data and the (i+1) th sample data in the transaction data sample set in sequence to obtain an ith loss function value corresponding to the ith sample data and an (i+1) th loss function value corresponding to the (i+1) th sample data, wherein i is greater than or equal to 1;
determining an i+1 learning rate according to a difference between the i-th loss function value and the i+1-th loss function value;
and updating model parameters of the initial transaction risk prediction model according to the i+1th learning rate to obtain the trained transaction risk prediction model, wherein the transaction risk prediction model is used for processing transaction data of the user to be identified and predicting transaction risk of the user to be identified.
According to an embodiment of the present disclosure, the acquiring the transaction data sample set of the sample user in response to the acquired data use permission operation includes:
acquiring original transaction data of each sample user in the transaction data sample set in response to the acquired data use permission operation, wherein the original transaction data comprises data values corresponding to a plurality of indexes;
Screening a plurality of indexes of the original transaction data to obtain a plurality of first indexes;
and determining data corresponding to the first indexes in the original transaction data as data in a transaction data sample.
According to an embodiment of the present disclosure, the filtering the multiple indexes of the original transaction data to obtain multiple first indexes includes:
screening a plurality of indexes of the original transaction data by utilizing a characteristic weight algorithm to obtain a plurality of second indexes;
calculating the credit values of the second indexes to obtain a plurality of credit values;
and screening the plurality of second indexes according to the plurality of credit values to obtain a plurality of first indexes.
According to an embodiment of the present disclosure, determining the i+1th learning rate according to the difference between the i+1th loss function value and the i+1th loss function value includes:
determining an index value of the index function according to the difference value;
dividing the first preset value by the sum of the index value and the first preset value after subtracting the first preset value from the index value to obtain a first value;
multiplying the first numerical value by the first preset value to obtain a first formula related to the i+1th learning rate parameter, wherein the i+1th learning rate parameter represents the i+1th learning rate to be solved;
Adding the first formula and a second preset value to obtain a second formula;
and (3) the i+1th learning rate parameter is equal to the second formula, so that the i+1th learning rate is obtained.
According to an embodiment of the present disclosure, training the initial transaction risk prediction model by using the ith sample data and the (i+1) th sample data in the transaction data sample set sequentially, respectively, to obtain an ith loss function value corresponding to the ith sample data and an (i+1) th loss function value corresponding to the (i+1) th sample data includes:
dividing the sample data in the sample set into risk category data and risk-free category data;
clustering the class data with the largest data amount in the risk class data and the risk-free class data by using a density-based spatial clustering algorithm to obtain K cluster class data, wherein K is a positive integer;
generating a balance data set according to K cluster type data and type data with minimum data quantity in the risk type data and the risk-free type data;
and training the initial transaction risk prediction model by utilizing the ith sample data and the (i+1) th sample data in the balance data set in sequence to obtain an ith loss function value corresponding to the ith sample data and an (i+1) th loss function value corresponding to the (i+1) th sample data.
According to an embodiment of the present disclosure, generating the balance data set according to the K cluster class data and the class data with the smallest data amount of the risky class data and the risky class data includes:
extracting data of a third preset value from each category data in the K cluster category data to obtain downsampled category data corresponding to the K cluster category data respectively, and obtaining a plurality of downsampled category data;
and generating a balance data set according to the plurality of downsampled category data and category data with the smallest data amount in the risky category data and the risky category data.
According to an embodiment of the disclosure, the initial parameters of the initial transaction risk prediction model are calculated according to a first preset learning rate.
Another aspect of the present disclosure provides a training apparatus of a transaction risk prediction model, including:
the sample set acquisition module is used for responding to the acquired data use permission operation to acquire a transaction data sample set of a sample user, wherein the transaction data sample in the transaction data sample set comprises attribute information and transaction characteristic information of the sample user;
The loss function value obtaining module is used for respectively training an initial transaction risk prediction model by utilizing the ith sample data and the (i+1) th sample data in the transaction data sample set in sequence to obtain an ith loss function value corresponding to the ith sample data and an (i+1) th loss function value corresponding to the (i+1) th sample data, wherein i is greater than or equal to 1;
a learning rate determining module, configured to determine an i+1 th learning rate according to a difference between the i-th loss function value and the i+1-th loss function value;
and the prediction model obtaining module is used for updating the model parameters of the initial transaction risk prediction model according to the i+1th learning rate to obtain the trained transaction risk prediction model, wherein the transaction risk prediction model is used for processing transaction data of the user to be identified and predicting the transaction risk of the user to be identified.
Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more instructions, wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement the method as described above.
Another aspect of the disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, cause the processor to implement a method as described above.
Another aspect of the present disclosure provides a computer program product comprising computer executable instructions which, when executed, are adapted to carry out the method as described above.
According to the embodiment of the disclosure, a transaction data sample set of a sample user is obtained by responding to obtained data use permission operation, an ith sample data and an ith+1 sample data in the transaction data sample set are utilized to train an initial transaction risk prediction model respectively in sequence, an ith loss function value corresponding to the ith sample data and an ith+1 loss function value corresponding to the ith+1 sample data are obtained, an ith+1 learning rate is determined according to a difference value between the ith loss function value and the ith+1 loss function value, model parameters of the initial transaction risk prediction model are updated according to the ith+1 learning rate, a technical means of the trained transaction risk prediction model is obtained, the learning rate is dynamically adjusted according to a difference value between loss functions obtained by training the initial transaction risk prediction model twice, the absolute value of the learning rate can be increased along with the decrease of the absolute value of the difference value, the parameter of the initial transaction risk prediction model is rapidly adjusted to a position close to an optimal parameter, the speed of the initial transaction risk prediction model is accelerated, the absolute value of the learning rate can be reduced along with the increase of the absolute value of the difference value, the model is better transaction risk prediction model is predicted by the aid of the local transaction risk prediction model of the sample user, and the accuracy of the sample risk prediction model is improved, and the accuracy of the transaction risk prediction model is better is predicted by the data of the sample user.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments thereof with reference to the accompanying drawings in which:
FIG. 1 schematically illustrates an exemplary system architecture to which a training method of a transaction risk prediction model may be applied, according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a training method of a transaction risk prediction model, according to an embodiment of the disclosure;
FIG. 3 schematically illustrates a flow chart of a method of training a transaction risk prediction model, according to another embodiment of the present disclosure;
FIG. 4 schematically illustrates a block diagram of a training apparatus of a transaction risk prediction model, according to an embodiment of the present disclosure; and
fig. 5 schematically illustrates a block diagram of a computer system suitable for implementing the above-described method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a formulation similar to at least one of "A, B or C, etc." is used, in general such a formulation should be interpreted in accordance with the ordinary understanding of one skilled in the art (e.g. "a system with at least one of A, B or C" would include but not be limited to systems with a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the related personal information of the user all conform to the regulations of related laws and regulations, necessary security measures are adopted, and the public order harmony is not violated.
In the related art, a method for predicting lending risk of a user is mainly based on a statistical method, a machine learning method, and a method of combining a plurality of statistical methods and artificial intelligence methods. The existing loan risk prediction method has low accuracy in evaluating the loan overdue risk of the user.
In order to at least partially solve the technical problems in the related art, embodiments of the present disclosure provide a training method, apparatus, device, and medium for a transaction risk prediction model, which may be applied to the field of computer technology and the field of artificial intelligence technology. The method comprises the steps of responding to the acquired data use permission operation, acquiring a transaction data sample set of a sample user, wherein a transaction data sample in the transaction data sample set comprises attribute information and transaction characteristic information of the sample user; training an initial transaction risk prediction model by utilizing the ith sample data and the (i+1) th sample data in the transaction data sample set in sequence to obtain an ith loss function value corresponding to the ith sample data and an (i+1) th loss function value corresponding to the (i+1) th sample data, wherein i is greater than or equal to 1; determining an i+1th learning rate according to the difference between the i-th loss function value and the i+1th loss function value; and updating model parameters of the initial transaction risk prediction model according to the i+1th learning rate to obtain a trained transaction risk prediction model, wherein the transaction risk prediction model is used for processing transaction data of the user to be identified and predicting transaction risk for the user to be identified.
Fig. 1 schematically illustrates an exemplary system architecture to which a training method of a transaction risk prediction model may be applied, according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios.
As shown in fig. 1, a system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is a medium used to provide a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired and/or wireless communication links, and the like.
The user may interact with the server 105 through the network 104 using at least one of the first terminal device 101, the second terminal device 102, the third terminal device 103, to receive or send messages, etc. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, and/or social platform software, etc. (by way of example only) may be installed on the first terminal device 101, the second terminal device 102, the third terminal device 103.
The first terminal device 101, the second terminal device 102, the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by the user using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that, the training method of the transaction risk prediction model provided by the embodiments of the present disclosure may be generally performed by the server 105. Accordingly, the training apparatus of the transaction risk prediction model provided by the embodiments of the present disclosure may be generally disposed in the server 105. The training method of the transaction risk prediction model provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105. Accordingly, the training apparatus of the transaction risk prediction model provided by the embodiments of the present disclosure may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105.
Alternatively, the training method of the transaction risk prediction model provided by the embodiment of the present disclosure may also be performed by the first terminal device 101, the second terminal device 102, or the third terminal device 103, or may also be performed by other terminal devices different from the first terminal device 101, the second terminal device 102, or the third terminal device 103. Accordingly, the training apparatus of the transaction risk prediction model provided in the embodiments of the present disclosure may also be provided in the first terminal device 101, the second terminal device 102, or the third terminal device 103, or in other terminal devices different from the first terminal device 101, the second terminal device 102, or the third terminal device 103.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 schematically illustrates a flowchart of a method of training a transaction risk prediction model, according to an embodiment of the disclosure.
As shown in fig. 2, the method includes operations S201 to S204.
In operation S201, a transaction data sample set of a sample user is acquired in response to the acquired data usage permission operation, wherein a transaction data sample in the transaction data sample set includes attribute information and transaction characteristic information of the sample user.
According to the embodiment of the disclosure, the attribute information and the transaction characteristic information of the sample user are acquired under the condition that the sample user permission is obtained.
According to embodiments of the present disclosure, a collection of transaction data samples may be stored in a server that takes security measures. Before acquiring the transaction data sample set of the sample user, the data requester can acquire the data use license, then the data requester sends a data acquisition request to the server taking the security measures, and then the server taking the security measures responds to the data acquisition request to send the transaction data sample set of the sample user to the data requester through an encrypted transmission link under the condition of verifying that the data requester is legal. The server on which the security measures are taken may be a server internal to the financial system.
According to embodiments of the present disclosure, the data in the sample set of transaction data may be data used to evaluate a sample user's loan risk during a loan transaction.
According to embodiments of the present disclosure, the attribute information of the sample user may include, for example, identity information and property information of the sample user. The metrics corresponding to the identity information of the sample user may include whether the sample user has a room, a car, a wedding, an academic, and an insurance flag. The index corresponding to the property information of the sample user may include investment financing information, deposit information, loan amount information, and income information of the sample user. It should be noted that these data are subject to the necessary security measures during use.
According to embodiments of the present disclosure, the sample user's transaction characteristic information may include, for example, sample user's transaction flowing information, payment information, and repayment information. The index corresponding to the loan transaction aggregate information for the sample user may include a sample user daily transaction aggregate amount. The index corresponding to the sample user's payoff information may include sample user account payoff amount, historical credit adjustment information. The index corresponding to the sample user payment information may include a sample user payment amount, a number of payment overdue times, and a number of payment overdue days. It should be noted that these data are subject to the necessary security measures during use.
According to the embodiment of the present disclosure, the attribute information of the sample user and the information specifically included in the transaction characteristic information may be selected according to actual situations, and the embodiment of the present disclosure does not limit the attribute information of the sample user and the information specifically included in the transaction characteristic information.
According to the embodiment of the disclosure, the index combination corresponding to the identity information, property information, loan transaction flow information, payment information and repayment information of the sample user can be selected according to actual situations.
According to embodiments of the present disclosure, after the original transaction sample data of a plurality of sample users is obtained, the original transaction sample data may be preprocessed.
According to an embodiment of the present disclosure, preprocessing the original transaction sample data may include: for a plurality of data under a specified index of a sample user, if the data is discontinuously missing, filling by using the average value of the front data and the rear data, and if the data is continuously missing, removing the sample user data. And aiming at the original transaction sample data of the same sample user, if the data corresponding to a plurality of indexes of the sample user are all lack of more data, rejecting the sample user data.
According to an embodiment of the present disclosure, preprocessing the original transaction sample data may further include: and carrying out numerical processing on non-numerical data in the original transaction sample data. The specific operation of the numerical processing is as follows: and carrying out 0-1 coding on the non-numerical data under the specified indexes, and then carrying out normalization processing on the numerical data under a plurality of indexes of the same user, so as to reduce the influence of the difference between the data characteristics consisting of the data corresponding to different indexes on the initial transaction risk prediction model.
According to an embodiment of the present disclosure, numerical data under a plurality of indexes may be normalized using the following formula (1).
Figure BDA0004104682140000101
Wherein x in the formula (1) represents data to be normalized in original transaction sample data corresponding to a sample user, y represents normalized data corresponding to x, min represents a minimum value in values of data under a plurality of indexes corresponding to the sample user, and max represents a maximum value in values of data under a plurality of indexes corresponding to the sample user.
According to an embodiment of the present disclosure, the transaction sample data of each sample user in the transaction data sample set is numerical data corresponding to a plurality of metrics.
According to an embodiment of the present disclosure, the plurality of metrics used to assess transaction risk for each sample user in the set of transaction data samples are the same.
According to the embodiment of the disclosure, for a plurality of same indexes for evaluating the transaction risk of each sample user in the transaction data sample set, indexes which can better reflect the association relation between sample data of each sample user in the transaction data sample set and indexes with higher credit value, namely, indexes with higher information quantity about risk categories, can be selected, so that the risk categories of the sample users can be distinguished according to the sample data formed by data corresponding to the indexes, and the accuracy of predicting the risk categories of the sample users by the initial transaction risk prediction model can be improved under the condition of training the initial transaction risk prediction model by the data corresponding to the indexes.
According to the embodiment of the disclosure, the initial transaction risk prediction model may be, for example, a CUSBoost model (cluster-based under-sampling with boosting, unbalanced data classification model based on clustering lifting downsampling), a CATBoost model (categorical boosting, gradient lifting algorithm model of class type features), and the embodiment of the disclosure does not limit a specific initial transaction risk prediction model and may be selected according to practical situations.
In operation S202, training the initial transaction risk prediction model by using the ith sample data and the (i+1) th sample data in the transaction data sample set, respectively, to obtain an ith loss function value corresponding to the ith sample data and an (i+1) th loss function value corresponding to the (i+1) th sample data, where i is greater than or equal to 1.
According to an embodiment of the present disclosure, the i-th sample data and the i+1-th sample data are sample data for training the transaction risk prediction model in two adjacent times.
According to the embodiment of the disclosure, under the condition that the initial transaction risk prediction model is trained for the ith time, randomly and unreleased extraction sample data from a transaction data sample set can be used for obtaining the ith sample data, then the ith sample data is input into the initial transaction risk prediction model, the initial transaction risk prediction model is trained by using the ith sample data, the ith prediction result of the initial transaction risk prediction model is obtained, and then the ith loss function value corresponding to the ith sample data is obtained according to the ith prediction result.
According to the embodiment of the disclosure, under the condition that the initial transaction risk prediction model is trained for the ith+1 time, randomly and unreleased extraction sample data from a transaction data sample set can be used for obtaining the ith+1 sample data, then the ith+1 sample data is input into the initial transaction risk prediction model, the initial transaction risk prediction model is trained by using the ith+1 sample data, the ith+1 prediction result of the initial transaction risk prediction model is obtained, and then the ith+1 loss function value corresponding to the ith+1 sample data is obtained according to the ith+1 prediction result.
According to the embodiment of the disclosure, sample data in a transaction data sample set is processed into balance data to obtain a balance data set, then ith sample data and (i+1) th sample data are extracted from the balance data set, and then an initial transaction risk prediction model is trained by using the ith sample data and the (i+1) th sample data extracted from the balance data in sequence to obtain an ith loss function value corresponding to the ith sample data and an (i+1) th loss function value corresponding to the (i+1) th sample data.
According to the embodiment of the disclosure, sample data in a transaction data sample set is processed into balance data to obtain a balance data set, and then an initial transaction risk prediction model is trained by using data in the balance data set, so that the prediction precision of the initial transaction risk prediction model on each type of data in risk type data and risk-free type data can be improved, and particularly, the prediction precision of the initial transaction risk prediction model on a few types of data in risk type data and risk-free type data is improved.
In operation S203, an i+1 th learning rate is determined from the difference between the i-th loss function value and the i+1-th loss function value.
According to the embodiment of the disclosure, a related index formula may be established according to the i-th loss function value, the difference between the i+1-th loss function values, and the i+1-th learning rate parameter, and the i+1-th learning rate may be determined according to the index formula.
According to the embodiment of the disclosure, under the condition that the absolute value of the difference between the i-th loss function value and the i+1-th loss function value is reduced along with the increase of i, the prediction of the initial transaction risk prediction model is more accurate, at the moment, the absolute value of the learning rate can be increased along with the reduction of the absolute value of the difference, the speed of adjusting the parameters of the initial transaction risk prediction model towards the direction approaching to the locally optimal parameters is increased, the speed of quickly adjusting the parameters of the initial transaction risk prediction model to the position approaching to the optimal parameters is realized, and the speed of training the initial transaction risk prediction model is increased.
According to the embodiment of the disclosure, under the condition that the absolute value of the difference between the i-th loss function value and the i+1-th loss function value increases along with the increase of i, the accuracy of the prediction of the initial transaction risk prediction model is reduced, at the moment, the absolute value of the learning rate can be reduced along with the increase of the absolute value of the difference, the speed of adjusting the parameters of the initial transaction risk prediction model towards the direction close to the local optimal parameters is slowed down, so that the position of the local optimal parameters is not missed, the parameters of the initial transaction risk prediction model are slowly returned to the position of the local optimal parameters through the smaller learning rate, the local optimal parameters are more accurate, and the prediction accuracy of the trained transaction risk prediction model is improved. According to the training method provided by the embodiment of the disclosure, the parameters of the initial transaction risk prediction model are slowly recalled to the position of the local optimal parameters through a small learning rate, so that the local optimal parameters are more accurate, and the training accuracy of the model can be met under the condition of limited hardware resources when the transaction risk prediction model is trained by using the electronic equipment.
According to the embodiment of the disclosure, the i+1 learning rate is determined according to the difference between the i loss function value and the i+1 loss function value, so that the learning rate can be adjusted according to the difference between the loss functions obtained by training the initial transaction risk prediction model twice, the absolute value of the learning rate is increased along with the decrease of the absolute value of the difference, the parameter of the initial transaction risk prediction model is quickly adjusted to a position close to the optimal parameter, the speed of training the initial transaction risk prediction model is increased, the absolute value of the learning rate is reduced along with the increase of the absolute value of the difference, and the parameter of the initial transaction risk prediction model is slowly recalled to the position of the local optimal parameter through the smaller learning rate, so that the local optimal parameter is more accurate, and the prediction precision of the trained transaction risk prediction model is further improved.
According to the embodiment of the disclosure, the i+1 learning rate is determined according to the difference between the i loss function value and the i+1 loss function value, so that the learning rate is dynamically adjusted according to the difference in the process of training the initial transaction risk prediction model, and the prediction accuracy of the trained transaction risk prediction model is improved while the speed of training the initial transaction risk prediction model is increased.
In operation S204, according to the i+1th learning rate, model parameters of the initial transaction risk prediction model are updated to obtain a trained transaction risk prediction model, where the transaction risk prediction model is used for processing transaction data of the user to be identified and predicting transaction risk for the user to be identified.
According to the embodiment of the disclosure, after updating the model parameters of the initial transaction risk prediction model according to the i+1 learning rate, the initial transaction risk prediction model can be trained according to the i+2 sample data in the transaction data sample set after updating the parameters to obtain the i+2 loss function value corresponding to the i+2 sample data, then the i+2 learning rate is determined according to the difference between the i+2 loss function value and the i+1 loss function value, the model parameters of the initial transaction risk prediction model are updated according to the i+2 learning rate, the steps are repeated until the initial transaction risk prediction model reaches the preset precision or the maximum iteration number, training is stopped to obtain the optimal model parameters, and the trained transaction risk prediction model is obtained.
According to the embodiment of the disclosure, the training method of the transaction risk prediction model provided by the embodiment of the disclosure can dynamically adjust the learning rate according to the difference value between the loss functions obtained by training the initial transaction risk prediction model twice, so that the absolute value of the learning rate can be increased along with the decrease of the absolute value of the difference value, the parameter of the initial transaction risk prediction model can be quickly adjusted to a position close to the optimal parameter, the speed of training the initial transaction risk prediction model is increased, the absolute value of the learning rate can be reduced along with the increase of the absolute value of the difference value, and the parameter of the initial transaction risk prediction model can be slowly returned to the position of the local optimal parameter through the smaller learning rate, so that the local optimal parameter is more accurate, and the prediction precision of the trained transaction risk prediction model is improved.
According to the embodiment of the disclosure, in the case that the data in the transaction data sample set is the data for evaluating the loan risk of the sample user in the loan transaction process, according to the training method of the transaction risk prediction model provided by the embodiment of the disclosure, the accuracy of predicting the loan risk of the sample user of the trained transaction risk prediction model can be improved.
According to an embodiment of the present disclosure, for operation S201 as shown in fig. 2, acquiring a transaction data sample set of a sample user in response to the acquired data use permission operation may include the operations of:
acquiring original transaction data of each sample user in a transaction data sample set in response to the acquired data use permission operation, wherein the original transaction data comprises data values corresponding to a plurality of indexes;
screening a plurality of indexes of the original transaction data to obtain a plurality of first indexes;
and determining data corresponding to the first indexes in the original transaction data as data in a transaction data sample.
According to the embodiment of the disclosure, under the condition of obtaining the sample user permission, the original transaction data of each sample user in the transaction data sample set can be obtained, then the original transaction data of all sample users are preprocessed, the original transaction data of sample users with more data missing are removed, and non-numerical data in the original transaction data of the rest sample users are subjected to numerical processing.
According to the embodiment of the disclosure, the original transaction data of each sample user in the transaction data sample set is obtained by responding to the obtained data use permission operation, wherein the original transaction data can be data related to loan transactions of the sample users, and then a plurality of indexes of the original transaction data are screened to obtain a plurality of first indexes, so that the screened first indexes can reflect the association relation between the sample data of each sample user in the transaction data sample set and contain more information about risk categories, the sample data formed according to the data corresponding to the indexes can distinguish the risk categories of the sample users, and under the condition that the initial transaction risk prediction model is trained by the data corresponding to the indexes, the accuracy of predicting the loan risk of the sample users by the initial transaction risk prediction model can be improved.
According to an embodiment of the present disclosure, screening a plurality of indicators of original transaction data to obtain a plurality of first indicators includes:
screening a plurality of indexes of the original transaction data by utilizing a characteristic weight algorithm to obtain a plurality of second indexes;
calculating the credit values of the second indexes to obtain a plurality of credit values;
And screening the second indexes according to the credit values to obtain first indexes.
According to the embodiment of the disclosure, the characteristic weight algorithm relief algorithm can be utilized to screen a plurality of indexes of original transaction data to obtain a plurality of second indexes, so that the plurality of second indexes can reflect the association relation between the original transaction data of a plurality of sample users, the association degree between the plurality of second indexes and predicted transaction risks is improved, the effectiveness of data features formed by data corresponding to the plurality of second indexes is improved, the precision of predicting the risk category of the sample users by the initial transaction risk prediction model can be improved under the condition that the initial transaction risk prediction model is trained by the data corresponding to the second indexes, and the precision of predicting the loan risk category of the sample users by the initial transaction risk prediction model can be improved under the condition that the original transaction data is the data related to loan transactions of the sample users.
According to an embodiment of the disclosure, the calculating step of screening the plurality of indexes of the original transaction data by utilizing the relief algorithm to obtain a plurality of second indexes includes: randomly selecting one sample data from the preprocessed original transaction data of a plurality of users, acquiring characteristic data corresponding to a specified index in the sample data, marking the characteristic data as characteristic data 1, finding out similar sample data of the sample data, acquiring characteristic data corresponding to the specified index in the similar sample data of the sample data, marking the characteristic data as characteristic data 2, calculating a difference value between the characteristic data 1 and the characteristic data 2, marking the characteristic data as a first difference value, finding out characteristic data corresponding to the specified index in heterogeneous sample data of the sample data, marking the difference value between the characteristic data 1 and the characteristic data 3 as characteristic data 3, calculating a second difference value, taking the square sum of the first difference value and the second difference value, calculating the result of all the sample data by analogy, dividing the result sum by the total number of the sample data, obtaining a plurality of second indexes with larger weight values, reserving the specified index with larger weight value, and rejecting the specified index with smaller weight value.
According to the embodiment of the disclosure, the credit value (Infromation Value, IV) of each second index can be calculated according to sample data corresponding to a plurality of second indexes of a plurality of sample users by using a credit value formula, so as to obtain the credit values respectively corresponding to the plurality of second indexes, and then the second index which is greater than or equal to the credit value threshold in the credit values is determined as the first index.
According to the embodiment of the disclosure, the larger the credit value is, the larger the information value contained in the index corresponding to the credit value is, the more information quantity related to the risk category is contained, therefore, the original transaction data of the sample user corresponding to the first indexes contains more information value, the category of the sample user can be better distinguished, the accuracy of predicting the risk category of the sample user by the initial transaction risk prediction model can be improved under the condition that the initial transaction risk prediction model is trained by the data corresponding to the first indexes, and the accuracy of predicting the loan risk category of the sample user by the initial transaction risk prediction model can be improved under the condition that the original transaction data is the data related to the loan transaction of the sample user.
According to the embodiment of the disclosure, the credit value threshold may be, for example, 0.02, 0.1 or 0.2, and the embodiment of the disclosure does not limit the specific credit value threshold, and may be selected according to practical situations.
According to embodiments of the present disclosure, the plurality of metrics of the raw transaction data may be, for example: whether the sample user has a house, whether the sample user has a car, whether the sample user has a wedding, an academic history, an insurance mark, investment financial information, deposit information, loan amount information, income information, total daily running water amount, account payoff amount, history amount adjustment information, payoff amount, payoff overdue times and payoff overdue days.
According to an embodiment of the present disclosure, after screening the multiple indexes of the original transaction data by using the feature weight algorithm, the obtaining multiple second indexes may be, for example: sample users have houses, vehicles, weddings, academies, investment financial information, deposit information, loan amount information, income information, total daily running water amount, account payouts, repayment amounts, repayment overdue times and repayment overdue days.
According to an embodiment of the present disclosure, after screening the plurality of second indexes according to the plurality of credit values, the plurality of first indexes obtained may be, for example: sample users have houses, cars, academies, investment financial information, deposit information, income information, account payoff amount, payoff overdue times and payoff overdue days.
According to the embodiment of the disclosure, the multiple indexes of the original transaction data are screened by utilizing the characteristic weight algorithm to obtain multiple second indexes, the second indexes which can reflect the association relation among the original transaction data of multiple sample users are obtained, the respective credit values of the multiple second indexes are calculated to obtain the multiple credit values, the multiple second indexes are screened according to the multiple credit values to obtain multiple first indexes, the first indexes with larger credit values, namely, the first indexes with larger information content about risk categories are obtained, the risk categories of the sample users can be distinguished according to the sample data formed by the data corresponding to the first indexes, the accuracy of predicting the risk categories of the sample users by the initial transaction risk prediction model can be improved under the condition that the initial transaction risk prediction model is trained by the data corresponding to the first indexes, and the accuracy of predicting the loan categories of the sample users by the initial transaction risk prediction model can be improved under the condition that the original transaction data is the data related to the transaction of the sample users.
According to the embodiment of the disclosure, the multiple indexes of the original transaction data are screened by utilizing the characteristic weight algorithm to obtain multiple second indexes, then the respective credit values of the multiple second indexes are calculated to obtain multiple credit values, and the multiple second indexes are screened according to the multiple credit values to obtain multiple first indexes, so that the purposes that indexes which have low correlation with the model prediction risk category can be eliminated under the condition that the indexes are more, the data volume of sample data corresponding to each sample user can be reduced, and the problem of model overfitting caused by overlarge data volume of each sample data can be effectively prevented.
According to an embodiment of the present disclosure, for operation S203 shown in fig. 2, determining the i+1th learning rate according to the difference between the i-th loss function value and the i+1th loss function value may include the operations of:
determining an index value of the exponential function according to the difference value;
dividing the index value by the sum of the index value and the first preset value after subtracting the first preset value to obtain a first value;
multiplying the first numerical value by an i+1th learning rate parameter after adding a first preset value to obtain a first formula related to the i+1th learning rate parameter, wherein the i+1th learning rate parameter represents the i+1th learning rate to be solved;
adding the first formula and a second preset value to obtain a second formula;
and (3) the i+1th learning rate parameter is equal to the second formula, so that the i+1th learning rate is obtained.
According to the embodiment of the present disclosure, the first preset value may be, for example, 1, 1.01, 1.001, or the like, and the embodiment of the present disclosure does not limit a specific first preset value, and may be selected according to actual situations.
According to the embodiment of the present disclosure, the second preset value may be, for example, 0.01, 0.001, or 0.0001, etc., and the embodiment of the present disclosure does not limit the specific second preset value and may be selected according to practical situations.
According to the embodiment of the present disclosure, there is an association relationship as shown in formula (2) between the difference between the i-th loss function value and the i+1-th learning rate parameter.
Figure BDA0004104682140000181
Wherein a represents the i+1th learning rate parameter, x represents the difference between the i-th loss function value and the i+1th loss function value, x= (S) i -S i+1 ),S i Characterization of the i loss function value, S i+1 The i+1th loss function value is represented, and beta represents a second preset value.
According to an embodiment of the present disclosure, substituting a specific difference value into e in equation (2) x Part of the values of the index is obtained and then the values of the index are substituted into the formula (2)
Figure BDA0004104682140000182
Obtaining a first value, wherein the value 1 in the formula (2) is a first preset value, and +_in the formula (2)>
Figure BDA0004104682140000183
The part is the first formula part, +.>
Figure BDA0004104682140000184
The part is a second formula part.
According to the embodiment of the disclosure, a specific difference value is substituted into the formula (2), and the i+1th learning rate can be calculated according to the formula (2).
According to the embodiment of the disclosure, the index value of the index function is determined according to the difference between the i loss function value and the i+1 loss function value, then the index value is divided by the sum of the index value and the first preset value after subtracting the first preset value to obtain the first value, the first value is multiplied by the i+1 learning rate parameter after adding the first preset value to obtain a first formula related to the i+1 learning rate parameter, the first formula is added with a second preset value to obtain a second formula, the i+1 learning rate parameter is equal to the second formula to obtain the i+1 learning rate, the difference between the loss functions obtained by training the initial transaction risk prediction model according to two adjacent times is adjusted, the absolute value of the learning rate is increased along with the decrease of the absolute value of the difference, the parameter of the initial transaction risk prediction model is quickly adjusted to a position close to the optimal parameter, the speed of training the initial transaction risk prediction model is accelerated, the absolute value of the learning rate is reduced along with the increase of the absolute value of the difference, the local transaction risk prediction model is slowly trained along with the decrease of the absolute value of the difference, the local risk prediction model is better, and the optimal risk prediction model is accurately trained by the local risk prediction model.
According to an embodiment of the present disclosure, for operation S202 shown in fig. 2, training an initial transaction risk prediction model by using the ith sample data and the (i+1) th sample data in the transaction data sample set, to obtain an ith loss function value corresponding to the ith sample data and an (i+1) th loss function value corresponding to the (i+1) th sample data, respectively, may include the following operations:
dividing sample data in a sample set into risk category data and risk-free category data;
clustering the class data with the largest data amount in the risk class data and the risk-free class data by using a density-based spatial clustering algorithm to obtain K cluster class data, wherein K is a positive integer;
generating a balance data set according to the K cluster type data and the type data with the smallest data quantity in the risk type data and the risk-free type data;
and training the initial transaction risk prediction model by utilizing the ith sample data and the (i+1) th sample data in the balance data set in sequence to obtain an ith loss function value corresponding to the ith sample data and an (i+1) th loss function value corresponding to the (i+1) th sample data.
According to the embodiment of the present disclosure, K may be, for example, 5, 10, 15, etc., and the embodiment of the present disclosure does not limit a specific K value, and may be selected according to practical situations.
According to the embodiment of the disclosure, under the condition that the data volume of the risky category data is larger than that of the risky category data, clustering the risky category data by using a Density-based spatial clustering algorithm (Density-Based Spatial Clustering ofApplications with Noise, DBSCAN) to obtain K cluster category data, and under the condition that the data volume of the risky category data is smaller than that of the risky category data, clustering the risky category data by using DBSCAN to obtain K cluster category data.
According to the embodiment of the disclosure, the K cluster type data is obtained by clustering the type data with the largest data amount in the risky type data and the risky type data by using a DBSCAN clustering algorithm, so that sample data with high enough density in the largest type data in the risky type data and the risky type data is divided into the K clusters, and the cluster clusters with any shape can be identified and found from the largest type data in the risky type data and the risky type data, and the K cluster type data formed by the sample data with the largest density is obtained, so that the K cluster type data can reflect important characteristics of the largest type data in the risky type data and the risky type data.
According to the embodiment of the disclosure, parameters such as a neighborhood radius to be set in a DBSCAN algorithm, a threshold value of the number of sample data in the neighborhood and the like can be adjusted to control the number of categories for clustering the category data with the largest data amount in the risk category data and the risk-free category data by using the DBSCAN clustering algorithm, so that the sample data with the same phase characteristics are clustered together, and the clustering precision is improved.
According to the embodiment of the disclosure, the data close to the data amount of the category data with the smallest data amount can be extracted from the K-cluster category data, so that the data extracted from the K-cluster category data and the data amount of the smallest category data are close to 1:1, and the data extracted from the K-cluster category data and the smallest category data can form balance data.
According to the embodiment of the disclosure, under the condition that the transaction risk prediction model is trained for the ith time, sample data can be randomly extracted without replacement from a balance data set to obtain the ith sample data, the ith sample data is input into the initial transaction risk prediction model, the initial transaction risk prediction model is trained by using the ith sample data to obtain the ith prediction result of the initial transaction risk prediction model, and the ith loss function value corresponding to the ith sample data is obtained according to the ith prediction result.
According to the embodiment of the disclosure, under the condition that the transaction risk prediction model is trained for the ith+1 time, sample data can be randomly extracted without replacement from a balance data set to obtain the ith+1 sample data, then the ith+1 sample data is input into the initial transaction risk prediction model, the initial transaction risk prediction model is trained by using the ith+1 sample data to obtain the ith+1 prediction result of the initial transaction risk prediction model, and then the ith+1 loss function value corresponding to the ith+1 sample data is obtained according to the ith+1 prediction result.
According to the embodiment of the disclosure, sample data in a sample set is divided into risk type data and risk-free type data, then the density-based spatial clustering algorithm is utilized to cluster the type data with the largest data amount in the risk type data and the risk-free type data to obtain K cluster type data, a balance data set is generated according to the K cluster type data and the type data with the smallest data amount in the risk type data and the risk-free type data, an initial transaction risk prediction model is trained by utilizing the ith sample data and the (i+1) th sample data in the balance data set in sequence, the ith loss function value corresponding to the ith sample data and the (i+1) th loss function value corresponding to the (i+1) th sample data are obtained, the sample data in the balance data set is utilized to train the initial transaction risk prediction model, the prediction accuracy of each type of the risk type data and the risk-free type data in the initial transaction risk prediction model is improved, and particularly, the prediction accuracy of the type data with the smallest data amount in the risk type data and the risk-free type data can be improved, and the prediction accuracy of the sample set is the user-related transaction risk sample risk prediction model.
According to an embodiment of the present disclosure, generating a balanced data set according to K cluster category data and category data having a smallest data amount among risk category data and risk-free category data includes:
extracting data of a third preset value from each category data aiming at each category data in the K cluster category data to obtain downsampled category data corresponding to the K cluster category data respectively, and obtaining a plurality of downsampled category data;
and generating a balance data set according to the plurality of downsampled category data and the category data with the smallest data amount in the risk category data and the risk-free category data.
According to an embodiment of the disclosure, the third preset value may be determined according to the K value and a data amount of the category data having the smallest data amount among the risky category data and the risky category data.
According to the embodiment of the present disclosure, 1/K (the data amount of the minimum class data) of data may be extracted from each of the K cluster class data such that the data extracted from each of the K cluster class data is added together to be close to 1:1 to the data amount of the minimum class data, and thus the data extracted from the K cluster class data and the minimum class data may constitute a balanced data set.
According to the embodiment of the disclosure, for example, when K has a value of 10, the risk-free class data is the class data with the smallest data amount of the risk class data and the risk-free class data, and the risk-free class data may be 7 ten thousand, the risk-free class data may be clustered into 10 clusters by using DBSCAN, and then 7000 sample data are randomly extracted from the 10 clusters, respectively, so that the sample data extracted from the 10 clusters and the risk-free class data form a balanced data set.
According to embodiments of the present disclosure, where the initial transaction risk prediction model is a CATBoost model, the initial CATBoost model may be trained with sample data in the balance dataset.
According to the embodiment of the disclosure, for each category data in the K cluster category data, data of a third preset value is extracted from each category data to obtain downsampled category data corresponding to the K cluster category data respectively, a plurality of downsampled category data are obtained, a balance data set is generated according to the downsampled category data and the category data with the smallest data volume in the risk category data and the risk-free category data, so that an initial transaction risk prediction model can be trained according to sample data in the balance data set, prediction precision of the initial transaction risk prediction model for each category data in the risk category data and the risk-free category data is improved, and in the case that the data in the balance data set are data related to loans of sample users, the precision of the initial transaction risk prediction model for predicting the risks of the loans of the sample users is improved.
According to an embodiment of the present disclosure, the initial parameters of the initial transaction risk prediction model are calculated according to a first preset learning rate.
According to the embodiment of the present disclosure, the first preset learning rate may be 0.001, 0.0001 or 0.00001, and the embodiment of the present disclosure does not limit the specific first preset learning rate, and may be selected according to actual situations.
According to the embodiment of the disclosure, the initial transaction risk prediction model may be trained by using all sample data in the balance data set in N rounds, where N is greater than or equal to 1, and the first preset learning rate used in each round may be the same or different.
It should be noted that, unless there is an execution sequence between different operations or an execution sequence between different operations in technical implementation, the execution sequence between multiple operations may be different, and multiple operations may also be executed simultaneously in the embodiment of the disclosure.
Fig. 3 schematically illustrates a flowchart of a method of training a transaction risk prediction model, according to another embodiment of the present disclosure.
As shown in fig. 3, in the case of being licensed by a sample user, historical data 310 of a plurality of sample users is acquired, where the historical data 310 is data related to loan transactions of the sample users, and the historical data 310 is taken as original transaction data, and the historical data 310 may be attribute information and transaction characteristic information of the plurality of sample users in a last period of time (for example, q).
As shown in fig. 3, the historical data 310 may be preprocessed, the data of the sample users with more data missing in the historical data 310 may be removed, and the non-numerical data in the historical data 310 may be digitally processed, and at the same time, the indicators in each historical data 310 that can better distinguish the risk categories of the sample users may be screened out, so as to obtain the preprocessed original transaction data 320. The preprocessed raw transaction data 320 is then distributed to the training set 330 and the testing set 340 according to actual requirements.
As shown in fig. 3, the preprocessed raw transaction data in the training set 330 is divided into minority class data 350 and majority class data 360, wherein the minority class data 350 is class data with the smallest data amount of the risky class data and the risky class data, and the majority class data 360 is class data with the largest data amount of the risky class data and the risky class data.
As shown in fig. 3, the data in the majority class data 360 is downsampled such that the downsampled majority class data 360 and minority class data 350 form a balanced data set 370.
As shown in fig. 3, the iterative tree algorithm model 380 is trained by using the balance data set 370, the iterative tree algorithm model 380 may be, for example, a CATBoost model, and the initial CATBoost model may be used as an initial transaction risk prediction model, and the process of training the iterative tree algorithm model 370 is as follows: the iteration tree algorithm model 380 is trained by utilizing the ith sample data and the (i+1) th sample data in the balance data set 370 in sequence to obtain an ith loss function value corresponding to the ith sample data and an (i+1) th loss function value corresponding to the (i+1) th sample data, determining an (i+1) th learning rate according to the difference between the (i+1) th loss function value and the (i+1) th loss function value, and updating parameters of the iteration tree algorithm model 380 according to the (i+1) th learning rate and the (i+1) th learning rate to obtain a trained iteration tree algorithm model 390.
As shown in FIG. 3, after the trained iterative tree algorithm model 390 is obtained, the trained iterative tree algorithm model 390 is validated using the preprocessed raw transaction data in the test set 340.
According to the embodiment of the disclosure, according to preprocessing as shown in fig. 3, indexes which can more reflect the association relation between the historical data of a plurality of sample users and contain more information about risk categories can be extracted, so that the risk categories of the sample users can be distinguished from sample data formed according to the data corresponding to the indexes.
According to the embodiment of the disclosure, by training the iterative tree algorithm model through the balance data as shown in fig. 3, the accuracy of predicting the sample data of each risk category by the iterative tree algorithm model can be improved, particularly, the accuracy of predicting the risk category of a few sample data can be improved, and in the case that the balance data is the data related to the loan transaction of the sample user, the accuracy of predicting the loan risk category of the sample user by the iterative tree algorithm model can be improved.
According to the embodiment of the disclosure, in the process of training the iterative tree algorithm model shown in fig. 3 by using balance data, the learning rate is dynamically adjusted according to the difference value between the loss functions obtained by training the iterative tree algorithm model twice, so that the absolute value of the learning rate can be increased along with the decrease of the absolute value of the difference value, the parameter of the iterative tree algorithm model is quickly adjusted to a position close to the optimal parameter, the speed of training the iterative tree algorithm model is accelerated, the absolute value of the learning rate can be reduced along with the increase of the absolute value of the difference value, the parameter of the iterative tree algorithm model is slowly returned to the position of the local optimal parameter through a smaller learning rate, the local optimal parameter is more accurate, the prediction precision of the trained iterative tree algorithm model is further improved, and the precision of predicting the loan risk category of the sample user by the trained iterative tree algorithm model can be improved under the condition that the balance data is data related to the loan transaction of the sample user.
Fig. 4 schematically illustrates a block diagram of a training apparatus of a transaction risk prediction model, according to an embodiment of the disclosure.
As shown in fig. 4, the training apparatus 400 for a transaction risk prediction model includes a sample set acquisition module 410, a loss function value obtaining module 420, a learning rate determining module 430, and a prediction model obtaining module 440.
A sample set obtaining module 410, configured to obtain a transaction data sample set of a sample user in response to the obtained data usage permission operation, where a transaction data sample in the transaction data sample set includes attribute information and transaction feature information of the sample user;
the loss function value obtaining module 420 is configured to train the initial transaction risk prediction model by using the ith sample data and the (i+1) th sample data in the transaction data sample set, to obtain an ith loss function value corresponding to the ith sample data and an (i+1) th loss function value corresponding to the (i+1) th sample data, where i is greater than or equal to 1;
a learning rate determining module 430, configured to determine an i+1th learning rate according to a difference between the i-th loss function value and the i+1th loss function value;
the prediction model obtaining module 440 is configured to update model parameters of the initial transaction risk prediction model according to the i+1th learning rate, and obtain a trained transaction risk prediction model, where the transaction risk prediction model is used to process transaction data of the user to be identified, and predict transaction risk for the user to be identified.
According to an embodiment of the present disclosure, the sample set acquisition module includes an original data acquisition sub-module, a first index obtaining sub-module, and a sample data determination sub-module.
And the original data acquisition sub-module is used for responding to the acquired data use permission operation and acquiring the original transaction data of each sample user in the transaction data sample set, wherein the original transaction data comprises data values corresponding to a plurality of indexes.
The first index obtaining sub-module is used for screening a plurality of indexes of the original transaction data to obtain a plurality of first indexes.
And the sample data determining submodule is used for determining data corresponding to the first indexes in the original transaction data as data in the transaction data samples.
According to an embodiment of the present disclosure, the first index obtaining submodule includes a second index obtaining unit, a credit value obtaining unit, and a first index obtaining unit.
The second index obtaining unit is used for screening the indexes of the original transaction data by utilizing the characteristic weight algorithm to obtain a plurality of second indexes.
The credit value obtaining unit is used for calculating the credit values of the second indexes to obtain a plurality of credit values;
the first index obtaining unit is used for screening the plurality of second indexes according to the plurality of credit values to obtain a plurality of first indexes.
According to an embodiment of the disclosure, the learning rate determination module includes an index value determination sub-module, a first value obtaining sub-module, a first formula obtaining sub-module, a second formula obtaining sub-module, and a learning rate obtaining sub-module.
And the exponent value determining submodule is used for determining the exponent value of the exponent function according to the difference value.
The first value obtaining submodule is used for dividing the index value subtracted by the first preset value by the sum of the index value and the first preset value to obtain the first value.
The first formula obtaining submodule is used for multiplying the first numerical value by the i+1th learning rate parameter after adding the first preset value to obtain a first formula related to the i+1th learning rate parameter, wherein the i+1th learning rate parameter represents the i+1th learning rate to be solved.
The second formula obtaining submodule is used for adding the first formula and a second preset value to obtain a second formula.
And the learning rate obtaining submodule is used for obtaining the i+1th learning rate by enabling the i+1th learning rate parameter to be equal to the second formula.
According to an embodiment of the disclosure, the loss function value obtaining module includes a risk and risk-free data obtaining sub-module, a K cluster category data obtaining sub-module, a balance data set obtaining sub-module, and a loss function value obtaining sub-module.
The risky and non-risky data obtaining submodule is used for dividing sample data in the sample set into risky category data and non-risky category data.
The K cluster type data obtaining sub-module is used for clustering the type data with the largest data volume in the risk type data and the risk-free type data by using a density-based spatial clustering algorithm to obtain K cluster type data, wherein K is a positive integer.
And the balance data set generation sub-module is used for generating a balance data set according to the K cluster type data and the type data with the smallest data quantity in the risk type data and the risk-free type data.
The loss function value obtaining submodule is used for training the initial transaction risk prediction model by utilizing the ith sample data and the (i+1) th sample data in the balance data set in sequence to obtain the ith loss function value corresponding to the ith sample data and the (i+1) th loss function value corresponding to the (i+1) th sample data.
According to an embodiment of the present disclosure, the balanced data set generating submodule includes a downsampled category data obtaining unit and a balanced data set generating unit.
The downsampling class data obtaining unit is used for extracting data of a third preset value from each class data aiming at each class data in the K cluster class data to obtain downsampling class data corresponding to the K cluster class data respectively, and obtaining a plurality of downsampling class data.
And the balance data set generating unit is used for generating a balance data set according to the plurality of downsampled category data and category data with minimum data quantity in the risk category data and the risk-free category data.
According to an embodiment of the present disclosure, the initial parameters of the initial transaction risk prediction model are calculated according to a first preset learning rate.
Any number of modules, sub-modules, units, sub-units, or at least some of the functionality of any number of the sub-units according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented as split into multiple modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or in any other reasonable manner of hardware or firmware that integrates or encapsulates the circuit, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be at least partially implemented as computer program modules, which when executed, may perform the corresponding functions.
For example, the training apparatus 400 of the transaction risk prediction model includes a sample set acquisition module 410, a loss function value obtaining module 420, a learning rate determination module 430, and a prediction model obtaining module 440, any of which may be combined in one module/unit/sub-unit, or any of which may be split into a plurality of modules/units/sub-units. Alternatively, at least some of the functionality of one or more of these modules/units/sub-units may be combined with at least some of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to embodiments of the present disclosure, the training apparatus 400 of the transaction risk prediction model includes a sample set acquisition module 410, a loss function value derivation module 420, a learning rate determination module 430, and a prediction model derivation module 440, at least one of which may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or as hardware or firmware in any other reasonable manner of integrating or packaging the circuit, or as any one of or a suitable combination of any of the three implementations of software, hardware, and firmware. Alternatively, the training apparatus 400 of the transaction risk prediction model includes a sample set acquisition module 410, a loss function value derivation module 420, a learning rate determination module 430, and a prediction model derivation module 440, at least one of which may be implemented at least in part as a computer program module that, when executed, may perform the corresponding functions.
It should be noted that, in the embodiment of the present disclosure, the training device portion of the transaction risk prediction model corresponds to the training method portion of the transaction risk prediction model in the embodiment of the present disclosure, and the description of the training device portion of the transaction risk prediction model specifically refers to the training method portion of the transaction risk prediction model, which is not described herein.
Fig. 5 schematically illustrates a block diagram of a computer system suitable for implementing the above-described method according to an embodiment of the present disclosure. The computer system illustrated in fig. 5 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 5, a computer system 500 according to an embodiment of the present disclosure includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. The processor 501 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 501 may also include on-board memory for caching purposes. The processor 501 may comprise a single processing unit or a plurality of processing units for performing different actions of the method flows according to embodiments of the disclosure.
In the RAM 503, various programs and data required for the operation of the system 500 are stored. The processor 501, ROM 502, and RAM 503 are connected to each other by a bus 504. The processor 501 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 502 and/or the RAM 503. Note that the program may be stored in one or more memories other than the ROM 502 and the RAM 503. The processor 501 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, the system 500 may further include an input/output (I/O) interface 505, the input/output (I/O) interface 505 also being connected to the bus 504. The system 500 may also include one or more of the following components connected to the I/O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output portion 507 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The drive 510 is also connected to the I/O interface 505 as needed. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as needed so that a computer program read therefrom is mounted into the storage section 508 as needed.
According to embodiments of the present disclosure, the method flow according to embodiments of the present disclosure may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 509, and/or installed from the removable media 511. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 501. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 502 and/or RAM 503 and/or one or more memories other than ROM 502 and RAM 503 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program comprising program code for performing the methods provided by the embodiments of the present disclosure, the program code for causing an electronic device to implement the training method of the transaction risk prediction model provided by the embodiments of the present disclosure when the computer program product is run on the electronic device.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 501. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed, and downloaded and installed in the form of a signal on a network medium, and/or installed from a removable medium 511 via the communication portion 509. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be combined in various combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (11)

1. A training method of a transaction risk prediction model, comprising:
responding to the acquired data use permission operation, acquiring a transaction data sample set of a sample user, wherein a transaction data sample in the transaction data sample set comprises attribute information and transaction characteristic information of the sample user;
training an initial transaction risk prediction model by utilizing the ith sample data and the (i+1) th sample data in the transaction data sample set in sequence to obtain an ith loss function value corresponding to the ith sample data and an (i+1) th loss function value corresponding to the (i+1) th sample data, wherein i is greater than or equal to 1;
Determining an i+1th learning rate according to the difference between the i-th loss function value and the i+1th loss function value;
and updating model parameters of the initial transaction risk prediction model according to the i+1th learning rate to obtain the trained transaction risk prediction model, wherein the transaction risk prediction model is used for processing transaction data of a user to be identified and predicting transaction risk of the user to be identified.
2. The method of claim 1, wherein the acquiring a sample set of transaction data for a sample user in response to the acquired data usage permission operation comprises:
acquiring original transaction data of each sample user in the transaction data sample set in response to the acquired data use permission operation, wherein the original transaction data comprises data values corresponding to a plurality of indexes;
screening a plurality of indexes of the original transaction data to obtain a plurality of first indexes;
and determining the data corresponding to the first indexes in the original transaction data as the data in the transaction data sample.
3. The method of claim 2, wherein the filtering the plurality of metrics of the raw transaction data to obtain a plurality of first metrics comprises:
Screening a plurality of indexes of the original transaction data by utilizing a characteristic weight algorithm to obtain a plurality of second indexes;
calculating the credit values of the second indexes to obtain a plurality of credit values;
and screening the second indexes according to the credit values to obtain first indexes.
4. The method of claim 1, wherein the determining an i+1 learning rate from the difference between the i-th loss function value and the i+1-th loss function value comprises:
determining an index value of an index function according to the difference value;
dividing the index value by the sum of the index value and a first preset value after subtracting the first preset value to obtain a first value;
multiplying the first numerical value by an i+1th learning rate parameter after adding the first preset value to obtain a first formula related to the i+1th learning rate parameter, wherein the i+1th learning rate parameter characterizes the i+1th learning rate to be solved;
adding the first formula and a second preset value to obtain a second formula;
and (3) the i+1th learning rate parameter is equal to the second formula, so that the i+1th learning rate is obtained.
5. The method of claim 1, wherein training an initial transaction risk prediction model with the ith sample data and the (i+1) th sample data in the transaction data sample set sequentially and respectively, to obtain an ith loss function value corresponding to the ith sample data and an (i+1) th loss function value corresponding to the (i+1) th sample data comprises:
Dividing sample data in the sample set into risk category data and risk-free category data;
clustering the class data with the largest data amount in the risk class data and the risk-free class data by using a density-based spatial clustering algorithm to obtain K cluster class data, wherein K is a positive integer;
generating a balance data set according to K cluster type data and type data with the smallest data quantity in the risk type data and the risk-free type data;
and training the initial transaction risk prediction model by utilizing the ith sample data and the (i+1) th sample data in the balance data set in sequence to obtain an ith loss function value corresponding to the ith sample data and an (i+1) th loss function value corresponding to the (i+1) th sample data.
6. The method of claim 5, wherein generating the balanced data set from K clusters of category data and the category data with the smallest data volume of the risky category data and the risky category data comprises:
extracting data of a third preset value from each category data in the K cluster category data to obtain downsampled category data corresponding to the K cluster category data respectively, and obtaining a plurality of downsampled category data;
And generating a balance data set according to the plurality of downsampled category data and category data with the smallest data amount in the risky category data and the risky category data.
7. The method of claim 1, wherein the initial parameters of the initial transaction risk prediction model are calculated from a first predetermined learning rate.
8. A training device for a transaction risk prediction model, comprising:
the sample set acquisition module is used for responding to the acquired data use permission operation to acquire a transaction data sample set of a sample user, wherein a transaction data sample in the transaction data sample set comprises attribute information and transaction characteristic information of the sample user;
the loss function value obtaining module is used for training an initial transaction risk prediction model by utilizing the ith sample data and the (i+1) th sample data in the transaction data sample set in sequence to obtain an ith loss function value corresponding to the ith sample data and an (i+1) th loss function value corresponding to the (i+1) th sample data, wherein i is more than or equal to 1;
the learning rate determining module is used for determining an ith learning rate of +1 according to the difference value between the ith loss function value and the ith +1 loss function value;
And the prediction model obtaining module is used for updating model parameters of the initial transaction risk prediction model according to the i+1th learning rate to obtain the trained transaction risk prediction model, wherein the transaction risk prediction model is used for processing transaction data of a user to be identified and predicting transaction risk of the user to be identified.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more instructions,
wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1 to 7.
10. A computer readable storage medium having stored thereon executable instructions which when executed by a processor cause the processor to implement the method of any of claims 1 to 7.
11. A computer program product comprising computer executable instructions for implementing the method of any one of claims 1 to 7 when executed.
CN202310188570.7A 2023-02-27 2023-02-27 Training method, device, equipment and medium of transaction risk prediction model Pending CN116228421A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310188570.7A CN116228421A (en) 2023-02-27 2023-02-27 Training method, device, equipment and medium of transaction risk prediction model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310188570.7A CN116228421A (en) 2023-02-27 2023-02-27 Training method, device, equipment and medium of transaction risk prediction model

Publications (1)

Publication Number Publication Date
CN116228421A true CN116228421A (en) 2023-06-06

Family

ID=86580255

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310188570.7A Pending CN116228421A (en) 2023-02-27 2023-02-27 Training method, device, equipment and medium of transaction risk prediction model

Country Status (1)

Country Link
CN (1) CN116228421A (en)

Similar Documents

Publication Publication Date Title
CN111192131A (en) Financial risk prediction method and device and electronic equipment
CN112561685B (en) Customer classification method and device
CN114462532A (en) Model training method, device, equipment and medium for predicting transaction risk
CN112613978B (en) Bank capital sufficiency prediction method and device, electronic equipment and medium
CN111695988A (en) Information processing method, information processing apparatus, electronic device, and medium
CN115994819A (en) Risk customer identification method, apparatus, device and medium
CN116091249A (en) Transaction risk assessment method, device, electronic equipment and medium
CN114782170A (en) Method, apparatus, device and medium for evaluating model risk level
CN116228421A (en) Training method, device, equipment and medium of transaction risk prediction model
CN114841800A (en) Loan risk assessment method, loan risk assessment device, loan risk assessment apparatus, and loan risk assessment medium
CN113129127A (en) Early warning method and device
CN113094595A (en) Object recognition method, device, computer system and readable storage medium
US20230385844A1 (en) Granting provisional credit based on a likelihood of approval score generated from a dispute-evaluator machine-learning model
CN117934154A (en) Transaction risk prediction method, model training method, device, equipment, medium and program product
CN116562974A (en) Object recognition method, device, electronic equipment and storage medium
TWI657393B (en) Marketing customer group prediction system and method
CN114239985A (en) Exchange rate prediction method and device, electronic equipment and storage medium
CN115423479A (en) Multi-dimension-based user fraud risk prediction method and system and electronic equipment
CN116308615A (en) Product recommendation method and device, electronic equipment and storage medium
CN117422545A (en) Credit risk identification method, apparatus, device and storage medium
CN114565453A (en) Model construction method, credit risk assessment device, credit risk assessment equipment and credit risk assessment medium
CN117670513A (en) Client fishing method, device, equipment and storage medium based on ensemble learning
CN114897564A (en) Target customer recommendation method and device, electronic equipment and storage medium
CN117911033A (en) Transaction quota determination method, device, equipment, medium and program product
CN114387087A (en) Dynamic allocation method and device for credit line, electronic equipment and storage 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