CN114493839A - Risk user prediction model training method, prediction method, equipment and storage medium - Google Patents

Risk user prediction model training method, prediction method, equipment and storage medium Download PDF

Info

Publication number
CN114493839A
CN114493839A CN202210082286.7A CN202210082286A CN114493839A CN 114493839 A CN114493839 A CN 114493839A CN 202210082286 A CN202210082286 A CN 202210082286A CN 114493839 A CN114493839 A CN 114493839A
Authority
CN
China
Prior art keywords
data
user
prediction model
training
risk
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
CN202210082286.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.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202210082286.7A priority Critical patent/CN114493839A/en
Publication of CN114493839A publication Critical patent/CN114493839A/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/03Credit; Loans; Processing thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Abstract

The application provides a risk user prediction model training method, a prediction method, equipment and a storage medium, wherein the method comprises the following steps: and acquiring historical behavior data of each sample user, performing time sequence feature extraction on the historical behavior data of each sample user, and training a risk user prediction model by taking the acquired time sequence feature data corresponding to each sample user as training data. In the application, due to the introduction of the time sequence characteristics, a gating cycle unit layer suitable for processing time sequence related problems is added in the risk user prediction model, and the time sequence characteristic data extracted from historical behavior data is objective characteristic data and has strong correlation among the data, so that the time sequence characteristic data is used as training data to train the risk user prediction model, and the stability and the accuracy of the risk user prediction model are effectively improved.

Description

