A method for identifying fraudulent users in network transactions
By generating an entity relationship graph and performing graph clustering, and combining transaction time, amount, and IP address features, a graph neural network is used to identify fraudulent users, solving the problem of difficulty in identifying hidden fraudulent users in existing technologies and improving the accuracy of identification.
Patent Information
- Application Number
- CN202211595822.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-12
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2042-12-12
AI Technical Summary
Existing technologies are insufficient to effectively identify concealed fraudulent users. These users engage in transactions with legitimate users by disguising their actions, thus interfering with the detector and concealing their fraudulent behavior.
Generate an entity relationship graph, cluster nodes using graph clustering methods to mask transaction relationships that do not belong to the same group, and use graph neural networks to identify fraudulent users by combining transaction time, amount and IP address features.
It significantly improves the accuracy of identifying concealed fraudulent users by extracting transaction features and masking relationships, thereby enhancing the graph neural network's ability to identify concealed fraudulent users.
Smart Images

Figure CN115953240B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of pattern recognition technology, and specifically provides a method for identifying fraudulent users in online transactions. Background Technology
[0002] The booming development of internet financial services has led to a significant increase in the frequency of fraud incidents, causing huge losses to institutions and consumers every year. Fraudulent users contact legitimate users through phone calls, emails, social media, and other means to gain their trust and solicit money. For example, fraudsters may contact victims by phone and guide them to transfer funds, which actually end up in the fraudsters' accounts. Accurately and efficiently identifying fraudulent users is a key challenge in online transaction fraud detection.
[0003] Existing methods for identifying fraudulent users in online transactions can be broadly categorized into rule-based and graph-based methods. Rule-based methods derive a set of abnormal behavior identification rules from a large pool of existing fraudulent users. However, due to constantly evolving fraud patterns, rule-based methods cannot effectively adapt to new fraud types. Graph-based methods, which have emerged in recent years, use graph models to model the interactions between users in financial transaction scenarios. Typical graph-based fraudulent user identification methods use graph neural networks to establish message passing channels between graph nodes, integrating the user's own behavioral characteristics with relevant information from their neighbors to obtain richer node feature representations, thus achieving better identification results than rule-based methods.
[0004] The complexity and variety of fraud types pose a significant challenge to the identification of fraudulent users in online transactions. A typical problem currently is how to effectively identify concealed fraudulent users. Concealed fraudulent users are those who disguise themselves and attempt to hide themselves among normal users. These users interfere with the detector by engaging in ordinary transactions with normal users, thereby concealing their fraudulent activities. Current fraud user identification technologies have not yet adequately solved the problem of identifying concealed fraudulent users. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of the prior art by providing a method for identifying fraudulent users in online transactions, thereby effectively improving the accuracy of identifying concealed fraudulent users.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0007] A method for identifying fraudulent users in online transactions includes two stages: model building and fraudulent user identification, characterized by:
[0008] The model construction includes the following steps:
[0009] A1. Generate entity relationship graph: Read transaction record table T1 from the training data. This table contains N transaction records involving M users. The i-th transaction record includes: the user who initiated the transaction. Transaction receiving user Initiating user equipment Receiver User Equipment Transaction amount m i Transaction time t i Initiating user IP address Receive user IP address Generate an entity relationship diagram G based on the entity data such as the transaction initiator user, transaction receiver user, initiator user device, and receiver user device in transaction record table T1. r ;
[0010] A2. Masking Entity Relationships: Graph clustering methods are used to mask the entity relationship graph G. r Cluster the nodes in the graph, grouping them into multiple groups; determine the i-th transaction record. and If the corresponding nodes belong to the same group, then set the i-th element of the masking array W to 0; otherwise, set it to 1; and finally obtain the masking array W.
[0011] A3. Generate transaction features: For the i-th transaction record, based on the transaction time t... i Generate transaction time characteristics Based on the transaction amount m i Generate transaction amount characteristics Based on the initiating user's IP address With the receiving user's IP address Generate the initiating user's IP address characteristics respectively Characteristics of the receiving user's IP address This generates transaction time-amount characteristics.
[0012] A4. Generate Transaction Graph: Read user data table T2 from the training data to obtain the user feature vector for each user; then, based on the transaction initiator user, transaction receiver user, initiator user device, receiver user device, initiator user IP address, and receiver user IP address from transaction record table T1, the user feature vector from user data table T2, and the generated initiator user IP address feature, receiver user IP address feature, and transaction time-amount feature, generate transaction graph G. s ;
[0013] A5. Training a Graph Neural Network Fraudulent User Identification Model: Read the user label file T3 from the training data to obtain the type label for each user. The label for the j-th user is y.j y j =0 indicates that the user is a normal user, y j =1 indicates that the user is a fraudulent user; the transaction graph G s The user's type label is input into the graph neural network fraud user identification model for training, and the backpropagation algorithm is used to complete the training.
[0014] The identification of fraudulent users includes the following steps:
[0015] B1. Generate Entity Relationship Graph: Read the transaction record table T′1 from the test data. This table contains N′ transaction records and involves M′ users. Following step A1, generate the entity relationship graph G′. r ;
[0016] B2. Masking Transaction Relationships: Following step A2, generate the masking array W′;
[0017] B3. Generate Transaction Features: Following step A3, generate transaction features for each transaction record: For the i-th transaction record, generate the transaction time-amount feature. Initiate user IP address characteristics and characteristics of the receiving user's IP address
[0018] B4. Generate transaction graph G′ s Follow step A4 to generate transaction chart G′ s ;
[0019] B5. User Type Prediction: Transaction graph G′ s The input is fed into a graph neural network fraud user identification model for prediction, and the output is the prediction type for all users.
[0020] Furthermore, the specific process of step A1 is as follows:
[0021] A1-1. For the i-th transaction record in the transaction record table T1, sequentially read the user who initiated the transaction. Transaction receiving user Initiating user equipment and receiving user equipment N is the total number of transaction records;
[0022] A1-2. Initialize Entity Relationship Diagram G r Empty;
[0023] A1-3. Generate Entity Relationship Diagram G r :
[0024] A1-3-1. Initialize i = 1;
[0025] A1-3-2. Determine the user who initiated the transaction. In G r Does a corresponding node exist in G? If not, then in G... r Create a pair with Create the corresponding new node and set its type to entity type; otherwise, proceed to step A1-3-3.
[0026] A1-3-3. Determine the transaction recipient user In G r Does a corresponding node exist in G? If not, then in G... r Create a pair with Create the corresponding new node and set its type to entity type; otherwise, proceed to step A1-3-4.
[0027] A1-3-4. Determine the initiating user equipment. In G r Does a corresponding node exist in G? If not, then in G... r Create a pair with Create the corresponding new node and set its type to entity type; otherwise, proceed to step A1-3-5.
[0028] A1-3-5. Determine the receiving user equipment. In G r Does a corresponding node exist in G? If not, then in G... r Create a pair with Create the corresponding new node and set its type to entity type; otherwise, proceed to step A1-3-6.
[0029] A1-3-6. In and Add an edge between the two corresponding nodes;
[0030] A1-3-7. In and Add an edge between the two corresponding nodes;
[0031] A1-3-8. In and Add an edge between the two corresponding nodes;
[0032] A1-3-9. Update i to i+1, and check if i is greater than N. If so, obtain the entity relationship graph G. r Otherwise, proceed to step A1-3-2.
[0033] Furthermore, the specific process of step A3 is as follows:
[0034] A3-1. For the i-th transaction record in transaction record table T1, sequentially read its transaction amount m. i Transaction time ti Initiating user IP address Receive user IP address
[0035] A3-2. Generating Transaction Time Characteristics:
[0036] From transaction time t i Read the year, month, day, hour, and minute from the input, and record them as year. i month i day i hour i and minute i Generate the transaction time characteristics of the i-th transaction.
[0037]
[0038] Transaction time characteristics Quantification:
[0039]
[0040] Where s is the time quantization step size, This is a floor function;
[0041] And the characteristics of transaction time Perform normalization;
[0042] A3-3. Generating Transaction Amount Characteristics:
[0043] Based on the transaction amount m i Generate the transaction amount characteristics of the i-th transaction.
[0044]
[0045] And characteristics of transaction amount Perform normalization;
[0046] A3-4. Generate Transaction Time-Amount Characteristics: This involves generating transaction time characteristics... Characteristics of transaction amount By piecing together the transaction time-amount characteristics, we can obtain the transaction time-amount feature.
[0047] A3-5. Characteristics of the IP address used to generate transactions:
[0048] according to and IP address characteristics of the user who initiated the i-th transaction record and characteristics of the receiving user's IP address
[0049]
[0050]
[0051] Characteristics of the initiating user's IP address and characteristics of the receiving user's IP address Normalize them separately.
[0052] Furthermore, the specific process of step A4 is as follows:
[0053] A4-1. Initialize Transaction Graph G s Empty;
[0054] A4-2. Generate Transaction Graph G s :
[0055] A4-2-1. Initialize i = 1;
[0056] A4-2-2. If the value of the i-th item in the masking array W is 0, then go to step A4-2-15; otherwise, go to step A4-2-3.
[0057] A4-2-3. In the user data table T2 of the training data, find the user who initiated the transaction. With transaction receiving user Obtain the corresponding user feature vectors for both. and
[0058] A4-2-4. Determine the user who initiated the transaction. In G s Does a corresponding node exist in G? If not, then in G... s Create a pair with Create a new corresponding node, set its type to user, and set its attribute value to [value]. Otherwise, proceed to step A4-2-5;
[0059] A4-2-5. Determine the Transaction Recipient User In G s Does a corresponding node exist in G? If not, then in G... s Create a pair with Create a new corresponding node, set its type to user, and set its attribute value to [value]. Otherwise, proceed to step A4-2-6;
[0060] A4-2-6. Determine the initiating user equipment. In G s Does a corresponding node exist in G? If not, then in G... s Create a pair with Create a new node and set its type to device type with an attribute value of 1; otherwise, proceed to step A4-2-7.
[0061] A4-2-7. Determine the receiving user equipment In G s Does a corresponding node exist in G? If not, then in G... s Create a pair with Create a new node and set its type to device type with an attribute value of 1; otherwise, proceed to step A4-2-8.
[0062] A4-2-8. Determine the IP address of the initiating user. In G s Does a corresponding node exist in G? If not, then in G... s Create a pair with The corresponding new node is then set to IP address type, and its attribute value is... Otherwise, proceed to step A4-2-9;
[0063] A4-2-9. Determine the receiving user's IP address In G s Does a corresponding node exist in G? If not, then in G... s Create a pair with The corresponding new node is then set to IP address type, and its attribute value is... Otherwise, proceed to step A4-2-10;
[0064] A4-2-10. In and Add an edge between the two corresponding nodes, and set its type to transaction type with the attribute value of transaction.
[0065] A4-2-11. In and Add an edge between the two corresponding nodes, and set its type to User-Device type with an attribute value of 1;
[0066] A4-2-12. In and Add an edge between the two corresponding nodes, and set its type to User-Device type with an attribute value of 1;
[0067] A4-2-13. In and Add an edge between the two corresponding nodes, and set its type to User-IP Address type with an attribute value of 1;
[0068] A4-2-14. In and Add an edge between the two corresponding nodes, and set its type to User-IP Address type with an attribute value of 1;
[0069] A4-2-15. Update i to i+1, and check if i is greater than N. If so, obtain the transaction graph G. s Otherwise, proceed to step A4-2-2.
[0070] Based on the above technical solution, the beneficial effects of the present invention are as follows:
[0071] This invention provides a method for identifying fraudulent users in online transactions. The method treats users and devices involved in the transaction as similar entities, generates an entity relationship graph, and clusters the entities based on this graph to distinguish between fraudulent user groups and normal user groups. By masking relationships, the influence of hidden fraudulent user interference is removed. Furthermore, by extracting transaction time-amount features and transaction IP address features, the graph neural network is enhanced in its ability to mine hidden fraudulent user features, significantly improving the accuracy of identifying hidden fraudulent users. Attached image description:
[0072] Figure 1 This is a flowchart illustrating the fraudulent user identification method in online transactions according to the present invention. Detailed Implementation
[0073] To make the objectives, technical solutions, and beneficial effects of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0074] This embodiment provides a method for identifying fraudulent users in online transactions, the process of which is as follows: Figure 1 As shown, the process includes two stages: model building and fraudulent user identification. The dataset contains 51,416 online transaction records, of which the first 30,850 are training data and the last 20,566 are test data. The specific steps are as follows:
[0075] A1. Generate entity relationship diagram:
[0076] A1-1. Reading Training Entity Data: Suppose that the transaction record table T1 in the training data contains N transaction records involving M users. For the i-th (1≤i≤N) record, let the user who initiated the transaction be... The transaction recipient is Initiating user equipment for Receiver user equipment is Read each record sequentially from transaction record table T1. and
[0077] In this embodiment, the transaction record table in the training data contains N = 30850 transaction records, involving a total of M = 15869 users. Each transaction record includes fields such as the transaction initiator user, transaction receiver user, initiator user's device, receiver user's device, transaction amount, transaction time, initiator user's IP address, and receiver user's IP address. The first transaction record is shown in Table 1.
[0078] Table 1. The first transaction record in Transaction Record Table T1
[0079] Transaction initiator user Transaction receiving user Initiating user equipment Receiver User Equipment 12221039 13136018 3097829 2727733 Transaction amount Trading hours Initiating user IP address Receive user IP address 1000.00 2017-09-09_16:55 175.152.100.9 175.152.108.119
[0080] Taking the i=1st transaction record as an example, the user who initiated the transaction for this record is retrieved from the transaction record table T1. Transaction receiving user Initiating user equipment Receiver User Equipment
[0081] A1-2. Initialize Entity Relationship Diagram G r Empty;
[0082] A1-3. Generate Entity Relationship Diagram G r :
[0083] A1-3-1. Initialize i = 1;
[0084] A1-3-2. Determine the user who initiated the transaction. In G r Does a corresponding node exist in G? If not, then in G... r Create a pair with Create the corresponding new node and set its type to entity type; otherwise, proceed to step A1-3-3.
[0085] In this embodiment, taking the i=1th transaction record as an example, since the transaction initiator is a user... In G r If no corresponding node exists in G, then in G r Create a pair with Create a new node and set its type to entity type;
[0086] A1-3-3. Determine the transaction recipient user In G r Does a corresponding node exist in G? If not, then in G... r Create a pair with Create the corresponding new node and set its type to entity type; otherwise, proceed to step A1-3-4.
[0087] In this embodiment, taking the i=1th transaction record as an example, since the transaction receiving user... In G r If no corresponding node exists in G, then in G r Create a pair with Create a new node and set its type to entity type;
[0088] A1-3-4. Determine the initiating user equipment. In G r Does a corresponding node exist in G? If not, then in G... r Create a pair with Create the corresponding new node and set its type to entity type; otherwise, proceed to step A1-3-5.
[0089] In this embodiment, taking the i=1th transaction record as an example, since the initiating user device In G r If no corresponding node exists in G, then in G r Create a pair with Create a new node and set its type to entity type;
[0090] A1-3-5. Determine the receiving user equipment. In G r Does a corresponding node exist in G? If not, then in G... r Create a pair with Create the corresponding new node and set its type to entity type; otherwise, proceed to step A1-3-6.
[0091] In this embodiment, taking the i=1th transaction record as an example, since the receiving user equipment In G r If no corresponding node exists in G, then in G r Create a pair with Create a new node and set its type to entity type;
[0092] A1-3-6. In and Add an edge between the two corresponding nodes;
[0093] In this embodiment, taking the i=1th transaction record as an example, in and Add an edge between the two corresponding nodes;
[0094] A1-3-7. In and Add an edge between the two corresponding nodes;
[0095] In this embodiment, taking the i=1th transaction record as an example, in and Add an edge between the two corresponding nodes;
[0096] A1-3-8. In and Add an edge between the two corresponding nodes;
[0097] In this embodiment, taking the i=1th transaction record as an example, in and Add an edge between the two corresponding nodes;
[0098] A1-3-9. Update i to i+1, and determine if i is greater than N=30850. If so, obtain the entity relationship graph G. r Proceed to step A2; otherwise proceed to step A1-3-2.
[0099] A2. Masking entity relationships:
[0100] A2-1. Entity Clustering: Graph clustering method is used to cluster the entity relationship graph G. r Clustering the nodes in the graph to group them into different groups;
[0101] In this embodiment, the Louvain community detection algorithm is used to analyze the entity relationship graph G. r The nodes in the graph are clustered, and the nodes are grouped into 3372 different groups;
[0102] A2-2. Define a masking array W of length N;
[0103] In this embodiment, a masking array W with a length of N = 30850 is defined;
[0104] A2-3. For each i satisfying 1≤i≤30850, determine... and If they are not in the same group, set the i-th element of the masking array W to 0; otherwise, set it to 1.
[0105] In this embodiment, when i = 1, and If the elements belong to the same group, set the first element of the masking array W to 1. This applies when i = 2, 150, 387, ..., 30850, etc. and If they are not in the same group, the element at the corresponding position in the masking array W is set to 0;
[0106] After this step is completed, the masking array W = [1, 0, 1, ..., 0] is obtained;
[0107] A3. Generating Transaction Features:
[0108] A3-1. Let m be the transaction amount in the i-th (1≤i≤30850) record of transaction record table T1. i The transaction time is t. i The initiating user's IP address is The receiving user IP address is Read the m value of each transaction record sequentially from transaction record table T1. i t i , and
[0109] In this embodiment, taking the i=1th transaction record as an example, the transaction amount m of that record is read from the transaction record table T1. 1 =1000.00, transaction time t 1 =2017-09-09 16:55, Initiating user IP address Receive user IP address
[0110] A3-2. Generating Transaction Time Characteristics:
[0111] A3-2-1. For each i satisfying 1≤i≤N, perform:
[0112] A3-2-1-1. From transaction time t i Read the year, month, day, hour, and minute from the input, and record them as year. i month i day i hour i and minute i Generate the transaction time characteristics of the i-th transaction.
[0113]
[0114] In this embodiment, taking the i=1th transaction record as an example, starting from transaction time t... 1 =Read the year, month, day, hour, and minute from 2017-09-09_16:55 to get the year. 1 =2017, month 1 =9, day 1 =9, hour 1 =16 and minute 1 =55, generating the transaction time characteristics of the i=1th transaction.
[0115]
[0116] A3-2-1-2. Characteristics of Transaction Time Quantification:
[0117]
[0118] Where s is the time quantization step size, This is a floor function;
[0119] In this embodiment, the time quantization step size s ranges from 1 to 43200, where s = 1440. Taking the i=1th transaction record as an example, its transaction time characteristics are analyzed. Quantification:
[0120]
[0121] A3-2-2. Feature Normalization: For each i satisfying 1≤i≤N, normalize the transaction time feature. Normalize:
[0122]
[0123] in, and These are N transaction time features. The maximum and minimum values in;
[0124] In this embodiment, the maximum value of all transaction time characteristics and minimum value Taking the i=1th transaction record as an example, its transaction time characteristics are analyzed. Normalize:
[0125]
[0126] A3-3. Generating Transaction Amount Characteristics:
[0127] A3-3-1. For each i satisfying 1≤i≤N, generate the transaction amount characteristics of the i-th transaction.
[0128]
[0129] In this embodiment, taking the i=1th transaction record as an example, the transaction amount m of the i=1th transaction... 1 =1000.00, generate transaction amount feature
[0130] A3-3-2. Feature Normalization: For each i satisfying 1≤i≤N, normalize the transaction amount feature. Normalize:
[0131]
[0132] in, and These are N transaction amount characteristics. The maximum and minimum values in;
[0133] In this embodiment, the maximum value of all transaction amount characteristics and minimum value Taking the i=1th transaction record as an example, its transaction amount characteristics are analyzed. Normalize:
[0134]
[0135] A3-4. Generate Transaction Time-Amount Features: For each i satisfying 1≤i≤N, generate the transaction time feature. Characteristics of transaction amount The transaction time-amount characteristics of the i-th transaction are concatenated. Right now
[0136] In this embodiment, taking the i=1th transaction record as an example, the transaction time feature is... Characteristics of transaction amount Piecing together transaction time-amount characteristics
[0137] A3-5. Characteristics of the IP address used to generate transactions:
[0138] A3-5-1. Assume IP addresses are represented in dotted decimal notation, i.e. For each i satisfying 1≤i≤N, generate the IP address characteristics of the initiating user of the i-th transaction. and characteristics of the receiving user's IP address
[0139]
[0140]
[0141] In this embodiment, taking the i=1th transaction record as an example, the initiating user's IP address is... The receiving user IP address is Characteristics of the initiating user's IP address that generates the transaction and characteristics of the receiving user's IP address
[0142]
[0143]
[0144] A3-5-2. Feature Normalization: For each i satisfying 1≤i≤N, normalize the feature of the initiating user's IP address. and characteristics of the receiving user's IP address Normalize them separately:
[0145]
[0146]
[0147] in, and They are respectively including and The maximum and minimum values among 2N data points;
[0148] In this embodiment, the maximum value of all IP address characteristics and minimum value Taking the i=1th transaction record as an example, we can analyze the characteristics of the initiating user's IP address. and characteristics of the receiving user's IP address Normalize:
[0149]
[0150]
[0151] A4. Generate transaction graph G s :
[0152] A4-1. Initialize Transaction Graph G s Empty;
[0153] A4-2. Generate Transaction Graph G s :
[0154] A4-2-1. Initialize i = 1;
[0155] A4-2-2. If the value of the i-th item in the masking array W is 0, then go to step A4-2-15; otherwise, go to step A4-2-3.
[0156] In this embodiment, taking the i=1th transaction record as an example, the value of the first item of the masking array W=[1,0,1,...,0] is 1, and proceed to step A4-2-3;
[0157] A4-2-3. The user data table T2 in the training data records all transaction users and their corresponding user feature vectors. Find the user who initiated the transaction in user data table T2. With transaction receiving user Obtain the corresponding user feature vectors for both. and
[0158] In this embodiment, taking the i=1th transaction record as an example, the record is found in the user data table T2. and Corresponding user feature vector and
[0159] A4-2-4. Determine the user who initiated the transaction. In G s Does a corresponding node exist in G? If not, then in G... s Create a pair with Create a new corresponding node, set its type to user, and set its attribute value to [value]. Otherwise, proceed to step A4-2-5;
[0160] In this embodiment, taking the i=1th transaction record as an example, since the transaction initiator is a user... In G s If no corresponding node exists in G, then in G s Create a pair with Create a new corresponding node, set its type to user, and set its attribute value to [value].
[0161] A4-2-5. Determine the Transaction Recipient User In G s Does a corresponding node exist in G? If not, then in G... s Create a pair with Create a new corresponding node, set its type to user, and set its attribute value to [value]. Otherwise, proceed to step A4-2-6;
[0162] In this embodiment, taking the i=1th transaction record as an example, since the transaction receiving user... In G s If no corresponding node exists in G, then in G s Create a pair with Create a new corresponding node, set its type to user, and set its attribute value to [value].
[0163] A4-2-6. Determine the initiating user equipment. In G s Does a corresponding node exist in G? If not, then in G... s Create a pair with Create a new node and set its type to device type with an attribute value of 1; otherwise, proceed to step A4-2-7.
[0164] In this embodiment, taking the i=1th transaction record as an example, since the initiating user device In G s If no corresponding node exists in G, then in G s Create a pair with Create a new node and set its type to device type with an attribute value of 1;
[0165] A4-2-7. Determine the receiving user equipment In G s Does a corresponding node exist in G? If not, then in G... s Create a pair with Create a new node and set its type to device type with an attribute value of 1; otherwise, proceed to step A4-2-8.
[0166] In this embodiment, taking the i=1th transaction record as an example, since the receiving user equipment In G s If no corresponding node exists in G, then in G s Create a pair with Create a new node and set its type to device type with an attribute value of 1;
[0167] A4-2-8. Determine the IP address of the initiating user. In G s Does a corresponding node exist in G? If not, then in G... s Create a pair with The corresponding new node is then set to IP address type, and its attribute value is... Otherwise, proceed to step A4-2-9;
[0168] In this embodiment, taking the i=1th transaction record as an example, since the initiating user's IP address In G s If no corresponding node exists in G, then in G s Create a pair with The corresponding new node is then set to IP address type, and its attribute value is...
[0169] A4-2-9. Determine the receiving user's IP address In G s Does a corresponding node exist in G? If not, then in G... s Create a pair with The corresponding new node is then set to IP address type, and its attribute value is... Otherwise, proceed to step A4-2-10;
[0170] In this embodiment, taking the i=1th transaction record as an example, since the receiving user IP address In G sIf no corresponding node exists in G, then in G s Create a pair with The corresponding new node is then set to IP address type, and its attribute value is...
[0171] A4-2-10. In and Add an edge between the two corresponding nodes, and set its type to transaction type with the attribute value of transaction.
[0172] In this embodiment, taking the i=1th transaction record as an example, in and Add an edge between the two corresponding nodes, and set its type to transaction type with the attribute value of transaction.
[0173] A4-2-11. In and Add an edge between the two corresponding nodes, and set its type to User-Device type with an attribute value of 1;
[0174] In this embodiment, taking the i=1th transaction record as an example, in and Add an edge between the two corresponding nodes, and set its type to User-Device type with an attribute value of 1;
[0175] A4-2-12 in and Add an edge between the two corresponding nodes, and set its type to User-Device type with an attribute value of 1;
[0176] In this embodiment, taking the i=1th transaction record as an example, in and Add an edge between the two corresponding nodes, and set its type to User-Device type with an attribute value of 1;
[0177] A4-2-13. In and Add an edge between the two corresponding nodes, and set its type to User-IP Address type with an attribute value of 1;
[0178] In this embodiment, taking the i=1th transaction record as an example, in and Add an edge between the two corresponding nodes, and set its type to User-IP Address type with an attribute value of 1;
[0179] A4-2-14. In and Add an edge between the two corresponding nodes, and set its type to User-IP Address type with an attribute value of 1;
[0180] In this embodiment, taking the i=1th transaction record as an example, in and Add an edge between the two corresponding nodes, and set its type to User-IP Address type with an attribute value of 1;
[0181] A4-2-15. Update i to i+1, and check if i is greater than N = 30850. If so, obtain the transaction graph G. s Proceed to step A5; otherwise proceed to step A4-2-2.
[0182] A5. Training a graph neural network model for identifying fraudulent users:
[0183] A5-1. Read the user label file T3 from the training data to obtain the type label for each user. The label for the j-th user is y. j (1≤j≤M), where y j =0 indicates that the user is a normal user, y j =1 indicates that the user is a fraudulent user;
[0184] In this embodiment, there are M = 15869 different users in the transaction record table T1. The type labels of all users are read from the user label file T3 used for training. Taking the j = 1st user as an example, y1 = 0, which means that the user is a normal user.
[0185] A5-2. Transaction chart G s The user's type label is input into the graph neural network fraud user identification model for training. The backpropagation algorithm is used to complete the training, and the fraud user identification model is obtained after the training is completed.
[0186] In this embodiment, the transaction graph G is... s The user type labels are input into the GraphSAGE graph neural network model for training. The backpropagation algorithm is used to update the model parameters. After training, the fraudulent user identification model is obtained.
[0187] The identification of fraudulent users includes the following steps:
[0188] B1. Generate entity relationship diagram:
[0189] B1-1. Reading Test Entity Data: Suppose that the transaction record table T′1 in the test data contains N′ transaction records and involves M′ users. For the i-th (1≤i≤N′) record, let the user who initiated the transaction be... The transaction recipient is Initiating user equipment for Receiving user equipment is Read each record sequentially from transaction record table T′1. and
[0190] In this embodiment, the transaction record table T′1 in the test data contains N′=20566 transaction records, involving a total of M′=7976 users. Each transaction record includes information such as the transaction initiating user, the transaction receiving user, the initiating user's device, the receiving user's device, the transaction amount, the transaction time, the initiating user's IP address, and the receiving user's IP address. The first transaction record is shown in Table 2:
[0191] Table 2. The first transaction record in Transaction Record Table T′1
[0192] Transaction initiator user Transaction receiving user Initiating user equipment Receiver User Equipment 12790691 13592379 3086466 4516738 Transaction amount Trading hours Initiating user IP address Receive user IP address 200.00 2018-07-27_12:54 180.149.124.141 114.67.200.32
[0193] Taking the i=1st transaction record as an example, the user who initiated the transaction for this record is read from the transaction record table T′1. Transaction receiving user Initiating user equipment Receiver User Equipment
[0194] B1-2. Initialize the entity relationship diagram G′ r Empty;
[0195] B1-3. Following step A1-3, generate the entity relationship diagram G′. r ;
[0196] B2. Masking Transaction Relationships: Following step A2, generate the masking array W′;
[0197] In this embodiment, a masking array W′ = [0, 1, 1, ..., 1] is generated, where the 1st, 168th, 827th, ..., 11596th elements of W′ are 0, and the rest are 1;
[0198] B3. Generate Transaction Features: Following step A3, generate transaction time-amount and transaction IP address features for each transaction record, i.e., generate transaction time-amount features for the i-th (1≤i≤N′) transaction record. Initiate user IP address characteristics and characteristics of the receiving user's IP address
[0199] In this embodiment, taking the i=1th transaction record as an example, the transaction time-amount feature is generated. Initiate user IP address characteristics and characteristics of the receiving user's IP address
[0200] B4. Generate transaction graph G′ s :
[0201] B4-1. Initialize the transaction graph G′ s Empty;
[0202] B4-2. Following step A4-2, generate transaction chart G′. s ;
[0203] B5. User Type Prediction: Transaction graph G′ s The input is fed into a graph neural network fraud user identification model for prediction, and the output is the predicted type of all users. Let the predicted type of the j-th user (1≤j≤M′) be y′. j y′ j =0 indicates that the user is a normal user, y′ j =1 indicates that the user is a fraudulent user.
[0204] In this embodiment, the transaction record table T′1 contains M′ = 7976 different users, and the transaction graph G′ s The input is fed into a graph neural network for prediction, and the output is the prediction type for all users. Among them, the 96 users from the 1st to the 532nd to the 1908th to the 7864th are fraudulent users, and the corresponding prediction type is 1. Taking the j=1st user as an example, y′1=1, which means that the user is a fraudulent user.
[0205] The recognition performance of the method of the present invention is compared with that of the original GraphSAGE graph neural network method. The recognition metric is PR-AUC. Both methods are trained and tested using the dataset of the embodiment. The comparison results are shown in Table 3.
[0206] Table 3. Comparison of Recognition Performance
[0207] method PR-AUC GraphSAGE Graph Neural Networks 61.3% Method of the present invention 69.8%
[0208] As can be seen, the PR-AUC of the method of the present invention is significantly improved compared with the original GraphSAGE graph neural network method, which indicates that the method of the present invention achieves a higher recognition accuracy.
[0209] The above description is merely a specific embodiment of the present invention. Any feature disclosed in this specification may be replaced by other equivalent or similar features unless otherwise specified. All disclosed features, or steps in all methods or processes, may be combined in any way except for mutually exclusive features and / or steps.
Claims
1. A method for identifying fraudulent users in online transactions, comprising two stages: model building and fraudulent user identification, characterized in that: The model construction includes the following steps: A1. Generate an entity relationship graph: Read the transaction record table from the training data. The table contains Transaction records, involving a total of The user, the first The transaction record includes: the user who initiated the transaction. Transaction receiving user Initiating user equipment Receiver user equipment Transaction amount Trading hours Initiating user IP address Receive user IP address ; using transaction record table The transaction initiating user, transaction receiving user, initiating user device, and receiving user device are entity data. An entity relationship diagram is generated based on the entity data. ; A2. Masking Entity Relationships: Using graph clustering methods to mask entity relationship graphs. Cluster the nodes in the graph to group them into multiple groups; determine the first... In the transaction records and Check if the corresponding nodes belong to the same group; if not, then mask the array. The Set each element to 0; otherwise, set it to 1; this results in the masking array. ; A3. Generate transaction features: targeting the first Transaction records, based on transaction time Generate transaction time characteristics According to the transaction amount Generate transaction amount features Based on the initiating user's IP address With the receiving user's IP address Generate the initiating user's IP address characteristics respectively Characteristics of the receiving user's IP address This generates transaction time-amount characteristics. : ; A4. Generate Transaction Graph: Read the user data table from the training data. This yields the user feature vector for each user; then, based on the transaction record table... The table contains information on the transaction initiating user, transaction receiving user, initiating user device, receiving user device, initiating user IP address, and receiving user IP address. The user feature vector, along with the generated initiating user IP address feature, receiving user IP address feature, and transaction time-amount feature, together generate the transaction graph. The specific process is as follows: A4-1. Initial Transaction Chart Empty; A4-2. Generate Transaction Chart : A4-2-1. Initialization ; A4-2-2. If the masking array The If the value of the item is 0, proceed to step A4-2-15; otherwise, proceed to step A4-2-3. A4-2-3. User Data Table in Training Data In the middle, find the user who initiated the transaction. With transaction receiving user The corresponding user feature vectors of the two are obtained. and ; A4-2-4. Determine the user who initiated the transaction. exist Does a corresponding node exist in the table? If not, then... Create a pair with Create a new corresponding node, set its type to user, and set its attribute value to [value]. Otherwise, proceed to step A4-2-5; A4-2-5. Determine the Transaction Recipient User exist Does a corresponding node exist in the table? If not, then... Create a pair with Create a new corresponding node, set its type to user, and set its attribute value to [value]. Otherwise, proceed to step A4-2-6; A4-2-6. Determine the initiating user equipment. exist Does a corresponding node exist in the table? If not, then... Create a pair with Create a new node and set its type to device type with an attribute value of 1; otherwise, proceed to step A4-2-7. A4-2-7. Determine the receiving user equipment exist Does a corresponding node exist in the table? If not, then... Create a pair with Create a new node and set its type to device type with an attribute value of 1; otherwise, proceed to step A4-2-8. A4-2-8. Determine the IP address of the initiating user. exist Does a corresponding node exist in the table? If not, then... Create a pair with The corresponding new node is then set to IP address type, and its attribute value is... Otherwise, proceed to step A4-2-9; A4-2-9. Determine the receiving user's IP address exist Does a corresponding node exist in the table? If not, then... Create a pair with The corresponding new node is then set to IP address type, and its attribute value is... Otherwise, proceed to step A4-2-10; A4-2-10. In and Add an edge between the two corresponding nodes, and set its type to transaction type with the attribute value of transaction. ; A4-2-11. In and Add an edge between the two corresponding nodes, and set its type to User-Device type with an attribute value of 1; A4-2-12. In and Add an edge between the two corresponding nodes, and set its type to User-Device type with an attribute value of 1; A4-2-13. In and Add an edge between the two corresponding nodes, and set its type to User-IP Address type with an attribute value of 1; A4-2-14. In and Add an edge between the two corresponding nodes, and set its type to User-IP Address type with an attribute value of 1; A4-2-15 Update for and judge Is it greater than If so, then a transaction diagram will be obtained. Otherwise, proceed to step A4-2-2; A5. Training a Graph Neural Network Fraudulent User Detection Model: Reading User Tag Files from the Training Data Get the type label for each user, the first The user's tags are , This indicates that the user is a normal user. This indicates the user is a fraudulent user; transaction screenshots will be displayed. The user's type label is input into the graph neural network fraud user identification model for training, and the backpropagation algorithm is used to complete the training. The identification of fraudulent users includes the following steps: B1. Generate Entity Relationship Diagram: Read the transaction record table from the test data. The table contains Transaction records, involving a total of For each user, generate an entity relationship diagram according to step A1. ; B2. Masking Transaction Relationships: Following step A2, generate a masking array. ; B3. Generate Transaction Features: Following step A3, generate the transaction features for each transaction record: for the first... Each transaction record generates a transaction time-amount feature. Initiating user IP address characteristics and characteristics of the receiving user's IP address ; B4. Generate Transaction Chart: Follow step A4 to generate the transaction chart. ; B5. User Type Prediction: Transaction Map The input is fed into a graph neural network fraud user identification model for prediction, and the output is the prediction type for all users.
2. The method for identifying fraudulent users in online transactions according to claim 1, characterized in that, The specific process of step A1 is as follows: A1-1. Regarding the transaction record table The Middle Each transaction record is read sequentially by the user who initiated the transaction. Transaction receiving user Initiating user equipment and receiving user equipment , The total number of transaction records; A1-2. Initialize the entity relationship diagram Empty; A1-3. Generate Entity Relationship Diagram : A1-3-1. Initialization ; A1-3-2. Determine the user who initiated the transaction. exist Does a corresponding node exist in the table? If not, then... Create a pair with Create the corresponding new node and set its type to entity type; otherwise, proceed to step A1-3-3. A1-3-3. Determine the transaction recipient user exist Does a corresponding node exist in the table? If not, then... Create a pair with Create the corresponding new node and set its type to entity type; otherwise, proceed to step A1-3-4. A1-3-4. Determine the initiating user equipment. exist Does a corresponding node exist in the table? If not, then... Create a pair with Create the corresponding new node and set its type to entity type; otherwise, proceed to step A1-3-5. A1-3-5. Determine the receiving user equipment. exist Does a corresponding node exist in the table? If not, then... Create a pair with Create the corresponding new node and set its type to entity type; otherwise, proceed to step A1-3-6. A1-3-6. In and Add an edge between the two corresponding nodes; A1-3-7. In and Add an edge between the two corresponding nodes; A1-3-8. In and Add an edge between the two corresponding nodes; A1-3-9 Update for and judge Is it greater than If so, then an entity relationship diagram is obtained. Otherwise, proceed to step A1-3-2.
3. The method for identifying fraudulent users in online transactions according to claim 1, characterized in that, The specific process of step A3 is as follows: A3-1. Regarding the transaction record table The Middle Each transaction record is read sequentially, along with its transaction amount. Trading hours Initiating user IP address Receive user IP address ; A3-2. Generating Transaction Time Characteristics: From the time of the transaction Read the year, month, day, hour, and minute, and record them as follows: , , , and , generate the first Transaction time characteristics of a transaction : Transaction time characteristics Quantification: in, Quantize the time step size, This is a floor function; And the characteristics of transaction time Perform normalization; A3-3. Generating Transaction Amount Characteristics: Based on transaction amount Generate the first Transaction amount characteristics of a transaction : And characteristics of transaction amount Perform normalization; A3-4. Generate Transaction Time-Amount Characteristics: This involves generating transaction time characteristics... Characteristics of transaction amount By piecing together the transaction time-amount characteristics, we can obtain the transaction time-amount feature. ; A3-5. Characteristics of the IP address used to generate transactions: according to and , generate the first IP address characteristics of the initiating user in each transaction record and characteristics of the receiving user's IP address : Characteristics of the initiating user's IP address and characteristics of the receiving user's IP address Normalize them separately.
