Credit card fraud behavior detection method, device and equipment and storage medium

By introducing the BiGRU model with attention mechanism, the accuracy problem of credit card fraud detection is solved, the temporal features of credit card transaction data and the extraction of key information are captured, and the accuracy of fraud detection is improved.

CN119693127BActive Publication Date: 2025-10-10INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411819661.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-10-10
Estimated Expiration
2044-12-11

AI Technical Summary

Technical Problem

Existing technologies make it difficult to accurately identify credit card fraud, and as fraud methods become more diverse and complex, detection faces enormous challenges.

Method used

The BiGRU model based on the attention mechanism is used to process credit card transaction data. The convolution module extracts initial features, the attention mechanism weights features, the BiGRU module captures time correlation and extracts contextual information, and finally fraud detection is performed through the fully connected layer.

Benefits of technology

Improved the accuracy of credit card fraud detection, enabling more precise identification of potential fraudulent activity and reducing the impact of noise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693127B_ABST
    Figure CN119693127B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a credit card fraud detection method, device and equipment and a computer readable storage medium, relating to the technical field of artificial intelligence. The method comprises: obtaining target credit card transaction data; processing the target credit card transaction data through a pre-trained detection model to obtain a fraud detection result; wherein the detection model is a BiGRU based on an attention mechanism. The detection model provided by the method introduces an attention mechanism on the basis of BiGRU, so that the detection model can not only capture the time characteristics of credit card transaction data, but also strengthen the extraction of key information, thereby improving the accuracy of the credit card fraud detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a credit card fraud detection method, apparatus, device, and computer-readable storage medium. Background Art

[0002] With the development of internet technology and the widespread adoption of e-commerce, credit card applications and usage channels are becoming increasingly diverse, bringing a convenient user experience to credit card users. However, credit card fraud transactions occur frequently, and the methods used are becoming increasingly diverse and complex, posing a significant challenge to fraud detection.

[0003] Therefore, for those skilled in the art, how to accurately identify credit card fraud is a technical problem that needs to be solved urgently. Summary of the Invention

[0004] The embodiments of the present application provide a credit card fraud detection method, apparatus, device, and computer-readable storage medium, which can improve the accuracy of credit card fraud detection results.

[0005] In a first aspect, an embodiment of the present application provides a method for detecting credit card fraud, comprising:

[0006] Obtain target credit card transaction data;

[0007] The target credit card transaction data is processed by a pre-trained detection model to obtain a fraud detection result; wherein the detection model is a BiGRU based on the attention mechanism.

[0008] In a second aspect, an embodiment of the present application provides a credit card fraud detection device, comprising:

[0009] Acquisition module, used to obtain target credit card transaction data;

[0010] A processing module is used to process the target credit card transaction data through a pre-trained detection model to obtain a fraud detection result; wherein the detection model is a BiGRU based on the attention mechanism.

[0011] In a third aspect, an embodiment of the present application provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the credit card fraud detection method provided in the first aspect of the embodiment of the present application are implemented.

[0012] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the credit card fraud detection method provided in the first aspect of the embodiment of the present application are implemented.

[0013] The technical scheme provided by the embodiment of the application obtains target credit card transaction data, and processes the target credit card transaction data through a pre-trained detection model, so as to obtain a corresponding fraud detection result. The detection model introduces an attention mechanism on the basis of BiGRU, so that the detection model can not only capture the time characteristics of the credit card transaction data, but also strengthen the extraction of key information that has an important influence on fraud detection, thereby improving the accuracy of the credit card fraud detection result. BRIEF DESCRIPTION OF DRAWINGS

[0014] Figure 1 An application environment schematic diagram of the credit card fraud behavior detection method provided by the embodiment of the application is shown.

[0015] Figure 2 A flow schematic diagram of the credit card fraud behavior detection method provided by the embodiment of the application is shown.

[0016] Figure 3 A structure schematic diagram of the detection model provided by the embodiment of the application is shown.

[0017] Figure 4 A structure schematic diagram of the attention mechanism module provided by the embodiment of the application is shown.

[0018] Figure 5 A structure schematic diagram of the BiGRU module provided by the embodiment of the application is shown.

[0019] Figure 6 A structure schematic diagram of the GRU in the BiGRU module provided by the embodiment of the application is shown.

[0020] Figure 7 A structure schematic diagram of the credit card fraud behavior detection device provided by the embodiment of the application is shown.