Risk user prediction model training method, prediction method, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a risk user prediction model training method, a prediction method, a device, and a storage medium.
Background
In banking, risk control is the core foundation for business transactions. With the continuous development of artificial intelligence and big data technology, a risk user prediction model can be adopted to predict risk users, so that risk control is realized.
At present, a common training method of a risk user prediction model is to obtain feature data of each sample user, input the obtained feature data as training data into a convolutional neural network of the risk user prediction model to perform model training, and obtain a trained risk user prediction model.
However, when the risk user prediction model is trained by using the above method, the feature data is usually determined according to personal experience, and the obtained feature data lacks correlation, so that the trained risk user prediction model has poor stability and low accuracy.
Disclosure of Invention
The application provides a risk user prediction model training method, a prediction method, equipment and a storage medium, which are used for improving the stability and the accuracy of a risk user prediction model.
In a first aspect, an embodiment of the present application provides a risk user prediction model training method, including:
acquiring historical behavior data of each sample user;
performing time sequence feature extraction on the historical behavior data of each sample user to obtain time sequence feature data corresponding to each sample user;
taking the time sequence characteristic data corresponding to each sample user as training data, and training the risk user prediction model to obtain a trained risk user prediction model; wherein the risk user prediction model comprises a convolutional neural network layer and a gated cyclic unit layer.
Further, the method for training the risk user prediction model by using the time series characteristic data corresponding to each sample user as training data to obtain the trained risk user prediction model includes:
taking the time sequence characteristic data corresponding to each sample user as a piece of training data, inputting the training data into a convolutional neural network layer of the risk user prediction model, and performing first-stage model training on the risk user prediction model to obtain a characteristic vector corresponding to each piece of training data;
and inputting the feature vector corresponding to each piece of obtained training data into a gate control cycle unit layer of the risk user prediction model, and performing second-stage model training on the risk user prediction model to obtain a trained risk user prediction model.
Further, the method as described above, after obtaining the historical behavior data of each sample user, further includes:
preprocessing the acquired historical behavior data of each sample user; the preprocessing comprises abnormal data processing and missing data processing;
the time sequence feature extraction of the historical behavior data of each sample user comprises the following steps:
and performing time sequence feature extraction on the preprocessed historical behavior data of each sample user.
Further, the above method, performing abnormal data processing on the acquired historical behavior data of each sample user, includes:
screening the acquired historical behavior data of each sample user to acquire abnormal data;
and replacing the abnormal data by adopting a first value which is specified in advance.
Further, the method as described above, the historical behavioral data comprising a plurality of attributes; the missing data processing of the acquired historical behavior data of each sample user comprises:
calculating the data missing rate corresponding to each attribute according to the historical behavior data corresponding to each attribute; the data missing rate corresponding to the attribute is the ratio of the number of the missing historical behavior data corresponding to the attribute to the total number of the historical behavior data in the acquired historical behavior data of all the sample users;
judging whether the data missing rate is larger than a preset threshold or not according to the data missing rate corresponding to each attribute;
if yes, deleting the historical behavior data corresponding to the attributes from the obtained historical behavior data of all the sample users;
and if not, filling the historical behavior data corresponding to the missing attributes by adopting a pre-specified second numerical value.
Further, the method, in which the time-series characteristic data corresponding to each sample user is used as training data to train the risk user prediction model, further includes:
taking the time sequence characteristic data corresponding to each sample user as training data of a plurality of batches, and training the risk user prediction model in batches;
the method further comprises the following steps:
calculating loss weights of training data corresponding to different types of sample users in each batch by adopting a batch weight loss function; wherein the different types of sample users comprise risk type sample users and non-risk type sample users;
and aiming at each batch of training data, the calculated loss weight of the training data corresponding to different types of sample users in the batch is acted on the corresponding training data, and then the risk user prediction model is trained.
In a second aspect, an embodiment of the present application provides a risk user prediction method, including:
acquiring behavior data of a user to be predicted;
performing time sequence feature extraction on the behavior data of the user to be predicted to obtain corresponding time sequence feature data of the user to be predicted;
inputting the corresponding time sequence characteristic data of the user to be predicted into a trained risk user prediction model to obtain a prediction result; the prediction result includes that the user to be predicted is a risky user or the user to be predicted is a non-risky user, and the trained risky user prediction model is obtained by training the risky user prediction model by using the method of the first aspect.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, and a memory communicatively coupled to the processor;
the memory stores computer execution instructions;
the processor executes computer-executable instructions stored by the memory to implement the method of the first or second aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having stored therein computer-executable instructions for implementing the method according to the first aspect or the second aspect when executed by a processor.
In a fifth aspect, the present application provides a computer program product comprising a computer program that, when executed by a processor, implements the method according to the first or second aspect.
The application provides a risk user prediction model training method, a prediction method, equipment and a storage medium, historical behavior data of each sample user is obtained, time sequence feature extraction is carried out on the historical behavior data of each sample user, time sequence feature data corresponding to each sample user is obtained, the time sequence feature data corresponding to each sample user is used as training data, a risk user prediction model is trained, and a trained risk user prediction model is obtained, wherein the risk user prediction model comprises a convolutional neural network layer and a gate control circulation unit layer. That is to say, the time sequence feature extraction is carried out on the historical behavior data of each sample user, the obtained time sequence feature data corresponding to each sample user is used as training data to train the risk user prediction model, due to the introduction of the time sequence feature, a gating cycle unit layer suitable for processing time sequence related problems is added into the risk user prediction model, and due to the fact that the time sequence feature data extracted from the historical behavior data are objective feature data and strong correlation exists among the data, the time sequence feature data are used as the training data to train the risk user prediction model, and the stability and the accuracy of the risk user prediction model are effectively improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic diagram of a system architecture according to an embodiment of the present application;
fig. 2 is a flowchart of a risk user prediction model training method according to an embodiment of the present disclosure;
FIG. 3 is a flowchart of another risk user prediction model training method provided in the embodiments of the present application;
fig. 4 is a flowchart of a risk user prediction method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a risk user prediction model training apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a risk user prediction device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with aspects of the present application.
In recent years, with the development of artificial intelligence and big data technology, in banking, a risk user prediction model is generally adopted to predict risk users for risk control. In the existing training method of the risk user prediction model, the feature data of each sample user is generally acquired as training data and input into the convolutional neural network of the risk user prediction model for model training.
However, in the above method for training the risk user prediction model, the feature data is usually determined according to personal experience, and the obtained feature data lacks correlation, so that the trained risk user prediction model has poor stability and low accuracy.
The risk user prediction model training method, the risk user prediction model prediction device and the risk user prediction model storage medium aim to solve the technical problems in the prior art.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of a system architecture according to an embodiment of the present disclosure, as shown in fig. 1, the system architecture shown in fig. 1 may specifically include a database 1 and a server 2, wherein the server 2 is provided with a risk user prediction model training device.
The database 1 stores historical behavior data of each sample user. The risk user prediction model training device can be carried on the server 2 and is used for acquiring historical behavior data of each sample user stored in the database 1, performing time sequence feature extraction on the historical behavior data of each sample user, taking the acquired time sequence feature data corresponding to each sample user as training data, training the risk user prediction model, and acquiring the trained risk user prediction model.
Example one
Fig. 2 is a flowchart of a risk user prediction model training method provided in the embodiment of the present application, and as shown in fig. 2, the risk user prediction model training method provided in the embodiment includes the following steps:
step 201, obtaining historical behavior data of each sample user.
Step 202, performing time sequence feature extraction on the historical behavior data of each sample user to obtain time sequence feature data corresponding to each sample user.
Step 203, taking the time sequence characteristic data corresponding to each sample user as training data, and training the risk user prediction model to obtain a trained risk user prediction model; wherein the risk user prediction model comprises a convolutional neural network layer and a gated cyclic unit layer.
It should be noted that the execution subject of the risk user prediction model training method provided in this embodiment may be a risk user prediction model training apparatus. In practical applications, the risk user prediction model training apparatus may be implemented by a computer program, such as application software, or a medium storing a related computer program, such as a usb disk, an optical disk, or the like; alternatively, it may be implemented by a physical device, such as a chip, etc., into which the relevant computer program is integrated or installed.
In this embodiment, in order to improve the stability and accuracy of the risk user prediction model, the risk user prediction model training device may perform time series feature extraction on the historical behavior data of each sample user, and train the risk user prediction model by using the obtained time series feature data corresponding to each sample user as training data.
Specifically, the risk user prediction model training device may first obtain historical behavior data of each sample user from a database, where the historical behavior data may include, but is not limited to, personal information, authentication time, service application time, service submission time, service quota, and the like.
After the historical behavior data of each sample user is obtained, the risk user prediction model training device can extract the time sequence characteristics of the historical behavior data of each sample user to obtain the time sequence characteristic data corresponding to each sample user.
In one example, for each sample user, the risk user prediction model training device may extract the authentication time, the service application time, and the service submission time of the sample user from the historical behavior data of the current sample user, and determine whether the authentication time of the sample user is before the service application time, and a time difference between the authentication time of the sample user and the service submission time. Correspondingly, the obtained time sequence characteristic data corresponding to the sample user may include the number of days that the authentication time of the sample user is earlier than the service application time, or the number of days that the authentication time of the sample user is later than the service application time, and the number of days that the authentication time of the sample user is different from the service submission time.
For example, if the risk user prediction model training device extracts, from historical behavior data of a sample user, that the authentication time of the sample user is 1 month and 3 days, the service application time is 1 month and 7 days, and the service submission time is 1 month and 15 days, the obtained time series characteristic data corresponding to the sample user is: the authentication time is 4 days earlier than the service application time, and the difference between the authentication time and the service submission time is 12 days. If the risk user prediction model training device extracts the authentication time of the sample user as 1 month and 5 days, the service application time as 1 month and 4 days and the service submission time as 1 month and 20 days from the historical behavior data of another sample user, the obtained time sequence characteristic data corresponding to the sample user is as follows: the authentication time is 1 day later than the service application time, and the difference between the authentication time and the service submission time is 15 days.
After the time series characteristic data corresponding to each sample user is obtained, the risk user prediction model training device may train the risk user prediction model by using the time series characteristic data corresponding to each sample user as training data, so as to obtain the trained risk user prediction model. The risk user prediction model comprises a convolutional neural network layer and a gating circulation unit layer.
In practical application, due to the introduction of the time sequence characteristics in the training data, a gated cyclic unit layer suitable for processing time sequence related problems is added in the risk user prediction model besides a convolutional neural network layer for processing characteristic data.
On the basis of the first embodiment, in an optional implementation manner, step 203 specifically includes: taking the time sequence characteristic data corresponding to each sample user as a piece of training data, inputting the training data into a convolutional neural network layer of the risk user prediction model, and performing first-stage model training on the risk user prediction model to obtain a characteristic vector corresponding to each piece of training data; and inputting the feature vector corresponding to each piece of obtained training data into a gate control cycle unit layer of the risk user prediction model, and performing second-stage model training on the risk user prediction model to obtain a trained risk user prediction model.
In this embodiment, the risk user prediction model training device may input the time sequence feature data corresponding to each sample user as a piece of training data into a convolutional neural network layer of the risk user prediction model, perform the first-stage model training on the risk user prediction model, and obtain a feature vector corresponding to each piece of training data.
In one example, since the input time series feature data (i.e., training data) is one-dimensional data, the number of channels of the convolutional neural network is set to 1, and accordingly, after the model training of the first stage is performed on the risk user prediction model, the feature vector corresponding to each piece of training data is obtained as follows:
fk'=X'*ω'k∈RH×1×1k=1,2,…D'
wherein f isk' is the k-th feature vector corresponding to the piece of training data, X ' is the piece of training data, and is the convolution operation, omega 'kFor the convolution kernel, H × 1 is the size of the feature vector, and D' is the number of the feature vectors corresponding to the training data.
After the risk user prediction model training device obtains the feature vector corresponding to each piece of training data, the obtained feature vector corresponding to each piece of training data can be input into the gate control cycle unit layer of the risk user prediction model, and model training of the second stage is performed on the risk user prediction model to obtain the trained risk user prediction model.
The method for training the risk user prediction model provided by this embodiment obtains historical behavior data of each sample user, performs time sequence feature extraction on the historical behavior data of each sample user to obtain time sequence feature data corresponding to each sample user, trains the risk user prediction model by using the time sequence feature data corresponding to each sample user as training data, and obtains the trained risk user prediction model, where the risk user prediction model includes a convolutional neural network layer and a gate control cycle unit layer. That is to say, in the embodiment of the present application, the time sequence feature extraction is performed on the historical behavior data of each sample user, and the obtained time sequence feature data corresponding to each sample user is used as training data to train the risk user prediction model.
Example two
On the basis of the first embodiment, in an optional implementation manner, after step 201, the method further includes: preprocessing the acquired historical behavior data of each sample user; the preprocessing comprises abnormal data processing and missing data processing. Correspondingly, in step 202, the performing time series feature extraction on the historical behavior data of each sample user includes: and performing time sequence feature extraction on the preprocessed historical behavior data of each sample user.
In this embodiment, because there may be a case where data cannot be normally used, such as data abnormality or data loss, in the acquired historical behavior data of each sample user, and the amount of training data is reduced if the data that cannot be normally used is directly deleted, which may affect the training effect, the risk user prediction model training device may pre-process the acquired historical behavior data of each sample user, so that the data may be normally used, and the amount of training data is not reduced. In particular, preprocessing may include exception data processing and missing data processing.
Correspondingly, after the acquired historical behavior data of each sample user is preprocessed, the risk user prediction model training device can extract the time sequence characteristics of the preprocessed historical behavior data of each sample user to acquire training data.
On the basis of the second embodiment, in an optional implementation manner, the performing abnormal data processing on the acquired historical behavior data of each sample user includes: screening the acquired historical behavior data of each sample user to acquire abnormal data; and replacing the abnormal data by adopting a first value which is specified in advance.
In this embodiment, the risk user prediction model training device may first screen the acquired historical behavior data of each sample user to obtain abnormal data. Specifically, the exception data may include, but is not limited to, format exception data, content exception data, and temporal exception data, among others.
After obtaining the abnormal data, the risk user prediction model training device may replace the abnormal data with a first value designated in advance. In particular, the pre-specified first value may be any value that is distinct from the normal data value, such as-1.
On the basis of the second embodiment, in a further optional implementation manner, the historical behavior data includes a plurality of attributes; the missing data processing of the acquired historical behavior data of each sample user comprises: calculating the data missing rate corresponding to each attribute according to the historical behavior data corresponding to each attribute; the data missing rate corresponding to the attribute is the ratio of the number of the missing historical behavior data corresponding to the attribute to the total number of the historical behavior data in the acquired historical behavior data of all the sample users; judging whether the data missing rate is larger than a preset threshold or not according to the data missing rate corresponding to each attribute; if yes, deleting the historical behavior data corresponding to the attributes from the obtained historical behavior data of all the sample users; and if not, filling the historical behavior data corresponding to the missing attributes by adopting a pre-specified second numerical value.
In this embodiment, the historical behavior data may include a plurality of attributes, and the historical behavior data of one sample user may include historical behavior data corresponding to all attributes, or may lack historical behavior data corresponding to one or more attributes. For example, in the historical behavior data of one sample user, the historical behavior data corresponding to the attribute of the authentication time is missing, and in the historical behavior data of another sample user, the historical behavior data corresponding to the attributes of the authentication time and the service transaction time is missing.
Therefore, in order to perform missing data processing on the acquired historical behavior data of each sample user, the risk user prediction model training device may calculate a data missing rate corresponding to the current attribute for the historical behavior data corresponding to each attribute. The data missing rate corresponding to the current attribute is the ratio of the number of the missing historical behavior data corresponding to the current attribute to the total number of the historical behavior data in the acquired historical behavior data of all the sample users.
For example, if the total number of the acquired historical behavior data of all the sample users is 100, and the number of the historical behavior data missing corresponding to the attribute of the authentication time is 5, the data missing rate corresponding to the attribute of the authentication time is 5/100, that is, 0.05.
After the data loss rate corresponding to each attribute is obtained, the risk user prediction model training device may determine whether the data loss rate is greater than a preset threshold value for the data loss rate corresponding to each attribute. In a possible situation, if the data loss rate is greater than the preset threshold, it indicates that the historical behavior data corresponding to the attribute is absent from the historical behavior data of the multiple sample users, and therefore the historical behavior data corresponding to the attribute is not suitable for being used as extraction data of training data, and therefore the risk user prediction model training device can delete the historical behavior data corresponding to the attribute from the historical behavior data of all the obtained sample users.
In another possible case, the data missing rate is not greater than the preset threshold, which indicates that only a few sample users lack the historical behavior data corresponding to the attribute in the historical behavior data, so the historical behavior data corresponding to the attribute can be used as the extracted data of the training data, and therefore the risk user prediction model training device can fill the missing historical behavior data corresponding to the attribute with a pre-specified second number, so that the data can be used normally. The second pre-specified value is different from the first pre-specified value, and may be, for example, a mode value of the historical behavior data corresponding to the attribute.
According to the risk user prediction model training method provided by the embodiment, abnormal data or missing data processing is performed on the acquired historical behavior data of each sample user, so that the data can be normally used, the reduction of the number of training data is effectively avoided, and the effect of risk user prediction model training is further ensured.
EXAMPLE III
On the basis of the first embodiment, in an optional implementation manner, step 203 further includes: and taking the time sequence characteristic data corresponding to each sample user as training data of a plurality of batches, and training the risk user prediction model in batches.
Correspondingly, fig. 3 is a flowchart of another risk user prediction model training method provided in the embodiment of the present application, and as shown in fig. 3, the risk user prediction model training method provided in the embodiment further includes the following steps:
step 301, calculating loss weights of training data corresponding to different types of sample users in each batch by adopting a batch weight loss function; wherein the different types of sample users include risk type sample users and non-risk type sample users.
And 302, aiming at each batch of training data, acting the calculated loss weight of the training data corresponding to different types of sample users in the batch on the corresponding training data, and then training the risk user prediction model.
In this embodiment, because the number of the obtained time series characteristic data corresponding to each sample user is large, and in order to ensure the training effect of the risk user prediction model, the risk user prediction model training apparatus needs to train the risk user prediction model in batches by using the time series characteristic data corresponding to each sample user as a plurality of batches of training data.
However, when distributing the training data of each batch, it cannot be guaranteed that the quantities of the training data corresponding to the risk type sample users and the non-risk type sample users are balanced in each batch, which may cause the prediction result of the trained risk user prediction model to be biased to the user type with a large quantity of training data. Therefore, in order to solve the problem, the loss weights of the training data corresponding to different types of sample users in each batch can be calculated, and after the loss weights are applied to the corresponding training data, the risk user prediction model is trained.
Specifically, the risk user prediction model training device may calculate the loss weight of the training data corresponding to different types of sample users in each batch by using a batch weight loss function, where a specific formula is as follows:
Figure BDA0003486378720000101
Figure BDA0003486378720000102
wherein the content of the first and second substances,
Figure BDA0003486378720000103
loss weight of training data corresponding to a kth type sample user in an ith batch, wherein M is the total number of the training data in the current batch, j is the jth training data in the current batch, yi,jClass is the type of sample user to which the jth training data in the ith batch belongskAnd epsilon is a constant for the kth type, and the constant can be set to 0.01 here to avoid that the loss weight is 0 due to the fact that the current batch only contains training data corresponding to a sample user of one type. In addition, when the ith batch is the class of the sample user to which the jth training data belongsWhen the type is identical to the kth type, I (y)i,j,classk) 1, when the type of the sample user to which the jth training data in the ith batch belongs is inconsistent with the kth type, I (y)i,j,classk) Is 0.
For example, in the first batch of training data, there are two types of training data corresponding to sample users, which are training data corresponding to the 1 st type, that is, risk type, and training data corresponding to the 2 nd type, that is, non-risk type, sample users. The total number of training data in the current batch is 10, wherein the type of the sample user to which the 1 st to 4 th training data belongs is the 1 st type, namely the risk type, and the type of the sample user to which the 5 th to 10 th training data belongs is the 2 nd type, namely the non-risk type, then in the training data of the batch, the loss weight of the training data corresponding to the sample user with the risk type is 10
Figure BDA0003486378720000104
I.e., 0.61, and accordingly, the loss weight of training data corresponding to the sample user of the non-risk type is
Figure BDA0003486378720000105
Figure BDA0003486378720000111
I.e. 0.41.
After the loss weights of the training data corresponding to the different types of sample users in each batch are obtained through calculation, the risk user prediction model training device can act the calculated loss weights of the training data corresponding to the different types of sample users in the current batch on the corresponding training data according to the training data of each batch, and then train the risk user prediction model.
In the method for training the risk user prediction model provided by this embodiment, the loss weights of the training data corresponding to different types of sample users in each batch are calculated by using a batch weight loss function, and the risk user prediction model is trained after the loss weights are applied to the corresponding training data, so that a problem that a prediction result of the trained risk user prediction model is biased to a user type with a large amount of training data due to the unbalanced amount of the training data corresponding to the risk type sample user and the non-risk type sample user in each batch is effectively avoided, and the accuracy of the model is further improved.
Example four
Fig. 4 is a flowchart of a risk user prediction method provided in an embodiment of the present application, and as shown in fig. 4, the risk user prediction method provided in this embodiment specifically includes the following steps:
step 401, behavior data of a user to be predicted is obtained.
Step 402, performing time sequence feature extraction on the behavior data of the user to be predicted to obtain corresponding time sequence feature data of the user to be predicted.
Step 403, inputting the corresponding time sequence characteristic data of the user to be predicted into the trained risk user prediction model to obtain a prediction result; the prediction result includes that the user to be predicted is a risk user or the user to be predicted is a non-risk user, and the trained risk user prediction model is obtained after the risk user prediction model is trained by adopting the method provided by any one of the embodiments of the application.
It should be noted that the execution subject of the risk user prediction method provided in this embodiment may be a risk user prediction device. In practical applications, the risk user prediction device may be implemented by a computer program, such as application software, or a medium storing a related computer program, such as a usb disk or an optical disk; alternatively, it may be implemented by a physical device, such as a chip, etc., into which the relevant computer program is integrated or installed.
In this embodiment, after obtaining the trained risk user prediction model, the risk user prediction apparatus may perform risk user prediction by using the trained risk user prediction model. Specifically, the risk user prediction device may first obtain behavior data of the user to be predicted from the database, where the behavior data may include, but is not limited to, personal information, authentication time, service application time, service submission time, service quota, and the like.
After acquiring the behavior data of the user to be predicted, the risk user prediction device may perform time series feature extraction on the behavior data of the user to be predicted, so as to acquire time series feature data corresponding to the user to be predicted. The specific implementation method may be the same as the implementation method for performing the time sequence feature extraction on the historical behavior data of each sample user in the first embodiment of the present application, and is not described herein again.
After obtaining the time sequence characteristic data corresponding to the user to be predicted, the risk user prediction device may input the time sequence characteristic data corresponding to the user to be predicted to the trained risk user prediction model, so as to obtain a prediction result. The prediction result may include that the user to be predicted is a risk user or that the user to be predicted is a non-risk user.
In addition, it should be noted that the trained risk user prediction model is obtained by training the risk user prediction model by using the method provided in any of the embodiments of the present application.
The method for predicting the risk user provided by the embodiment obtains the behavior data of the user to be predicted, extracts the time sequence characteristics of the behavior data, inputs the obtained time sequence characteristic data corresponding to the user to be predicted into the trained risk user prediction model, and obtains the prediction result.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a risk user prediction model training device according to an embodiment of the present application, and as shown in fig. 5, the risk user prediction model training device according to the embodiment includes: a first acquisition module 51, a first extraction module 52 and a training module 53. The first obtaining module 51 is configured to obtain historical behavior data of each sample user. The first extraction module 52 is configured to perform time sequence feature extraction on the historical behavior data of each sample user, so as to obtain time sequence feature data corresponding to each sample user. The training module 53 is configured to train the risk user prediction model by using the time sequence feature data corresponding to each sample user as training data, so as to obtain a trained risk user prediction model; wherein the risk user prediction model comprises a convolutional neural network layer and a gated cyclic unit layer.
The risk user prediction model training device provided in this embodiment obtains historical behavior data of each sample user, performs time sequence feature extraction on the historical behavior data of each sample user, obtains time sequence feature data corresponding to each sample user, trains a risk user prediction model by using the time sequence feature data corresponding to each sample user as training data, and obtains a trained risk user prediction model, where the risk user prediction model includes a convolutional neural network layer and a gate control cycle unit layer. That is to say, in the embodiment of the present application, the time sequence feature extraction is performed on the historical behavior data of each sample user, and the obtained time sequence feature data corresponding to each sample user is used as training data to train the risk user prediction model.
In an optional embodiment, the training module 53 is specifically configured to use time sequence feature data corresponding to each sample user as a piece of training data, input the training data to a convolutional neural network layer of the risk user prediction model, perform a first-stage model training on the risk user prediction model, and obtain a feature vector corresponding to each piece of training data; and inputting the feature vector corresponding to each piece of obtained training data into a gating circulation unit layer of the risk user prediction model, and performing model training of a second stage on the risk user prediction model to obtain the trained risk user prediction model.
In an alternative embodiment, the apparatus further comprises: the processing module is used for preprocessing the acquired historical behavior data of each sample user; the preprocessing comprises abnormal data processing and missing data processing. The first extraction module 52 is specifically configured to perform time sequence feature extraction on the preprocessed historical behavior data of each sample user.
In an optional embodiment, the processing module includes a screening unit, configured to screen the acquired historical behavior data of each sample user to obtain abnormal data. The processing module further comprises a replacing unit, which is used for replacing the abnormal data by adopting a first value which is specified in advance.
In an optional embodiment, the processing module further includes a calculating unit, configured to calculate, for historical behavior data corresponding to each attribute, a data loss rate corresponding to the attribute; the data missing rate corresponding to the attribute is the ratio of the number of the missing historical behavior data corresponding to the attribute to the total number of the historical behavior data in the acquired historical behavior data of all the sample users. The processing module further comprises a judging unit, configured to judge, for a data loss rate corresponding to each attribute, whether the data loss rate is greater than a preset threshold. The processing module further comprises a deleting unit, which is used for deleting the historical behavior data corresponding to the attributes from the obtained historical behavior data of all the sample users if the data loss rate is greater than a preset threshold. The processing module further comprises a filling unit, which is used for filling the historical behavior data corresponding to the missing attributes by adopting a pre-specified second numerical value if the data missing rate is not greater than a preset threshold value.
In an optional embodiment, the training module 53 is further configured to train the risk user prediction model in batches by using the time-series feature data corresponding to each sample user as training data of a plurality of batches. The device further comprises: the calculating module is used for calculating the loss weight of the training data corresponding to different types of sample users in each batch by adopting a batch weight loss function; wherein the different types of sample users include risk type sample users and non-risk type sample users. The training module 53 is further configured to apply the calculated loss weights of the training data corresponding to different types of sample users in each batch to corresponding training data for training the risk user prediction model.
It should be noted that, for the technical solution and the effect executed by the risk user prediction model training apparatus provided in this embodiment, reference may be made to the relevant contents of the foregoing method embodiments, and details are not described herein again.
Example six
Fig. 6 is a schematic structural diagram of a risk user prediction device according to an embodiment of the present application, and as shown in fig. 6, the risk user prediction device according to the embodiment includes: a second acquisition module 61, a second extraction module 62 and a prediction module 63. The second obtaining module 61 is configured to obtain behavior data of the user to be predicted. And a second extraction module 62, configured to perform time series feature extraction on the behavior data of the user to be predicted, so as to obtain corresponding time series feature data of the user to be predicted. The prediction module 63 is configured to input the corresponding time sequence feature data of the user to be predicted into the trained risk user prediction model to obtain a prediction result; the prediction result includes that the user to be predicted is a risk user or the user to be predicted is a non-risk user, and the trained risk user prediction model is obtained after the risk user prediction model is trained by adopting the risk user prediction model training device provided by the fifth embodiment of the application.
It should be noted that, for the technical solution and the effect executed by the risk user prediction apparatus provided in this embodiment, reference may be made to relevant contents of the foregoing method embodiments, and details are not described herein again.
EXAMPLE seven
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 7, the present application further provides an electronic device 700, including: a memory 701 and a processor 702.
The memory 701 stores a program. In particular, the program may include program code comprising computer-executable instructions. The memory 701 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
A processor 702 for executing the programs stored in the memory 701.
A computer program is stored in the memory 701 and configured to be executed by the processor 702 to implement the risk user prediction model training method or the risk user prediction method provided in any of the embodiments of the present application. The related descriptions and effects corresponding to the steps in the drawings can be correspondingly understood, and redundant description is not repeated here.
In this embodiment, the memory 701 and the processor 702 are connected by a bus. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 7, but this is not intended to represent only one bus or type of bus.
Example eight
The embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the risk user prediction model training method or the risk user prediction method provided in any one of the embodiments of the present application.
Example nine
The embodiment of the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the computer program implements the method for training the risk user prediction model or the method for predicting the risk user provided in any embodiment of the present application.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of modules is merely a division of logical functions, and an actual implementation may have another division, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
Modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware form, and can also be realized in a form of hardware and a software functional module.
Program code for implementing the methods of the present application may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable risk user prediction model training apparatus such that the program codes, when executed by the processor or controller, cause the functions/acts specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, 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), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Further, while operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the application. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A risk user prediction model training method is characterized by comprising the following steps:
acquiring historical behavior data of each sample user;
performing time sequence feature extraction on the historical behavior data of each sample user to obtain time sequence feature data corresponding to each sample user;
taking the time sequence characteristic data corresponding to each sample user as training data, and training the risk user prediction model to obtain a trained risk user prediction model; wherein the risk user prediction model comprises a convolutional neural network layer and a gated cyclic unit layer.
2. The method according to claim 1, wherein the training the risk user prediction model by using the time series characteristic data corresponding to each sample user as training data to obtain the trained risk user prediction model comprises:
taking the time sequence characteristic data corresponding to each sample user as a piece of training data, inputting the training data into a convolutional neural network layer of the risk user prediction model, and performing first-stage model training on the risk user prediction model to obtain a characteristic vector corresponding to each piece of training data;
and inputting the feature vector corresponding to each piece of obtained training data into a gate control cycle unit layer of the risk user prediction model, and performing second-stage model training on the risk user prediction model to obtain a trained risk user prediction model.
3. The method of claim 1, wherein after obtaining the historical behavior data of each sample user, further comprising:
preprocessing the acquired historical behavior data of each sample user; the preprocessing comprises abnormal data processing and missing data processing;
the time sequence feature extraction of the historical behavior data of each sample user comprises the following steps:
and performing time sequence feature extraction on the preprocessed historical behavior data of each sample user.
4. The method according to claim 3, wherein the performing exception data processing on the acquired historical behavior data of each sample user includes:
screening the acquired historical behavior data of each sample user to acquire abnormal data;
and replacing the abnormal data by adopting a first value which is specified in advance.
5. The method of claim 3, wherein the historical behavior data comprises a plurality of attributes; the missing data processing of the acquired historical behavior data of each sample user comprises:
calculating the data missing rate corresponding to each attribute according to the historical behavior data corresponding to each attribute; the data missing rate corresponding to the attribute is the ratio of the number of the missing historical behavior data corresponding to the attribute to the total number of the historical behavior data in the acquired historical behavior data of all the sample users;
judging whether the data missing rate is larger than a preset threshold or not according to the data missing rate corresponding to each attribute;
if yes, deleting the historical behavior data corresponding to the attributes from the obtained historical behavior data of all the sample users;
and if not, filling the historical behavior data corresponding to the missing attributes by adopting a pre-specified second numerical value.
6. The method according to claim 2, wherein the training of the risk user prediction model using the time series feature data corresponding to each sample user as training data further comprises:
taking the time sequence characteristic data corresponding to each sample user as training data of a plurality of batches, and training the risk user prediction model in batches;
the method further comprises the following steps:
calculating loss weights of training data corresponding to different types of sample users in each batch by adopting a batch weight loss function; wherein the different types of sample users comprise risk type sample users and non-risk type sample users;
and aiming at each batch of training data, the calculated loss weight of the training data corresponding to different types of sample users in the batch is acted on the corresponding training data, and then the risk user prediction model is trained.
7. A method for predicting a risk user, comprising:
acquiring behavior data of a user to be predicted;
performing time sequence feature extraction on the behavior data of the user to be predicted to obtain corresponding time sequence feature data of the user to be predicted;
inputting the corresponding time sequence characteristic data of the user to be predicted into a trained risk user prediction model to obtain a prediction result; wherein the prediction result comprises that the user to be predicted is a risk user or the user to be predicted is a non-risk user, and the trained risk user prediction model is obtained by training the risk user prediction model by adopting the method of any one of claims 1 to 6.
8. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored by the memory to implement the method of any of claims 1-7.
9. A computer-readable storage medium having computer-executable instructions stored thereon, which when executed by a processor, perform the method of any one of claims 1-7.
10. A computer program product comprising a computer program, characterized in that the computer program realizes the method according to any of claims 1-7 when executed by a processor.
CN202210082286.7A 2022-01-24 2022-01-24 Risk user prediction model training method, prediction method, equipment and storage medium Pending CN114493839A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210082286.7A CN114493839A (en) 2022-01-24 2022-01-24 Risk user prediction model training method, prediction method, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210082286.7A CN114493839A (en) 2022-01-24 2022-01-24 Risk user prediction model training method, prediction method, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114493839A true CN114493839A (en) 2022-05-13

