Anti-fraud detection dynamic graph model construction method and system based on layered attention
By constructing an anti-fraud detection dynamic graph model based on hierarchical attention, analyzing user transaction relationships and features, combining local and global graph feature learning, the problem of low prediction accuracy in the existing technology is solved, and more accurate fraud prediction is achieved .
Patent Information
- Application Number
- CN202411026700.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-11-22
AI Technical Summary
In identifying and preventing bank card fraud, the prior art fails to fully consider the complex interaction changes in independent user transaction activities and the concentration and concealment of fraud gangs, resulting in a decrease in prediction accuracy.
Adopt the anti-fraud detection dynamic graph model based on hierarchical attention, build a user transaction relationship graph structure, introduce local and global graph feature learning modules, learn historical trading modes through LSTM codec network, and iteratively optimize prediction in the dynamic time prediction mechanism Model.
It improves the accuracy of fraud prediction, can take into account the multi-character characteristics of a single user and the dynamic characteristics of multiple transactions between users, dynamically select parameters, and accurately consider long-term and short-term fraud issues.
Smart Images

Figure CN119006155A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of financial information analysis and identification, and in particular to a method and system for constructing an anti-fraud detection dynamic graph model based on hierarchical attention. Background Art
[0002] In recent years, with the rapid development of e-commerce and online transactions, fraud has also shown a growing trend. Bank card fraud occurs widely in real life, involving a wide range of people and with high frequency. Being able to predict the direction of funds and identify risks before a case occurs is of great significance for avoiding losses. Accurately predicting the possibility of fraud based on a large amount of independent user information is a breakthrough in identifying and preventing fraud.
[0003] The identification of fraudulent behavior is an important part of regulating e-commerce, especially for independent users. For example, the Chinese invention patent publication CN114298417A discloses an anti-fraud risk assessment method, training method, device and readable storage medium, including: obtaining a training sample set, the training sample includes multi-dimensional features and its fraud label, the multi-dimensional features include: user static features, user behavior features and device risk APP features; inputting the training sample set into the anti-fraud risk assessment model to be trained for iterative training; wherein, in each round of iteration, the anti-fraud risk assessment model performs embedding processing on the input multi-dimensional features to obtain an input vector, inputs the input vector into a feature learning network constructed based on the self-attention mechanism to obtain a weighted fused encoding vector, inputs the encoding vector into a deep network to obtain a risk prediction result, and uses the risk prediction result and the loss function constructed by the fraud label to update the parameters of the risk assessment model. However, the characteristics of independent user transaction activities are not taken into account, so the feature extraction is insufficient, resulting in reduced prediction accuracy.
[0004] In the prior art, the interaction changes of independent users in the transaction network are relatively complex. The traditional anti-fraud model mainly focuses on the historical transaction records of independent individual customers. However, the transaction relationship between users forms a complex network structure. Only focusing on the characteristics of independent users will inevitably reduce the accuracy of fraud prediction; secondly, in fraudulent behavior, concentration and concealment coexist. On the one hand, concentration is reflected in the fact that a fraud gang is often associated with different user behaviors and has the characteristics of concentrated occurrence. On the other hand, the fraud gang will conceal its account attributes as a normal company. However, in the transaction behavior, the structural pattern they reflect is completely different from the normal structure and isolated. The traditional method lacks global capabilities and only relies on observing independent user behavior. It is not enough to capture the specific scenarios behind the user's transaction, and therefore often ignores some behavioral clues. Summary of the invention
[0005] In order to address the deficiencies of the prior art, the present invention proposes a method, system, electronic device and computer-readable storage medium for constructing an anti-fraud detection dynamic graph model based on hierarchical attention.
[0006] To achieve the above objectives, the technical solutions adopted by the present invention include:
[0007] A method for constructing an anti-fraud detection dynamic graph model based on hierarchical attention, characterized by comprising:
[0008] S1. Construct a user transaction relationship graph structure, analyze the multi-feature factors that affect user transaction decisions, encode the multi-feature set, and embed it into the user transaction relationship graph structure to obtain a data set;
[0009] S2. construct a feature model based on a hierarchical graph attention mechanism to extract features, and construct a prediction model to learn the rules of historical transaction patterns based on the data set;
[0010] S3 introduces the prediction model into a dynamic time prediction mechanism for iteration, and inputs the pre-divided transaction history data for encoding and decoding, obtains the prediction value of the fraud of the independent user and makes an evaluation.
[0011] Optionally, the step S1 further includes:
[0012] S11, treating independent transaction users as user nodes, and when there is a transaction between the user nodes, connecting the user nodes with connection edges to form a directed user transaction relationship graph structure;
[0013] S12, analyzing the features that have an impact on the user's transaction decision, constructing a multi-feature set, and encoding and reducing the feature dimension of the multi-feature set, wherein the multi-feature set includes user features, external features, and graph structure features;
[0014] S13, embedding the encoded multi-feature set into the user transaction relationship graph structure, and integrating to obtain a data set.
[0015] Optionally, step S2 further comprises:
[0016] S21, introducing a local graph feature learning module and a global graph structure learning module into the hierarchical attention mechanism, and constructing the feature model to extract local graph features and global graph features;
[0017] S22. Construct an LSTM encoding and decoding network structure as the prediction model, and input the local graph features, the global graph features and the data set to learn the rules of historical transaction patterns through encoding and decoding.
[0018] Optionally, step S3 further includes:
[0019] S31, introducing the prediction model into a dynamic time prediction mechanism based on a multiplication weight attenuation factor, wherein the dynamic time prediction mechanism dynamically learns the transaction pattern and adaptively selects parameters to iterate the prediction model;
[0020] S32, dividing the transaction history data according to a preset step size to form a snapshot data set;
[0021] The snapshot data set is input into the iterated prediction model for encoding and decoding to obtain a prediction value for the fraud of the independent user, and the prediction value is evaluated based on the real label data.
[0022] Furthermore, the step S11 further includes:
[0023] The size of the connection edge between the user nodes is determined by the normalized transaction amount.
[0024] Furthermore, the multi-feature set in step S12 further includes:
[0025] The user characteristics include: occupation, age, and region, which are the main influencing factors for analyzing user behavior;
[0026] The external features include: transaction channel, whether it is a holiday sign, and serve as auxiliary information for predicting user transactions and fraudulent behavior;
[0027] The graph structure features include: the node degree of the graph and the Laplace eigenvector of the maximum eigenvalue.
[0028] In addition, the present invention also relates to a hierarchical attention-based anti-fraud detection dynamic graph model construction system, which is characterized by comprising:
[0029] A graph structure construction module, used to construct the user transaction relationship graph structure, wherein the user transaction relationship graph structure regards the independent transaction users as user nodes, and if a transaction occurs between the user nodes, the user nodes are connected by connecting edges, and the user transaction relationship graph is a directed graph;
[0030] A multi-feature set construction module, used for analyzing features that have a greater influence on user transaction decisions, and constructing the multi-feature set, performing one-hot encoding and feature dimension reduction on the multi-feature set, wherein the multi-feature set includes user features, external features, and graph structure features;
[0031] An integration module, used to one-hot encode the multiple feature sets and embed them into the user transaction relationship graph structure for integration to obtain a data set;
[0032] Feature extraction module, used to build a feature model based on the hierarchical graph attention mechanism to extract local graph features and global graph features;
[0033] A prediction model building module, used to build an LSTM encoding and decoding network structure as the prediction model, and input the local graph features, the global graph features and the data set to learn the rules of historical transaction patterns through encoding and decoding;
[0034] A transaction history data partitioning module is used to partition the transaction history data according to a preset step size to form a snapshot data set;
[0035] A model iteration module, used for introducing the prediction model into a dynamic time prediction mechanism based on a multiplication weight decay factor, wherein the dynamic time prediction mechanism dynamically learns the transaction pattern and adaptively selects parameters to iterate the prediction model;
[0036] The prediction module is used to input the snapshot data set into the iterated prediction model for encoding and decoding, obtain the prediction value for the fraud of the independent user, and evaluate the prediction value based on the real label data.
[0037] Furthermore, the graph structure building module is also used for:
[0038] The size of the connection edge between the user nodes is determined based on the normalized transaction amount.
[0039] In addition, the present invention also relates to an electronic device, characterized in that it includes a processor and a memory; the memory is used to store operation instructions; and the processor is used to execute the above method by calling the operation instructions.
[0040] In addition, the present invention also relates to a computer-readable storage medium, characterized in that a computer program is stored on the storage medium, and the computer program implements the above method when executed by a processor.
[0041] Using the solution provided by the present application, first, by analyzing the multi-feature set of user transaction decisions and integrating it with the user transaction relationship graph structure, a data set is constructed; secondly, the hierarchical attention mechanism including local feature attention and global feature attention is introduced, and the feature model is constructed to extract local graph features and global graph features. The LSTM encoding and decoding network structure is used as a prediction model to learn historical transaction patterns based on the local graph features, the global graph features and the data set; finally, the prediction model is introduced into a dynamic time prediction mechanism for iteration, the transaction history data is encoded and decoded, and the predicted value of independent user fraud is evaluated; therefore, the above technical solution can fully consider user characteristics, and through the hierarchical attention mechanism, it can simultaneously take into account the dynamic characteristics of multiple features of a single user and multiple transactions between users, and can dynamically select parameters as the basis for prediction, accurately consider long-term and short-term fraud problems, and provide a new and effective method for the anti-fraud field. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of a method for constructing a dynamic graph model for anti-fraud detection based on hierarchical attention provided in an embodiment of the present application;
[0043] Figure 2a A schematic diagram of a transaction relationship in a normal transaction mode provided in an embodiment of the present application;
[0044] Figure 2b A schematic diagram of a transaction relationship of an abnormal transaction mode provided in an embodiment of the present application;
[0045] Figure 3 A schematic diagram of the structure of a system for building a dynamic graph model for anti-fraud detection based on hierarchical attention provided in an embodiment of the present application;
[0046] Figure 4 A schematic diagram of the structure of an anti-fraud dynamic graph model provided in an embodiment of the present application;
[0047] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present invention.
[0049] Those skilled in the art can understand that, unless otherwise stated, the singular forms "one", "an", "said" and "the" used herein may also include plural forms, and the "first", "second", etc., are only used to distinguish and define objects for the purpose of introducing the scheme clearly, and do not limit the objects themselves. Of course, the objects defined by "first" and "second" may be the same terminal, device, user, etc., or the same type of terminal, device and user. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0050] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments.
[0051] Figure 1 The present invention provides a schematic diagram of a method for constructing a dynamic graph model for anti-fraud detection based on hierarchical attention, including:
[0052] S1. Constructing a user transaction relationship graph structure (CUSGNN), analyzing the multi-feature factors that affect the user's transaction decision, and embedding the encoded multi-feature set into the user transaction relationship graph structure as a supplement to obtain a data set, wherein the multi-feature set is constructed based on the multi-feature factors;
[0053] Specifically, the step S1 includes:
[0054] S11. The user transaction relationship graph structure (CUSGNN) regards independent transaction users as user nodes. If a transaction occurs between the user nodes, the user nodes are connected by connecting edges. The user transaction relationship graph structure is represented by G = {V, E, A}, v u ∈V represents a client node, e u ∈E represents a transaction edge, with a total of V = |N| nodes and E = |M| edges established;
[0055] When a transaction occurs, an edge is established. If there is no transaction relationship, it is not established. The user transaction relationship graph is a directed graph. uab ∈E represents the flow of funds, and e uab The size of is determined by the normalized transaction amount, so e uab ∈(0,1), A is the adjacency matrix representing the graph relationship, expressed as:
[0056]
[0057] like Figure 2a The transaction relationship diagram of the normal transaction mode shown in FIG. 1 represents that the user nodes of the independent users are closely connected due to the existence of the transaction relationship and are in a randomly divergent state. Figure 2b In the transaction relationship diagram of the abnormal transaction mode shown, multiple user nodes are connected to one node, which is not a random transaction state under a normal relationship.
[0058] S12. Analyze the features that have a greater influence on the user's transaction decision, and construct the multi-feature set, and perform one-hot encoding and feature dimensionality reduction on the multi-feature set, wherein the multi-feature set includes user features, external features, and graph structure features.
[0059] The user characteristics include: occupation, age, and region, represented by F C , F A and F R , as the main influencing factor for analyzing user behavior;
[0060] The external features include: transaction channel, whether it is a festival sign, represented by F L and F H , as auxiliary information for predicting user transactions and fraudulent behavior;
[0061] The graph structure features include: the node degree of the graph The Laplace eigenvector u0 of the largest eigenvalue;
[0062] The Laplace matrix is obtained through the adjacency matrix A and the degree matrix D in the user transaction relationship graph structure, and the graph structure feature decomposition is performed through the Laplace matrix: u0 is the main eigenvector of the user transaction relationship graph structure.
[0063] By fully mining the above features and taking into account transaction patterns and graph structure features, the features can be represented more clearly and accurately, which can simplify the problems of feature selection and feature alignment faced by multi-user transaction problems.
[0064] S13, one-hot encoding the multi-feature set:
[0065] The user transaction relationship graph structure is embedded and integrated to obtain a data set, which is expressed as: in, is the characteristic data, It is the original transaction graph data.
[0066] S2. Constructing a feature model (TH-ATTN-CUSGNN) based on a hierarchical graph attention mechanism for feature extraction, and constructing a prediction model to learn the rules of historical transaction patterns based on the data set and the features, wherein the hierarchical graph attention mechanism includes: a local graph feature learning module (PFL) and a global graph structure learning module (GGL);
[0067] Specifically, step S2 includes:
[0068] S21. Introduce a local graph feature learning module and a global graph structure learning module into the hierarchical attention mechanism, and construct the feature model to extract local graph features and global graph features.
[0069] The local feature learning module (PFL) is used to capture local user portraits and transaction characteristics, that is, single customer features. Each customer's transaction is regarded as a local feature. Given the k-th feature representation of the i-th node, the dynamic correlation and importance between each local feature are adaptively captured by the local feature attention at the first level:
[0070]
[0071] in is the learnable parameter of the model. i,k represents the kth eigenvector of the ith node at time t, h t-1 and t-1 is the state vector of the model, That is, at time t, the attention coefficient of feature k for node i is passed through the PFL module to obtain the weighted output vector after feature attention:
[0072]
[0073] The global graph structure learning module (GGL) is used to capture the characteristics of the global transaction graph structure, that is, the global feature attention is located at the second level, which is used to extract the global graph features, learn structural characteristics, and make vertices with similar topological structures mapped to the local vector space closer, so as to improve the model's ability to identify groups or clusters with abnormal transactions. Given the i-th node to be predicted and other nodes j with transaction relationships, 0≤j≤n,j≠i, obtain the transaction relationship attention:
[0074]
[0075] in are the learnable parameters of the model, represents the node with which the i-th node has a transaction relationship at time t. t-1 and t-1 is the state vector of the model. is the attention coefficient of node k to node i at time t, that is, the structural coefficient. After passing through the GGL module, the output vector is obtained:
[0076]
[0077] Integrate local customer features and global transaction structure features. and Convert to the same dimensions:
[0078]
[0079] And normalize it:
[0080]
[0081] Finally, the fused data is obtained:
[0082] By introducing a hierarchical attention mechanism, we can fully consider the characteristics of independent user transaction activities, deeply explore feature relationships, improve the accuracy of the model, and capture the dynamic characteristics of multiple features of a single user and multiple transactions between users. We extract local graph features through local feature attention, dynamically capture the association between multiple features of user nodes, and obtain the influence weight of local features. Considering that fraudulent behavior will appear in the form of concentrated and isolated distribution of transactions, the performance pattern of fraudulent events in the transaction graph structure will be different from that of the normal transaction graph structure. We extract global graph features through global feature attention, capture the relationship between nodes, that is, the transaction association between multiple users, and thus discover global fraudulent behavior.
[0083] S22. Construct an LSTM encoding and decoding network structure as the prediction model, and input the local graph features, the global graph features and the data set to learn the rules of historical transaction patterns through encoding and decoding.
[0084] The encoder is represented as: where h t represents the hidden state of the LSTM encoder at time t, and the decoder is represented as: d t'-1 represents the hidden state of the LSTM decoder at time t-1. The prediction result is expressed as:
[0085] S3. Introducing the prediction model into a dynamic time prediction mechanism for iteration, and inputting the pre-divided transaction history data for encoding and decoding, obtaining the prediction value of the independent user being defrauded and evaluating it.
[0086] Specifically, step S3 includes:
[0087] S31. Introducing the prediction model into a dynamic time prediction mechanism based on a multiplication weight attenuation factor, wherein the dynamic time prediction mechanism dynamically learns the transaction pattern and adaptively selects parameters to iterate the prediction model.
[0088] The candidate prediction model in a time period is represented as f q ,1≤q≤Q, the model set is represented by {f1,f2…f q …f Q}, Q represents the number of dynamic models. The loss function at time t is expressed as: The optimal solution of the model is expressed as Then the cost of each decision is defined as:
[0089]
[0090] Among them, r and s represent any time interval in the entire time range.
[0091] The iterative process flow is described as follows:
[0092] (1): The model set within the time range 1≤t≤T is represented as S t , let the model S at time t be t The distribution is p t , the initialization model distribution function is
[0093] (2): For q∈S t , at time t the model is calculated as:
[0094] (3): At any time, the goal of the dynamic model is to get closer to the actual result, that is, minimize when Update, the distribution function of the model is updated:
[0095]
[0096] (4): The prediction model at time t+1 will be determined based on the performance of the model at time t. If the probability distribution of t makes the result closer to the truth, a new set of models will be added and updated based on the original ones according to the multiplication rule:
[0097]
[0098] (5): Last updated model distribution:
[0099] (6): Execute steps (1)-(5) within 1≤t≤T;
[0100] S32. Transaction history data Divide according to the preset step size to form a snapshot data set;
[0101] The snapshot data set is input into the iterated prediction model for encoding and decoding to obtain the prediction value of fraud for the independent user i Based on real label data The predicted value is evaluated.
[0102] The dynamic time prediction mechanism can adaptively select the time step size to address the uneven distribution of transaction behaviors in the data divided by step size, so as to accurately consider long-term and short-term fraud problems.
[0103] By adopting the above solution, user characteristics can be fully considered, and through the hierarchical attention mechanism, the multiple characteristics of a single user and the dynamic characteristics of multiple transactions between users can be taken into account at the same time, and parameters can be dynamically selected as the basis for prediction, accurately considering long-term and short-term fraud problems.
[0104] based on Figure 1 The method for constructing an anti-fraud detection dynamic graph model based on hierarchical attention is shown in the figure. On the other hand, it also relates to a system for constructing an anti-fraud detection dynamic graph model based on hierarchical attention, and its structure is as follows Figure 3 As shown, including:
[0105] The graph structure construction module 301 is used to construct the user transaction relationship graph structure. The user transaction relationship graph structure regards the independent transaction users as user nodes. If there is a transaction between the user nodes, the user nodes are connected by connecting edges, and the user transaction relationship graph is a directed graph. uab ∈E represents the flow of funds, and e uab The size of is determined by the normalized transaction amount, so e uab ∈(0,1), A is the adjacency matrix representing the graph relationship;
[0106] A multi-feature set construction module 302 is used to analyze features that have a greater influence on user transaction decisions, and construct the multi-feature set, and perform one-hot encoding and feature dimension reduction on the multi-feature set, wherein the multi-feature set includes user features, external features, and graph structure features;
[0107] The user characteristics include: occupation, age, and region, which are the main influencing factors for analyzing user behavior;
[0108] The external features include: transaction channel, whether it is a holiday sign, and serve as auxiliary information for predicting user transactions and fraudulent behavior;
[0109] The graph structure features include: the node degree of the graph, the Laplace eigenvector of the maximum eigenvalue;
[0110] An integration module 303 is used to embed the multi-feature set into the user transaction relationship graph structure after one-hot encoding to obtain a data set;
[0111] A feature extraction module 304 is used to construct a feature model based on a hierarchical graph attention mechanism (TH-ATTN-CUSGNN) to extract local graph features and global graph features, wherein the hierarchical graph attention mechanism includes: a local graph feature learning module (PFL) and a global graph structure learning module;
[0112] The prediction model construction module 305 is used to construct an LSTM encoding and decoding network structure as the prediction model, and input the local graph features, the global graph features and the data set to learn the rules of historical transaction patterns through encoding and decoding;
[0113] The transaction history data partitioning module 306 is used to partition the transaction history data according to a preset step size to form a snapshot data set;
[0114] A model iteration module 307, used for introducing the prediction model into a dynamic time prediction mechanism based on a multiplication weight decay factor, wherein the dynamic time prediction mechanism dynamically learns the transaction pattern and adaptively selects parameters to iterate the prediction model;
[0115] The prediction module 308 is used to input the snapshot data set into the iterated prediction model for encoding and decoding, obtain the prediction value of the fraud of the independent user, and evaluate the prediction value based on the real label data.
[0116] By using this system, the above method can be executed and the corresponding technical effects can be achieved.
[0117] at the same time, Figure 4 A schematic diagram of the anti-fraud dynamic graph model structure is shown. In the transaction graph structure, the decoder is a component used to convert the features extracted by the encoder into an understandable format. Dynamically updating the model combination and parameters can help the decoder to dynamically adjust and optimize according to different transaction data. GGL (global graph attention layer) and TH-ATTN (hierarchical graph attention layer) can extract feature information in the transaction graph from a global and local perspective, respectively, and model the relationship between nodes to help the decoder better understand the transaction graph structure.
[0118] The encoder is used to extract the features of transaction data. GGL (Global Graph Attention Layer) can globally capture the relationship information between nodes in the transaction graph. TH-ATTN (Hierarchical Graph Attention Layer) can extract local and global information of multiple features and multiple nodes from bottom to top. TH-ATN (Adaptive Time Attention Layer) can perform dynamic modeling based on time series information.
[0119] The embedding layer represents discrete node attributes as continuous vectors, which facilitates model learning and reasoning;
[0120] Through components playing their own unique roles in the entire transaction graph structure and working together, they can effectively process and analyze the transaction data of independent customers, thereby improving the accuracy and efficiency of fraud detection.
[0121] An embodiment of the present invention further provides an electronic device for executing the above method, as an implementation device of the method, comprising a processor and a memory;
[0122] A memory, used for storing operation instructions;
[0123] The processor is used to execute the anti-fraud detection dynamic graph model construction method provided in any embodiment of the present application by calling operation instructions.
[0124] As an example, Figure 5 A schematic diagram of the structure of an electronic device applicable to the embodiment of the present application is shown. Figure 5 As shown, the electronic device 500 includes: a processor 501 and a memory 503. The processor 501 and the memory 503 are connected, such as being connected via a bus 502. Optionally, the electronic device 500 may further include a transceiver 504. It should be noted that in actual applications, the transceiver 504 is not limited to one. It is understandable that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the specific structure of the electronic device 500. In other embodiments of the present application, the electronic device 500 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. Optionally, the electronic device may further include a display screen 505 for displaying images, or receiving user operation instructions when necessary.
[0125] The processor 501 is applied in the embodiment of the present application to implement the method shown in the above method embodiment. The transceiver 504 may include a receiver and a transmitter. The transceiver 504 is applied in the embodiment of the present application to implement the function of the electronic device of the embodiment of the present application communicating with other devices when executed.
[0126] Processor 501 may be a CPU (Central Processing Unit), a general purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 501 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0127] The processor 501 may also include one or more processing units, for example, the processor 501 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural network processor (Neural-network Processing Unit, NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors. Among them, the controller may be the nerve center and command center of the electronic device 500. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions. A memory may also be set in the processor 501 for storing instructions and data. In some embodiments, the memory in the processor 501 is a high-speed cache memory. The memory may store instructions or data that the processor 501 has just used or circulated. If the processor 501 needs to use the instruction or data again, it can be directly called from the memory. Repeated access is avoided, the waiting time of the processor 501 is reduced, and the efficiency of the system is improved.
[0128] The processor 501 can run the anti-fraud detection dynamic graph model construction method provided in the embodiment of the present application to reduce the user's operation complexity, improve the intelligence of the terminal device, and enhance the user experience. The processor 501 can include different devices. For example, when the CPU and GPU are integrated, the CPU and GPU can cooperate to execute the anti-fraud detection dynamic graph model construction method provided in the embodiment of the present application to obtain faster processing efficiency.
[0129] The bus 502 may include a path to transmit information between the above components. The bus 502 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 502 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0130] The memory 503 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or may include a high-speed random access memory, or may include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this.
[0131] Optionally, the memory 503 is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 501. The processor 501 is used to execute the application code stored in the memory 503 to implement the anti-fraud detection dynamic graph model construction method provided in any embodiment of the present application.
[0132] The memory 503 can be used to store computer executable program codes, which include instructions. The processor 501 executes various functional applications and data processing of the electronic device 500 by running the instructions stored in the memory 503. The memory 503 may include a program storage area and a data storage area. Among them, the program storage area can store the code of the operating system, application program, etc. The data storage area can store data created during the use of the electronic device 500 (such as images, videos, etc. collected by the camera application), etc.
[0133] The memory 503 may also store one or more computer programs corresponding to the anti-fraud detection dynamic graph model construction method provided in the embodiment of the present application. The one or more computer programs are stored in the above-mentioned memory 503 and are configured to be executed by the one or more processors 501. The one or more computer programs include instructions, and the above-mentioned instructions can be used to execute each step in the above-mentioned corresponding embodiment.
[0134] Of course, the code of the anti-fraud detection dynamic graph model construction method provided in the embodiment of the present application can also be stored in an external memory. In this case, the processor 501 can run the code of the database configuration method stored in the external memory through the external memory interface, and the processor 501 can control the operation of the database configuration process.
[0135] The display screen 505 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 500 may include 1 or N display screens 505, where N is a positive integer greater than 1. The display screen 505 can be used to display information input by a user or information provided to a user and various graphical user interfaces (GUIs). For example, the display screen 505 can display photos, videos, web pages, or files, etc.
[0136] The electronic device provided in the embodiment of the present application is applicable to any embodiment of the above method. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, which will not be repeated here.
[0137] An embodiment of the present invention also provides a computer-readable storage medium capable of implementing all the steps in the method in the above embodiment, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, all the steps in the method in the above embodiment are implemented.
[0138] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0139] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or boxes.
[0140] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction system, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0141] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1The steps of the functions specified in a box or multiple boxes. Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the attached claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0142] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for constructing a dynamic graph model for anti-fraud detection based on hierarchical attention, characterized in that: include: S1. Construct a user transaction relationship graph structure, analyze the multi-feature factors that affect user transaction decisions, encode the multi-feature set, and embed it into the user transaction relationship graph structure to obtain a data set; S2. construct a feature model based on a hierarchical graph attention mechanism to extract features, and construct a prediction model to learn the rules of historical transaction patterns based on the data set; S3. Introducing the prediction model into a dynamic time prediction mechanism for iteration, and inputting pre-divided transaction history data for encoding and decoding, obtaining a prediction value for the fraud of an independent user and performing an evaluation.
2. The method according to claim 1, characterized in that The step S1 further comprises: S11, treating independent transaction users as user nodes, and when there is a transaction between the user nodes, connecting the user nodes with connection edges to form a directed user transaction relationship graph structure; S12, analyzing the features that have an impact on the user's transaction decision, constructing a multi-feature set, and encoding and reducing the feature dimension of the multi-feature set, wherein the multi-feature set includes user features, external features, and graph structure features; S13, embedding the encoded multi-feature set into the user transaction relationship graph structure, and integrating to obtain a data set.
3. The method according to claim 1, characterized in that The step S2 further comprises: S21, introducing a local graph feature learning module and a global graph structure learning module into the hierarchical attention mechanism, and constructing the feature model to extract local graph features and global graph features; S22. Construct an LSTM encoding and decoding network structure as the prediction model, and input the local graph features, the global graph features and the data set to learn the rules of historical transaction patterns through encoding and decoding.
4. The method according to claim 1, characterized in that The step S3 further comprises: S31, introducing the prediction model into a dynamic time prediction mechanism based on a multiplication weight attenuation factor, wherein the dynamic time prediction mechanism dynamically learns the transaction pattern and adaptively selects parameters to iterate the prediction model; S32, dividing the transaction history data according to a preset step size to form a snapshot data set; The snapshot data set is input into the iterated prediction model for encoding and decoding to obtain a prediction value for the fraud of the independent user, and the prediction value is evaluated based on the real label data.
5. The method according to claim 2, characterized in that: The step S11 further includes: The size of the connection edge between the user nodes is determined by the normalized transaction amount.
6. The method according to claim 2, characterized in that The multiple feature set in step S12 further includes: The user characteristics include: occupation, age, and region, which are the main influencing factors for analyzing user behavior; The external features include: transaction channel, whether it is a holiday sign, and serve as auxiliary information for predicting user transactions and fraudulent behavior; The graph structure features include: the node degree of the graph and the Laplace eigenvector of the maximum eigenvalue.
7. A hierarchical attention-based anti-fraud detection dynamic graph model construction system, characterized in that: include: A graph structure construction module, used to construct the user transaction relationship graph structure, wherein the user transaction relationship graph structure regards the independent transaction users as user nodes, and if a transaction occurs between the user nodes, the user nodes are connected by connecting edges, and the user transaction relationship graph is a directed graph; A multi-feature set construction module, used for analyzing features that have a greater influence on user transaction decisions, and constructing the multi-feature set, performing one-hot encoding and feature dimension reduction on the multi-feature set, wherein the multi-feature set includes user features, external features, and graph structure features; An integration module, used to one-hot encode the multiple feature sets and embed them into the user transaction relationship graph structure for integration to obtain a data set; Feature extraction module, used to build a feature model based on the hierarchical graph attention mechanism to extract local graph features and global graph features; A prediction model building module, used to build an LSTM encoding and decoding network structure as the prediction model, and input the local graph features, the global graph features and the data set to learn the rules of historical transaction patterns through encoding and decoding; A transaction history data partitioning module is used to partition the transaction history data according to a preset step size to form a snapshot data set; A model iteration module, used for introducing the prediction model into a dynamic time prediction mechanism based on a multiplication weight decay factor, wherein the dynamic time prediction mechanism dynamically learns the transaction pattern and adaptively selects parameters to iterate the prediction model; The prediction module is used to input the snapshot data set into the iterated prediction model for encoding and decoding, obtain the prediction value for the fraud of the independent user, and evaluate the prediction value based on the real label data.
8. The system according to claim 7, characterized in that The graph structure building module is also used to determine the size of the connection edges between the user nodes based on the normalized transaction amount.
9. An electronic device, characterized in that: including a processor and a memory; The memory is used to store operation instructions; The processor is used to execute the method according to any one of claims 1 to 6 by calling the operation instruction.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Transaction fraud risk prediction method and system based on user behavior logic
CN119991133A
Unsupervised recommendation system anomaly detection method based on multi-scale behavior modeling and boundary perception enhancement
CN121188669A