[0021] Figure 8 A structure schematic diagram of the electronic device provided by the embodiment of the application is shown. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical scheme and advantages of the application more clear, the technical scheme in the embodiment of the application is further described in detail through the following embodiments and in combination with the drawings. It should be understood that the specific embodiments described herein are only used to explain the application and not to limit the application. Those skilled in the art can adjust them as needed to adapt to specific application occasions. In addition, it should be noted that, in order to facilitate the description, only the parts related to the application are shown in the drawings, not all structures.

[0023] Figure 1This is a schematic diagram of the application environment of the credit card fraud detection method provided in the embodiment of the present application. Figure 1 The credit card fraud detection method is applied to a credit card fraud detection system. The credit card fraud detection system may include a terminal 101 and a server 102. Terminal 101 and server 102 are connected via a wireless network or a wired network. Terminal 101 may be a desktop terminal or a mobile terminal. Optionally, the mobile terminal may be at least one of a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), an in-vehicle terminal (e.g., an in-vehicle navigation terminal), and a mobile phone. Server 102 may be a standalone server or a server cluster consisting of multiple servers.

[0024] It should be noted that the credit card fraud detection method in the embodiments of the present application can be executed independently by the terminal 101 or the server 102, or can be executed jointly by the terminal 101 and the server 102. The following method embodiments are described using an electronic device (the electronic device being the terminal 101 and / or the server 102) as an example.

[0025] Figure 2 A flowchart of a credit card fraud detection method provided in an embodiment of the present application.

[0026] like Figure 2 As shown, the method may include:

[0027] S201. Obtain target credit card transaction data.

[0028] Among them, the target credit card transaction data is the credit card transaction data to be detected, including all relevant data of the credit card transaction, such as the transaction operations involved in the credit card, the transaction time of each transaction operation, the transaction amount, the transaction location, the time difference between adjacent transaction operations, etc.

[0029] In one embodiment, when fraud detection is required for a target credit card, the target credit card transaction data can be obtained from a data center and preprocessed to obtain standardized data. The standardized data is then processed using a detection model. Preprocessing methods include outlier removal, null value filling, standardization, and normalization. Alternatively, the target credit card transaction data can be normalized using the following formula or a variation of the formula:

[0030]

[0031] Among them, X std represents the normalized data, X represents the original target credit card transaction data, and X minrepresents the minimum value in the target credit card transaction data, X max Indicates the maximum value in the target credit card transaction data.

[0032] Optionally, a box plot can be used for analysis, and data points that exceed the upper limit or fall below the lower limit are considered outliers and deleted.

[0033] S202: Process the target credit card transaction data using a pre-trained detection model to obtain a fraud detection result.

[0034] Among them, the detection model is a bidirectional gated recurrent neural network (BiGRU) based on the attention mechanism, that is, the detection model introduces a BiGRU module, which can include multiple GRUs. The BiGRU module fully extracts the temporal correlation of the target credit card transaction data from the forward and backward propagation by combining the forward and reverse GRU hidden layers and connecting them to the same output layer.

[0035] In addition, credit card transaction data often contains a large amount of information, but not all information is equally important for detecting credit card fraud. Therefore, the detection model also introduces an attention mechanism, which extracts feature information that has a key impact on credit card fraud detection from the target credit card transaction data, such as abnormal transaction patterns, atypical transaction behaviors, etc., and by giving these feature information higher weights and other useless features smaller weights, thereby shielding the interference of other useless features, allowing the detection model to more accurately identify potential fraud. For example, the attention mechanism can use an attention scoring function to calculate the attention distribution (i.e., weight coefficient) of the target credit card transaction data, and use the calculated attention distribution to perform a weighted summation on the transaction feature information. Among them, the attention scoring function can adopt an additive model, a dot product model, or a bilinear model.

[0036] Therefore, after acquiring the target credit card transaction data, the electronic device inputs the target credit card transaction data into the detection model. The BiGRU module introduced in the detection model mines the temporal correlation of the target credit card transaction data. The attention mechanism introduced in the detection model also performs differentiated information aggregation on the feature information mined by the BiGRU module. Based on the aggregated feature information, it determines whether there is fraud in the target credit card transaction data. If fraud is present, an alarm can be triggered and the fraudulent transaction of the credit card can be prevented. For example, the electronic device can send an alarm message to the terminal held by the credit card administrator.