Family

ID=81475425

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210082286.7A Pending CN114493839A (en) 2022-01-24 2022-01-24 Risk user prediction model training method, prediction method, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114493839A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115208938A (en) * 2022-07-06 2022-10-18 中移互联网有限公司 User behavior control method and device and computer readable storage medium
CN115905642A (en) * 2023-01-03 2023-04-04 北京码牛科技股份有限公司 Method, system, terminal and storage medium for enhancing speech emotion
CN116205376A (en) * 2023-04-27 2023-06-02 北京阿帕科蓝科技有限公司 Behavior prediction method, training method and device of behavior prediction model

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115208938A (en) * 2022-07-06 2022-10-18 中移互联网有限公司 User behavior control method and device and computer readable storage medium
CN115208938B (en) * 2022-07-06 2023-08-01 中移互联网有限公司 User behavior control method and device and computer readable storage medium
CN115905642A (en) * 2023-01-03 2023-04-04 北京码牛科技股份有限公司 Method, system, terminal and storage medium for enhancing speech emotion
CN115905642B (en) * 2023-01-03 2023-05-05 北京码牛科技股份有限公司 Method, system, terminal and storage medium for enhancing speaking emotion
CN116205376A (en) * 2023-04-27 2023-06-02 北京阿帕科蓝科技有限公司 Behavior prediction method, training method and device of behavior prediction model
CN116205376B (en) * 2023-04-27 2023-10-17 北京阿帕科蓝科技有限公司 Behavior prediction method, training method and device of behavior prediction model

