A bank audit method and system based on deep neural network
Through deep neural network technology, bank transaction data are automatically processed, features are extracted and anomaly models are constructed, which solves the problem of inefficiency of traditional audit methods, achieves fast and accurate anomaly detection and early warning, and improves the efficiency and accuracy of bank audits.
Patent Information
- Application Number
- CN202410728637.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2024-10-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional bank audit methods require a lot of manpower and time, and contain loopholes and errors. It is difficult to quickly and accurately detect potential fraud and abnormal activities, and cannot meet the needs of the complex and rapidly developing financial market.
A bank audit method based on deep neural networks is used to obtain and preprocess bank account transaction data, extract features, build an audit exception model, add an exception classification layer, perform multiple exception processing and probability aggregation, and achieve automated anomaly detection and early warning.
It improves the accuracy and efficiency of auditing, reduces false positives and omissions, promptly identifies high-risk abnormal behaviors, reduces potential losses and risks, and provides a comprehensive abnormal warning and response mechanism.
Smart Images

Figure CN118312909B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of deep neural network technology, and in particular to a bank audit method and system based on deep neural network. Background Art
[0002] Traditional bank auditing methods usually require a lot of manpower and time, and may also have loopholes and errors. As banking business continues to develop and the market continues to change, auditors need to detect potential fraud and abnormal activities faster and more accurately. Therefore, the banking industry needs to use modern scientific and technological tools and techniques to improve the accuracy and efficiency of audits to meet the needs of increasingly complex and high-speed financial markets. Summary of the invention
[0003] In order to solve the above technical problems, the present invention proposes a bank audit method and system based on deep neural network to solve at least one of the above technical problems.
[0004] This application provides a bank audit method based on a deep neural network, comprising the following steps:
[0005] Step S1: acquiring bank account transaction data, and preprocessing the bank account transaction data to obtain bank account transaction preprocessing data;
[0006] Step S2: extracting features from the preprocessed bank account transaction data to obtain bank account transaction feature data, and constructing an audit anomaly model for the bank account transaction feature data to obtain an audit anomaly model;
[0007] Step S3: adding an exception classification layer to the audit exception model to obtain an audit multiple exception processing model, and performing exception processing according to the audit multiple exception processing model to obtain audit multiple exception data;
[0008] Step S4: Perform probability aggregation based on multiple audit abnormal data to obtain abnormal probability aggregation data for abnormal warning operations.
[0009] The preprocessing step in the present invention can effectively reduce the noise and errors in the data and improve the accuracy and stability of the model. Through the feature extraction step, important features that can reflect the transaction behavior are extracted to enhance the expressiveness of the model. Using deep neural network modeling, complex time series patterns and abnormal behaviors can be effectively captured, and the accuracy of anomaly detection can be improved. By adding an abnormal classification layer, various types of abnormal behaviors can be detected and classified, and the comprehensiveness and precision of anomaly detection can be improved. Multiple exception handling steps can automatically handle different types of anomalies and improve the efficiency and consistency of audit processing. Through probability aggregation, the overall risk of different types of anomalies can be comprehensively evaluated to provide comprehensive abnormal warnings. The early warning system can promptly identify high-risk abnormal behaviors and trigger corresponding early warning and response mechanisms to reduce potential losses and risks.
[0010] Optionally, the present application further provides a bank audit system based on a deep neural network, which is used to execute the bank audit method based on a deep neural network as described above. The bank audit system based on a deep neural network includes:
[0011] A bank account transaction preprocessing module, used to obtain bank account transaction data and preprocess the bank account transaction data to obtain bank account transaction preprocessing data;
[0012] An audit anomaly model building module is used to extract features from bank account transaction preprocessing data to obtain bank account transaction feature data, and to build an audit anomaly model for the bank account transaction feature data to obtain an audit anomaly model;
[0013] The audit multiple exception processing module is used to add an exception classification layer to the audit exception model to obtain the audit multiple exception processing model, and perform exception processing according to the audit multiple exception processing model to obtain the audit multiple exception data;
[0014] The abnormal warning operation module is used to perform probability aggregation based on multiple audit abnormal data to obtain abnormal probability aggregation data for abnormal warning operations.
[0015] The purpose of the present invention is to ensure the integrity and consistency of transaction data through data cleaning and preprocessing, and provide a high-quality data foundation for subsequent analysis and modeling. Through multi-level feature extraction such as text preprocessing, word embedding and graph embedding, the complex patterns and associated information in the transaction data are fully captured, and the expression ability and detection accuracy of the model are improved. The LSTM model can effectively capture the time series pattern in the transaction data and identify potential abnormal behaviors. By adding the Dropout layer and parameter optimization, the model is prevented from overfitting, the stability and generalization ability of the model are improved, and the accuracy of anomaly detection is enhanced. The classification layer data generated by various methods can detect and classify various types of abnormal behaviors and improve the precision of anomaly detection. Multi-level and multi-mode feature extraction and integration improve the robustness and stability of the model, reduce false positives and false negatives, and improve the detection effect. Through extreme value extraction, gradient calculation and weighted calculation, the abnormal risk of the transaction is comprehensively evaluated and the detection accuracy is improved. Through real-time probability aggregation and early warning operations, high-risk abnormal behaviors are timely identified and responded to, reducing potential losses and risks. The aggregation and integration of multiple methods improve the robustness and stability of anomaly detection and reduce the limitations and false positive rates of single methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting implementations made with reference to the following drawings:
[0017] Figure 1 A flowchart of a bank audit method based on a deep neural network according to an embodiment is shown;
[0018] Figure 2 A flowchart showing a method for preprocessing bank account transactions according to an embodiment of the present invention is provided;
[0019] Figure 3 A flowchart showing a method for building an audit anomaly model according to an embodiment of the present invention is provided;
[0020] Figure 4 A flowchart showing a method for handling multiple audit exceptions according to an embodiment of the present invention is provided;
[0021] Figure 5 A flowchart showing a method for summarizing multiple abnormality probabilities in an audit according to an embodiment of the present invention is provided;
[0022] Figure 6 A flowchart of a method for implementing bank auditing based on a deep neural network algorithm according to an embodiment is shown;
[0023] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0024] The technical method of the present invention is described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are 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 technicians in this field without creative work are within the scope of protection of the present invention.
[0025] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the drawings represent the same or similar parts, and thus their repeated description will be omitted.
[0026] It should be understood that, although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.
[0027] The bank audit method proposed in the present invention uses deep neural network algorithm machine learning technology to automatically identify problematic transactions by learning and analyzing a large amount of historical transaction data, and remind auditors to conduct more in-depth investigations. The invention has the following technical features:
[0028] 1. Obtain bank account and transaction data, and use natural language processing technology to clean, classify, standardize and serialize the data, extract useful features from the standardized transaction record data set, such as transaction time, transaction amount, transaction type, transaction direction, transaction location, transaction counterparty, transaction IP, transaction equipment, transaction operation behavior, etc., and regard each transaction record as an input sequence of a time step, and each time step corresponds to a transaction feature vector.
[0029] 2. Input the feature sequence into the recurrent neural network, use the LSTM structure to model the sequence, and build the audit anomaly model M0. During this period, the model performance is optimized by adding the Dropout layer and setting the hyperparameter P.
[0030] 3. According to audit-related systems and expert experience, various transaction anomalies are classified, and the output of the neural network is converted into probability values for each category using the softmax function.
[0031] 4. The training set is input into the neural network model M0, and the output prediction result corresponds to the first probability P1 of the first type, the second probability P2 of the second type…, the tth probability Pt of the tth type, and so on.
[0032] 5. Summarize all abnormal probability values P = P1 + P2 + ... + Pt. If the probability value P is greater than the set warning value, it means that the customer has an abnormal situation.
[0033] 6. Develop a web application using JAVA framework and VUE technology. The system can monitor bank account and transaction data in real time, detect potential fraud or abnormal activities by comparing and matching with established models, and generate alerts and visualization reports.
[0034] See also Figures 1 to 6 , the present application provides a bank audit method based on deep neural network, comprising the following steps:
[0035] Step S1: acquiring bank account transaction data, and preprocessing the bank account transaction data to obtain bank account transaction preprocessing data;
[0036] Specifically, extract transaction data from the bank database, including transaction time, transaction amount, transaction type, transaction counterparty, transaction IP address, etc. Convert timestamps to datetime type, convert transaction types to numerical form, and standardize numerical features. Use expert rule engines to perform preliminary classification of transaction data (assuming that the rule engine is based on transaction amount and type, etc.). Perform text preprocessing on transaction notes or description information (such as removing stop words, word segmentation, etc.), and then perform word embedding.
[0037] Step S2: extracting features from the preprocessed bank account transaction data to obtain bank account transaction feature data, and constructing an audit anomaly model for the bank account transaction feature data to obtain an audit anomaly model;
[0038] Specifically, the transaction amount, transaction type and other features are extracted from the preprocessed data. The extracted feature data is modeled using the LSTM model to build a primary audit anomaly model.
[0039] # Import the NumPy library in Python import numpy as np; from tensorflow.keras.models import Sequential; from tensorflow.keras.layers import LSTM, Dense, Dropout; def create_sequences(data, time_steps): sequences = []; for i in range(len(data) - time_steps): sequences.append(data[i:(i + time_steps)]); return np.array(sequences); time_steps = 3; X = create_sequences(feature_data, time_steps); y = np.random.randint(0, 2, size=(X.shape[0],)) # Randomly generate labels model = Sequential(); model.add(LSTM(50, return_sequences=True, input_shape=(X.shape[1], X.shape[2]))); model.add(Dropout(0.2)); model.add(LSTM(50, return_sequences=False)); model.add(Dropout(0.2)); model.add(Dense(1, activation='sigmoid')); model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy']); from sklearn.model_selection import train_test_split; X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42); model.fit(X_train, y_train, epochs=20, batch_size=32, validation_split=0.2).
[0040] Step S3: adding an exception classification layer to the audit exception model to obtain an audit multiple exception processing model, and performing exception processing according to the audit multiple exception processing model to obtain audit multiple exception data;
[0041] Specifically, obtain abnormal category data of bank account transactions defined based on historical data and expert experience, and construct and integrate data at different classification levels. anomaly_data = np.random.rand(100, 10) # 100 samples, 10 anomaly probabilities for each sample; from tensorflow.keras.layers import BatchNormalization,Input, Add inputs = Input(shape=(10,)); standard_fc = Dense(64, activation='relu')(inputs); batchnorm_fc = BatchNormalization()(Dense(64, activation=None)(inputs)); batchnorm_fc = tf.nn.relu(batchnorm_fc); residual = Add()([inputs, Dense(64, activation='relu')(inputs)]); combined = tf.concat([standard_fc, batchnorm_fc, residual], axis=1); outputs = Dense(1, activation='sigmoid')(combined); classification_model=Model(inputs=inputs,outputs=outputs); classification_model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy']).
[0042] Step S4: Perform probability aggregation based on multiple audit abnormal data to obtain abnormal probability aggregation data for abnormal warning operations.
[0043] Specifically, the extreme value data of the abnormal probability is extracted and the gradient is calculated. A probability graph is generated based on the gradient data to obtain the first abnormal probability summary data. Weighted calculation is performed on multiple abnormal data and the final abnormal probability is summarized. An early warning operation is performed based on the summarized abnormal probability, such as generating a report or sending a notification.
[0044] probability_extremes = np.max(multi_anomaly_data, axis=1); probability_gradients = np.gradient(probability_extremes); G = nx.Graph()fori, grad in enumerate(probability_gradients):G.add_node(i, gradient=grad); fori in range(len(probability_gradients) - 1): G.add_edge(i, i + 1); first_anomaly_prob_sum = np.array([G.nodes[i]['gradient']for i in G.nodes]). np.max and np.gradient are processed by calling the NumPy library, and nx.Graph() and subsequent code functions are processed by calling the NetworkX library.
[0045] Specifically, bank account and transaction data are obtained, and algorithms are used to clean, classify and standardize the data. Machine learning algorithms are used for learning and training, and detection or early warning reports are generated in real time. Deep neural network algorithms are used to learn and analyze historical transaction data, establish various audit anomaly models, and use cross-validation and regularization techniques to optimize and adjust the models.
[0046] The preprocessing step in the present invention can effectively reduce the noise and errors in the data and improve the accuracy and stability of the model. Through the feature extraction step, important features that can reflect the transaction behavior are extracted to enhance the expressiveness of the model. Using deep neural network modeling, complex time series patterns and abnormal behaviors can be effectively captured, and the accuracy of anomaly detection can be improved. By adding an abnormal classification layer, various types of abnormal behaviors can be detected and classified, and the comprehensiveness and precision of anomaly detection can be improved. Multiple exception handling steps can automatically handle different types of anomalies and improve the efficiency and consistency of audit processing. Through probability aggregation, the overall risk of different types of anomalies can be comprehensively evaluated to provide comprehensive abnormal warnings. The early warning system can promptly identify high-risk abnormal behaviors and trigger corresponding early warning and response mechanisms to reduce potential losses and risks.
[0047] Optionally, step S1 specifically includes:
[0048] Step S11: Obtain bank account transaction data;
[0049] Specifically, the transaction data is extracted from the bank database system, including transaction time, transaction amount, transaction type, transaction counterparty, transaction IP address, etc. SQL queries are used to extract the required transaction data from the bank's database. For example: SELECT transaction_id, timestamp, amount, transaction_type FROM transactions.
[0050] Remove duplicate records. Handle missing values, such as filling with mean or median. Check and handle outliers, such as extremely large transactions. Use functions such as drop_duplicates() and fillna() in the pandas library to clean the data. Handle outliers based on empirical rules, such as transaction amounts should be between 0 and 10,000.
[0051] Step S12: classifying the bank account transaction data to obtain bank account transaction classification data;
[0052] Specifically, use the preset rule engine to classify transaction data, such as based on transaction amount and transaction type. Write a classification function to classify transaction data according to business rules, and use the apply() function of pandas to apply the classification rules.
[0053] Step S13: Standardizing the bank account transaction data to obtain standardized bank account transaction data;
[0054] Specifically, the numerical features (such as transaction amount) are standardized so that they are distributed within the same scale range. Common methods include Z-score standardization. Use StandardScaler in the scikit-learn library to standardize the data to ensure that different features have the same dimension.
[0055] Step S14: Serialize the bank account transaction standardized data to obtain bank account transaction preprocessing data.
[0056] Specifically, the standardized transaction data is serialized in chronological order to generate time series data, preparing for the input of the subsequent LSTM model.
[0057] The present invention ensures the integrity, accuracy and high quality of data, providing a solid foundation for subsequent analysis and modeling. Through the classification and standardization steps, the data is structured, which facilitates the mining and utilization of transaction feature patterns and improves the expressiveness of the model. The serialization step retains the time dependency of transaction data, allowing the model to capture patterns and abnormal behaviors in time series. Standardization processing and high-quality data preprocessing help improve the performance and stability of deep learning models and accelerate the convergence of models.
[0058] Optionally, step S2 specifically includes:
[0059] Step S21: extracting features from the pre-processed bank account transaction data to obtain bank account transaction feature data;
[0060] Specifically, key features are extracted from the preprocessed transaction data, including transaction amount, transaction type, transaction time interval, transaction frequency, etc.
[0061] Step S22: Perform LSTM modeling based on the bank account transaction feature data to obtain a primary audit anomaly model;
[0062] Specifically, the extracted transaction feature data is modeled using the LSTM model, which is able to capture patterns and abnormal behaviors in time series. import numpy as np; from tensorflow.keras.models importSequential; from tensorflow.keras.layers import LSTM, Dense; # Create time series data def create_sequences(data, time_steps): sequences = []; for i in range(len(data) - time_steps):sequences.append(data[i:(i + time_steps)]); returnnp.array(sequences); time_steps = 3; return_sequences=True,input_shape=(X.shape[1], X.shape[2]))); model.add(LSTM(50, return_sequences=False)); model.add(Dense(1, activation='sigmoid')); # Compile model model.compile(optimizer='adam',loss='binary_crossentropy',metrics=['accuracy']) # Split dataset from sklearn.model_selection import train_test_split; X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42) # Train model model.fit(X_train, y_train, epochs=20, batch_size=32, validation_split=0.2).
[0063] Step S23: Add a Dropout layer to the primary audit anomaly model and optimize the parameters to obtain an audit anomaly model.
[0064] Specifically, add the Dropout layer and optimize parameters: add the Dropout layer to the primary audit anomaly model to prevent overfitting and improve the generalization ability of the model by randomly inactivating a part of neurons. Optimize the model's hyperparameters, such as learning rate and batch size.
[0065] In the present invention, through feature extraction, important features that can reflect transaction behaviors can be extracted, and the expressive power of the model can be enhanced. High-quality feature data helps to improve the accuracy and stability of the model, and provides a good data foundation for subsequent LSTM modeling. The LSTM model can effectively capture the time series patterns in transaction data and identify the time dependence of abnormal transaction behaviors. Through LSTM modeling, complex transaction behaviors and abnormal patterns can be detected more accurately, and the accuracy of anomaly detection can be improved. Adding a Dropout layer can prevent the model from overfitting during training and improve the performance of the model on unseen data. Parameter optimization and the addition of a Dropout layer can enhance the robustness of the model and improve the stability and prediction performance of the model.
[0066] Optionally, step S3 specifically includes:
[0067] Step S31: acquiring bank account transaction abnormality category data, and generating an abnormality classification layer according to the bank account transaction abnormality category data to obtain abnormality classification layer data;
[0068] Specifically, based on historical data analysis, expert experience or rule engines, different bank account transaction abnormality category data are defined, such as high-value transactions, frequent transactions, abnormal IP address transactions, etc. According to the bank account transaction abnormality category data, a fully connected layer, a batch normalized fully connected layer and a residual connection layer are generated to obtain the abnormal classification layer data.
[0069] Step S32: adding the abnormal classification layer data to the audit abnormality model to obtain the audit multiple abnormality processing model;
[0070] Specifically, the generated exception classification layer data is added to the previously constructed audit exception model to form a multiple exception handling model. # Build an audit anomaly model audit_model_inputs = Input(shape=(len(anomaly_categories),)); audit_model_lstm = LSTM(50, return_sequences=True)(audit_model_inputs); audit_model_lstm = LSTM(50, return_sequences=False)(audit_model_lstm); audit_model_outputs = Dense(1, activation='sigmoid')(audit_model_lstm); # Add anomaly classification layer data combined_inputs = Input(shape=(len(anomaly_categories),)); combined_model = Dense(64, activation='relu')(combined_inputs); combined_model = Add()([combined_model, audit_model_outputs]); # Build a multiple anomaly handling model multi_anomaly_model = Model(inputs=combined_inputs, outputs=combined_model); multi_anomaly_model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy']).
[0071] Step S33: dividing the test data set according to the bank account transaction preprocessing data to obtain bank account transaction test data;
[0072] Specifically, according to the preprocessed transaction data, the data set is divided into a training set and a test set.
[0073] Step S34: Use the audit multiple exception processing model to perform exception processing on the bank account transaction test data to obtain audit multiple exception data.
[0074] Specifically, a multiple exception processing model is used to predict and process test data, identify and classify abnormal transaction behaviors, and generate audit multiple exception data.
[0075] In the present invention, by obtaining a variety of bank account transaction abnormality category data, different types of abnormal behaviors can be detected and distinguished, thereby improving the precision of abnormality detection. The design of the abnormality classification layer can be flexibly adjusted and expanded according to business needs to adapt to different types of abnormality detection needs. By adding the abnormality classification layer to the audit abnormality model, integrated multiple abnormality processing is achieved to improve the detection capability and efficiency of the model. The integrated model ensures that different types of abnormality processing methods are consistent, reduces false positives and false negatives, and improves the reliability of the model. By dividing the test data set, the performance of the model can be evaluated and verified during the training process to ensure the accuracy and stability of the model on unseen data. An independent test set can effectively prevent model overfitting and ensure the performance of the model on real data. Using a multiple exception handling model, multiple levels of abnormality detection are performed on the test data to improve the coverage and accuracy of abnormality detection.
[0076] Optionally, step S4 is specifically:
[0077] Step S41: Probability aggregation is performed based on the audit multiple abnormal data to obtain abnormal probability aggregation data;
[0078] Specifically, the anomaly probability of each transaction sample is obtained from the multiple anomaly processing models, and these probabilities are aggregated to obtain the comprehensive anomaly probability of each transaction sample.
[0079] Step S42: determining whether the abnormal probability summary data is greater than or equal to the preset abnormal probability threshold data;
[0080] Specifically, a threshold of abnormal probability is set to determine whether a transaction is abnormal. The comprehensive abnormal probability of each transaction sample is compared with the threshold to determine whether it is abnormal.
[0081] Step S43: When it is determined that the abnormal probability summary data is greater than or equal to the preset abnormal probability threshold data, the corresponding bank account transaction data is determined as bank account abnormal transaction data to perform abnormal warning operations.
[0082] Specifically, transaction samples with a comprehensive abnormal probability greater than or equal to a threshold are marked as abnormal transactions, and abnormal warning reports are generated or relevant personnel are notified for further processing and auditing.
[0083] The aggregation step in the present invention can smooth the errors of a single classification layer and improve the reliability and accuracy of overall anomaly detection. By setting a reasonable anomaly probability threshold, the sensitivity of anomaly detection can be flexibly adjusted to meet different business needs. The simple and direct threshold comparison method can make quick decisions to determine whether a transaction is abnormal and improve detection efficiency. When an abnormal transaction is detected, the system can trigger an early warning and response mechanism in real time to prevent potential risks and losses in a timely manner. The automated early warning and response mechanism can significantly reduce manual intervention and improve the efficiency and accuracy of bank audits.
[0084] Optionally, the bank account transaction classification data includes first bank account transaction classification data and second bank account transaction classification data, and step S12 is specifically:
[0085] Perform preliminary classification of bank account transaction data through a preset expert rule engine to obtain primary bank account transaction classification data;
[0086] Specifically, a preset expert rule engine is used to classify bank account transaction data, for example, based on features such as transaction amount and transaction type.
[0087] Performing text preprocessing on primary bank account transaction classification data to obtain bank account transaction preprocessing data;
[0088] Specifically, the text information (such as transaction notes) in the primary bank account transaction classification data is preprocessed, including removing stop words, word segmentation, stemming, etc.
[0089] Performing word embedding on the preprocessed bank account transaction data to obtain first bank account transaction classification data;
[0090] Specifically, word embedding techniques (such as Word2Vec or GloVe) are used to convert the preprocessed text data into word vector representations.
[0091] Generate nodes based on the primary bank account transaction classification data to obtain bank account transaction node data, and generate a transaction graph based on the bank account transaction node data to obtain bank account transaction graph data;
[0092] Specifically, nodes are generated based on primary classification data, each node represents a transaction or account, and transaction graph data is generated based on the relationship between nodes (such as transaction frequency, amount flow, etc.).
[0093] Performing graph embedding on the bank account transaction graph data to obtain second bank account transaction classification data;
[0094] Specifically, the transaction graph is embedded using graph embedding technology (such as Node2Vec) to obtain a low-dimensional representation of each node.
[0095] The specific steps of graph embedding are:
[0096] Performing adjacency matrix conversion on the bank account transaction graph data to obtain bank account transaction graph conversion data;
[0097] Specifically, the transaction graph data is converted into an adjacency matrix representation, and each element in the adjacency matrix represents the connection relationship between two nodes.
[0098] The high-dimensional adjacency matrix of the bank account transaction graph conversion data is calculated to obtain the high-dimensional data of the bank account transaction graph;
[0099] Specifically, high-dimensional adjacency matrices (such as second-order and third-order adjacency matrices) are calculated to capture more complex node relationships and global information. The initial adjacency matrix is extracted from the transaction graph. The elements in the adjacency matrix represent the direct connectivity between the nodes in the graph. For example, if there is an edge between node 1 and node 2, the corresponding position of the adjacency matrix is 1, otherwise it is 0. The second-order adjacency matrix is obtained by performing matrix multiplication on the initial adjacency matrix and itself. The elements of the second-order adjacency matrix represent the indirect connectivity between nodes through an intermediary node. For example, if there is no direct connection between node 1 and node 3, but node 1 is connected to node 2, and node 2 is connected to node 3, the corresponding position of the second-order adjacency matrix is 1.
[0100] The third-order adjacency matrix is obtained by performing matrix multiplication on the second-order adjacency matrix and the initial adjacency matrix. The elements of the third-order adjacency matrix represent the indirect connectivity between nodes through two intermediary nodes. For example, if there is no connection between node 1 and node 4, either directly or through an intermediary node, but they can be connected through node 2 and node 3, then the corresponding position of the third-order adjacency matrix is 1.
[0101] The high-dimensional data of the bank account transaction graph is subjected to non-negative matrix decomposition and regularization processing to obtain the second bank account transaction classification data.
[0102] Specifically, a non-negative matrix factorization is performed on the high-dimensional adjacency matrix to generate a low-dimensional embedding representation. Regularization is performed to prevent overfitting and improve the stability and interpretability of the embedding.
[0103] Get the calculated high-dimensional adjacency matrix from the previous step, such as a second-order or third-order adjacency matrix. A high-dimensional adjacency matrix is able to capture more complex node relationships and global information in the transaction graph. Decompose the high-dimensional adjacency matrix using non-negative matrix factorization (NMF). NMF is a matrix decomposition technique that decomposes the original matrix into the product of two non-negative matrices, expressed as V ≈ W * H. W is the basis matrix and H is the coefficient matrix. In the implementation, the NMF class in the scikit-learn library can be used for decomposition. Set the appropriate embedding dimension (n_components) to generate a low-dimensional embedding representation.
[0104] In order to prevent overfitting and improve the stability and interpretability of embedding, the decomposed basis matrix (W) and coefficient matrix (H) are L2 regularized. The purpose of regularization is to normalize each row of the matrix so that the L2 norm of each row is 1. In the implementation process, the numpy library can be used to perform L2 regularization on the matrix.
[0105] The present invention uses an expert rule engine to quickly perform preliminary classification of transaction data and improve processing efficiency. The experience and knowledge of experts are integrated into the preliminary classification to enhance the accuracy and reliability of the classification. Through text preprocessing, the quality of text data is improved to provide a better data basis for subsequent word embedding and classification. Stop words and irrelevant information are removed to reduce data noise and improve the accuracy of the model. Word embedding technology can capture semantic information in text data and improve the expressiveness of the classification model. Text data is converted into high-dimensional word vector representation to enhance feature representation capabilities. By generating transaction graph data, the complex relationship between transactions is captured and the recognition ability of the model is improved. Transaction data is structured as a graph to improve the organization and management capabilities of data. By generating transaction graph data, the complex relationship between transactions is captured, and the transaction data is structured to improve the organization and management capabilities of data. Adjacency matrix conversion and high-dimensional adjacency matrix calculation can deeply capture the global and complex relationship between nodes in the graph and enhance the expressiveness of the model. Through NMF technology, high-dimensional graph data is decomposed into low-dimensional embedding representations, and regularization is performed to reduce computational complexity, prevent model overfitting, and improve generalization and stability.
[0106] Optionally, step S22 is specifically:
[0107] Step S221: Generate a cell layer according to the bank account transaction feature data to obtain bank account transaction cell layer data;
[0108] Specifically, based on the bank account transaction feature data, the cell layer data of the LSTM model is generated.
[0109] Step S222: performing forget gate calculation and input gate calculation on the bank account transaction cell layer data to obtain bank account transaction forget gate data and bank account transaction input gate data;
[0110] Specifically, the outputs of the forget gate and the input gate are calculated based on the cell layer data to determine which information needs to be forgotten and retained, respectively.
[0111] Step S223: updating the state of the bank account transaction cell layer data according to the bank account transaction forget gate data and the bank account transaction input gate data to obtain the bank account transaction cell layer update data;
[0112] Specifically, the cell state is updated according to the output of the forget gate and the input gate.
[0113] Step S224: Perform output gate processing on the bank account transaction cell layer update data to obtain bank account transaction cell layer output gate data;
[0114] Specifically, based on the updated cell state and output gate, a new hidden state is calculated.
[0115] Step S225: iterate step S221 to step S224 until all bank account transaction feature data are traversed to obtain a primary audit anomaly model;
[0116] Specifically, the above steps are iterated until all transaction feature data are traversed and a primary audit anomaly model is constructed.
[0117] The bank account transaction cell layer data includes the first bank account transaction cell layer data and the second bank account transaction cell layer data. The cell layer generation is specifically as follows:
[0118] Performing clustering calculation on the bank account transaction feature data corresponding to the first bank account transaction classification data to obtain bank account transaction feature clustering data;
[0119] Specifically, clustering calculation is performed based on the bank account transaction classification data and feature data to obtain bank account transaction feature clustering data. There is a bank account transaction data set that contains three features: transaction times, total transaction amount, and average transaction amount. The data is shown in Table 1:
[0120]
[0121] The K-means clustering algorithm is used to cluster the data, standardize the data and set the number of clusters to 2.
[0122] The results are shown in Table 2:
[0123]
[0124] The above result is one of the implementation methods. There is also similar clustering based on label types.
[0125] Constructing a similarity graph for the bank account transaction feature clustering data to obtain bank account transaction feature similarity graph data;
[0126] Specifically, cosine similarity is used to construct a similarity graph. # Calculate the cosine similarity matrix similarity_matrix = cosine_similarity(scaled_features); # Build a graph structure G = nx.Graph()# Add nodesfor idx, row in data.iterrows():G.add_node(row['Account ID'], cluster=row['Cluster Label']); # Add edges (based on similarity threshold)threshold = 0.9 # Set the similarity threshold, 0.9 is an assumed valuefor i in range(len(similarity_matrix)):for j in range(i + 1, len(similarity_matrix)):if similarity_matrix[i][j]>threshold:G.add_edge(data.loc[i, 'Account ID'], data.loc[j,'Account ID'], weight=similarity_matrix[i][j]);print(G.edges(data=True)).
[0127] Perform graph convolution calculation on the bank account transaction feature similarity graph data and generate a cell layer to obtain first bank account transaction cell layer data;
[0128] Specifically, node embeddings are calculated through a graph convolutional network (GCN) and cell layer data are generated. # Prepare graph data edge_index = torch.tensor(list(G.edges())).t().contiguous(); self).__init__(); self.conv1 = GCNConv(data.num_node_features, 16); self.conv2 = GCNConv(16, 2); def forward(self, data): x, edge_index = data.x, data.edge_index; x = self.conv1(x, edge_index); x = F.relu(x); x = self.conv2(x, edge_index); return F.log_softmax(x, dim=1). # Create model model = GCN(); # Forward propagation output = model(data).
[0129] Specifically, use cosine similarity to calculate the similarity between standardized feature data and obtain a similarity matrix. Create a graph structure in which nodes represent bank accounts and edges represent the similarity between accounts. Set a similarity threshold and connect nodes with similarity above the threshold. Convert the edge list and standardized feature data of the similarity graph into the input format of the graph convolutional network (GCN). Define a two-layer GCN model. Use GCN to perform convolution calculations on the graph data to obtain the embedded representation of each node. The embedded representation of each node is cell layer data. In the graph convolutional network (GCN), through the convolution operation, the features of the node will be embedded into a new feature space, and the new feature vector is the cell layer data.
[0130] Perform convolution calculation on the bank account transaction feature data corresponding to the second bank account transaction classification data to obtain bank account transaction convolution layer data;
[0131] Specifically, a convolutional neural network is used to perform convolution calculations on bank account transaction feature data to generate convolution layer data.
[0132] Specifically, convolutional layers are generated according to preset convolutional layer parameters, such as edge convolutional layers, maximum convolutional layers, and average convolutional layers.
[0133] Perform graph mapping on the bank account transaction convolutional layer data to obtain bank account transaction graph mapping data;
[0134] Specifically, the convolutional layer data is mapped into a graph structure (each sample is a node. Edges are added based on the similarity or other relationships between samples) to generate graph mapping data.
[0135] Perform self-attention weighted calculation on the bank account transaction graph mapping data to obtain bank account transaction self-attention weighted data;
[0136] Specifically, the self-attention mechanism is used to perform weighted calculations on the graph mapping data to capture global dependencies. The feature vectors of each node in the graph are extracted. These feature vectors are combined into a feature matrix. The self-attention mechanism is constructed using TensorFlow and Keras. The self-attention weighted calculations are performed on the feature matrix.
[0137] Specifically, obtain the bank account transaction graph mapping data from the previous step, which is the data processed by the convolution layer and mapped to a graph structure. Extract the feature vectors of each node in the graph and form a feature matrix with these feature vectors. This feature matrix will be used for self-attention calculation. Use TensorFlow and Keras libraries to build a self-attention mechanism. The self-attention mechanism captures global dependencies by calculating the correlation of each position in the input feature matrix. In the implementation process, use Keras's Attention layer to perform weighted calculations on the feature matrix to generate self-attention weighted data.
[0138] Performing correlation cell layer generation on the bank account transaction self-attention weighted data and the bank account transaction feature data to obtain second bank account transaction cell layer data;
[0139] Specifically, the self-attention weighted data is associated with the original transaction feature data to generate weighted associated cell layer data. The self-attention weighted data is spliced or otherwise associated with the original transaction feature data. In the implementation process, a dimension is first added to the original transaction feature data to splice with the self-attention weighted data, and then a fully connected layer is constructed to process the spliced data to obtain the second bank account transaction cell layer data.
[0140] Specifically, there are two ways of association, one is direct splicing and weighted association of cell layer data, and the other is to construct a splicing network, and then perform convolution calculations and pooling calculations based on the splicing network to obtain the second bank account transaction cell layer data.
[0141] The self-attention weighted data and the original transaction feature data are used as nodes, and the feature dimension is used as the degree of the edge. The feature data from two different sources are initially fused together through the splicing graph construction, and the convolution layer is constructed to perform convolution calculations on the splicing network data. The convolution layer can extract high-level features, capture local patterns and structures in the data, and construct the pooling layer to downsample the convolution output. The pooling layer can reduce the size of the feature map, retain the most significant features, and improve the computational efficiency and robustness of the model.
[0142] The similarity graph is constructed as follows:
[0143] Constructing a multi-level similarity graph for the bank account transaction feature clustering data to obtain first bank account transaction feature similarity graph data;
[0144] Specifically, a multi-level graph structure is constructed to represent similarity relationships at different levels. For example, a first-level graph represents a direct similarity relationship, and a second-level graph represents an indirect similarity relationship through an intermediary node. A first-level similarity graph (direct similarity relationship) is constructed, a cosine similarity matrix is calculated, a similarity threshold is set, and a direct similarity graph is constructed. A second-level similarity graph (indirect similarity relationship) is constructed. Based on the first-level similarity graph, an indirect similarity relationship through an intermediary node is found, an indirect similarity threshold is set, and a second-level similarity graph is constructed. Multi-level similarity graphs are merged, the first-level similarity graph and the second-level similarity graph are merged, the edge weights are adjusted, and the first bank account transaction feature similarity graph data is constructed.
[0145] The specific steps for finding indirect similarity relationships through an intermediary node are as follows: Traverse each node: For example, starting from node A1, find all nodes directly connected to A1 (i.e., neighbor nodes), such as A2, A3, A4, and A5. Find all neighbor nodes: For each node, find all neighbor nodes. For example, A1's neighbor nodes are A2, A3, A4, and A5. Calculate the indirect similarity between each pair of neighbor nodes: For each combination of A1's neighbor nodes, calculate the indirect similarity between each pair of neighbor nodes. For example, the indirect similarity between A2 and A3 is:
[0146]
[0147] is the indirect similarity between A2 and A3, is the similarity between A1 and A2, is the similarity between A1 and A3;
[0148] Other neighbor node pairs (such as A2 and A4, A2 and A5, etc.) are also calculated in this way. Add the indirect similarity as the weight of the edge to the secondary similarity graph: If there is no direct edge between A2 and A3, add an edge to the secondary similarity graph, and the weight of the edge is the calculated indirect similarity.
[0149] Suppose a node A1 in the first-level similarity graph has the following neighbor nodes: A1's neighbor nodes: A2, A3, A4, A5, direct similarity (weight): W(A1, A2) = 0.997, W(A1, A3) = 0.997, W(A1, A4) = 0.997, W(A1, A5) = 0.994, calculate the indirect similarity between A2 and A3 based on the above weights: = (0.997 + 0.997) / 2 = 0.997. If there is no direct connection between A2 and A3 in the first-level similarity graph, an edge is added to the second-level similarity graph with an edge weight of 0.997.
[0150] # Calculate indirect similarityfor node in G1.nodes():neighbors = list(G1.neighbors(node));for u, v in itertools.combinations(neighbors, 2): if notG1.has_edge(u, v): sim_uv = (G1[node][u]['weight'] + G1[node][v]['weight']) / 2 # Indirect similarityif sim_uv>threshold: # Assume that the same threshold as the direct similarity is usedG2.add_edge(u, v, weight=sim_uv).
[0151] Perform label similarity calculation on the bank account transaction feature clustering data to obtain label similarity data;
[0152] Specifically, create a dataset containing bank account transaction features and cluster labels. The dataset includes account ID, number of transactions, total transaction amount, average transaction amount, and cluster labels. Create a zero matrix to store the label similarity between each pair of accounts. Iterate over each pair of accounts in the dataset and compare their cluster labels. If the cluster labels of two accounts are the same, the similarity is 1; otherwise, the similarity is 0. Print the label similarity matrix to show the similarity between each pair of accounts.
[0153] Perform time series similarity calculation on the bank account transaction feature clustering data to obtain time series similarity data;
[0154] Specifically, a two-dimensional cumulative distance matrix is constructed, and each element of the matrix represents the distance between the current two points. By iteratively filling this matrix, the minimum cumulative distance path of the two series can be found. The DTW distance between each pair of bank accounts is calculated and the distance is converted into similarity. The DTW distance represents the cumulative distance between two time series on the optimal alignment path.
[0155] Dynamic Time Warping (DTW) is an algorithm for measuring the similarity between two time series. It allows certain points on the time axis to be stretched or compressed to find the best matching path, thereby calculating the distance between the two. The DTW distance is converted to similarity using the formula: Similarity = 1 / (1+distance similarity). This formula ensures that the similarity is between 0 and 1, and the smaller the distance, the greater the similarity.
[0156] DTW is specifically: construct a cumulative distance matrix, each element of which represents the minimum cumulative distance from the current point to the starting point. By iteratively filling this matrix, the minimum cumulative distance path between two sequences can be found. Dynamic programming, using dynamic programming method to fill the cumulative distance matrix, the formula is: ; is the minimum cumulative distance between the two current points in the nearest time. For the current two points The distance is the previous time step Node and Node The distance between for Node and the node of the previous time step The distance between is the previous time step Node and the node of the previous time step The distance between the two points. It means that the distance of the current position is equal to the distance of the current point plus the minimum cumulative distance of the previous step. After the cumulative distance matrix is filled, backtrack from the lower right corner of the matrix to find the optimal alignment path.
[0157] Performing mixed similarity measurement based on label similarity data and time series similarity data to obtain mixed similarity data;
[0158] Specifically, label similarity and temporal similarity are weighted α Perform weighted combination, the formula is: Mixed similarity = .
[0159] Constructing a similarity graph for the bank account transaction feature clustering data according to the mixed similarity data to obtain second bank account transaction feature similarity graph data;
[0160] Specifically, create an undirected graph object. Add nodes, the number of nodes is the same as the number of accounts. Traverse the mixed similarity matrix, and according to the set threshold, add edges with similarity greater than the threshold, and the weight of the edge is the similarity value.
[0161] The first bank account transaction feature similarity graph data is weight-adjusted according to the second bank account transaction feature similarity graph data to obtain the bank account transaction feature similarity graph data.
[0162] Specifically, the data of the second similarity graph will be used to adjust the weight of the first similarity graph. If an edge exists in both graphs, the average of the two weights is taken; if an edge does not exist in the first similarity graph but exists in the second similarity graph, the edge is added to the first similarity graph and the corresponding weight is assigned.
[0163] In the present invention, through linear cell layer generation and convolution calculation, transaction features are preliminarily extracted and data is compressed to improve computing efficiency. Through graph mapping and self-attention weighted calculation, complex relationships and global features in transaction data are captured to improve the expressiveness of the model. Through associative cell layer generation, feature data from different sources are fused to achieve information complementarity and enhance the accuracy of anomaly detection. Through LSTM cell state update, cell memory and forgetting are dynamically managed, long time series data are processed, and the memory capacity and stability of the model are improved. Through multiple iterations and model optimization, transaction data features are extracted to prevent overfitting and improve the generalization ability and robustness of the model. Compared with the conventional LSTM model, the present invention introduces different cell layer data generation to achieve deep multi-dimensional processing of data with significant features, reduce the noise of interference data at the usage level, so as to better achieve the effect of anomaly detection, and provide strong support for financial security and risk prevention. Through clustering algorithms, different types of accounts can be effectively distinguished, potential abnormal accounts can be identified, and the accuracy and effectiveness of clustering can be improved. Through the construction of multi-level similarity graphs, more complex similarity relationships between accounts can be captured, especially the combination of label similarity and time series similarity, making the similarity measurement more accurate. The hybrid similarity metric combines label and time series similarity, so that the similarity graph can more accurately reflect the relationship between accounts, improving the effect of anomaly detection and behavior analysis. Through graph convolution calculation, deep features in the graph structure can be effectively extracted, and complex patterns and relationships in account transaction data can be captured. Self-attention weighted calculation can dynamically focus on important features and relationships, enhance the model's ability to capture key features, and improve the accuracy and robustness of the model. The calculation process of cell layer generation, forget gate, input gate and output gate is similar to the LSTM model, which can effectively capture the time dependency in transaction data and avoid information loss in long time series. Through the calculation of forget gate and input gate, the state of cell layer data is updated, so that the model can better adapt to dynamically changing transaction data and improve the model's ability to detect abnormal behavior. By iteratively executing the cell layer update process, the model parameters can be continuously optimized, making the model more stable and accurate when processing large amounts of transaction data. The final primary audit anomaly model can more effectively identify abnormal transaction behaviors and improve the bank's risk control capabilities and audit efficiency.
[0164] Optionally, step S31 is specifically:
[0165] Obtain abnormal category data of bank account transactions;
[0166] Specifically, based on historical data analysis, expert experience or rule engines, different categories of abnormal bank account transaction data are defined, such as high-value transactions, frequent transactions, abnormal IP address transactions, etc.
[0167] Generate a standard fully connected layer based on the bank account transaction abnormality category data to obtain the first abnormality classification layer data;
[0168] Specifically, based on the abnormal category data of bank account transactions, standard fully connected layer data is generated. A standard fully connected layer is constructed. A fully connected layer is a neural network layer that connects all input neurons to all output neurons. In the implementation process, a fully connected layer containing 64 neurons is constructed, and the activation function is ReLU (Rectified Linear Unit). The abnormal category data of bank account transactions is used as input, and the output is generated through the fully connected layer to obtain the first abnormal classification layer data.
[0169] A batch normalization fully connected layer is generated based on the abnormal category data of bank account transactions to obtain the second abnormal classification layer data;
[0170] Specifically, batch normalized fully connected layer data is generated based on the abnormal category data of bank account transactions.
[0171] The batch normalization fully connected layer is generated as follows:
[0172] ;
[0173] is the second abnormal classification layer data, Adjust parameter data for scaling, For the abnormal transaction category data of bank accounts, is the order of input data, is the batch data volume item, is the error adjustment term, Adjust parameter data for translation;
[0174] Generate a residual connection layer based on the abnormal category data of bank account transactions to obtain the third abnormal classification layer data;
[0175] Specifically, based on the abnormal category data of bank account transactions, the residual connection layer data is generated. Build a residual connection layer. The residual connection layer is a neural network layer that adds all input neurons to the output of the fully connected layer, thereby retaining the input information while increasing the depth of the network. In the implementation process, a fully connected layer containing 64 neurons is constructed, and the activation function is ReLU (Rectified Linear Unit), and its output is added to the input to form a residual connection layer. Take the abnormal category data of bank account transactions as input, generate output through the residual connection layer, and obtain the third abnormal classification layer data.
[0176] The first abnormal classification layer data, the second abnormal classification layer data and the third abnormal classification layer data are integrated to obtain the abnormal classification layer data.
[0177] Specifically, the data of the standard fully connected layer, batch normalized fully connected layer, and residual connection layer are integrated to generate the final abnormal classification layer data.
[0178] In the present invention, the basic features are extracted by the standard fully connected layer to provide initial data for subsequent complex feature processing. The standard fully connected layer has a simple structure and high computational efficiency, and is suitable for preliminary feature extraction. Batch normalization can stabilize the model training process, accelerate convergence, and improve the stability and performance of the model. Through normalization processing, the gradient vanishing and gradient explosion problems in deep networks are alleviated, and the effect of model training is improved. The batch normalization layer can dynamically adjust the input data, enhance the feature expression ability, and improve the accuracy of classification. Residual connections can effectively prevent gradient vanishing and improve the training effect of deep networks. Residual connections allow the construction of deeper neural networks, improving the expression ability and anomaly detection ability of the model. Through residual connections, the model can better learn complex trading patterns and abnormal behaviors, and improve the classification effect. Multi-level and multi-mode feature extraction and integration improve the robustness of the model and reduce the impact of single feature or layer failure on the overall effect.
[0179] Optionally, step S41 is specifically:
[0180] Probability extreme value extraction is performed based on multiple audit abnormal data to obtain probability extreme value data;
[0181] Specifically, the extreme value (eg, maximum value, minimum value) of the abnormal probability of each transaction sample is extracted from the multiple abnormal data.
[0182] Perform gradient calculation based on probability extreme value data to obtain abnormal probability gradient data;
[0183] Specifically, based on the probability extreme value data, the gradient of the abnormal probability is calculated to quantify the changing trend of the abnormal probability. Gradient calculation is a numerical differentiation process that can quantify the change of the abnormal probability of each sample over time or sample sequence. For example, if the abnormal probability of a sample suddenly increases, the gradient value will be positive and large; if the abnormal probability suddenly decreases, the gradient value will be negative and large. Assuming that there are 8 transaction samples with probability extreme value data [0.2, 0.5, 0.3, 0.6, 0.4, 0.7, 0.5, 0.8], we can calculate the gradient of these data: for the first sample (0.2), its gradient is determined by the subsequent sample (0.5), and the gradient is 0.5-0.2=0.3. For the middle sample, the gradient is determined by the samples before and after it. For example, the gradient of the second sample (0.5) is (0.3-0.2) / 2+(0.6-0.5) / 2=0.05+0.05=0.1. For the last sample (0.8), its gradient is determined by the previous sample (0.5), and the gradient is 0.8-0.5=0.3.
[0184] Generate a probability graph of the abnormal probability gradient data to obtain first abnormal probability summary data;
[0185] Specifically, a probability graph is generated based on the abnormal probability gradient data, and the changing trend of the abnormal probability is visualized as graph data.
[0186] Specifically, ensure that the gradient data of the abnormal probability has been calculated. The gradient data represents the changing trend of the abnormal probability of each transaction sample. Convert the abnormal probability gradient data into graph data. Each gradient value is used as a node in the graph, and edges are generated between adjacent gradient values to represent the relationship between them. Use the matplotlib library to visualize the generated probability graph. The size and color of the node are adjusted according to the gradient value to make the changing trend of the abnormal probability more intuitive. Summarize the gradient data of all nodes in the graph. The aggregation method can be a simple summation or average to obtain the first abnormal probability summary data, or weight the degree of abnormality according to the edge and the derived relative distance concept to obtain the first abnormal probability summary data.
[0187] Perform probability weighted calculation on multiple audit abnormal data to obtain the second abnormal probability summary data;
[0188] Specifically, weighted calculation is performed on multiple abnormal data, and the comprehensive abnormal probability is calculated according to the importance and weights of different abnormal categories.
[0189] The first abnormal probability summary data and the second abnormal probability summary data are summarized to obtain abnormal probability summary data.
[0190] Specifically, the first abnormal probability summary data generated by gradient calculation and the second abnormal probability summary data generated by weighted calculation are integrated to obtain the final abnormal probability summary data.
[0191] By extracting the extreme value data of abnormal probability in the present invention, the most significant abnormal points in the transaction data can be effectively captured, and the sensitivity of abnormal detection can be improved. Extreme value extraction helps to reduce the impact of noise in the data, so that the model can focus more on significant abnormal points and enhance the detection effect. Gradient calculation can capture the changing trend of abnormal probability and help identify abnormal behaviors that gradually emerge. By analyzing the changing gradient of abnormal probability, potential abnormalities can be detected earlier and countermeasures can be taken in time. The probability graph can intuitively represent the changes in abnormal probability and help understand and analyze abnormal behaviors. By generating probability graphs, graph algorithms can be applied to further analyze abnormal relationships and patterns to improve detection effects. Through weighted calculations, the risks of different types of abnormalities are comprehensively evaluated to improve the comprehensiveness of abnormal detection. According to business needs and historical data, the weights of each abnormal category can be flexibly adjusted to improve the adaptability and accuracy of the model. The aggregation of multiple methods can enhance the robustness of anomaly detection and reduce the limitations and false alarm rate of a single method.
[0192] Optionally, the present application further provides a bank audit system based on a deep neural network, which is used to execute the bank audit method based on a deep neural network as described above. The bank audit system based on a deep neural network includes:
[0193] A bank account transaction preprocessing module, used to obtain bank account transaction data and preprocess the bank account transaction data to obtain bank account transaction preprocessing data;
[0194] An audit anomaly model building module is used to extract features from bank account transaction preprocessing data to obtain bank account transaction feature data, and to build an audit anomaly model for the bank account transaction feature data to obtain an audit anomaly model;
[0195] The audit multiple exception processing module is used to add an exception classification layer to the audit exception model to obtain the audit multiple exception processing model, and perform exception processing according to the audit multiple exception processing model to obtain the audit multiple exception data;
[0196] The abnormal warning operation module is used to perform probability aggregation based on multiple audit abnormal data to obtain abnormal probability aggregation data for abnormal warning operations.
[0197] The purpose of the present invention is to ensure the integrity and consistency of transaction data through data cleaning and preprocessing, and provide a high-quality data foundation for subsequent analysis and modeling. Through multi-level feature extraction such as text preprocessing, word embedding and graph embedding, the complex patterns and associated information in the transaction data are fully captured, and the expression ability and detection accuracy of the model are improved. The LSTM model can effectively capture the time series pattern in the transaction data and identify potential abnormal behaviors. By adding the Dropout layer and parameter optimization, the model is prevented from overfitting, the stability and generalization ability of the model are improved, and the accuracy of anomaly detection is enhanced. The classification layer data generated by various methods can detect and classify various types of abnormal behaviors and improve the precision of anomaly detection. Multi-level and multi-mode feature extraction and integration improve the robustness and stability of the model, reduce false positives and false negatives, and improve the detection effect. Through extreme value extraction, gradient calculation and weighted calculation, the abnormal risk of the transaction is comprehensively evaluated and the detection accuracy is improved. Through real-time probability aggregation and early warning operations, high-risk abnormal behaviors are timely identified and responded to, reducing potential losses and risks. The aggregation and integration of multiple methods improve the robustness and stability of anomaly detection and reduce the limitations and false positive rates of single methods.
[0198] Therefore, from any point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the attached application documents rather than the above description, and it is intended that all changes falling within the meaning and scope of equivalent elements of the application documents are included in the present invention.
[0199] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.
Claims
1. A bank audit method based on deep neural network, characterized in that: The following steps are involved: Step S1 includes: Step S11: Obtain bank account transaction data; Step S12: classifying the bank account transaction data to obtain bank account transaction classification data; Step S13: Standardizing the bank account transaction data to obtain standardized bank account transaction data; Step S14: Serializing the bank account transaction standardized data to obtain bank account transaction preprocessing data; Step S2 comprises: Step S21: extracting features from the pre-processed bank account transaction data to obtain bank account transaction feature data; Step S22: Perform LSTM modeling based on the bank account transaction feature data to obtain a primary audit anomaly model; Step S23: Add a Dropout layer to the primary audit anomaly model and optimize the parameters to obtain an audit anomaly model; Step S3 includes: Step S31: acquiring bank account transaction abnormality category data, and generating an abnormality classification layer according to the bank account transaction abnormality category data to obtain abnormality classification layer data; Step S32: adding the abnormal classification layer data to the audit abnormality model to obtain the audit multiple abnormality processing model; Step S33: dividing the test data set according to the bank account transaction preprocessing data to obtain bank account transaction test data; Step S34: using the audit multiple exception processing model to perform exception processing on the bank account transaction test data to obtain audit multiple exception data; Step S4: Probability aggregation is performed based on the audit multiple abnormal data to obtain abnormal probability aggregation data for abnormal warning operation; The bank account transaction classification data includes the first bank account transaction classification data and the second bank account transaction classification data. Step S12 is specifically as follows: Perform preliminary classification of bank account transaction data through a preset expert rule engine to obtain primary bank account transaction classification data; Performing text preprocessing on primary bank account transaction classification data to obtain bank account transaction preprocessing data; Performing word embedding on the preprocessed bank account transaction data to obtain first bank account transaction classification data; Generate nodes based on the primary bank account transaction classification data to obtain bank account transaction node data, and generate a transaction graph based on the bank account transaction node data to obtain bank account transaction graph data; Performing graph embedding on the bank account transaction graph data to obtain second bank account transaction classification data; The specific steps of graph embedding are: Performing adjacency matrix conversion on the bank account transaction graph data to obtain bank account transaction graph conversion data; The high-dimensional adjacency matrix of the bank account transaction graph conversion data is calculated to obtain the high-dimensional data of the bank account transaction graph; Performing non-negative matrix decomposition and regularization processing on the high-dimensional data of the bank account transaction graph to obtain second bank account transaction classification data; Wherein step S22 is specifically as follows: Step S221: Generate a cell layer according to the bank account transaction feature data to obtain bank account transaction cell layer data; Step S222: performing forget gate calculation and input gate calculation on the bank account transaction cell layer data to obtain bank account transaction forget gate data and bank account transaction input gate data; Step S223: updating the state of the bank account transaction cell layer data according to the bank account transaction forget gate data and the bank account transaction input gate data to obtain the bank account transaction cell layer update data; Step S224: Perform output gate processing on the bank account transaction cell layer update data to obtain bank account transaction cell layer output gate data; Step S225: iterate step S221 to step S224 until all bank account transaction feature data are traversed to obtain a primary audit anomaly model; The bank account transaction cell layer data includes the first bank account transaction cell layer data and the second bank account transaction cell layer data. The cell layer generation is specifically as follows: Performing clustering calculation on the bank account transaction feature data corresponding to the first bank account transaction classification data to obtain bank account transaction feature clustering data; Constructing a similarity graph for the bank account transaction feature clustering data to obtain bank account transaction feature similarity graph data; Perform graph convolution calculation on the bank account transaction feature similarity graph data and generate a cell layer to obtain first bank account transaction cell layer data; Perform convolution calculation on the bank account transaction feature data corresponding to the second bank account transaction classification data to obtain bank account transaction convolution layer data; Perform graph mapping on the bank account transaction convolutional layer data to obtain bank account transaction graph mapping data; Perform self-attention weighted calculation on the bank account transaction graph mapping data to obtain bank account transaction self-attention weighted data; Performing correlation cell layer generation on the bank account transaction self-attention weighted data and the bank account transaction feature data to obtain second bank account transaction cell layer data; The similarity graph is constructed as follows: Constructing a multi-level similarity graph for the bank account transaction feature clustering data to obtain first bank account transaction feature similarity graph data; Perform label similarity calculation on the bank account transaction feature clustering data to obtain label similarity data; Perform time series similarity calculation on the bank account transaction feature clustering data to obtain time series similarity data; Performing mixed similarity measurement based on label similarity data and time series similarity data to obtain mixed similarity data; Constructing a similarity graph for the bank account transaction feature clustering data according to the mixed similarity data to obtain second bank account transaction feature similarity graph data; weight-adjust the first bank account transaction feature similarity graph data according to the second bank account transaction feature similarity graph data to obtain the bank account transaction feature similarity graph data; Wherein step S31 is specifically as follows: Obtain abnormal category data of bank account transactions; Generate a standard fully connected layer based on the bank account transaction abnormality category data to obtain the first abnormality classification layer data; The batch normalization fully connected layer is generated according to the abnormal category data of bank account transactions to obtain the second abnormal classification layer data; wherein the batch normalization fully connected layer is generated specifically as follows: is the second abnormal classification layer data, Adjust parameter data for scaling, For the abnormal transaction category data of bank accounts, is the order of input data, is the batch data volume item, is the error adjustment term, Adjust parameter data for translation; Generate a residual connection layer based on the abnormal category data of bank account transactions to obtain the third abnormal classification layer data; The first abnormal classification layer data, the second abnormal classification layer data and the third abnormal classification layer data are integrated to obtain the abnormal classification layer data.
2. The method according to claim 1, characterized in that Step S4 is specifically as follows: Step S41: Probability aggregation is performed based on the audit multiple abnormal data to obtain abnormal probability aggregation data; Step S42: determining whether the abnormal probability summary data is greater than or equal to the preset abnormal probability threshold data; Step S43: When it is determined that the abnormal probability summary data is greater than or equal to the preset abnormal probability threshold data, the corresponding bank account transaction data is determined as bank account abnormal transaction data to perform abnormal warning operations.
3. The method according to claim 2, characterized in that Step S41 is specifically as follows: Probability extreme value extraction is performed based on multiple audit abnormal data to obtain probability extreme value data; Perform gradient calculation based on probability extreme value data to obtain abnormal probability gradient data; Generate a probability graph of the abnormal probability gradient data to obtain first abnormal probability summary data; Perform probability weighted calculation on multiple audit abnormal data to obtain the second abnormal probability summary data; The first abnormal probability summary data and the second abnormal probability summary data are summarized to obtain abnormal probability summary data.
4. A bank audit system based on deep neural network, characterized in that: For executing the bank audit method based on deep neural network as claimed in claim 1, the bank audit system based on deep neural network comprises: A bank account transaction preprocessing module is used to obtain bank account transaction data; classify the bank account transaction data to obtain bank account transaction classification data; standardize the bank account transaction data to obtain bank account transaction standardized data; and serialize the bank account transaction standardized data to obtain bank account transaction preprocessing data; The bank account transaction classification data includes the first bank account transaction classification data and the second bank account transaction classification data, and the data classification is specifically as follows: Perform preliminary classification of bank account transaction data through a preset expert rule engine to obtain primary bank account transaction classification data; Performing text preprocessing on primary bank account transaction classification data to obtain bank account transaction preprocessing data; Performing word embedding on the preprocessed bank account transaction data to obtain first bank account transaction classification data; Generate nodes based on the primary bank account transaction classification data to obtain bank account transaction node data, and generate a transaction graph based on the bank account transaction node data to obtain bank account transaction graph data; Performing graph embedding on the bank account transaction graph data to obtain second bank account transaction classification data; The specific steps of graph embedding are: Performing adjacency matrix conversion on the bank account transaction graph data to obtain bank account transaction graph conversion data; The high-dimensional adjacency matrix of the bank account transaction graph conversion data is calculated to obtain the high-dimensional data of the bank account transaction graph; Performing non-negative matrix decomposition and regularization processing on the high-dimensional data of the bank account transaction graph to obtain second bank account transaction classification data; The audit anomaly model building module is used to extract features from the pre-processed data of bank account transactions to obtain bank account transaction feature data; perform LSTM modeling based on the bank account transaction feature data to obtain a primary audit anomaly model; add a Dropout layer to the primary audit anomaly model and optimize the parameters to obtain an audit anomaly model; The LSTM modeling is specifically as follows: S221: Generate a cell layer according to the bank account transaction feature data to obtain bank account transaction cell layer data; S222: performing forget gate calculation and input gate calculation on the bank account transaction cell layer data to obtain bank account transaction forget gate data and bank account transaction input gate data; S223: updating the state of the bank account transaction cell layer data according to the bank account transaction forget gate data and the bank account transaction input gate data to obtain bank account transaction cell layer update data; S224: Perform output gate processing on the bank account transaction cell layer update data to obtain bank account transaction cell layer output gate data; S225: Iterate S221 to S224 until all bank account transaction feature data are traversed to obtain a primary audit anomaly model; The bank account transaction cell layer data includes the first bank account transaction cell layer data and the second bank account transaction cell layer data. The cell layer generation is specifically as follows: Performing clustering calculation on the bank account transaction feature data corresponding to the first bank account transaction classification data to obtain bank account transaction feature clustering data; Constructing a similarity graph for the bank account transaction feature clustering data to obtain bank account transaction feature similarity graph data; Perform graph convolution calculation on the bank account transaction feature similarity graph data and generate a cell layer to obtain first bank account transaction cell layer data; Perform convolution calculation on the bank account transaction feature data corresponding to the second bank account transaction classification data to obtain bank account transaction convolution layer data; Perform graph mapping on the bank account transaction convolutional layer data to obtain bank account transaction graph mapping data; Perform self-attention weighted calculation on the bank account transaction graph mapping data to obtain bank account transaction self-attention weighted data; Performing correlation cell layer generation on the bank account transaction self-attention weighted data and the bank account transaction feature data to obtain second bank account transaction cell layer data; The similarity graph is constructed as follows: Constructing a multi-level similarity graph for the bank account transaction feature clustering data to obtain first bank account transaction feature similarity graph data; Perform label similarity calculation on the bank account transaction feature clustering data to obtain label similarity data; Perform time series similarity calculation on the bank account transaction feature clustering data to obtain time series similarity data; Performing mixed similarity measurement based on label similarity data and time series similarity data to obtain mixed similarity data; Constructing a similarity graph for the bank account transaction feature clustering data according to the mixed similarity data to obtain second bank account transaction feature similarity graph data; weight-adjust the first bank account transaction feature similarity graph data according to the second bank account transaction feature similarity graph data to obtain the bank account transaction feature similarity graph data; The audit multiple exception processing module is used to obtain bank account transaction exception category data, and generate an exception classification layer according to the bank account transaction exception category data to obtain exception classification layer data; add the exception classification layer data to the audit exception model to obtain the audit multiple exception processing model; divide the test data set according to the bank account transaction pre-processing data to obtain bank account transaction test data; use the audit multiple exception processing model to perform exception processing on the bank account transaction test data to obtain audit multiple exception data; The abnormal classification layer is generated as follows: Obtain abnormal category data of bank account transactions; Generate a standard fully connected layer based on the bank account transaction abnormality category data to obtain the first abnormality classification layer data; The batch normalization fully connected layer is generated according to the abnormal category data of bank account transactions to obtain the second abnormal classification layer data; wherein the batch normalization fully connected layer is generated specifically as follows: is the second abnormal classification layer data, Adjust parameter data for scaling, For the abnormal transaction category data of bank accounts, is the order of input data, is the batch data volume item, is the error adjustment term, Adjust parameter data for translation; Generate a residual connection layer based on the abnormal category data of bank account transactions to obtain the third abnormal classification layer data; Integrate the first abnormal classification layer data, the second abnormal classification layer data and the third abnormal classification layer data to obtain abnormal classification layer data; The abnormal warning operation module is used to perform probability aggregation based on multiple audit abnormal data to obtain abnormal probability aggregation data for abnormal warning operations.
Citation Information
Patent Citations
Telecommunication network fraud prevention system
CN114612112A
WiFi sign language translation system and method based on deep learning
CN115188073A
Abnormal transaction behavior detection method based on tensor distribution search feature space
CN115860929A
Account security rechecking method, device and equipment and storage medium
CN116645105A
Bank abnormal transaction detection method, system and device
CN118094439A