[0037] The credit card fraud detection method provided in the embodiments of the present application obtains target credit card transaction data and processes the target credit card transaction data through a pre-trained detection model to obtain corresponding fraud detection results. The detection model introduces an attention mechanism based on BiGRU, so that the detection model can not only capture the temporal characteristics of the credit card transaction data, but also enhance the extraction of key information, thereby improving the accuracy of the credit card fraud detection results.

[0038] In one embodiment, optionally, Figure 3 As shown in the figure, the BiGRU based on the attention mechanism may include: a convolution module, an attention mechanism module, a BiGRU module and a fully connected layer.

[0039] Specifically, the convolution module is used to extract the initial feature information of the target credit card transaction data; the attention mechanism module is used to generate weighted feature information based on the initial feature information; the BiGRU module is used to extract contextual information from the weighted feature information; and the fully connected layer is used to classify the contextual information to obtain fraud detection results.

[0040] That is, after acquiring the target credit card transaction data, the electronic device inputs the target credit card transaction data into the detection model. The detection model first performs feature extraction on the target credit card transaction data using a convolution module, mining for hidden characteristic information within the target credit card transaction data. Optionally, the convolution module may include multiple convolution kernels, each of varying sizes. In one example, the convolution module may include three convolution kernels: a convolution kernel of size 5, a convolution kernel of size 1, and a convolution kernel of size 3. For example, the electronic device may initially learn to capture the overall characteristics of the target credit card transaction data using a convolution kernel of size 5. Subsequently, the extracted overall characteristics are further processed using a 1*1 convolution kernel and an activation function (e.g., a ReLU function) to enhance the model's nonlinearity and robustness. Furthermore, a convolution kernel of size 3 is used to further deepen the network depth, fully mining the high-level features of the target credit card transaction data to facilitate subsequent fraud detection and classification. Furthermore, the convolution module integrates a nonlinear activation layer after each convolution layer to correct the distribution of the output data, thereby improving the detection model's discriminative ability.

[0041] After obtaining the initial feature information output by the convolution module, the initial feature information is used as the input of the attention mechanism module, and the initial feature information is subjected to attention processing (i.e., weight coefficient assignment) by the attention mechanism module to obtain weighted feature information. Among them, the attention mechanism module realizes the attention of the local receptive field and enhances the nonlinearity of the model. Optionally, the process of the attention mechanism module generating weighted feature information based on the initial feature information may include: processing the initial feature information through a first attention processing method to obtain a first attention processing result; processing the initial feature information through a second attention processing method to obtain a second attention processing result; superimposing the first attention processing result and the second attention processing result to obtain weighted feature information.

[0042] The first attention processing method is different from the second attention processing method. In this embodiment, the attention mechanism module mines key features in the initial feature information through multiple attention processing methods (i.e., different dimensions), and superimposes the key features mined through different dimensions, giving the key features a greater weight, so that the key features are retained to the greatest extent, further improving the accuracy of credit card fraud detection results.

[0043] Optionally, the process of processing the initial feature information through the first attention processing method to obtain the first attention processing result may include: performing global average pooling processing on the initial feature information to obtain global average pooling features; performing convolution operations, batch normalization processing and nonlinear transformation on the global average pooling features in sequence to obtain a first nonlinear transformation result; performing residual processing on the first nonlinear transformation result and the initial feature information to obtain the first attention processing result.

[0044] Optionally, the process of processing the initial feature information through the second attention processing method to obtain the second attention processing result may include: performing global maximum pooling processing on the initial feature information to obtain global maximum pooling features; performing convolution operation, batch normalization processing and nonlinear transformation on the global maximum pooling features in sequence to obtain a second nonlinear transformation result; performing residual processing on the second nonlinear transformation result and the initial feature information to obtain a second attention processing result.

[0045] Optionally, the convolution operation can be a 1*1 convolution operation, which captures the correlation between channel information and reduces the number of parameters in the detection model. Optionally, the corresponding batch normalization results can be nonlinearly transformed using ReLU activation functions and sigmoid activation functions.

[0046] That is, Figure 4As shown in the figure, the attention mechanism module includes two parallel attention processing paths. One of the processing paths is: performing global average pooling on the initial feature information to obtain global average pooling features, and then performing 1*1 convolution operations, batch normalization processing, and nonlinear transformation of the batch normalization results through ReLU and sigmoid functions on the global average pooling features to achieve feature mapping on this path; in addition, the first nonlinear transformation result obtained after the sigmoid function can be residually connected with the initial feature information through the following formula or a variation of the formula:

