Credit card fraud behavior detection method and device, equipment and storage medium
By using the BiGRU detection model based on attention mechanism in credit card fraud detection, the problem of difficulty in accurately identifying credit card fraud in the prior art is solved, and higher detection accuracy is achieved.
Patent Information
- Application Number
- CN202411819661.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-11
AI Technical Summary
It is difficult for the prior art to accurately identify credit card fraud, especially when fraudulent means are diversified and complex.
The BiGRU detection model based on attention mechanism is used to process the target credit card transaction data to extract time characteristics and key information, thereby improving the accuracy of fraud detection.
By introducing an attention mechanism, the detection model can not only capture the time characteristics of credit card transaction data, but also strengthen the extraction of important information for fraud detection, significantly improving the accuracy of credit card fraud detection results.
Smart Images

Figure CN119693127A_ABST
Abstract
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, device, equipment and computer-readable storage medium. Background Art
[0002] With the development of Internet technology and the widespread popularity of e-commerce, the channels for applying for and using credit cards are becoming more and more extensive, bringing convenient experience to credit card users. However, credit card fraud transactions occur from time to time, and the fraud methods are becoming increasingly diverse and complicated, which brings huge challenges 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] Get 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 an attention mechanism.
[0008] In a second aspect, an embodiment of the present application provides a credit card fraud detection device, comprising:
[0009] An acquisition module, used to acquire 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 an attention mechanism.
[0011] In a third aspect, an embodiment of the present application provides an electronic device, including 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, and 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 solution provided in the embodiment 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 that has an important impact on fraud detection, thereby improving the accuracy of the credit card fraud detection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 A schematic diagram of an application environment of the credit card fraud detection method provided in an embodiment of the present application;
[0015] Figure 2 A flow chart of a credit card fraud detection method provided in an embodiment of the present application;
[0016] Figure 3 A schematic diagram of a structure of a detection model provided in an embodiment of the present application;
[0017] Figure 4 A schematic diagram of the structure of the attention mechanism module provided in the embodiment of the present application;
[0018] Figure 5 A schematic diagram of the structure of the BiGRU module provided in the embodiment of the present application;
[0019] Figure 6 A schematic diagram of the structure of the GRU in the BiGRU module provided in an embodiment of the present application;
[0020] Figure 7 A schematic diagram of a structure of a credit card fraud detection device provided in an embodiment of the present application;
[0021] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application are further described in detail through the following embodiments and in combination with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. Those skilled in the art can make adjustments to them as needed to suit specific application scenarios. It should also be noted that, for ease of description, only the parts related to the present application are shown in the accompanying drawings, rather than 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. The terminal 101 and the server 102 are connected via a wireless network or a wired network. The 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), a vehicle terminal (such as a vehicle navigation terminal), and a mobile phone. The server 102 may be an independent server or a server cluster consisting of multiple servers.
[0024] It should be noted that the credit card fraud detection method in the embodiment of the present application can be executed by the terminal 101 or the server 102 separately, or can be executed jointly by the terminal 101 and the server 102. The following method embodiment is described by taking the execution subject as an electronic device (the electronic device is 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 the obtained target credit card transaction data can be preprocessed to obtain standardized data, and then the standardized data can be processed using a detection model. The preprocessing method includes outlier deletion, null value filling, standardization, and normalization. Optionally, 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 and are 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 network (BidirectionalRecurrent 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 time 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 lot of information, but not all information is equally important for credit card fraud detection. 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 gives these feature information higher weights and other useless features lower weights, thereby shielding the interference of other useless features, so that the detection model can more accurately identify potential fraud. For example, the attention mechanism can use the 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 weighted summation on the transaction feature information. Among them, the attention scoring function can use 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, mines the temporal correlation of the target credit card transaction data through the BiGRU module introduced in the detection model, and performs differentiated information aggregation on the feature information mined by the BiGRU module through the attention mechanism introduced in the detection model, and determines whether there is fraud in the target credit card transaction data based on the aggregated feature information. If there is fraud, 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 manager, etc.
[0037] The credit card fraud detection method provided in the embodiment 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, the above-mentioned 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, and the detection model first extracts features from the target credit card transaction data through a convolution module to mine the hidden feature information in the target credit card transaction data. Optionally, the convolution module may include multiple convolution kernels, and the sizes of the convolution kernels are different. In one example, the convolution module may include three convolution kernels, which are 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 first learn to capture the overall features of the target credit card transaction data through a convolution kernel of size 5. Then, the overall features extracted above are further processed through a 1*1 convolution kernel and an activation function (e.g., a ReLU function) to enhance the nonlinearity and robustness of the model. Further, the network depth is further deepened through a convolution kernel of size 3 to fully mine the high-level features of the target credit card transaction data, so as to facilitate subsequent fraud detection and classification. In addition, the convolution module also integrates a nonlinear activation layer after each convolution layer to correct the distribution of the output data, thereby improving the discrimination ability of the detection model.
[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 according to the initial feature information may include: processing the initial feature information by a first attention processing method to obtain a first attention processing result; processing the initial feature information by 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] Among them, the first attention processing method is different from the second attention processing method. In this embodiment, the attention mechanism module mines the 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 larger weight, so that the key features are retained to the greatest extent, further improving the accuracy of the credit card fraud detection results.
[0043] Optionally, the process of processing the initial feature information by 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 operations, 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 may be a 1*1 convolution operation, which captures the correlation of information between channels and reduces the number of parameters of the detection model. Optionally, the corresponding batch normalization result may be nonlinearly transformed by a ReLU activation function and a sigmoid activation function.
[0046] That is, Figure 4As shown, the attention mechanism module includes two parallel attention processing paths. One of the processing paths is: global average pooling is performed on the initial feature information to obtain global average pooling features, and the global average pooling features are sequentially subjected to 1*1 convolution operations, batch normalization, and nonlinear transformation of the batch normalization results through ReLU and sigmoid functions 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: perform global maximum pooling processing on the initial feature information to obtain the global maximum pooling feature, and perform 1*1 convolution operation, batch normalization processing and nonlinear transformation of the batch normalization processing result through ReLU and sigmoid function on the global maximum pooling feature in sequence 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 salient features in the initial feature information through the second attention processing method, thereby 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, Figure 5-Figure 6 As shown in the figure, the BiGRU module is composed of multiple GRUs, which are divided into forward GRU and reverse GRU. The forward GRU extracts forward information from the front to the back (or from the past to the future), and the reverse GRU extracts reverse information from the back to the front (or from the future to the past). Each GRU includes a reset gate and an update gate. Figure 6 x in t represents the input (i.e., 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 fully extracts the context information of weighted feature information from forward and backward propagation by connecting the forward and backward GRU hidden layers to the same output layer. The context information is jointly determined by the states of the forward GRU and the backward GRU, as shown in the following formula:
[0056]
[0057] Among them, 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 In this way, the forward feature information and the reverse feature information are superimposed through the forward and backward propagation of BiGRU, so that the most important features are retained to the maximum extent.
[0058] Finally, the context information extracted by the BiGRU module is input into the fully connected layer and transformed by the sigmoid function to obtain the fraud detection result.
[0059] In this embodiment, the initial feature information of the target credit card transaction data is extracted through 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 backward propagation, and the attention mechanism is used to enhance the influence of key information, so that the most important features of the target credit card transaction data are retained to the maximum extent, thereby improving the accuracy of the credit card fraud detection results.
[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 there is fraudulent behavior in the sample credit card transaction data; 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 marked. If there is fraud, it can be marked as "1", and if there is no fraud, it can be marked as "0", forming the 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 A schematic diagram of a structure of a credit card fraud detection device provided in an 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 acquire target credit card transaction data;
[0066] The processing module 702 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 an attention mechanism.
[0067] On the basis of 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; superimpose the first attention processing result and the second attention processing result to obtain the weighted feature information.
[0070] On the basis of the above embodiment, optionally, the processing module 702 is further specifically used 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;
[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 operations, 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 used 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 a label result of fraudulent behavior;
[0075] The processing module 702 is also used 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 the focal loss function.
[0076] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as 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 the processor 80 in the device can be one or more. Figure 8 A processor 80 is taken as an example; the processor 80, memory 81, input device 82 and output device 83 in the device can be connected by a bus or other means. Figure 8 The example of connecting through bus is taken in the following.
[0077] The memory 81 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the credit card fraud detection method in the embodiments of the present application (for example, the acquisition module 701 and the processing module 702 used in the credit card fraud detection device). The processor 80 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 81, that is, implementing the credit card fraud detection method provided in any of the above embodiments.
[0078] The memory 81 may mainly include a program storage area and a data storage area, wherein 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 created during the detection of credit card fraud, etc. In addition, the memory 81 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 81 may further include a memory remotely arranged relative to the processor 80, and these remote memories may be connected to the device / terminal / server via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, 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] Get 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 an attention mechanism.
[0083] The credit card fraud detection device, electronic device, and computer-readable storage medium provided in the above embodiments can execute the credit card fraud detection method provided in any embodiment of the present application, and have the corresponding functional modules and beneficial effects of executing the method. For technical details not described in detail in the above embodiments, please refer to the credit card fraud detection method provided in any embodiment of the present application.
[0084] Through the above description of the implementation method, the technicians in the relevant field can clearly understand that the present application can be implemented with the help of software and necessary general 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 is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer 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 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 used. 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 is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A method for detecting credit card fraud, characterized in that: include: Get target credit card transaction data; 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 bidirectional gated recurrent network BiGRU based on an attention mechanism.
2. The method according to claim 1, characterized in that 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 according to 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.
3. The method according to claim 2, characterized in that The step of generating weighted feature information according to the initial feature information comprises: Processing the initial feature information by a first attention processing method to obtain a first attention processing result; Processing the initial feature information by a second attention processing method to obtain a second attention processing result; The first attention processing result and the second attention processing result are superimposed to obtain the weighted feature information.
4. The method according to claim 3, characterized in that 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; The global average pooling feature is sequentially subjected to convolution operation, batch normalization processing, and nonlinear transformation 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; Correspondingly, the initial feature information is processed by the second attention processing method to obtain a second attention processing result, including: Performing global maximum pooling processing on the initial feature information to obtain global maximum pooling features; The global maximum pooling feature is sequentially subjected to convolution operation, batch normalization processing, and nonlinear transformation 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.
5. The method according to claim 4, characterized in that The convolution operation includes a 1*1 convolution operation.
6. The method according to claim 2, characterized in that The convolution module includes multiple convolution kernels, and the sizes of the convolution kernels are different.
7. The method according to any one of claims 1 to 6, characterized in that The detection model is trained through the following process: 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; The sample credit card transaction data is used as the input of the detection model, and the label data is used as the expected output of the detection model. The detection model is trained based on a focal loss function.
8. A credit card fraud detection device, characterized in that: include: An acquisition module, used to acquire target credit card transaction data; 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 an attention mechanism.
9. 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 7 are implemented.
10. 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 7 are implemented.
Citation Information
Patent Citations
Transaction behavior risk identification method and device, storage medium and computer equipment
CN111340506A
Credit card fraud behavior prediction method and device
CN114358922A
Credit card fraud behavior detection method and device
CN116681512A
Financial unbalanced data classification method based on deep learning
CN117407526A
Bank fraud detection method based on time domain convolutional network and attention mechanism
CN118194113A