Credit card overdue prediction method, device and electronic device based on graph embedding
By constructing a credit card overdue prediction model based on the graph embedding method, the problem of lack of credit card overdue prediction models in the existing technology is solved, and the accuracy of credit card overdue prediction is improved.
Patent Information
- Application Number
- CN202011520990.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-21
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2040-12-21
AI Technical Summary
The existing technology lacks methods for constructing a machine learning model for credit card overdue prediction and how to use the model for credit card overdue prediction.
Using a method based on graph embedding, by obtaining the target field content in the credit card bill data set, a heterogeneous graph is constructed, a meta-path is generated, a random walk is performed, the word embedding vector is calculated, spliced into training sample data, and a machine learning model is trained to detect credit card overdue predict.
It improves the accuracy of credit card overdue prediction, and can rely on graph embedding technology to accurately depict customer behavior routes and generate training sample data sets for credit card overdue prediction.
Smart Images

Figure CN112561688B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the financial field, and more specifically, to a credit card overdue prediction method based on graph embedding, a credit card overdue prediction device based on graph embedding, an electronic device, and a computer-readable storage medium. Background Art
[0002] Credit card delinquency prediction is an important topic in banking and financial services. A good credit card delinquency prediction model can provide good guidance for a series of business operations such as personal credit rating, customized collection plans, and credit card limit management. However, the relevant technology does not provide how to build a machine learning model for credit card delinquency prediction and how to use the machine learning model to predict credit card delinquency. Summary of the invention
[0003] One purpose of the embodiments of the present disclosure is to provide a new technical solution for credit card overdue prediction based on graph embedding.
[0004] According to a first aspect of the present disclosure, a method for predicting credit card overdue payments based on graph embedding is provided, comprising:
[0005] Get the contents of each target field in the credit card bill dataset;
[0006] Construct a heterogeneous graph based on the content of each target field;
[0007] Generate a meta path based on each target field;
[0008] Based on the generated meta-path, a random walk is performed on the heterogeneous graph to obtain a corresponding walk path;
[0009] Calculate the word embedding vector of the content of the target field corresponding to each node in each walking path;
[0010] For each piece of data in the credit card bill data set, concatenate the word embedding vectors of the contents of each target field of the piece of data to obtain a piece of training sample data, and finally obtain a training sample data set;
[0011] Using the training sample data set to train a machine learning model for credit card overdue prediction; and,
[0012] Credit card overdue payment prediction is performed based on the machine learning model.
[0013] Optionally, the method further comprises the step of obtaining the credit card bill dataset,
[0014] The step of obtaining the credit card bill dataset includes:
[0015] Acquire multiple credit card factor data tables; wherein the credit card factor data tables at least include a user transaction data table, a user attribute data table, a credit card data table, and a user default data table;
[0016] Performing splicing processing on the multiple credit card factor data tables to obtain a target credit card factor data table;
[0017] Aggregation processing is performed on the target credit card factor data table to obtain the credit card bill data set.
[0018] Optionally, obtaining the content of each target field in the credit card bill data set includes:
[0019] Extracting each attribute field in the credit card bill data set;
[0020] Based on the gradient boosting tree algorithm, calculate the feature importance value of each attribute field;
[0021] Obtaining each target field according to the feature importance value of each attribute field; and,
[0022] The content of each target field is obtained.
[0023] Optionally, obtaining each target field according to the feature importance value of each attribute field includes:
[0024] According to the descending order of the feature importance values of each attribute field, the attribute fields corresponding to the previously set number of feature importance values are obtained as each basic field;
[0025] When the value type of any of the basic fields is lower than the set value type threshold, the corresponding basic field is used as the first target basic field; wherein each basic field includes the first target basic field and the second target basic field except the first target basic field;
[0026] Performing field combination on each of the first target basic fields to obtain a combined field; and,
[0027] The second basic fields and the combined fields are used as the target fields.
[0028] Optionally, after obtaining the content of each target field in the credit card bill data set, the method further includes:
[0029] According to the set configuration rules, a corresponding serial number is configured for the content of each target field; wherein the set configuration rules satisfy the following items: the same serial number is configured for the same content of the target field of the same field type; different serial numbers are configured for different contents of the target field of the same field type; and different serial numbers are configured for the contents of the target field of different field types;
[0030] Save the mapping relationship between the content of each target field and the configured sequence number.
[0031] Optionally, constructing a heterogeneous graph according to the content of each target field includes:
[0032] A heterogeneous graph is constructed with the sequence number corresponding to the content of each target field as a node and the connection between two adjacent nodes as an edge.
[0033] Optionally, generating a meta path according to each target field includes:
[0034] Get the number of meta paths to be generated;
[0035] Taking any target field in each target field as a node, generating the number of meta-paths according to a set generation rule;
[0036] The generation rules of the settings satisfy the following items:
[0037] The field types of adjacent nodes in the meta-path are different;
[0038] The path length of the meta-path is less than or equal to a set path length threshold; and,
[0039] The field types of the start node and the end node of the meta-path are the same.
[0040] Optionally, performing a random walk on the heterogeneous graph based on the generated meta-path to obtain a corresponding walk path includes:
[0041] Obtaining the number of random walks performed on the anomaly graph;
[0042] For the i-th random walk of each meta-path, a node having the same field type as the starting node of the meta-path is selected from each node of the heterogeneous graph as the target node; wherein the value of i is any natural number from 1 to N, and N is the number of walks;
[0043] Taking the target node as the starting walking node, randomly selecting corresponding nodes on the heterogeneous graph for walking according to the node order in the meta-path, and obtaining the walking path of the i-th random walk of the meta-path.
[0044] Optionally, the content of each target field has a corresponding serial number, and each node in the heterogeneous graph is the serial number of the content of the corresponding target field.
[0045] After obtaining the corresponding walking path, it also includes:
[0046] Obtain mapping data of the mapping relationship between the content of each target field and the configured sequence number;
[0047] For each of the walking paths, the content of the target field corresponding to the sequence number of each node is obtained according to the mapping data and the sequence number of each node on the walking path.
[0048] Optionally, the calculating of the word embedding vector of the content of the target field corresponding to each node in each walking path includes:
[0049] Based on the natural language processing algorithm, the content of the target field of each node on each walking path is used as corpus data for training to obtain the word embedding vector of the content of each target field.
[0050] Optionally, for each piece of data in the credit card bill data set, concatenating the word embedding vectors of the contents of each target field of the piece of data to obtain a piece of training sample data, and finally obtaining the training sample data set, including:
[0051] For each piece of data in the credit card bill data set, obtaining the primary key field of the data from each target field;
[0052] Processing the word embedding vector of the content of the other target fields according to the field relationship between the other target fields and the primary key field;
[0053] Concatenating the word embedding vector of the content of the other target field after the processing with the word embedding vector of the content of the primary key field to obtain a piece of training sample data;
[0054] Based on the training sample data, a training sample data set is finally obtained.
[0055] Optionally, the processing of the word embedding vector of the content of the other target field according to the field relationship between the other target field and the primary key field includes:
[0056] When the field relationship between the primary key field and the other target field is a one-to-one relationship, retaining the word embedding vector of the content of the other target field; and,
[0057] When the field relationship between the primary key field and the other target fields is a one-to-many relationship, an average value of the word embedding vectors of the contents of the other target fields is obtained.
[0058] Optionally, the using the training sample data set to train a machine learning model for credit card overdue prediction includes:
[0059] At least one preset model training algorithm is used to train a machine learning model for credit card overdue prediction based on the training samples.
[0060] Optionally, the method further comprises:
[0061] In response to a triggering operation of configuring a walk parameter for executing a random walk process, a configuration interface is provided; wherein the walk parameter includes at least the number of meta-paths and the number of walks;
[0062] The wandering parameters are configured according to the configuration interface.
[0063] Optionally, the wandering parameters are parameters written based on the YAML specification.
[0064] According to a second aspect of the present disclosure, a credit card overdue prediction device based on graph embedding is also provided, comprising:
[0065] The first acquisition module is used to obtain the content of each target field in the credit card bill data set;
[0066] A construction module, used to construct a heterogeneous graph based on the content of each target field;
[0067] A generation module, used to generate a meta path based on each target field;
[0068] A second acquisition module is used to perform a random walk on the heterogeneous graph based on the generated meta-path to obtain a corresponding walk path;
[0069] A calculation module, used to calculate the word embedding vector of the content of the target field corresponding to each node in each walking path;
[0070] A concatenation module is used to concatenate the word embedding vectors of the contents of each target field of each piece of data in the credit card bill data set to obtain a piece of training sample data, and finally obtain a training sample data set;
[0071] A training module, used to train a machine learning model for credit card overdue prediction using the training sample data set; and
[0072] A prediction module is used to predict credit card overdue payments based on the machine learning model.
[0073] Optionally, the first acquisition module is further used to:
[0074] Acquire multiple credit card factor data tables; wherein the credit card factor data tables at least include a user transaction data table, a user attribute data table, a credit card data table, and a user default data table;
[0075] Performing splicing processing on the multiple credit card factor data tables to obtain a target credit card factor data table;
[0076] Aggregation processing is performed on the target credit card factor data table to obtain the credit card bill data set.
[0077] Optionally, the first acquisition module is specifically used to:
[0078] Extracting each attribute field in the credit card bill data set;
[0079] Based on the gradient boosting tree algorithm, calculate the feature importance value of each attribute field;
[0080] Obtaining each target field according to the feature importance value of each attribute field; and,
[0081] The content of each target field is obtained.
[0082] Optionally, the first acquisition module is specifically used to:
[0083] According to the descending order of the feature importance values of each attribute field, the attribute fields corresponding to the previously set number of feature importance values are obtained as the basic fields;
[0084] When the value type of any of the basic fields is lower than the set value type threshold, the corresponding basic field is used as the first target basic field; wherein each basic field includes the first target basic field and the second target basic field except the first target basic field;
[0085] Performing field combination on each of the first target basic fields to obtain a combined field; and,
[0086] The second basic fields and the combined fields are used as the target fields.
[0087] Optionally, the device further includes a first configuration module, configured to:
[0088] According to the set configuration rules, a corresponding serial number is configured for the content of each target field; wherein the set configuration rules satisfy the following items: the same serial number is configured for the same content of the target field of the same field type; different serial numbers are configured for different contents of the target field of the same field type; and different serial numbers are configured for the contents of the target field of different field types;
[0089] Save the mapping relationship between the content of each target field and the configured sequence number.
[0090] Optionally, the building block is specifically used for:
[0091] A heterogeneous graph is constructed with the sequence number corresponding to the content of each target field as a node and the connection between two adjacent nodes as an edge.
[0092] Optionally, the generating module is specifically used for:
[0093] Get the number of meta paths to be generated;
[0094] Taking any target field in each target field as a node, generating the number of meta-paths according to a set generation rule;
[0095] The generation rules of the settings satisfy the following items:
[0096] The field types of adjacent nodes in the meta-path are different;
[0097] The path length of the meta-path is less than or equal to a set path length threshold; and,
[0098] The field types of the start node and the end node of the meta-path are the same.
[0099] Optionally, the second acquisition module is specifically used to:
[0100] Obtaining the number of random walks performed on the anomaly graph;
[0101] For the i-th random walk of each meta-path, a node having the same field type as the starting node of the meta-path is selected from each node of the heterogeneous graph as the target node; wherein the value of i is any natural number from 1 to N, and N is the number of walks;
[0102] Taking the target node as the starting walking node, randomly selecting corresponding nodes on the heterogeneous graph for walking according to the node order in the meta-path, and obtaining the walking path of the i-th random walk of the meta-path.
[0103] Optionally, the second acquisition module is further used for:
[0104] Obtain mapping data of the mapping relationship between the content of each target field and the configured sequence number;
[0105] For each of the walking paths, the content of the target field corresponding to the sequence number of each node is obtained according to the mapping data and the sequence number of each node on the walking path.
[0106] Optionally, the calculation module is specifically used for:
[0107] Based on the natural language processing algorithm, the content of the target field of each node on each walking path is used as corpus data for training to obtain the word embedding vector of the content of each target field.
[0108] Optionally, the splicing module is specifically used for:
[0109] For each piece of data in the credit card bill data set, obtaining the primary key field of the data from each target field;
[0110] Processing the word embedding vector of the content of the other target fields according to the field relationship between the other target fields and the primary key field;
[0111] Concatenating the word embedding vector of the content of the other target field after the processing with the word embedding vector of the content of the primary key field to obtain a piece of training sample data;
[0112] Based on the training sample data, a training sample data set is finally obtained.
[0113] Optionally, the splicing module is specifically used for:
[0114] When the field relationship between the primary key field and the other target field is a one-to-one relationship, retaining the word embedding vector of the content of the other target field; and,
[0115] When the field relationship between the primary key field and the other target fields is a one-to-many relationship, an average value of the word embedding vectors of the contents of the other target fields is obtained.
[0116] Optionally, the training module is specifically used for:
[0117] At least one preset model training algorithm is used to train a machine learning model for credit card overdue prediction based on the training samples.
[0118] Optionally, the device further includes a second configuration module, configured to:
[0119] In response to a triggering operation of configuring a walk parameter for executing a random walk process, a configuration interface is provided; wherein the walk parameter includes at least the number of meta-paths and the number of walks;
[0120] The wandering parameters are configured according to the configuration interface.
[0121] Optionally, the wandering parameters are parameters written based on the YAML specification.
[0122] According to a third aspect of the present disclosure, there is also provided a device comprising at least one computing device and at least one storage device, wherein the at least one storage device is used to store instructions, and the instructions are used to control the at least one computing device to execute the method according to the first aspect above.
[0123] According to a fourth aspect of the present disclosure, a computer-readable storage medium is further provided, wherein a computer program is stored thereon, and when the computer program is executed by a processor, the method described in the first aspect above is implemented.
[0124] One beneficial effect of the present disclosure is that according to the method of the embodiment of the present disclosure, after obtaining the credit card bill data set, it can rely on graph embedding technology to process each target field and the content of each target field in the credit card bill data set, that is, accurately depict the customer behavior route to obtain the word embedding vector of the content of each target field, and for each data in the credit card bill data set, the word embedding vectors of the content of each target field of the data are spliced to obtain a training sample data, and finally obtain the training sample data set, and use the training sample data set to train a machine learning model for credit card overdue prediction, and then use the machine learning model to predict credit card overdue, thereby improving the accuracy of overdue prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0125] Further features and advantages of the present invention will become apparent from the following detailed description of exemplary embodiments of the present invention with reference to the attached drawings.
[0126] Figure 1 is a block diagram showing an example of a hardware configuration of an electronic device that can be used to implement an embodiment of the present disclosure;
[0127] Figure 2 A schematic diagram showing the flow of a credit card overdue prediction method based on graph embedding according to an embodiment of the present disclosure;
[0128] Figure 3 A schematic diagram showing a heterogeneous graph of an embodiment of the present disclosure is shown;
[0129] Figure 4a A walking schematic diagram of performing random walk based on a heterogeneous graph according to an embodiment of the present disclosure is shown;
[0130] Figure 4b A walking schematic diagram of performing random walk based on a heterogeneous graph according to another embodiment of the present disclosure is shown;
[0131] Figure 5 A flowchart of a credit card overdue prediction method based on graph embedding is shown as an example;
[0132] Figure 6 A principle block diagram of a credit card overdue prediction device based on graph embedding according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0133] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.
[0134] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
[0135] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0136] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0137] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0138] Hereinafter, various embodiments and examples according to embodiments of the present invention are described with reference to the accompanying drawings.
[0139] <Hardware Configuration>
[0140] The method of the embodiment of the present disclosure may be implemented by at least one electronic device, that is, the apparatus 6000 for implementing the method may be arranged on the at least one electronic device. Figure 1 The hardware structure of an arbitrary electronic device is shown. Figure 1 The electronic device shown may be a portable computer, a desktop computer, a workstation, a server, etc., or may be any other device having a computing device such as a processor and a storage device such as a memory, and is not limited here.
[0141] like Figure 1As shown, the electronic device 1000 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, and the like. Among them, the processor 1100 is used to execute a computer program. The computer program can be written in an instruction set of an architecture such as x86, Arm, RISC, MIPS, SSE, etc. The memory 1200 includes, for example, ROM (read-only memory), RAM (random access memory), a non-volatile memory such as a hard disk, and the like. The interface device 1300 includes, for example, a USB interface, a headphone interface, and the like. The communication device 1400 is, for example, capable of wired or wireless communication, and specifically may include Wifi communication, Bluetooth communication, 2G / 3G / 4G / 5G communication, and the like. The display device 1500 is, for example, a liquid crystal display screen, a touch display screen, and the like. The input device 1600 may include, for example, a touch screen, a keyboard, a somatosensory input, and the like. The electronic device 1000 may output voice information through the speaker 1700 , and may collect voice information through the microphone 1800 , etc.
[0142] Figure 1 The electronic device shown is merely illustrative and does not in any way imply any limitation on the present invention, its application or use. In the embodiment of the present disclosure, the memory 1200 of the electronic device 1000 is used to store instructions, and the instructions are used to control the processor 1100 to operate to perform the credit card overdue prediction method based on graph embedding of the embodiment of the present disclosure. Technicians can design instructions according to the scheme disclosed in the present invention. How instructions control the processor to operate is well known in the art, so it will not be described in detail here.
[0143] In one embodiment, a device is provided, including at least one computing device and at least one storage device, wherein the at least one storage device is used to store instructions, and the instructions are used to control the at least one computing device to execute the method according to any embodiment of the present disclosure.
[0144] The device may include at least one Figure 1 The electronic device 1000 shown is provided with at least one computing device such as a processor and at least one storage device such as a memory, which is not limited herein.
[0145] <Method Example>
[0146] In this embodiment, a credit card overdue prediction method based on graph embedding is provided. The credit card overdue prediction method based on graph embedding can be implemented by an electronic device, and the electronic device can be as follows: Figure 1The electronic device 1000 shown may be a server or a terminal device. That is, the method of this embodiment may be implemented by a server or a terminal device, or may be implemented by both a server and a terminal device.
[0147] In applications where a terminal device participates in the implementation of the method of this embodiment, the interaction may include human-computer interaction. In applications where a server participates in the implementation of the method of this embodiment, the interaction may include interaction between the server and the terminal device.
[0148] according to Figure 2 As shown, the credit card overdue prediction method based on graph embedding in this embodiment may include the following steps S2100 to S2800:
[0149] Step S2100, obtaining the content of each target field in the credit card bill data set.
[0150] The credit card bill dataset contains a large amount of credit card bill data.
[0151] The target field can be obtained based on the attribute field in the credit card bill dataset, and the target field is the composition field for constructing the heterogeneous graph. The target field can be fields such as user id, bill date, credit card type, historical default times, and last transaction interval. In other words, a piece of data in the credit card bill dataset can be: user id: user A, bill date: 20th, credit card type: Class A credit card, last transaction interval: 10, historical default times: 0.
[0152] In this embodiment, the credit card overdue prediction method based on graph embedding also includes the step of first obtaining a credit card bill data set, including: obtaining multiple credit card factor data tables; splicing the multiple credit card factor data tables to obtain a target credit card factor data table; aggregating the target credit card factor data table to obtain a credit card bill data set.
[0153] The above credit card factor data tables at least include a user transaction data table, a user attribute data table, a credit card data table and a user default data table.
[0154] The user transaction data table at least includes attribute fields such as user id, merchant id, transaction time, transaction amount, transaction type, etc. The user transaction data table includes a large amount of user transaction data.
[0155] The user attribute data table at least includes attribute fields such as user ID, user age, user education, user credit limit, etc. The user attribute data table includes a large amount of user attribute data.
[0156] The credit card data table at least includes attribute fields such as issuance time, validity period, promotion activities, etc. of different credit card categories. Among them, the credit card data table includes a large amount of credit card data
[0157] The user default data table at least includes attribute fields such as customer credit card default behavior records, etc. The user default data table includes a large amount of data related to user default.
[0158] According to this embodiment, several original data tables can be spliced to merge the original data tables into a wide table, and then the wide table can be aggregated to the bill granularity, that is, the credit card bill data, using aggregation methods such as mean and maximum, and then a credit card bill data set is obtained based on the credit card bill data. After obtaining the credit card bill data set, each target field and corresponding content in the credit card bill data set can be extracted.
[0159] According to this embodiment, after obtaining the credit card bill dataset, it can mark part of the data in the credit card bill dataset with a label indicating whether the bill is overdue, for example, it can mark 0 if the bill is not overdue, and mark 1 if the bill is overdue. Of course, it can also mark all the data in the credit card bill dataset with a label indicating whether the bill is overdue.
[0160] In this embodiment, obtaining the content of each target field in the credit card bill data set in step S2100 may further include the following steps S2110 to S2140:
[0161] Step S2110, extracting each attribute field in the credit card bill data set.
[0162] In this step S2110, the attribute fields extracted may be attribute fields such as user ID, billing date, credit card type, number of historical defaults, transaction interval, user education level, etc.
[0163] Step S2120, based on the gradient boosting tree algorithm, calculate the feature importance value of each attribute field.
[0164] In this step S2120, the feature importance output interface of the gradient boosting tree algorithm (Light Gradient Boosting Machine, LightGBM) is called to use the LightGBM model to calculate the feature importance value of each attribute field.
[0165] Step S2130, obtaining each target field according to the feature importance value of each attribute field.
[0166] In this step S2130, obtaining each target field according to the feature importance value of each attribute field may further include the following steps S2131 to S2134:
[0167] Step S2131, according to the descending sorting order of the feature importance values of each attribute field, obtain the attribute fields corresponding to the previously set number of feature importance values as each basic field.
[0168] The above set number can be a value set according to actual application scenarios and actual needs, and this embodiment does not limit it. For example, the attribute fields corresponding to the top 20% feature importance values can be obtained to form each basic field.
[0169] Each basic field includes the above first target basic field and a second target basic field except the first target basic field.
[0170] Step S2132: When the value type of any basic field is lower than the set value type threshold, the corresponding basic field is used as the first target basic field.
[0171] The set value type threshold may be a numerical value set according to actual application scenarios and actual needs, and this embodiment does not limit this.
[0172] It is understandable that among the extracted attribute fields, there are often cases where the value types of some attribute fields are uneven. At this time, if the attribute field has fewer values and is directly used as a node to construct a heterogeneous graph, the degree of the node will be too high, affecting the use effect of the heterogeneous graph. Therefore, it is necessary to combine attribute fields with fewer value types to balance the value types of each node. The combined field is input into the heterogeneous graph as a combined field as a node.
[0173] For example, the attribute field is a credit card category field, and the value types of the credit card category are 6, that is, there are 6 categories of credit cards. Since the value types of the credit card category are lower than the set value type threshold, the credit card category field can be used as the first target basic field.
[0174] For another example, the attribute field is the cardholder's financial level field, and the value types of the cardholder's financial level are 5, that is, there are 5 levels. Since the value types of the cardholder's financial level field are lower than the set value type threshold, the cardholder's financial level field can be used as the first target basic field.
[0175] For another example, the attribute field is a billing cycle field, and the value types of the billing cycle are 31, that is, there are 31 categories. Since the value types of the billing cycle field are lower than the set value type threshold, the billing cycle field can be used as the first target basic field.
[0176] Step S2133: perform field combination on each first target basic field to obtain each combined field.
[0177] Continuing with the example of step S2132 above, since the value types of the credit card category field, the cardholder financial level field, and the billing cycle field are all less than the set value type threshold, if the field is used as a node alone, the number of nodes will be too high due to the small number of value types, which will cause the calculation amount of the heterogeneous graph to expand and cannot be calculated effectively. Here, these categories can be combined to form a combined node of "card-person-account", and its categories will increase to 900 categories of 6*5*30, effectively reducing the degree and facilitating the calculation process of the heterogeneous graph.
[0178] Step S2134: taking each second basic field and each combined field as a target field.
[0179] The above basic fields include a first target basic field and a second target basic field except the first target basic field.
[0180] According to the above steps S2131 to S2134, it is possible to combine attribute fields with fewer value types, thereby balancing the value types of each node.
[0181] Step S2140, obtaining the content of each target field.
[0182] In this step S2140, the target fields include user id, billing date, credit card type, last transaction interval, and historical default times. That is to say, a piece of data in the credit card bill data set can be: user id: user A, billing date: 20th, credit card type: Class A credit card, last transaction interval: 10, historical default times: 0.
[0183] In this embodiment, after obtaining the content of each target field in the credit card bill data set, the credit card overdue prediction based on graph embedding also includes: configuring a corresponding serial number for the content of each target field according to the set configuration rules; and saving the mapping relationship between the content of each target field and the configured serial number.
[0184] The configuration rules set above satisfy the following items: configuring the same sequence number for the same content of target fields of the same field type; configuring different sequence numbers for different contents of target fields of the same field type; and configuring different sequence numbers for the contents of target fields of different field types.
[0185] It can be understood that what is obtained according to the above step S2100 is the content of each target field in the credit card bill data set in the original value form, and for the construction of a heterogeneous graph, it requires serialized data as input, so the content of each target field also needs to be serialized.
[0186] In this embodiment, when a continuous field is retained, it is also necessary to perform bucket processing on the continuous field, and the number of buckets is kept similar to the types of values of other fields.
[0187] In this embodiment, the content of each target field may be numbered in sequence, and after sorting by field content, the sequence numbers are accumulated starting from 1, and the sequence numbers do not increase when the content is the same. For example, [amount 1, amount 2, amount 3, amount 1], such a sequence is numbered as [1, 2, 3, 1], wherein the first three amounts are not repeated, so they have independent sequence numbers, and the fourth amount is repeated with the first, so the sequence number is also the same as the first. After obtaining the sequence numbers of the contents of each target field, the mapping relationship between the contents of each target field and the configured sequence numbers can be saved to facilitate the use in subsequent steps.
[0188] After obtaining the contents of each target field in the credit card bill data, enter:
[0189] Step S2200, constructing a heterogeneous graph according to the content of each target field.
[0190] In this embodiment, after obtaining the content of each target field in the credit card bill data set according to the above step S2200, a heterogeneous graph can be constructed according to this step S2200.
[0191] In this embodiment, step S2200 of constructing a heterogeneous graph according to the content of each target field may further include: constructing a heterogeneous graph using the sequence numbers corresponding to the content of each target field as nodes and the connections between two adjacent nodes as edges.
[0192] In this embodiment, the field contents of the two target fields are considered to be connected, and all edges required by the current heterogeneous graph can be generated. At the same time, the processed fields need to be combined in pairs. The constructed heterogeneous graph has the following characteristics: nodes are reachable in pairs, and two nodes are reachable in both directions.
[0193] For example, take a piece of data in the credit card bill data as an example: "User id: user A, billing date: 20th, credit card type: Class A credit card, last transaction interval: 10, historical default times: 0 times", the data after serialization can be: 1, 5, 9, 20, 23, where 1 is the serial number of user A, 5 is the serial number of the billing date 20th, 9 is the serial number of Class A credit card, 20 is the serial number of the last transaction interval 10, and 23 is the serial number of the historical default times 0. Figure 3 It is understandable that the sequence number of the content of each target field can also be the field type of the target field, for example Figure 4a and Figure 4bA, B, and C in A-1, A-5, B-3, B-9, C-2, and C-6 represent the field types of different target fields. For example, A represents the amount field, B represents the credit card type field, and C represents the billing date field.
[0194] After constructing a heterogeneous graph based on the contents of each target field, proceed to:
[0195] Step S2300: Generate a meta-path based on each target field.
[0196] In this embodiment, after a meta-path is generated based on each target field according to step S2300, a random walk can be performed on the heterogeneous graph based on the generated meta-path to obtain a corresponding walk path.
[0197] In this embodiment, generating a meta-path based on each target field in step S2300 may further include the following steps S2310 to S2320:
[0198] Step S2310, obtaining the number of meta-paths to be generated.
[0199] The number of meta-paths may be a value set according to actual application scenarios and actual needs, and is not limited in this embodiment.
[0200] Step S2320 , taking any target field among the target fields as a node, generating the number of meta-paths according to the set generation rule.
[0201] The set generation rule satisfies the following items: the field types of adjacent nodes in the meta-path are different; the path length of the meta-path is less than or equal to the set path length threshold; and the field types of the start node and the end node of the meta-path are the same.
[0202] The set path length threshold may be a value set according to actual application scenarios and actual needs, and the set path length threshold may be 6.
[0203] Taking the setting quantity as 3 and the setting path length threshold as 6 as an example, 3 meta-paths need to be generated, and the length of each meta-path is less than or equal to 6. At the same time, the meta-path must start with a node of a certain type and end with a node of that type. At the same time, the meta-path does not include continuous repeated node types. Here, the target field types include A, B, C, D, E, and F. Here, the first meta-path generated can be ACEFA, the second meta-path generated can be FDECF, and the third meta-path generated can be [A, B, C, A].
[0204] After generating the meta path based on each target field, enter:
[0205] Step S2400: Based on the generated meta-path, a random walk is performed on the heterogeneous graph to obtain a corresponding walk path.
[0206] In this embodiment, random walking is performed according to the setting of the meta-path. The process of random walking is the process of continuously selecting paths to move forward on the heterogeneous graph according to the meta-path. Whenever it needs to go to the next node, the probability of walking to any node connected to the current node is equal.
[0207] In this embodiment, in step S2400, based on the generated meta-path, random walking is performed on the heterogeneous graph to obtain the corresponding walking path, which may further include the following steps S2410 to S2430:
[0208] Step S2410, obtaining the number of random walks on the anomaly graph.
[0209] The number of walks may be a value set according to actual application scenarios and actual needs, and this embodiment does not limit this.
[0210] Step S2420: For the i-th random walk of each meta-path, a node having the same field type as the start node of the meta-path is selected from each node of the heterogeneous graph as a target node.
[0211] The value of i is any natural number from 1 to N, where N is the number of walks.
[0212] Step S2430, taking the target node as the starting walking node, randomly selecting corresponding nodes on the heterogeneous graph according to the node order in the meta-path to walk, and obtaining the walking path of the ith random walk of the meta-path
[0213] Next, take the meta-path [A, B, C, A] and walk 2 times. Figure 4a and Figure 4b The above step S2420 and this step S2430 are described in detail by taking the random walk on the heterogeneous graph shown in FIG. Figure 4a and Figure 4b Only six nodes on the heterogeneous graph are shown, and the connection relationship between the six nodes is not drawn. The six nodes may be A-1, A-5, B-3, B-9, C-2, and C-5 respectively.
[0214] For the first random walk of this metapath, we can get Figure 4a Randomly select a type A node from the six nodes in the heterogeneous graph as the target node. For example, take A-1 as the target node, then take A-1 as the starting walking node, and randomly select the corresponding nodes on the heterogeneous graph in the order of ABCA for the first walk. The walking path of the first random walk of the meta-path can be obtained as Figure 4aA-1, B-9, C-2, A-5 shown.
[0215] For the second random walk of this metapath, we can get Figure 4b Randomly select a type A node from the six nodes in the heterogeneous graph as the target node. For example, take A-5 as the target node, then take A-5 as the starting walking node, and randomly select the corresponding nodes on the heterogeneous graph in the order of ABCA for the first walk. The walking path of the first random walk of the meta-path can be obtained as Figure 4b A-5, B-3, C-2, A-5 shown.
[0216] It is understandable that for each meta-path, each different starting walking node value will trigger a walking process. When all preset meta-paths are completed in the above walking manner, the random walking process is completed.
[0217] In this embodiment, since the wandering process records the serial number of each node, it is necessary to use the previously saved mapping between the content of the target field corresponding to each node and the serial number to map the node sequence back to the content of the target field corresponding to the node and save it. Here, after obtaining the corresponding wandering path, the credit card overdue prediction method based on graph embedding also includes: obtaining mapping data of the mapping relationship between the content of each target field and the configured serial number; for each wandering path, according to the mapping data and the serial number of each node on the wandering path, obtaining the content of the target field corresponding to the serial number of each node.
[0218] For example, the sequence number of a certain walking path is: 2, 4, 1, 9, 3, 5, and the values can be 'A', 'beijing', 20, 'CCB', 99.
[0219] After performing a random walk on the heterogeneous graph based on the generated meta-path and obtaining the corresponding walk path, proceed to:
[0220] Step S2500, calculating the word embedding vector of the content of the target field corresponding to each node in each walking path.
[0221] In this embodiment, calculating the word embedding vector of the content of the target field corresponding to each node in each wandering path in step S2500 may further include: based on a natural language processing algorithm, using the content of the target field corresponding to each node on each wandering path as corpus data for training to obtain the word embedding vector of the content of each target field.
[0222] In this embodiment, skip-gram is used as the underlying algorithm, and the content combination of the target field corresponding to the nodes formed by each walking path is regarded as corpus data for training, so as to obtain the word embedding vector of each word, that is, each node value.
[0223] After calculating the word embedding vector of the target field content corresponding to each node in each walk path, enter:
[0224] Step S2600: for each piece of data in the credit card bill data set, the word embedding vectors of the contents of each target field of the piece of data are concatenated to obtain a piece of training sample data, and finally a training sample data set is obtained.
[0225] According to the above steps, the content of each target field in each piece of data in the credit card bill data set is replaced with its own word embedding vector. Here, the word embedding vectors need to be spliced to obtain training sample data, and then form a training sample data set. It can be understood that the training sample data set can be divided into a training data set and a validation data set, and each piece of data in the training data set has a label indicating whether the bill is overdue.
[0226] In this embodiment, for each piece of data in the credit card bill data set, this step S2600 concatenates the word embedding vectors of the contents of each target field of the piece of data to obtain a piece of training sample data, and finally obtaining the training sample data set may further include the following steps S2610 to S2640:
[0227] Step S2610: For each piece of data in the credit card bill data set, the primary key field of the data is obtained from each target field.
[0228] The word embedding vector of the primary key field of the data must be retained. For example, if the primary key field is the customer number, the word embedding vector corresponding to the node is the most important word embedding vector, which is concatenated and retained.
[0229] Step S2620, processing the word embedding vectors of the contents of other target fields according to the field relationship between other target fields and the primary key field.
[0230] The word embedding vectors of other fields of the data can be selectively retained. Other fields contain a large amount of long-tail information and need to be retained as an auxiliary to the primary key field.
[0231] In this embodiment, in step S2620, processing the word embedding vector of the content of the other target fields according to the field relationship between the other target fields and the primary key field may further include:
[0232] The first case: When the field relationship between the primary key field and other target fields is one-to-one, the word embedding vectors of the contents of other target fields are retained.
[0233] The above one-to-one relationship means that one primary key field will only correspond to one related field. For example, if the primary key field is the customer number and the related field is the customer's row ID, it is a one-to-one relationship.
[0234] In this case, if the primary key field and the field to be retained have a one-to-one relationship, they are directly concatenated and retained.
[0235] In the second case, when the field relationship between the primary key field and other target fields is a one-to-many relationship, the average value of the word embedding vectors of the contents of other target fields is obtained.
[0236] A one-to-many relationship means that the related fields have multiple values. For example, if the primary key is the customer number and the related field is the user's historical purchase of products, it is a one-to-many relationship.
[0237] In this case, if the primary key field and the field to be retained are in a one-to-many relationship, the average of all vectors of the field is taken and then concatenated and retained.
[0238] Step S2630: Concatenate the processed word embedding vectors of the contents of other target fields with the word embedding vectors of the contents of the primary key field to obtain a piece of training sample data.
[0239] Step S2640: finally obtaining a training sample data set based on the training sample data.
[0240] For each piece of data in the credit card bill dataset, the word embedding vectors of the content of each target field of the data are concatenated to obtain a training sample data. After finally obtaining the training sample data set, enter:
[0241] Step S2700, using the training sample data set to train a machine learning model for credit card overdue prediction.
[0242] In this embodiment, the training data set in the training sample data set can be used to train a machine learning model for credit card overdue prediction.
[0243] In this embodiment, training a machine learning model for credit card overdue prediction using a training sample data set in step S2700 may further include: using at least one preset model training algorithm to train a machine learning model for credit card overdue prediction based on training samples.
[0244] The preset model training algorithm can be the above LightGBM algorithm.
[0245] After training a machine learning model for credit card overdue prediction using the training sample data set, proceed to:
[0246] Step S2800, predicting credit card overdue payments based on a machine learning model.
[0247] In this embodiment, the verification data set in the training sample data set can be used to predict credit card overdue payments based on the machine learning model, and then obtain the predicted label for each verification data. The predicted label is a label indicating whether the bill is overdue. If the bill is overdue, the label is 1, and if the bill is not overdue, the label is 0.
[0248] According to the method of the embodiment of the present disclosure, after obtaining the credit card bill data set, it can rely on graph embedding technology to process each target field and the content of each target field in the credit card bill data set, that is, accurately depict the customer behavior route to obtain the word embedding vector of the content of each target field, and for each data in the credit card bill data set, the word embedding vector of the content of each target field of the data is spliced to obtain a training sample data, and finally obtain the training sample data set, and use the training sample data set to train a machine learning model for credit card overdue prediction, and then use the machine learning model to predict credit card overdue, thereby improving the accuracy of overdue prediction.
[0249] In one embodiment, the credit card overdue prediction based on graph embedding may also include: providing a configuration interface in response to a triggering operation of configuring walk parameters for executing a random walk process; and configuring the walk parameters according to the configuration interface.
[0250] In this embodiment, the walking parameters at least include the number of meta-paths and the number of walking times. Moreover, the walking parameters are parameters written based on the YAML specification.
[0251] In this embodiment, the configuration interface may be any entry for a user to input information, such as an input box, a drop-down list, a voice input entry, etc., and is not limited here.
[0252] In this embodiment, other parameters can also be configured through the configuration interface, such as the table name of the above credit card factor data table, the storage path of the machine learning model, and the parameters of the gradient boosting tree algorithm.
[0253] <Example>
[0254] Next, we will show an example of a credit card overdue prediction method based on graph embedding. Figure 5 As shown, the credit card overdue prediction method based on graph embedding may include the following steps:
[0255] Step S5010, obtaining a credit card bill dataset.
[0256] Step S5020, obtaining each target field and the content of each target field in the credit card bill data set.
[0257] Step S5030: According to the set configuration rules, a corresponding sequence number is configured for the content of each target field.
[0258] Step S5040, constructing a heterogeneous graph with the sequence number corresponding to the content of each target field as a node and the connection between two adjacent nodes as an edge.
[0259] Step S5050: Generate a meta-path according to each target field.
[0260] Step S5060: Based on the generated meta-path, a random walk is performed on the heterogeneous graph to obtain a corresponding walk path.
[0261] Step S5070, calculating the word embedding vector of the content of the target field corresponding to each node in each walking path.
[0262] Step S5080: for each piece of data in the credit card bill data set, the word embedding vectors of the contents of each target field of the piece of data are concatenated to obtain a piece of training sample data, and finally a training sample data set is obtained.
[0263] Step S5090, using the training sample data set to train a machine learning model for credit card overdue prediction.
[0264] Step S50100, predicting credit card overdue payments based on the machine learning model.
[0265] <Device Example>
[0266] In this embodiment, a credit card overdue prediction device 6000 based on graph embedding is provided. Figure 6 As shown, it includes a first acquisition module 6100, a construction module 6200, a generation module 6300, a second acquisition module 6400, a calculation module 6500, a splicing module 6600, a training module 6700 and a prediction module 6800.
[0267] The first acquisition module 6100 is used to acquire the content of each target field in the credit card bill data set.
[0268] The construction module 6200 is used to construct a heterogeneous graph according to the content of each target field.
[0269] The generating module 6300 is used to generate a meta-path based on each target field.
[0270] The second acquisition module 6400 is used to perform a random walk on the heterogeneous graph based on the generated meta-path to obtain a corresponding walk path.
[0271] The calculation module 6500 is used to calculate the word embedding vector of the content of the target field corresponding to each node in each walking path.
[0272] The concatenation module 6600 is used to concatenate the word embedding vectors of the contents of each target field of each piece of data in the credit card bill data set to obtain a piece of training sample data, and finally obtain a training sample data set.
[0273] The training module 6700 is used to train a machine learning model for credit card overdue prediction using the training sample data set.
[0274] Prediction module 6800 is used to predict credit card overdue payments based on the machine learning model.
[0275] In one embodiment, the first acquisition module 6100 is further used to: acquire multiple credit card factor data tables; wherein the credit card factor data tables at least include a user transaction data table, a user attribute data table, a credit card data table, and a user default data table; perform splicing processing on the multiple credit card factor data tables to obtain a target credit card factor data table; perform aggregation processing on the target credit card factor data table to obtain the credit card bill data set.
[0276] In one embodiment, the first acquisition module 6100 is specifically used to: extract each attribute field in the credit card bill data set; calculate the feature importance value of each attribute field based on the gradient boosting tree algorithm; obtain each target field according to the feature importance value of each attribute field; and obtain the content of each target field.
[0277] In one embodiment, the first acquisition module 6100 is specifically used to: acquire a set number of attribute fields corresponding to feature importance values as basic fields according to the descending sort order of the feature importance values of each attribute field; when the value type of any of the basic fields is lower than the set value type threshold, use the corresponding basic field as the first target basic field.
[0278] Among them, each basic field includes a first target basic field and a second target basic field except the first target basic field; each of the first target basic fields is combined to obtain a combined field; and each of the second basic fields and each of the combined fields is used as each of the target fields.
[0279] In one embodiment, the device also includes a first configuration module (not shown in the figure), which is used to: configure a corresponding serial number for the content of each target field according to a set configuration rule; wherein the set configuration rule satisfies the following items: configure the same serial number for the same content of target fields of the same field type; configure different serial numbers for different contents of target fields of the same field type; and configure different serial numbers for the contents of target fields of different field types; and save the mapping relationship between the content of each target field and the configured serial number.
[0280] In one embodiment, the construction module 6200 is specifically used to construct a heterogeneous graph using the sequence numbers corresponding to the contents of each target field as nodes and the connections between two adjacent nodes as edges.
[0281] In one embodiment, the generating module 6300 is specifically used to: obtain the number of meta-paths to be generated; and generate the number of meta-paths according to a set generating rule by taking any target field in each target field as a node.
[0282] The set generation rule satisfies the following items: the field types of adjacent nodes in the meta-path are different; the path length of the meta-path is less than or equal to a set path length threshold; and the field types of the start node and the end node of the meta-path are the same.
[0283] In one embodiment, the second acquisition module 6400 is specifically used to: obtain the number of random walks on the abnormal graph; for the i-th random walk of each meta-path, select a node with the same field type as the starting node of the meta-path from each node of the heterogeneous graph as the target node; wherein the value of i is a natural number from 1 to N, and N is the number of walks; taking the target node as the starting walking node, randomly selecting corresponding nodes on the heterogeneous graph for walking according to the node order in the meta-path, and obtaining the walking path of the i-th random walk of the meta-path.
[0284] In one embodiment, the second acquisition module 6400 is also used to: obtain mapping data of the mapping relationship between the content of each target field and the configured serial number; for each of the wandering paths, obtain the content of the target field corresponding to the serial number of each node based on the mapping data and the serial number of each node on the wandering path.
[0285] In one embodiment, the computing module 6500 is specifically used to: based on a natural language processing algorithm, train the content of the target field of each node on each walking path as corpus data to obtain a word embedding vector of the content of each target field.
[0286] In one embodiment, the splicing module 6600 is specifically used to: for each piece of data in the credit card bill data set, obtain the primary key field of the data from each target field; process the word embedding vector of the content of the other target fields according to the field relationship between the other target fields and the primary key field; splice the word embedding vector of the content of the other target fields after the processing with the word embedding vector of the content of the primary key field to obtain a training sample data; based on the training sample data, finally obtain the training sample data set.
[0287] In one embodiment, the splicing module 6600 is specifically used to: retain the word embedding vector of the content of the other target field when the field relationship between the primary key field and the other target fields is a one-to-one relationship; and obtain the average value of the word embedding vector of the content of the other target field when the field relationship between the primary key field and the other target fields is a one-to-many relationship.
[0288] In one embodiment, the training module 6700 is specifically used to: utilize at least one preset model training algorithm to train a machine learning model for credit card overdue prediction based on the training samples.
[0289] In one embodiment, the device also includes a second configuration module (not shown in the figure), which is used to: provide a configuration interface in response to a trigger operation of configuring the walk parameters of the random walk process; wherein the walk parameters include at least the number of meta-paths and the number of walks; and configure the walk parameters according to the configuration interface.
[0290] In one embodiment, the walking parameters are parameters written based on the YAML specification.
[0291] <Storage Medium Embodiment>
[0292] This embodiment provides a computer-readable storage medium, wherein a computer program is stored thereon, and when the computer program is executed by a processor, the method according to any one of the above method embodiments is implemented.
[0293] The present invention may be a device, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.
[0294] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0295] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0296] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present invention.
[0297] Various aspects of the present invention are described herein with reference to the flow charts and / or block diagrams of the methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each box of the flow chart and / or block diagram and the combination of each box in the flow chart and / or block diagram can be implemented by computer-readable program instructions.
[0298] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0299] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0300] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a part of a module, a program segment or an instruction, and a part of the module, a program segment or an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.
[0301] Embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.
Claims
1. A credit card overdue prediction method based on graph embedding, comprising: Obtaining the content of each target field in a credit card bill data set, wherein the credit card bill data set is obtained based on a plurality of credit card factor data tables, the credit card factor data tables at least including a user transaction data table, a user attribute data table, a credit card data table, and a user default data table, and the target field is obtained based on an attribute field in the credit card bill data set; Constructing a heterogeneous graph according to the content of each target field, wherein nodes in the heterogeneous graph are reachable to each other and two directions between two nodes are reachable; Generate a meta path based on each target field; Based on the generated meta-path, a random walk is performed on the heterogeneous graph to obtain a corresponding walk path; Calculate the word embedding vector of the content of the target field corresponding to each node in each walking path; For each piece of data in the credit card bill data set, concatenate the word embedding vectors of the contents of each target field of the piece of data to obtain a piece of training sample data, and finally obtain a training sample data set; Using the training sample data set to train a machine learning model for credit card overdue prediction; and, Credit card overdue prediction is performed based on the machine learning model. The step of generating a meta-path according to each target field includes: Get the number of meta paths to be generated; Taking any target field in each target field as a node, generating the number of meta-paths according to a set generation rule; The generation rules of the settings satisfy the following items: The field types of adjacent nodes in the meta-path are different; The path length of the meta-path is less than or equal to a set path length threshold; and, The field types of the start node and the end node of the meta-path are the same.
2. The method according to claim 1, wherein: The method further comprises the step of obtaining the credit card bill dataset, The step of obtaining the credit card bill dataset includes: Get multiple credit card factor data tables; Performing splicing processing on the multiple credit card factor data tables to obtain a target credit card factor data table; Aggregation processing is performed on the target credit card factor data table to obtain the credit card bill data set.
3. The method according to claim 1, wherein: The method of obtaining the content of each target field in the credit card bill data set includes: Extracting each attribute field in the credit card bill data set; Based on the gradient boosting tree algorithm, calculate the feature importance value of each attribute field; Obtaining each target field according to the feature importance value of each attribute field; and, The content of each target field is obtained.
4. The method according to claim 3, wherein: The step of obtaining each target field according to the feature importance value of each attribute field includes: According to the descending order of the feature importance values of each attribute field, the attribute fields corresponding to the previously set number of feature importance values are obtained as each basic field; When the value type of any of the basic fields is lower than the set value type threshold, the corresponding basic field is used as the first target basic field; wherein each basic field includes the first target basic field and the second target basic field except the first target basic field; Performing field combination on each of the first target basic fields to obtain a combined field; and, Each of the second target base fields and each of the combination fields are used as each of the target fields.
5. The method according to claim 1, wherein: After obtaining the content of each target field in the credit card bill data set, it also includes: According to the set configuration rules, a corresponding serial number is configured for the content of each target field; wherein the set configuration rules satisfy the following items: the same serial number is configured for the same content of the target field of the same field type; different serial numbers are configured for different contents of the target field of the same field type; and different serial numbers are configured for the contents of the target field of different field types; Save the mapping relationship between the content of each target field and the configured sequence number.
6. The method according to claim 5, wherein: The step of constructing a heterogeneous graph according to the content of each target field includes: A heterogeneous graph is constructed with the sequence number corresponding to the content of each target field as a node and the connection between two adjacent nodes as an edge.
7. The method according to claim 1, wherein: The step of performing a random walk on the heterogeneous graph based on the generated meta-path to obtain a corresponding walk path includes: Obtaining the number of random walks performed on the heterogeneous graph; For the i-th random walk of each meta-path, a node having the same field type as the starting node of the meta-path is selected from each node of the heterogeneous graph as the target node; wherein the value of i is any natural number from 1 to N, and N is the number of walks; Taking the target node as the starting walking node, randomly selecting corresponding nodes on the heterogeneous graph for walking according to the node order in the meta-path, and obtaining the walking path of the i-th random walk of the meta-path.
8. The method according to claim 1, wherein: The content of each target field has a corresponding serial number, and each node in the heterogeneous graph is the serial number of the content of the corresponding target field. After obtaining the corresponding walking path, it also includes: Obtain mapping data of the mapping relationship between the content of each target field and the configured sequence number; For each of the walking paths, the content of the target field corresponding to the sequence number of each node is obtained according to the mapping data and the sequence number of each node on the walking path.
9. The method according to claim 8, wherein: The calculating of the word embedding vector of the content of the target field corresponding to each node in each walking path includes: Based on the natural language processing algorithm, the content of the target field of each node on each walking path is used as corpus data for training to obtain the word embedding vector of the content of each target field.
10. The method according to claim 1, wherein for each piece of data in the credit card bill data set, the word embedding vectors of the contents of each target field of the piece of data are concatenated to obtain a piece of training sample data, and finally the training sample data set is obtained, comprising: For each piece of data in the credit card bill data set, obtaining the primary key field of the data from each target field; Processing the word embedding vector of the content of the other target fields according to the field relationship between the other target fields and the primary key field; Concatenating the word embedding vector of the content of the other target field after the processing with the word embedding vector of the content of the primary key field to obtain a piece of training sample data; Based on the training sample data, a training sample data set is finally obtained.
11. The method according to claim 10, wherein: The processing of the word embedding vector of the content of the other target field according to the field relationship between the other target field and the primary key field includes: When the field relationship between the primary key field and the other target field is a one-to-one relationship, retaining the word embedding vector of the content of the other target field; and, When the field relationship between the primary key field and the other target fields is a one-to-many relationship, an average value of the word embedding vectors of the contents of the other target fields is obtained.
12. The method according to claim 1, wherein: The method of using the training sample data set to train a machine learning model for credit card overdue prediction includes: At least one preset model training algorithm is used to train a machine learning model for credit card overdue prediction based on the training samples.
13. The method according to claim 7, wherein: The method further comprises: In response to a triggering operation of configuring a walk parameter for executing a random walk process, a configuration interface is provided; wherein the walk parameter includes at least the number of meta-paths and the number of walks; The wandering parameters are configured according to the configuration interface.
14. The method according to claim 13, wherein: The walk parameters are parameters written based on the YAML specification.
15. A credit card overdue prediction device based on graph embedding, comprising: A first acquisition module is used to acquire the content of each target field in a credit card bill data set, wherein the credit card bill data set is obtained based on a plurality of credit card factor data tables, the credit card factor data tables at least including a user transaction data table, a user attribute data table, a credit card data table, and a user default data table, and the target field is obtained based on an attribute field in the credit card bill data set; A construction module, used to construct a heterogeneous graph according to the content of each target field, wherein nodes in the heterogeneous graph are reachable from one another and two directions between two nodes are reachable; A generation module, used to generate a meta path based on each target field; A second acquisition module is used to perform a random walk on the heterogeneous graph based on the generated meta-path to obtain a corresponding walk path; A calculation module, used to calculate the word embedding vector of the content of the target field corresponding to each node in each walking path; A concatenation module is used to concatenate the word embedding vectors of the contents of each target field of each piece of data in the credit card bill data set to obtain a piece of training sample data, and finally obtain a training sample data set; A training module, used to train a machine learning model for credit card overdue prediction using the training sample data set; and A prediction module, used to predict credit card overdue payments based on the machine learning model, Wherein, the generation module is specifically used for: Get the number of meta paths to be generated; Taking any target field in each target field as a node, generating the number of meta-paths according to a set generation rule; The generation rules of the settings satisfy the following items: The field types of adjacent nodes in the meta-path are different; The path length of the meta-path is less than or equal to a set path length threshold; and, The field types of the start node and the end node of the meta-path are the same.
16. The device according to claim 15, wherein: The first acquisition module is further used for: Get multiple credit card factor data tables; Performing splicing processing on the multiple credit card factor data tables to obtain a target credit card factor data table; Aggregation processing is performed on the target credit card factor data table to obtain the credit card bill data set.
17. The device according to claim 15, wherein: The first acquisition module is specifically used for: Extracting each attribute field in the credit card bill data set; Based on the gradient boosting tree algorithm, calculate the feature importance value of each attribute field; Obtaining each target field according to the feature importance value of each attribute field; as well as, The content of each target field is obtained.
18. The device according to claim 17, wherein: The first acquisition module is specifically used for: According to the descending order of the feature importance values of each attribute field, the attribute fields corresponding to the previously set number of feature importance values are obtained as each basic field; When the value type of any of the basic fields is lower than the set value type threshold, the corresponding basic field is used as the first target basic field; wherein each basic field includes the first target basic field and the second target basic field except the first target basic field; Performing field combination on each of the first target basic fields to obtain a combined field; and, Each of the second target base fields and each of the combination fields are used as each of the target fields.
19. The device according to claim 15, wherein: The device also includes a first configuration module, configured to: According to the set configuration rules, a corresponding serial number is configured for the content of each target field; wherein the set configuration rules satisfy the following items: the same serial number is configured for the same content of the target field of the same field type; different serial numbers are configured for different contents of the target field of the same field type; and different serial numbers are configured for the contents of the target field of different field types; Save the mapping relationship between the content of each target field and the configured sequence number.
20. The device according to claim 19, wherein The building blocks are specifically used for: A heterogeneous graph is constructed with the sequence number corresponding to the content of each target field as a node and the connection between two adjacent nodes as an edge.
21. The device according to claim 15, wherein: The second acquisition module is specifically used for: Obtaining the number of random walks performed on the heterogeneous graph; For the i-th random walk of each meta-path, a node having the same field type as the starting node of the meta-path is selected from each node of the heterogeneous graph as the target node; wherein the value of i is any natural number from 1 to N, and N is the number of walks; Taking the target node as the starting walking node, randomly selecting corresponding nodes on the heterogeneous graph for walking according to the node order in the meta-path, and obtaining the walking path of the i-th random walk of the meta-path.
22. The device according to claim 15, wherein: The second acquisition module is also used for: Obtain mapping data of the mapping relationship between the content of each target field and the configured sequence number; For each of the walking paths, the content of the target field corresponding to the sequence number of each node is obtained according to the mapping data and the sequence number of each node on the walking path.
23. The device according to claim 15, wherein: The calculation module is specifically used for: Based on the natural language processing algorithm, the content of the target field of each node on each walking path is used as corpus data for training to obtain the word embedding vector of the content of each target field.
24. The device according to claim 15, wherein: The splicing module is specifically used for: For each piece of data in the credit card bill data set, obtaining the primary key field of the data from each target field; Processing the word embedding vector of the content of the other target fields according to the field relationship between the other target fields and the primary key field; Concatenating the word embedding vector of the content of the other target field after the processing with the word embedding vector of the content of the primary key field to obtain a piece of training sample data; Based on the training sample data, a training sample data set is finally obtained.
25. The device according to claim 24, wherein The splicing module is specifically used for: When the field relationship between the primary key field and the other target field is a one-to-one relationship, retaining the word embedding vector of the content of the other target field; and, When the field relationship between the primary key field and the other target fields is a one-to-many relationship, an average value of the word embedding vectors of the contents of the other target fields is obtained.
26. The device according to claim 15, wherein: The training module is specifically used for: At least one preset model training algorithm is used to train a machine learning model for credit card overdue prediction based on the training samples.
27. The device according to claim 21, wherein The device also includes a second configuration module, configured to: In response to a triggering operation of configuring a walk parameter for executing a random walk process, a configuration interface is provided; wherein the walk parameter includes at least the number of meta-paths and the number of walks; The wandering parameters are configured according to the configuration interface.
28. The device according to claim 27, wherein The walk parameters are parameters written based on the YAML specification.
29. An apparatus comprising at least one computing device and at least one storage device, wherein: The at least one storage device is used to store instructions, and the instructions are used to control the at least one computing device to execute the method according to any one of claims 1 to 14; or, the device implements the device according to claims 15 to 28 through the computing device and the storage device.
30. A computer-readable storage medium, wherein: A computer program is stored thereon, which implements the method according to any one of claims 1 to 14 when executed by a processor.