[0047]

[0048] Among them, z1 represents the first attention processing result, Represents the first nonlinear transformation result, and x represents the initial feature information.

[0049] Another processing path is to perform global maximum pooling on the initial feature information to obtain the global maximum pooling feature, and then perform 1*1 convolution operation, batch normalization processing and nonlinear transformation of the batch normalization result through ReLU and sigmoid function on the global maximum pooling feature to realize the feature mapping on this path; in addition, the second nonlinear transformation result obtained by the sigmoid function can be residually connected with the initial feature information through the following formula or a variation of the formula:

[0050]

[0051] Among them, z2 represents the second attention processing result, represents the second nonlinear transformation result, and x represents the initial feature information.

[0052] The attention mechanism module can obtain the dependency between the initial feature information through the first attention processing method, and can obtain the most critical prominent features in the initial feature information through the second attention processing method, reducing the influence of other irrelevant noise features and further improving the accuracy of credit card fraud detection results.

[0053] Furthermore, the attention mechanism module superimposes the first attention processing result z1 and the second attention processing result z2 output by the two processing paths, and then performs a nonlinear transformation on the superimposed result through the sigmoid function to obtain weighted feature information.

[0054] After obtaining the weighted feature information, the weighted feature information is used as the input of the BiGRU module, and the context information of the weighted feature information is extracted through the BiGRU module.

[0055] Specifically, such asFigures 5-6 As shown, the BiGRU module is composed of multiple GRUs, which are divided into forward GRUs and reverse GRUs. The forward GRUs extract forward information from front to back (or from past to future), and the reverse GRUs extract reverse information from back to front (or from future to past). Each GRU includes a reset gate and an update gate, Figure 6 where x t represents the input (i.e., the weighted feature information), represents the reset gate, represents the update gate, represents the candidate hidden state, h t-1 represents the previous hidden state, h t represents the final hidden state. The BiGRU module combines the forward and reverse GRU hidden layers to the same output layer to fully extract the context information of the weighted feature information from the forward and reverse propagation. The context information is jointly determined by the states of the forward GRU and the reverse GRU, as shown in the following formula:

[0056]

[0057] where h t is the extracted context information, is the forward state of the forward GRU, is the reverse state of the reverse GRU, w t is the weight corresponding to the forward state, v t is the weight corresponding to the reverse state, b t is the bias. In this way, the BiGRU through forward and backward propagation superimposes the forward feature information and the reverse feature information, so that the most important features are maximally retained.

[0058] Finally, the context information extracted by the BiGRU module is input to the fully connected layer, and the fraud detection result is obtained after transformation by the sigmoid function.

[0059] In this embodiment, the initial feature information of the target credit card transaction data is extracted by the convolution module, and the BiGRU module is used to fully extract the time-related features of the target credit card transaction data from the forward and reverse propagation, and the attention mechanism is used to strengthen the influence of key information, so that the most important features in the target credit card transaction data are maximally retained, thereby improving the accuracy of the credit card fraud detection result.

[0060] In one embodiment, optionally, the above-mentioned detection model can be trained through the following process: obtaining training data, the training data including sample credit card transaction data and label data, the label data being used to indicate the marking result of whether the sample credit card transaction data contains fraudulent behavior; using the sample credit card transaction data as the input of the detection model and the label data as the expected output of the detection model, and training the detection model based on the focal loss function.

[0061] Specifically, after obtaining the sample credit card transaction data, the obtained sample credit card transaction data is preprocessed, and the preprocessed data is subsequently used to train the detection model. Among them, the preprocessing methods include outlier deletion, null value filling processing, standardization processing, and normalization processing. At the same time, the sample credit card transaction data can also be labeled. If there is fraud, it can be marked as "1", and if there is no fraud, it can be marked as "0", forming label data corresponding to the sample credit card transaction data; in addition, the focus loss function is set as the optimization objective function of the detection model. Further, the sample credit card transaction data is used as the input of the detection model to be trained, and the label data is used as the expected output of the detection model to be trained. The loss value of the focus loss function is calculated, and the parameters of the detection model are adjusted based on the loss value until the convergence condition of the focus loss function is reached, thereby obtaining a trained detection model.

[0062] In this embodiment, the focal loss function is selected as the optimization objective function of the detection model, which can balance the problem caused by the imbalanced distribution of credit card transaction data during the model training process, thereby improving the accuracy of the detection model.

