A financial transaction risk control method based on financial sequence generation technology
Through financial sequence generation technology, graph convolutional neural networks, and autoencoder models, combined with bank internal and external data, the problem of imbalance and strong correlation in financial transaction risk data is solved, and the performance and efficiency of risk identification and control are improved.
Patent Information
- Application Number
- CN202410742387.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-06-11
AI Technical Summary
The problems of imbalanced financial transaction risk data, high data dimensions, and strong internal correlations have resulted in the limited performance of existing methods in risk identification and prevention and control.
Using a method based on financial sequence generation technology, through graph convolutional neural network and autoencoder anomaly detection network, we perform data augmentation and abnormal pattern recognition on financial transaction data, establish a risk prediction, detection and grade classification model, and combine the internal and external processes of the bank. External data for risk control.
It effectively solves the problem of unbalanced financial transaction risk data samples, improves the model's ability to identify abnormal data, fully explores data correlation, provides a more comprehensive risk control perspective, and reduces system operating costs.
Smart Images

Figure CN118333763B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial risk control technology, and in particular to a financial transaction risk control method based on financial sequence generation technology. Background Art
[0002] With the widespread application of artificial intelligence and big data technologies in the financial field, machine learning methods represented by deep learning are being applied to the field of financial transaction risk prevention and control, providing new ideas and means to improve risk identification and prevention capabilities.
[0003] Reference publication (announcement) number: CN117407769A, publication (announcement) date: 2024-01-16, discloses a financial management method and system based on deep learning. The financial management method based on deep learning includes: retrieving financial data from a database and generating a training data set based on the financial data; retrieving a convolutional neural network model from a database, wherein the convolutional neural network model is used to classify the financial data; training the convolutional neural network model, and using the trained convolutional neural network model to classify the financial data received in real time to obtain the classified financial data; and classifying and storing the classified financial data according to the data type and managing the classified financial data.
[0004] In the prior art including the above patents, deep learning can extract high-level features based on data. Such features contain more structural information in the data that is not easy to find and do not rely on any expert knowledge and experience. However, these methods still face some problems that need to be solved. First, the imbalance of financial transaction risk data has brought great difficulties and challenges to the establishment of risk identification models. Secondly, financial transaction risk data has the characteristics of high data dimension and strong intrinsic correlation. The existing methods ignore the capture of correlation information between features, resulting in limited model recognition performance. Summary of the invention
[0005] The purpose of the present invention is to provide a financial transaction risk control method based on financial transaction sequence generation technology, to perform data augmentation on abnormal transaction patterns based on financial transaction sequence generation technology, to train a graph convolutional neural network and an autoencoder anomaly detection network respectively, and to perform risk control on real-time financial transaction data.
[0006] In order to achieve the above object, the present invention provides the following technical solution: a financial transaction risk control method based on financial sequence generation technology, comprising the following steps:
[0007] S01. Acquire internal bank data and external bank data at multiple historical time points to form a first training data set and a test data set, wherein the internal bank data is customer financial transaction data, user account information and operation specifications, and the external bank data is credit information;
[0008] S02, inputting historical financial transaction data into a trained financial sequence generation module, generating a financial transaction sequence containing an abnormal transaction pattern and storing it in a financial transaction database to form a second training data set;
[0009] S03, training based on the first training data set and the test data set obtained to generate the following model:
[0010] S31, a financial transaction risk prediction model, inputting the first training data set into a graph convolutional neural network for training to obtain a model capable of predicting financial transaction risks;
[0011] S32, a financial transaction anomaly detection model, inputting the normal transaction pattern data extracted from the first training set data into the autoencoder framework, having the encoder learn the features of the normal data, and then reconstructing the learned features into data as close as possible to the input data through the decoder, so as to train the data reconstruction capability of the decoder;
[0012] S33, Financial Transaction Abnormal Grade Classification Model, obtains abnormal transaction samples from the labeled financial transaction data set, and classifies them into different grades according to the degree of abnormality, and trains these data in combination with convolutional neural networks and long short-term memory networks, and finally evaluates the model performance and applies it to actual transaction data before giving measures
[0013] S04, input the second training data set into the above model for prediction:
[0014] S41. Use financial transaction risk prediction models to predict the time when transaction risks may occur, and promptly notify financial institutions to take pre-emptive defensive measures;
[0015] S42. Use the previously collected external bank data and internal bank data to establish black, white and gray lists of customers, and input them into the financial transaction anomaly detection model through the attention mechanism to determine whether the real-time transaction pattern is abnormal;
[0016] S43. If step S42 is judged as abnormal, it is input into the financial transaction abnormality level classification model to determine the risk level, and corresponding risk level measures are generated to notify customers and staff, and the risk quantification library is updated at the same time.
[0017] Preferably, the step S01 of preparing the first training data set and the test data set comprises the following steps:
[0018] S11, retrieve financial transaction data X of M accounts in N days from the bank database to obtain corresponding account information and operation specification data corresponding to different accounts;
[0019] S12: Integrate the acquired financial transaction data and internal and external bank data into M groups of m-dimensional time series with a time length of 24*3600*N seconds in chronological order. , where b represents the account index, ;
[0020] S13. According to the existing transaction mode information, the financial transaction data is marked and classified into mode 1 to mode s, wherein the transaction mode information includes abnormal mode information, which is mode k;
[0021] S14, classifying the training set and the test set of the model based on the data set of the pattern obtained in step S13, including:
[0022] S141, for training the model, dividing the data set of mode 1 into a training set and a test set according to a ratio of 8:2, for training and testing the financial transaction risk prediction model;
[0023] S142, dividing the data set of pattern s into a training set and a test set according to a ratio of 8:2, for training a financial transaction anomaly detection model;
[0024] S143. Divide the data set of pattern s into a training set and a test set according to a ratio of 8:2 for training a financial transaction anomaly grade classification model.
[0025] Preferably, the training of the financial sequence generation module in step S02 includes:
[0026] S21. Using a scale-invariant subsequence clustering algorithm, the input financial transaction sequence is divided into segments of variable length and grouped into s different clusters based on the principle that they present similar shapes after appropriate duration and amplitude scaling to form s transaction patterns;
[0027] S22, obtaining the knowledge vector data of expert knowledge through the word embedding module, and using the attention module to guide the extraction of abnormal patterns. After the abnormal patterns are extracted, data generation is performed on the abnormal patterns through the expansion model;
[0028] S23. In the step S23, during the diffusion process of abnormal patterns by the expansion model, Gaussian noise is gradually added in K steps to gradually disturb the pattern representation until it becomes pure noise. In the denoising process, the noise is gradually removed in the same steps to restore the pure noise of the original representation, which is equivalent to learning the mapping from the potential Gaussian space to the pattern space. Given a Gaussian noise, a pattern representation can be generated.
[0029] Preferably, in step S21, dynamic time warping is used to calculate the minimum cost of point-by-point alignment between two segments, and to identify similarities in segments with similar shapes but different durations and amplitudes:
[0030] ;
[0031] Among them, B represents all possible alignments, and A represents a specific alignment of sequences x and y among all possible alignments;
[0032] The point-by-point distance matrix between sequences x and y is ,in; Represents x i and i The distance between and Represents the element index of sequences x and y respectively.
[0033] Preferably, in step S23, the diffusion network first applies the following diffusion process to gradually perturb the pattern representation by adding noise in R steps until it becomes pure noise:
[0034] ;
[0035] in, Indicates the size of each segment, represents the intensity of the noise, represents Gaussian noise, represents the process of adding noise;
[0036] In the denoising process, the target sequence is recovered from the prior Gaussian noise in R steps:
[0037] ;
[0038] in, is a neural network that learns the denoising gradient at each step, and the superscript i represents the step in the diffusion and denoising process.
[0039] Preferably, the training of the financial transaction risk prediction model in step 31 includes the following steps:
[0040] S311, constructing the customer financial transaction data into a graph structure, wherein nodes represent transaction data and other account-related information, and edges represent the association or transaction pattern between them, and then determining the attributes of the nodes and edges according to requirements, wherein the attributes include transaction amount, timestamp, and account type;
[0041] S312. Design a multi-layer graph convolutional neural network structure to learn feature representation on the transaction graph and capture the relationship and structural information between nodes. In each layer of the graph convolutional neural network, ReLU is used to introduce nonlinearity.
[0042] S313. Design a time series convolution module and use multiple standard one-dimensional dilated convolution kernels to extract high-dimensional time series features.
[0043] S314, using the labeled first training data set and minimizing the prediction error by a back propagation algorithm and an Adam optimizer pair to train and optimize the model;
[0044] S315. Use the test data set to evaluate the trained model, calculate the error between the predicted result and the actual situation, and introduce the mean absolute error, mean square error, and mean absolute percentage error to evaluate the accuracy and generalization ability of the model.
[0045] Preferably, the training of the financial transaction anomaly detection model in step S32 includes:
[0046] S321, taking the normal data training set divided in step S14 as input, and learning data features through an encoder, wherein the encoder includes multiple hidden layers, and each hidden layer introduces nonlinearity through a Sigmoid function to gradually reduce the dimension of the input data;
[0047] S322, setting a decoder to map the low-dimensional representation learned by the encoder back to the original data space, and reconstructing data as close as possible to the input data, wherein the network structure of the decoder is opposite to that of the encoder, and the data dimension is gradually increased through multiple hidden layers to restore the original data;
[0048] S323, using the stochastic gradient descent method to train the autoencoder model, setting the maximum number of iterations f, if the reconstruction error decreases during the training process, continuing the training until the maximum number of iterations f, if the reconstruction error tends to be stable during the training process, stopping the training to obtain the final model;
[0049] Among them, the calculation of reconstruction error is expressed by mean square error:
[0050] ;
[0051] Among them, X j Represents the input data, De represents the decoder, En represents the encoder, and n represents the length of the training data.
[0052] Preferably, the training of the financial transaction risk level classification model in step S33 includes:
[0053] S331, taking the abnormal data training set divided by S14 as input, and using a convolutional neural network to extract local features of the transaction data;
[0054] S332, designing a long short-term memory network structure to capture the long-term dependencies of the transaction sequence, combining the local features learned in step S331 with the temporal features learned by the long short-term memory network, and improving the modeling capability of the model for abnormal transaction data;
[0055] S333, using a softmax classifier to train the model and classify abnormal transaction data into levels from 1 to n;
[0056] S334. Use the trained transaction risk level classification model to evaluate the test set data, calculate the accuracy and recall rate indicators of the model, and adjust the model parameters according to the evaluation results.
[0057] In the above technical solution, the financial transaction risk control method based on financial sequence generation technology provided by the present invention has the following beneficial effects:
[0058] 1. The problem of imbalanced samples of financial transaction risk data is solved. Through the financial transaction sequence generation technology, sequences are generated for abnormal patterns, thereby expanding the training data set and improving the model's ability to identify abnormal data.
[0059] 2. Make full use of the bank's internal data information and combine it with the bank's external information to establish a black, white and gray list of accounts. Effectively integrate data information from different sources, fully explore the relevance and comprehensiveness between data, and provide a more comprehensive perspective for risk control.
[0060] 3. It fully integrates the transaction anomaly detection model and the transaction anomaly prediction model, and uses the transaction anomaly grade classification model to classify existing anomalies, more accurately locate the risk level, and help financial institutions formulate risk control strategies more targetedly.
[0061] 4. The financial transaction sequence generation technology proposed in this application does not blindly generate any transaction model, but generates abnormal patterns in a targeted manner, thereby improving computing efficiency and reducing system operating costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0063] Figure 1A flowchart of financial transaction risk control provided by an embodiment of the present invention;
[0064] Figure 2 A schematic diagram of a financial transaction risk control framework provided by an embodiment of the present invention;
[0065] Figure 3 A schematic diagram of a financial sequence generation module including anomalies provided by an embodiment of the present invention;
[0066] Figure 4 A schematic diagram of a financial transaction risk prediction module provided by an embodiment of the present invention;
[0067] Figure 5 Provided for the embodiment of the present invention is a schematic diagram of a financial transaction abnormal pattern detection model;
[0068] Figure 6 A schematic diagram of a financial transaction risk level classification model provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0069] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0070] like Figure 1-6 As shown, a financial transaction risk control method based on financial sequence generation technology includes the following steps:
[0071] S01. Acquire internal bank data and external bank data at multiple historical time points to form a first training data set and a test data set, wherein the internal bank data is customer financial transaction data, user account information and operation specifications, and the external bank data is credit information;
[0072] S02, inputting historical financial transaction data into a trained financial sequence generation module, generating a financial transaction sequence containing an abnormal transaction pattern and storing it in a financial transaction database to form a second training data set;
[0073] S03, training is performed based on the obtained first training data set and test data set to generate the following model:
[0074] S31, a financial transaction risk prediction model, inputting the first training data set into a graph convolutional neural network for training to obtain a model capable of predicting financial transaction risks;
[0075] S32, a financial transaction anomaly detection model, inputting the normal transaction pattern data extracted from the first training set data into the autoencoder framework, having the encoder learn the features of the normal data, and then reconstructing the learned features into data as close as possible to the input data through the decoder, so as to train the data reconstruction capability of the decoder;
[0076] S33, Financial Transaction Abnormal Grade Classification Model, obtains abnormal transaction samples from the labeled financial transaction data set, and classifies them into different grades according to the degree of abnormality, and trains these data in combination with convolutional neural networks and long short-term memory networks, and finally evaluates the model performance and applies it to actual transaction data before giving measures
[0077] S04. Input the second training data set into the above model for prediction:
[0078] S41. Use financial transaction risk prediction models to predict the time when transaction risks may occur, and promptly notify financial institutions to take pre-emptive defensive measures;
[0079] S42. Use the previously collected external bank data and internal bank data to establish black, white and gray lists of customers, and input them into the financial transaction anomaly detection model through the attention mechanism to determine whether the real-time transaction pattern is abnormal;
[0080] S43. If step S42 is judged as abnormal, it is input into the financial transaction abnormality level classification model to determine the risk level, and corresponding risk level measures are generated to notify customers and staff, and the risk quantification library is updated at the same time.
[0081] As an embodiment further provided by the present invention, step S01 of preparing a first training data set and a test data set comprises the following steps:
[0082] S11, retrieve financial transaction data X of M accounts in N days from the bank database to obtain corresponding account information and operation specification data corresponding to different accounts;
[0083] S12: Integrate the acquired financial transaction data and internal and external bank data into M groups of m-dimensional time series with a time length of 24*3600*N seconds in chronological order. , where b represents the account index,
[0084] S13. According to the existing transaction mode information, the financial transaction data is marked and classified into mode 1 to mode s, wherein the transaction mode information includes abnormal mode information, which is mode k;
[0085] S14, classifying the training set and the test set of the model based on the data set of the pattern obtained in step S13, including:
[0086] S141, for training the model, dividing the data set of mode 1 into a training set and a test set according to a ratio of 8:2, for training and testing the financial transaction risk prediction model;
[0087] S142, dividing the data set of pattern s into a training set and a test set according to a ratio of 8:2, for training a financial transaction anomaly detection model;
[0088] S143. Divide the data set of pattern s into a training set and a test set according to a ratio of 8:2 for training a financial transaction anomaly grade classification model.
[0089] As another embodiment further provided by the present invention, the training of the financial sequence generation module in step S02 includes:
[0090] S21. Using a scale-invariant subsequence clustering algorithm, the input financial transaction sequence is divided into segments of variable length and grouped into s different clusters based on the principle that they present similar shapes after appropriate duration and amplitude scaling to form s transaction patterns;
[0091] S22, obtaining the knowledge vector data of expert knowledge through the word embedding module, and using the attention module to guide the extraction of abnormal patterns. After the abnormal patterns are extracted, data generation is performed on the abnormal patterns through the expansion model;
[0092] S23. In step S23, during the diffusion process of abnormal patterns by expanding the model, Gaussian noise is gradually added in K steps to gradually perturb the pattern representation until it becomes pure noise. In the denoising process, the noise is gradually removed in the same steps to restore the pure noise of the original representation, which is equivalent to learning the mapping from the potential Gaussian space to the pattern space. Given a Gaussian noise, a pattern representation can be generated.
[0093] As another embodiment further provided by the present invention, in step S21, dynamic time warping is used to calculate the minimum cost of point-by-point alignment between two segments, and similarities in segments with similar shapes but different durations and amplitudes are identified:
[0094] ;
[0095] Among them, B represents all possible alignments, and A represents a specific alignment of sequences x and y among all possible alignments;
[0096] The point-by-point distance matrix between sequences x and y is ,in; Represents x i and i The distance between and Represents the element index of sequences x and y respectively.
[0097] As another embodiment further provided by the present invention, in step S23, the diffusion network first applies the following diffusion process to gradually perturb the pattern representation by adding noise in R steps until it becomes pure noise:
[0098] ;
[0099] in, Indicates the size of each segment, represents the intensity of the noise, represents Gaussian noise, represents the process of adding noise;
[0100] In the denoising process, the target sequence is recovered from the prior Gaussian noise in R steps:
[0101] ;
[0102] in, is a neural network that learns the denoising gradient at each step, and the superscript i represents the step in the diffusion and denoising process.
[0103] As another embodiment further provided by the present invention, the training of the financial transaction risk prediction model in step 31 includes the following steps:
[0104] S311, constructing the customer financial transaction data into a graph structure, wherein nodes represent transaction data and other account-related information, and edges represent the association or transaction pattern between them, and then determining the attributes of the nodes and edges according to requirements, the attributes including transaction amount, timestamp and account type;
[0105] S312. Design a multi-layer graph convolutional neural network structure to learn feature representation on the transaction graph and capture the relationship and structural information between nodes. In each layer of the graph convolutional neural network, use ReLU to introduce nonlinearity to enhance the expressiveness of the model.
[0106] S313. Design a time series convolution module, use multiple standard one-dimensional dilated convolution kernels to extract high-dimensional time series features, capture long-term dependencies while increasing the receptive field, and do not increase model parameters, thereby improving the model's ability to model financial transaction data;
[0107] S314, using the labeled first training data set, and minimizing the prediction error through the back propagation algorithm and the Adam optimizer pair to train and optimize the model, and setting a suitable learning rate and number of iterations during the training process to achieve the purpose of model convergence and performance improvement;
[0108] S315. Use the test data set to evaluate the trained model, calculate the error between the predicted result and the actual situation, and introduce the mean absolute error, mean square error, and mean absolute percentage error to evaluate the accuracy and generalization ability of the model.
[0109] As another embodiment further provided by the present invention, the training of the financial transaction anomaly detection model in step S32 includes:
[0110] S321, taking the normal data training set divided in step S14 as input, and learning data features through an encoder, wherein the encoder includes multiple hidden layers, and each hidden layer introduces nonlinearity through a Sigmoid function to gradually reduce the dimension of the input data;
[0111] S322, setting a decoder to map the low-dimensional representation learned by the encoder back to the original data space, and reconstructing data as close as possible to the input data, wherein the network structure of the decoder is opposite to that of the encoder, and the data dimension is gradually increased through multiple hidden layers to restore the original data;
[0112] S323, using the stochastic gradient descent method to train the autoencoder model, setting the maximum number of iterations f, if the reconstruction error decreases during the training process, continuing the training until the maximum number of iterations f, if the reconstruction error tends to be stable during the training process, stopping the training to obtain the final model;
[0113] Among them, the calculation of reconstruction error is expressed by mean square error:
[0114] ;
[0115] Among them, X j Represents the input data, De represents the decoder, En represents the encoder, and n represents the length of the training data.
[0116] As another embodiment further provided by the present invention, the training of the financial transaction risk level classification model in step S33 includes:
[0117] S331, taking the abnormal data training set divided by S14 as input, and using a convolutional neural network to extract local features of the transaction data;
[0118] S332, designing a long short-term memory network structure to capture the long-term dependencies of the transaction sequence, combining the local features learned in step S331 with the temporal features learned by the long short-term memory network, and improving the modeling capability of the model for abnormal transaction data;
[0119] S333, using a softmax classifier to train the model and classify abnormal transaction data into levels from 1 to n;
[0120] S334. Use the trained transaction risk level classification model to evaluate the test set data, calculate the accuracy and recall rate indicators of the model, and adjust the model parameters according to the evaluation results.
[0121] In summary, the above embodiment solves the problem of imbalanced samples of financial transaction risk data. Through the financial transaction sequence generation technology, sequence generation is performed for abnormal patterns, thereby expanding the training data set and improving the model's ability to identify abnormal data. And make full use of internal bank data information such as user account information and operating specifications, and combine external bank information to establish a black, white and gray list of accounts. It effectively integrates data information from different sources, fully explores the relevance and comprehensiveness between data, and provides a more comprehensive perspective for risk control. In addition, by fully integrating the transaction anomaly detection model and the transaction anomaly prediction model, and using the transaction anomaly grade classification model to classify existing anomalies, it can more accurately locate the risk level, which helps financial institutions to formulate risk control strategies more targetedly. Therefore, the financial transaction sequence generation technology proposed in the above embodiment does not blindly generate any transaction model, but generates abnormal patterns in a targeted manner, improves computing efficiency, and reduces system operating costs.
[0122] It will be appreciated by those skilled in the art 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. Furthermore, 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.
[0123] 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 generate 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 device that provides the functions specified in a block or multiple blocks.
[0124] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0125] 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 1 The steps for the functions specified in one or more boxes.
[0126] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
[0127] The embodiments of the present application also provide a specific implementation of an electronic device capable of implementing all steps of the method in the above embodiments, and the electronic device specifically includes the following contents:
[0128] Processor, memory, communications interface and bus;
[0129] Wherein, the processor, memory, and communication interface communicate with each other via the bus;
[0130] The processor is used to call the computer program in the memory, and when the processor executes the computer program, all the steps in the method in the above embodiment are implemented.
[0131] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps of the method in the above embodiments, 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 of the method in the above embodiments are implemented.
[0132] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the hardware + program embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. Although the embodiment of this specification provides the method operation steps as described in the embodiment or flowchart, more or fewer operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiment is only one way of executing the order of many steps, and does not represent the only execution order. When the device or terminal product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiment or the accompanying drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method, product or device. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or device including the elements. For the convenience of description, the above device is described by dividing it into various modules according to its functions. Of course, when implementing the embodiments of this specification, the functions of each module can be implemented in the same or more software and / or hardware, or the module implementing the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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 process Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0133] Those skilled in the art should understand that the embodiments of this specification can be provided as methods, systems or computer program products. Therefore, the embodiments of this specification can be in the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the embodiments of this specification can be in 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 codes. Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In the description of this specification, the description of the reference term "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of this specification.
[0134] In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradicting each other. The above is only an embodiment of the embodiment of this specification and is not intended to limit the embodiment of this specification. For those skilled in the art, the embodiment of this specification may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiment of this specification shall be included in the scope of the claims of the embodiment of this specification.
Claims
1. A financial transaction risk control method based on financial sequence generation technology, characterized in that: The following steps are involved: S01. Acquire internal bank data and external bank data at multiple historical time points to form a first training data set and a test data set, wherein the internal bank data is customer financial transaction data, user account information and operation specifications, and the external bank data is credit information; S02, inputting historical financial transaction data into a trained financial sequence generation module, generating a financial transaction sequence containing an abnormal transaction pattern and storing it in a financial transaction database to form a second training data set; The training of the financial sequence generation module includes: S21. Using a scale-invariant subsequence clustering algorithm, the input financial transaction sequence is divided into segments of variable length and grouped into s different clusters based on the principle that they present similar shapes after appropriate duration and amplitude scaling to form s transaction patterns; S22, obtaining the knowledge vector data of expert knowledge through the word embedding module, and using the attention module to guide the extraction of abnormal patterns. After the abnormal patterns are extracted, data generation is performed on the abnormal patterns through the expansion model; S23, in the step S23, in the process of expanding the model for the abnormal pattern diffusion, Gaussian noise is gradually added in K steps to gradually disturb the pattern representation until it becomes pure noise, and in the denoising process, the noise is gradually removed in the same steps to restore the pure noise of the original representation, which is equivalent to learning the mapping from the potential Gaussian space to the pattern space. Given a Gaussian noise, a pattern representation can be generated; In step S21, dynamic time warping is used to calculate the minimum cost of point-by-point alignment between two segments, identifying similarities in segments with similar shapes but different durations and amplitudes: ; Among them, B represents all possible alignments, and A represents a specific alignment of sequences x and y among all possible alignments; The point-by-point distance matrix between sequences x and y is in; Represents x i and i The distance between and Represents the element index of sequences x and y respectively; In step S23, the diffusion network first applies the following diffusion process to gradually perturb the pattern representation by adding noise in R steps until it becomes pure noise: ; in, Indicates the size of each segment, represents the intensity of the noise, represents Gaussian noise, represents the process of adding noise; In the denoising process, the target sequence is recovered from the prior Gaussian noise in R steps: ; in, It is a neural network that learns the denoising gradient at each step. The superscript i represents the step in the diffusion and denoising process; S03, training based on the first training data set and the test data set obtained to generate the following model: S31, a financial transaction risk prediction model, inputting the first training data set into a graph convolutional neural network for training to obtain a model capable of predicting financial transaction risks; S32, a financial transaction anomaly detection model, inputting the normal transaction pattern data extracted from the first training set data into the autoencoder framework, having the encoder learn the features of the normal data, and then reconstructing the learned features into data as close as possible to the input data through the decoder, so as to train the data reconstruction capability of the decoder; S33, Financial Transaction Abnormal Grade Classification Model, obtains abnormal transaction samples from the labeled financial transaction data set and classifies them into different grades according to the degree of abnormality, and trains these data in combination with convolutional neural networks and long short-term memory networks, and finally evaluates the model performance and applies it to actual transaction data before giving measures; S04, inputting the second training data set into the above-mentioned model for prediction; S41. Use financial transaction risk prediction models to predict the time when transaction risks may occur, and promptly notify financial institutions to take pre-emptive defensive measures; S42. Use the previously collected external bank data and internal bank data to establish black, white and gray lists of customers, and input them into the financial transaction anomaly detection model through the attention mechanism to determine whether the real-time transaction pattern is abnormal; S43. If step S42 is judged as abnormal, it is input into the financial transaction abnormality level classification model to determine the risk level, and corresponding risk level measures are generated to notify customers and staff, and the risk quantification library is updated at the same time.
2. A financial transaction risk control method based on financial sequence generation technology according to claim 1, characterized in that: The step S01 of preparing the first training data set and the test data set comprises the following steps: S11, retrieve financial transaction data X of M accounts in N days from the bank database to obtain corresponding account information and operation specification data corresponding to different accounts; S12: Integrate the acquired financial transaction data and internal and external bank data into M groups of m-dimensional time series with a time length of 24*3600*N seconds in chronological order. , where b represents the account index, ; S13. According to the existing transaction mode information, the financial transaction data is marked and classified into mode 1 to mode s, wherein the transaction mode information includes abnormal mode information, which is mode k; S14, classifying the training set and the test set of the model based on the data set of the pattern obtained in step S13, including: S141, for training the model, dividing the data set of mode 1 into a training set and a test set according to a ratio of 8:2, for training and testing the financial transaction risk prediction model; S142, dividing the data set of pattern s into a training set and a test set according to a ratio of 8:2, for training a financial transaction anomaly detection model; S143. Divide the data set of pattern s into a training set and a test set according to a ratio of 8:2 for training a financial transaction anomaly grade classification model.
3. The financial transaction risk control method based on financial sequence generation technology according to claim 1, characterized in that: The training of the financial transaction risk prediction model in step 31 includes the following steps: S311, constructing the customer financial transaction data into a graph structure, wherein nodes represent transaction data and other account-related information, and edges represent the association or transaction pattern between them, and then determining the attributes of the nodes and edges according to requirements, wherein the attributes include transaction amount, timestamp, and account type; S312. Design a multi-layer graph convolutional neural network structure to learn feature representation on the transaction graph and capture the relationship and structural information between nodes. In each layer of the graph convolutional neural network, ReLU is used to introduce nonlinearity. S314, using the labeled first training data set and minimizing the prediction error by a back propagation algorithm and an Adam optimizer pair to train and optimize the model; S315. Use the test data set to evaluate the trained model, calculate the error between the predicted result and the actual situation, and introduce the mean absolute error, mean square error, and mean absolute percentage error to evaluate the accuracy and generalization ability of the model.
4. The financial transaction risk control method based on financial sequence generation technology according to claim 1, characterized in that: The training of the financial transaction anomaly detection model in step S32 includes: S321, taking the normal data training set divided in step S14 as input, and learning data features through an encoder, wherein the encoder includes multiple hidden layers, and each hidden layer introduces nonlinearity through a Sigmoid function to gradually reduce the dimension of the input data; S322, setting a decoder to map the low-dimensional representation learned by the encoder back to the original data space, and reconstructing data as close as possible to the input data, wherein the network structure of the decoder is opposite to that of the encoder, and the data dimension is gradually increased through multiple hidden layers to restore the original data; S323, using the stochastic gradient descent method to train the autoencoder model, setting the maximum number of iterations f, if the reconstruction error decreases during the training process, continuing the training until the maximum number of iterations f, if the reconstruction error tends to be stable during the training process, stopping the training to obtain the final model; Among them, the calculation of reconstruction error is expressed by mean square error: ; Among them, X j Represents the input data, De represents the decoder, En represents the encoder, and n represents the length of the training data.
5. The financial transaction risk control method based on financial sequence generation technology according to claim 1, characterized in that: The training of the financial transaction risk level classification model in step S33 includes: S331, taking the abnormal data training set divided by S14 as input, and using a convolutional neural network to extract local features of the transaction data; S332, designing a long short-term memory network structure to capture the long-term dependencies of the transaction sequence, combining the local features learned in step S331 with the temporal features learned by the long short-term memory network, and improving the modeling capability of the model for abnormal transaction data; S333, using a softmax classifier to train the model and classify abnormal transaction data into levels from 1 to n; S334. Use the trained transaction risk level classification model to evaluate the test set data, calculate the accuracy and recall rate indicators of the model, and adjust the model parameters according to the evaluation results.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the financial transaction risk control method based on financial sequence generation technology described in any one of claims 1 to 5 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 financial transaction risk control method based on financial sequence generation technology described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Financial management method and system based on deep learning
CN117407769A
Fund product evaluation method and system based on generative adversarial network
CN117745439A
Transaction risk prediction method, model training method, device, equipment, medium and program product
CN117934154A