Similar Documents

Publication Publication Date Title
CN114493839A (en) Risk user prediction model training method, prediction method, equipment and storage medium
CN110782240B (en) Business data processing method and device, computer equipment and storage medium
CN108846520A (en) Overdue loan prediction technique, device and computer readable storage medium
CN109242672A (en) Refund information forecasting method, device and the computer readable storage medium of loan
CN108615096A (en) Server, the processing method of Financial Time Series and storage medium
CN108711047B (en) Automatic repayment method, system and terminal equipment
CN111275491A (en) Data processing method and device
CN108648810B (en) Data processing method and device for medical audit and computer readable storage medium
CN109285069B (en) Resource transfer method, device and server
CN110348705B (en) Method and apparatus for risk control
CN109284369B (en) Method, system, device and medium for judging importance of securities news information
CN109118376A (en) Medical insurance premium calculation principle method, apparatus, computer equipment and storage medium
CN110111208A (en) Declaration form data processing method, device, computer equipment and storage medium
CN108629685A (en) loan product attribute determining method and server
CN114298804A (en) Intelligent account checking method, system and computer readable storage medium
CN112950347B (en) Resource data processing optimization method and device, storage medium and terminal
CN110110970A (en) Virtual resource risk rating method, system, computer equipment and storage medium
CN109542764A (en) Webpage automated testing method, device, computer equipment and storage medium
CN113362162A (en) Wind control identification method and device based on network behavior data, electronic equipment and medium
CN115168848A (en) Interception feedback processing method based on big data analysis interception
CN114358903A (en) RPA-based multi-system accounting checking method and device and computer equipment
CN114445044A (en) Court execution checking and controlling case processing method and device combining RPA and AI
CN110322339B (en) Virtual resource management method, device, computer system and readable storage medium
CN108804640A (en) Based on packet method, apparatus, storage medium and the equipment for maximizing IV
CN117132414A (en) Account entry generation method, device, 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