[0063] It should be noted that the information collected in the embodiments of the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0064] Figure 7 This is a schematic diagram of the structure of the credit card fraud detection device provided in the embodiment of the present application. Figure 7 As shown, the device may include: an acquisition module 701 and a processing module 702.

[0065] Specifically, the acquisition module 701 is used to obtain target credit card transaction data;

[0066] The processing module 702 is used to process the target credit card transaction data using a pre-trained detection model to obtain a fraud detection result; wherein the detection model is a BiGRU based on the attention mechanism.

[0067] Based on the above embodiment, optionally, the BiGRU based on the attention mechanism includes: a convolution module, an attention mechanism module, a BiGRU network and a fully connected layer;

[0068] The processing module 702 is specifically used to extract the initial feature information of the target credit card transaction data through the convolution module; generate weighted feature information based on the initial feature information through the attention mechanism module; extract context information in the weighted feature information through the BiGRU network; and classify the context information through the fully connected layer to obtain the fraud detection result.

[0069] Based on the above embodiment, optionally, the processing module 702 is also specifically used to process the initial feature information through a first attention processing method to obtain a first attention processing result; process the initial feature information through a second attention processing method to obtain a second attention processing result; and superimpose the first attention processing result and the second attention processing result to obtain the weighted feature information.

[0070] Based on the above embodiment, optionally, the processing module 702 is further specifically configured to perform global average pooling processing on the initial feature information to obtain global average pooling features; sequentially perform convolution operation, batch normalization processing, and nonlinear transformation on the global average pooling features to obtain a first nonlinear transformation result; perform residual processing on the first nonlinear transformation result and the initial feature information to obtain a first attention processing result;

[0071] The processing module 702 is also specifically used to perform global maximum pooling processing on the initial feature information to obtain global maximum pooling features; perform convolution operation, batch normalization processing and nonlinear transformation on the global maximum pooling features in sequence to obtain a second nonlinear transformation result; perform residual processing on the second nonlinear transformation result and the initial feature information to obtain a second attention processing result.

[0072] Based on the above embodiment, optionally, the convolution operation includes a 1*1 convolution operation.

[0073] Based on the above embodiment, optionally, the convolution module includes multiple convolution kernels, and the sizes of the convolution kernels are different.

[0074] Based on the above embodiment, optionally, the acquisition module 701 is further configured to acquire training data, wherein the training data includes sample credit card transaction data and label data, wherein the label data is used to indicate whether the sample credit card transaction data contains fraudulent behavior.

[0075] The processing module 702 is further configured to use the sample credit card transaction data as the input of the detection model and the label data as the expected output of the detection model, and train the detection model based on a focal loss function.

[0076] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 8 As shown, the device includes a processor 80, a memory 81, an input device 82 and an output device 83; the number of processors 80 in the device can be one or more. Figure 8 In the embodiment, a processor 80 is used as an example; the processor 80, the memory 81, the input device 82 and the output device 83 in the device can be connected by a bus or other means. Figure 8 The bus connection is taken as an example.

[0077] Memory 81, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the credit card fraud detection method in the embodiments of the present application (e.g., acquisition module 701 and processing module 702 used in the credit card fraud detection device). Processor 80 executes the software programs, instructions, and modules stored in memory 81 to perform various functional applications and data processing of the device, thereby implementing the credit card fraud detection method provided in any of the above embodiments.

[0078] Memory 81 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data generated during the credit card fraud detection process, etc. Furthermore, memory 81 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state memory device. In some instances, memory 81 may further include memory remotely located relative to processor 80, and such remote memory may be connected to the device / terminal / server via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0079] The input device 82 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the electronic device. The output device 83 may include a display device such as a display screen.

[0080] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0081] Obtain target credit card transaction data;

[0082] The target credit card transaction data is processed by a pre-trained detection model to obtain a fraud detection result; wherein the detection model is a BiGRU based on the attention mechanism.

[0083] The credit card fraud detection devices, electronic devices, and computer-readable storage media provided in the above embodiments can implement the credit card fraud detection methods provided in any of the embodiments of this application, and possess the corresponding functional modules and beneficial effects of executing the methods. For technical details not fully described in the above embodiments, please refer to the credit card fraud detection methods provided in any of the embodiments of this application.

[0084] Through the above description of the implementation methods, those skilled in the art can clearly understand that the present application can be implemented with the help of software and necessary general-purpose hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a computer's floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0085] It is worth noting that the various units and modules included in the above embodiments are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application.

[0086] Note that the above are only preferred embodiments of the present application and the technical principles employed. Those skilled in the art will understand that the present application is not limited to the specific embodiments herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments and may include many other equivalent embodiments without departing from the scope of the present application. The scope of the present application is determined by the scope of the appended claims.

Claims

1. A credit card fraud detection method, characterized in that: include: Obtain target credit card transaction data; Processing the target credit card transaction data using a pre-trained detection model to obtain fraud detection results; wherein the detection model is a Bidirectional Gated Recurrent Network (BiGRU) based on an attention mechanism; The BiGRU based on the attention mechanism includes: a convolution module, an attention mechanism module, a BiGRU module and a fully connected layer; The convolution module is used to extract initial feature information of the target credit card transaction data; The attention mechanism module is used to generate weighted feature information based on the initial feature information; The BiGRU module is used to extract context information from the weighted feature information; The fully connected layer is used to classify the context information to obtain the fraud detection result; Generating weighted feature information according to the initial feature information includes: Processing the initial feature information using a first attention processing method to obtain a first attention processing result; Processing the initial feature information using a second attention processing method to obtain a second attention processing result; Superimposing the first attention processing result and the second attention processing result to obtain the weighted feature information; The processing of the initial feature information by the first attention processing method to obtain a first attention processing result includes: Performing global average pooling processing on the initial feature information to obtain global average pooling features; Performing convolution, batch normalization, and nonlinear transformation on the global average pooling feature in sequence to obtain a first nonlinear transformation result; Performing residual processing on the first nonlinear transformation result and the initial feature information to obtain a first attention processing result; The processing of the initial feature information by the second attention processing method to obtain a second attention processing result includes: Performing global maximum pooling processing on the initial feature information to obtain global maximum pooling features; performing convolution operation, batch normalization processing and nonlinear transformation on the global maximum pooling feature in sequence to obtain a second nonlinear transformation result; Perform residual processing on the second nonlinear transformation result and the initial feature information to obtain a second attention processing result.

2. The method according to claim 1, characterized in that The convolution operation includes a 1*1 convolution operation.

3. The method according to claim 1, characterized in that The convolution module includes multiple convolution kernels, and the sizes of the convolution kernels are different.

4. The method according to any one of claims 1 to 3, characterized in that The detection model is trained through the following process: Acquire training data, the training data including sample credit card transaction data and label data, the label data being used to indicate whether the sample credit card transaction data is fraudulent; The sample credit card transaction data is used as the input of the detection model, the label data is used as the expected output of the detection model, and the detection model is trained based on the focal loss function.

5. A credit card fraud detection device, characterized in that: include: Acquisition module, used to obtain target credit card transaction data; a processing module, configured to process the target credit card transaction data using a pre-trained detection model to obtain a fraud detection result; wherein the detection model is a BiGRU based on an attention mechanism; The BiGRU based on the attention mechanism includes: a convolution module, an attention mechanism module, a BiGRU network and a fully connected layer; The processing module is specifically configured to extract initial feature information of the target credit card transaction data through the convolution module; generate weighted feature information based on the initial feature information through the attention mechanism module; extract context information from the weighted feature information through the BiGRU network; and classify the context information through the fully connected layer to obtain the fraud detection result; The processing module is further specifically configured to process the initial feature information using a first attention processing method to obtain a first attention processing result; process the initial feature information using a second attention processing method to obtain a second attention processing result; and superimpose the first attention processing result and the second attention processing result to obtain the weighted feature information; The processing module is further specifically configured to perform global average pooling processing on the initial feature information to obtain global average pooling features; perform convolution operation, batch normalization processing, and nonlinear transformation on the global average pooling features in sequence to obtain a first nonlinear transformation result; perform residual processing on the first nonlinear transformation result and the initial feature information to obtain a first attention processing result; The processing module is also specifically used to perform global maximum pooling processing on the initial feature information to obtain global maximum pooling features; perform convolution operation, batch normalization processing and nonlinear transformation on the global maximum pooling features in sequence to obtain a second nonlinear transformation result; perform residual processing on the second nonlinear transformation result and the initial feature information to obtain a second attention processing result.

6. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Financial unbalanced data classification method based on deep learning

    CN117407526A

  • Customer service appeal data processing method and device, electronic equipment and storage medium

    CN118643828A