Financial transaction anomaly detection system
By using technologies such as frequency feature analysis and variational autoencoders in the financial transaction anomaly detection system, periodic and sudden abnormal patterns in financial transaction data are identified, which solves the misunderstanding of existing systems in identifying complex and hidden abnormal patterns. It solves the problem of reporting and missed detection, improves detection accuracy and adaptability, and reduces financial risks.
Patent Information
- Application Number
- CN202411025716.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-07-30
AI Technical Summary
Existing financial transaction anomaly detection systems have high false positives and missed detections when identifying complex and hidden abnormal patterns, and are difficult to adapt to emerging abnormal patterns, resulting in periodic fraud being ignored, causing financial losses and threats to transaction security.
The frequency feature analysis module, periodic anomaly detection module, frequency domain mutation identification module, potential distribution learning module and anomaly cluster analysis module are used to extract the key frequencies of transaction data through technologies such as fast Fourier transform and variational autoencoders. components and underlying distributions, identify periodic anomalies and sudden trading patterns, and generate optimized monitoring strategies.
It significantly improves the accuracy of anomaly detection and the system's adaptability to emerging abnormal patterns, reduces financial risks, reduces false positives and missed detections, and enhances the response ability to hidden periodic anomalies and sudden large-amount transaction patterns.
Smart Images

Figure CN118568641B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of anomaly detection technology, and in particular to a financial transaction anomaly detection system. Background Art
[0002] The field of anomaly detection technology focuses on identifying unusual patterns or anomalous behaviors in data that deviate significantly from expected or standard behavior. In the context of financial transactions, this involves using algorithms and statistical models to monitor transaction activity to identify fraud, errors, or other non-compliant behavior. Anomaly detection technology uses normal behavior patterns learned from historical transaction data to identify transactions that deviate from these patterns, indicating potential fraud or risk.
[0003] Among them, the financial transaction anomaly detection system is a system that applies anomaly detection technology to the financial field, aiming to automatically identify and report abnormal transaction activities. Its key purpose is to protect individuals and institutions from fraud, reduce financial losses, and improve transaction security. By detecting and processing abnormal transactions in a timely manner, these systems help maintain the health and stability of the financial market and provide confidence to users and businesses.
[0004] Existing financial transaction anomaly detection systems focus on using historical data to learn normal behavior patterns to identify anomalies, but their ability to identify complex and hidden abnormal patterns is limited. This limitation leads to high false positives and missed detections in practical applications, especially when dealing with hidden periodic anomalies and rapidly changing transaction patterns. The lack of analysis of key frequency components and potential distribution learning makes it difficult for the system to adapt to emerging abnormal patterns, which can lead to periodic fraud being ignored, resulting in greater financial losses and threats to transaction security. Summary of the invention
[0005] The purpose of the present invention is to solve the shortcomings in the prior art and to propose a financial transaction anomaly detection system.
[0006] In order to achieve the above object, the present invention adopts the following technical solution: The financial transaction anomaly detection system includes:
[0007] The frequency feature analysis module performs fast Fourier transform based on the time series of transaction data, extracts the key frequency components and energy distribution of transaction activities, and generates frequency domain features;
[0008] The periodic anomaly detection module analyzes key frequency components based on the frequency domain characteristics, identifies repeated transaction behaviors at fixed time intervals and their anomalies, captures energy distribution, analyzes hidden periodic abnormal behaviors, and identifies periodic abnormal characteristics;
[0009] The frequency domain mutation identification module analyzes atypical patterns in frequency components and energy distribution based on the frequency domain characteristics, identifies mutation indicators indicating sudden large-amount transactions or unconventional periodic transaction patterns, and generates frequency domain mutation indicators;
[0010] The potential distribution learning module applies a variational autoencoder to learn the potential distribution of the transaction data based on the periodic abnormal characteristics and frequency domain mutation indicators, identifies data points with abnormal distribution, and generates potential space abnormal characteristics;
[0011] The abnormal cluster analysis module performs cluster analysis based on the abnormal characteristics of the latent space, classifies abnormal transaction data points, identifies abnormal transaction patterns of differentiated types, and generates abnormal transaction pattern clusters;
[0012] The strategy generation and adjustment module designs monitoring strategies based on the abnormal transaction pattern clustering, adjusts abnormal detection parameters, updates the model to match the newly identified abnormal patterns, and generates optimized monitoring strategies.
[0013] As a further solution of the present invention, the frequency domain features include the main frequency of trading activities, the key energy distribution area, and the frequency fluctuation pattern; the periodic abnormal features specifically refer to the deviation of fixed-period trading patterns, the abnormal period intensity, and the irregular changes in the period duration; the frequency domain mutation indicators include the appearance of unconventional frequency components, the sudden peak of energy distribution, and the short-term changes in the frequency domain; the latent space abnormal features specifically include the distribution of abnormal data points, the clustered area of abnormal data points, and the distribution form in the latent space; the abnormal trading pattern clustering includes the grouping of differentiated abnormal types, the classification criteria of abnormal patterns, and the key feature description in the clustering results; the optimized monitoring strategy specifically refers to the adjusted anomaly detection threshold, the current anomaly recognition model parameters, and the monitoring rules for the newly identified abnormal patterns.
[0014] As a further solution of the present invention, the frequency characteristic analysis module includes a transaction data analysis submodule, a periodicity detection submodule, and an energy spectrum analysis submodule;
[0015] The transaction data analysis submodule identifies basic behavior patterns based on the transaction data time series, including trend analysis and volatility assessment, emphasizes the dynamic characteristics of the data, and generates behavior pattern recognition results;
[0016] The periodicity detection submodule uses the behavior pattern recognition results and the Fourier transform method to analyze the periodicity of the transaction data, identify the repetitive patterns and periodic changes, highlight the repetitive characteristics of the data, and generate periodic characteristic data;
[0017] The energy spectrum analysis submodule analyzes the periodic characteristic data, highlights the dominant frequency and energy concentration area of the trading activity, extracts the energy distribution corresponding to the frequency components, and generates frequency domain features;
[0018] The Fourier transform method uses the formula:
[0019] ;
[0020] in, To improve the frequency The Fourier transform result at For at time point The signal sampling value, To adjust the signal strength weight coefficient, is the prediction error correction term based on the behavior pattern, is the total number of sampling points, is the sampling interval, is the rotation factor, is the weight coefficient of frequency correction, Based on frequency The cyclical fluctuation correction term.
[0021] As a further solution of the present invention, the periodic anomaly detection module includes a frequency analysis submodule, an anomaly identification submodule, and a periodic feature extraction submodule;
[0022] The frequency analysis submodule analyzes the key frequency components based on the frequency domain characteristics, captures the key information of energy distribution, sorts out the energy values of multiple frequency components, and generates key frequency and energy distribution diagrams;
[0023] The abnormality identification submodule screens repeated transaction behaviors at fixed time intervals based on key frequencies and energy distribution diagrams, analyzes abnormalities, identifies abnormal transaction behaviors, and generates abnormal transaction behavior analysis results;
[0024] The periodic feature extraction submodule uses the abnormal transaction behavior analysis results to parse the timestamps in the transaction data, presets the frequency parameters according to the time periodicity of the transaction data, decomposes the time series data into trend components, seasonal components and residual components, analyzes the seasonal components, and identifies periodic abnormal features.
[0025] As a further solution of the present invention, the frequency domain mutation identification module includes a frequency component analysis submodule, an energy distribution analysis submodule, and a mutation index identification submodule;
[0026] The frequency component analysis submodule performs frequency component analysis based on frequency domain characteristics, identifies atypical frequency patterns by performing statistics on the amplitude and phase information of the frequency, and generates atypical frequency pattern analysis results;
[0027] The energy distribution analysis submodule analyzes the energy distribution of the frequency components based on the atypical frequency mode analysis results, identifies the abnormal modes in the energy distribution by calculating the energy value of each frequency component, and generates abnormal energy distribution analysis results;
[0028] The mutation index identification submodule uses the abnormal energy distribution analysis results, comprehensively refers to the information of frequency components and energy distribution, makes logical judgments, identifies mutation indicators indicating sudden large transactions or unconventional periodic transaction patterns, and integrates frequency domain mutation indicators.
[0029] As a further solution of the present invention, the potential distribution learning module includes a periodic anomaly detection submodule, a variational autoencoder training submodule, and an anomaly recognition and feature extraction submodule;
[0030] The periodic anomaly detection submodule performs frequency domain conversion on the data based on the periodic anomaly characteristics and frequency domain mutation index, analyzes the amplitude of the converted data, uses the set threshold to determine the abnormal components in the frequency domain, performs inverse transformation on the abnormal components, extracts the periodic anomaly characteristics and frequency domain mutation characteristics, and generates a periodic frequency domain feature set;
[0031] The variational autoencoder training submodule is based on the periodic frequency domain feature set and adopts the variational autoencoder algorithm to construct a variational autoencoder model, including the design of the encoder and the decoder, setting the activation function, selecting the optimizer, defining the loss function, performing model training, setting the batch size and the number of iterations, and using all the data in the periodic frequency domain feature set for training to obtain a potential distribution model;
[0032] The anomaly identification and feature extraction submodule is based on the potential distribution model and applies the threshold judgment method to mark the data points in the latent space as abnormal, perform feature extraction on the abnormal data points, calculate the coordinate values and relative positions of the abnormal data points in the latent space, and generate the abnormal features of the latent space;
[0033] The variational autoencoder algorithm uses the formula:
[0034] ;
[0035] in, is the weight coefficient of reconstruction loss, for The weight coefficient of the divergence loss, is the L1 regularization coefficient, is the L2 regularization coefficient, Indicates the model The value of the parameter, is the total number of model parameters, is the difference between the original input data and the decoder output, is the difference between the latent distribution and the prior distribution encoded.
[0036] As a further solution of the present invention, the abnormal clustering analysis module includes an abnormal feature extraction submodule, a clustering algorithm application submodule, and an abnormal pattern recognition submodule;
[0037] The abnormal feature extraction submodule performs feature vectorization based on the abnormal features of the latent space, encodes the characteristics of the abnormal data into a numerical vector, reflects the abnormal degree of each data point, and generates an abnormal feature vector set;
[0038] The clustering algorithm application submodule automatically groups data points based on the abnormal feature vector set, classifies abnormal data according to the fit of the feature vector, aggregates similar features, and obtains abnormal data clustering results;
[0039] The abnormal pattern recognition submodule performs pattern analysis based on the abnormal data clustering results, identifies the abnormal transaction pattern represented by each category, extracts differentiated abnormal patterns from the clustering results, and generates abnormal transaction pattern clusters.
[0040] As a further solution of the present invention, the strategy generation and adjustment module includes an abnormal trading pattern analysis submodule, a strategy optimization test submodule, and a real-time monitoring logic adjustment submodule;
[0041] The abnormal transaction pattern analysis submodule analyzes the clustered data based on abnormal transaction pattern clustering, identifies the target behavior characteristics of each cluster, identifies the differentiated abnormal transaction patterns, and generates an abnormal transaction behavior feature set;
[0042] The strategy optimization test submodule designs a monitoring strategy based on the abnormal trading behavior feature set, including setting a detection threshold and a monitoring frequency, performs simulation tests on the designed strategy, and establishes a strategy optimization plan;
[0043] The real-time monitoring logic adjustment submodule adjusts the logic parameters of the real-time monitoring system based on the strategy optimization solution, including updating thresholds and monitoring indicators, matching the current abnormal transaction mode, identifying and responding to abnormal transactions, and building an optimized monitoring strategy.
[0044] Compared with the prior art, the advantages and positive effects of the present invention are:
[0045] In the present invention, by performing fast Fourier transform to extract the key frequency components of trading activities and applying variational autoencoders to learn the potential distribution of trading data, the solution effectively identifies repeated trading behaviors and their abnormalities at fixed time intervals, and accurately captures hidden periodic anomalies. In addition, in-depth analysis of frequency components and energy distribution enhances the ability to respond to sudden large transactions and unconventional periodic trading patterns. These innovative methods not only significantly improve the accuracy of anomaly detection, but also enhance the system's adaptability to emerging abnormal patterns, effectively reducing financial risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 is a system flow chart of the present invention;
[0047] Figure 2 It is a schematic diagram of the system framework of the present invention;
[0048] Figure 3 It is a flow chart of the frequency characteristic analysis module of the present invention;
[0049] Figure 4 This is a flow chart of the periodic anomaly detection module of the present invention;
[0050] Figure 5 This is a flow chart of the frequency domain mutation identification module of the present invention;
[0051] Figure 6 It is a flow chart of the potential distribution learning module of the present invention;
[0052] Figure 7 This is a flow chart of the abnormal clustering analysis module of the present invention;
[0053] Figure 8 This is a flow chart of the strategy generation and adjustment module of the present invention. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0055] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, in the description of the present invention, "multiple" means two or more, unless otherwise clearly and specifically defined.
[0056] Example 1: Please refer to Figure 1 to Figure 2 ,The financial transaction anomaly detection system includes:
[0057] The frequency feature analysis module performs fast Fourier transform based on the time series of transaction data, extracts the key frequency components and energy distribution of transaction activities, and generates frequency domain features;
[0058] The periodic anomaly detection module analyzes key frequency components based on frequency domain characteristics, identifies repeated trading behaviors and their anomalies at fixed time intervals, captures energy distribution, analyzes hidden periodic abnormal behaviors, and identifies periodic abnormal characteristics;
[0059] The frequency domain mutation identification module analyzes atypical patterns in frequency components and energy distribution based on frequency domain characteristics, identifies mutation indicators that indicate sudden large transactions or unconventional periodic transaction patterns, and generates frequency domain mutation indicators;
[0060] The latent distribution learning module uses variational autoencoders to learn the latent distribution of transaction data based on periodic anomaly features and frequency domain mutation indicators, identify data points with abnormal distribution, and generate latent space anomaly features;
[0061] The abnormal cluster analysis module performs cluster analysis based on the abnormal characteristics of the latent space, classifies abnormal transaction data points, identifies abnormal transaction patterns of differentiated types, and generates abnormal transaction pattern clusters;
[0062] The strategy generation and adjustment module designs monitoring strategies based on clustering of abnormal transaction patterns, adjusts anomaly detection parameters, updates models to match newly identified abnormal patterns, and generates optimized monitoring strategies.
[0063] Frequency domain features include the main frequency of trading activities, key energy distribution areas, and frequency fluctuation patterns. Periodic anomaly features specifically refer to deviations from fixed-period trading patterns, abnormal periodic intensity, and irregular changes in period duration. Frequency domain mutation indicators include the appearance of unconventional frequency components, sudden peaks in energy distribution, and short-term changes in the frequency domain. Latent space anomaly features specifically include the distribution of abnormal data points, the clustering areas of abnormal data points, and the distribution patterns in the latent space. Abnormal trading pattern clustering includes the grouping of differentiated anomaly types, classification criteria for abnormal patterns, and descriptions of key features in clustering results. The optimized monitoring strategy specifically refers to the adjusted anomaly detection threshold, current anomaly recognition model parameters, and monitoring rules for newly identified abnormal patterns.
[0064] See also Figure 3 ,The frequency feature analysis module includes a transaction data analysis submodule, a periodicity detection submodule, and an energy spectrum analysis submodule;
[0065] The transaction data analysis submodule identifies basic behavior patterns based on the transaction data time series, including trend analysis and volatility assessment, emphasizing the dynamic characteristics of the data and generating behavior pattern recognition results;
[0066] The transaction data analysis submodule is based on the transaction data time series and adopts the time series analysis method. It uses Python's Pandas library to format the data, sets the date and time as the index, and uses the seasonal decomposition function in the Statsmodels library to extract trends. The parameters include setting the model as an additive model and the frequency setting according to the time interval of the data to decompose the time series data to separate the trend and seasonal components. At the same time, the rolling standard deviation method is used to evaluate volatility, and the window size is set to 7 days to calculate the weekly data fluctuations and generate behavioral pattern recognition results.
[0067] The periodicity detection submodule uses the behavior pattern recognition results and the Fourier transform method to analyze the periodicity of transaction data, identify repetitive patterns and periodic changes, highlight the repetitive characteristics of the data, and generate periodic characteristic data;
[0068] The periodicity detection submodule uses the Fourier transform analysis method based on the behavior pattern recognition results. It uses the fft function of the NumPy library to transform the behavior pattern recognition results. The parameters include the sampling frequency set to the time interval according to the transaction data. The signal.find_peaks function in the SciPy library is used. The parameter settings include distance and height to identify and filter the main cycles. This process identifies repetitive patterns and periodic changes by transforming the frequency space to generate periodic feature data.
[0069] The Fourier transform method uses the formula:
[0070] ;
[0071] in, To improve the frequency The Fourier transform result at For at time point The signal sampling value, To adjust the signal strength weight coefficient, is the prediction error correction term based on the behavior pattern, is the total number of sampling points, is the sampling interval, is the rotation factor, is the weight coefficient of frequency correction, Based on frequency The cyclical fluctuation correction term.
[0072] Combined with the original sampled values of the signal and the error correction term based on the prediction model , here The behavior pattern error obtained based on historical data analysis can be used to fine-tune the value of each sampling point to improve the model's prediction accuracy for future behavior patterns. It is used to adjust the influence of the prediction error correction term, and its optimal value can be determined through methods such as cross-validation. The rotation factors remain unchanged and are still responsible for converting the time domain signal to the frequency domain. and is used to further fine-tune the signal in the frequency domain, where According to frequency importance or periodic fluctuation characteristics, As a weight coefficient, determined through data analysis, to balance The influence on the final result can improve the accuracy and robustness of periodic feature recognition.
[0073] The energy spectrum analysis submodule analyzes the periodic characteristic data, highlights the dominant frequency and energy concentration area of trading activities, extracts the energy distribution corresponding to the frequency components, and generates frequency domain features.
[0074] The energy spectrum analysis submodule analyzes the periodic characteristic data using the power spectrum density (PSD) calculation method and the signal.welch function in the SciPy library. The parameter settings include the window type being the Hamming window and the sampling frequency being consistent with the previous period detection. This function calculates the power spectrum density of the time series to represent the energy distribution at different frequencies, thereby extracting the dominant frequency and energy concentration area of the trading activity and generating frequency domain features.
[0075] See also Figure 4 ,The periodic anomaly detection module includes a frequency analysis submodule, anomaly recognition submodule, and periodic feature extraction submodule;
[0076] The frequency analysis submodule analyzes key frequency components based on frequency domain characteristics, captures key information of energy distribution, sorts out the energy values of multi-frequency components, and generates key frequency and energy distribution diagrams;
[0077] The frequency analysis submodule is based on frequency domain features and adopts energy spectral density analysis method. It uses Matplotlib library for graphics drawing, sets X-axis as frequency and Y-axis as energy value, and uses NumPy library to sort and select frequency domain features. Parameter settings include selecting the top ten frequency components with the highest energy values, and drawing the energy distribution curve through plt.plot function. Parameters include line color and width, which are used to organize the energy values of multiple frequency components and generate key frequency and energy distribution diagrams.
[0078] The abnormal identification submodule screens repeated trading behaviors at fixed time intervals based on key frequencies and energy distribution diagrams, analyzes abnormalities, identifies abnormal trading behaviors, and generates abnormal trading behavior analysis results;
[0079] The anomaly identification submodule is based on key frequencies and energy distribution diagrams. It adopts the Z-score method and uses the stats.zscore function of the SciPy library to standardize the energy value of each frequency component. The parameter settings include setting the axis parameter to 0 to operate on the column, identifying data points with Z scores higher than 2 or lower than -2 as anomalies, and using the Matplotlib library to plot the positions of the anomalies on the energy distribution diagram. The marker symbols and colors are set to screen repeated trading behaviors at fixed time intervals, analyze the anomalies, and generate abnormal trading behavior analysis results.
[0080] The periodic feature extraction submodule uses the results of abnormal trading behavior analysis to parse the timestamps in the trading data, presets the frequency parameters according to the time periodicity of the trading data, decomposes the time series data into trend component, seasonal component and residual component, analyzes the seasonal component, and identifies periodic abnormal features.
[0081] The periodic feature extraction submodule uses the results of abnormal trading behavior analysis, adopts the time series decomposition method, and uses the seasonal_decompose function of the Statsmodels library. The model is set to an additive model, and the frequency parameters are preset according to the typical periodicity of the trading data. The parameter settings include the cycle length and the model type. The time series data is decomposed through the function, and the time series data is decomposed into trend components, seasonal components, and residual components. The seasonal components are analyzed, the periodic abnormal characteristics are identified, and the periodic abnormal characteristic data are generated.
[0082] See also Figure 5 ,The frequency domain mutation identification module includes a frequency component analysis submodule, an energy distribution analysis submodule, and a mutation index identification submodule;
[0083] The frequency component analysis submodule performs frequency component analysis based on frequency domain characteristics, identifies atypical frequency patterns by statistically analyzing the amplitude and phase information of the frequency, and generates atypical frequency pattern analysis results;
[0084] The frequency component analysis submodule is based on frequency domain characteristics and adopts the Fourier transform method. It uses the fft function of Python's NumPy library to perform frequency conversion. It extracts the amplitude and phase information of the frequency, sets the fft function parameters including data length and sampling frequency, and uses amplitude sorting and phase contrast to identify atypical frequency patterns that are significantly different from the average pattern. It uses the plt.scatter function to visualize the amplitude and phase, and sets the scatter plot parameters including color and marker size to facilitate the identification of atypical frequency patterns and generate atypical frequency pattern analysis results.
[0085] The energy distribution analysis submodule analyzes the energy distribution of frequency components based on the atypical frequency mode analysis results, identifies abnormal modes in the energy distribution by calculating the energy value of each frequency component, and generates abnormal energy distribution analysis results;
[0086] The energy distribution analysis submodule is based on the analysis results of atypical frequency patterns and adopts the energy spectral density analysis method. It uses the signal.spectrogram function of the SciPy library. The parameter settings include window type and overlap rate. The energy value of each frequency component is calculated and analyzed. By setting the energy value threshold, the energy distribution pattern above or below the threshold is identified. The plt.bar function of the Matplotlib library is used to visualize the energy value. The bar chart parameters including color and width are set to identify abnormal patterns in the energy distribution and generate abnormal energy distribution analysis results.
[0087] The mutation indicator identification submodule uses the abnormal energy distribution analysis results, comprehensively refers to the information of frequency components and energy distribution, makes logical judgments, identifies mutation indicators that indicate sudden large transactions or unconventional periodic transaction patterns, and integrates frequency domain mutation indicators.
[0088] The mutation indicator identification submodule uses the abnormal energy distribution analysis results and adopts a logical analysis method to comprehensively refer to the information of frequency components and energy distribution, compare the frequency and energy distribution of normal trading patterns, set the judgment logic including energy value anomalies and frequency component deviations, and use Python logical operators to perform logical judgments on mutation indicators, identify patterns in which energy suddenly increases or decreases and frequency components significantly deviate from the normal range, integrate this information to identify mutation indicators that indicate sudden large transactions or unconventional periodic trading patterns, and generate frequency domain mutation indicators.
[0089] See also Figure 6 ,The latent distribution learning module includes a periodic anomaly detection submodule, a variational autoencoder training submodule, and anomaly recognition and feature extraction submodule;
[0090] The periodic anomaly detection submodule performs frequency domain conversion on the data based on the periodic anomaly characteristics and frequency domain mutation indicators, analyzes the amplitude of the converted data, uses the set threshold to determine the abnormal components in the frequency domain, performs inverse transformation on the abnormal components, extracts periodic anomaly characteristics and frequency domain mutation characteristics, and generates a periodic frequency domain feature set;
[0091] The periodic anomaly detection submodule is based on frequency domain conversion. It uses the Fourier transform algorithm to perform frequency domain conversion on the data. It uses the fast Fourier transform method to convert the time domain data into frequency domain data, analyzes the amplitude of the converted data, and uses the amplitude-frequency characteristics to detect abnormal components in the frequency domain. The threshold is set to 3 times the standard deviation to judge the abnormal components, perform inverse Fourier transform on the abnormal components, restore them to the time domain, extract periodic anomaly features and frequency domain mutation features, and generate a periodic frequency domain feature set.
[0092] The variational autoencoder training submodule is based on the periodic frequency domain feature set and adopts the variational autoencoder algorithm to build a variational autoencoder model, including the design of the encoder and decoder, setting the activation function, selecting the optimizer, defining the loss function, training the model, setting the batch size and number of iterations, and using all the data in the periodic frequency domain feature set for training to obtain the potential distribution model;
[0093] The variational autoencoder training submodule is based on the periodic frequency domain feature set and adopts the variational autoencoder algorithm to construct the encoder and decoder structure. The encoder consists of two fully connected layers, the dimension of the middle layer is 20, and the activation function is ReLU. The decoder is symmetrically constructed, which is opposite to the encoder structure. The activation function of the final layer is sigmoid, the optimizer is Adam, the learning rate is set to 0.001, the loss function includes reconstruction loss and KL divergence loss, the batch size is 64, the number of iterations is 100, and all the data in the periodic frequency domain feature set are used for model training to obtain the potential distribution model.
[0094] The variational autoencoder algorithm uses the formula:
[0095] ;
[0096] in, is the weight coefficient of reconstruction loss, for The weight coefficient of the divergence loss, is the L1 regularization coefficient, is the L2 regularization coefficient, Indicates the model The value of the parameter, is the total number of model parameters, is the difference between the original input data and the decoder output, is the difference between the latent distribution and the prior distribution encoded.
[0097] First, by adjusting and The value of can control the relative importance of reconstruction loss and KL divergence loss in the total loss, which allows the model to trade off between reconstruction accuracy and smoothness of the latent space. Secondly, by introducing L1 and L2 regularization terms, that is, and , aims to prevent the model from overfitting and improve the generalization ability of the model. and The value of can be determined by cross-validation method to achieve the best regularization effect.
[0098] The anomaly identification and feature extraction submodule is based on the potential distribution model and applies the threshold judgment method to mark the data points in the latent space as abnormal, perform feature extraction on the abnormal data points, calculate the coordinate values and relative positions of the abnormal data points in the latent space, and generate the abnormal features of the latent space;
[0099] The anomaly identification and feature extraction submodule is based on the potential distribution model and adopts the threshold judgment method. The threshold is set as the mean value of the data points in the latent space plus 2 times the standard deviation. The data points in the latent space are marked as abnormal, and feature extraction is performed on the abnormal data points. The coordinate values and relative positions of the abnormal data points in the latent space are calculated to generate the abnormal features of the latent space.
[0100] See also Figure 7 ,The abnormal clustering analysis module includes an abnormal feature extraction submodule, a clustering algorithm application submodule, and an abnormal pattern recognition submodule;
[0101] The abnormal feature extraction submodule performs feature vectorization based on the abnormal features of the latent space, encodes the characteristics of the abnormal data into a numerical vector, reflects the abnormal degree of each data point, and generates an abnormal feature vector set;
[0102] The abnormal feature extraction submodule is based on the abnormal features of the latent space, adopts a vectorization algorithm, and uses the StandardScaler function of the Sklearn library to standardize the data. The parameter settings include adjusting the mean value of each feature to 0, adjusting the standard deviation to 1, and using the PCA (principal component analysis) method to reduce the dimension. The parameters include setting n_components to 2 to extract the main features. Through these steps, the characteristics of the abnormal data are encoded into a numerical vector, reflecting the degree of abnormality of each data point, and generating an abnormal feature vector set.
[0103] The clustering algorithm application submodule automatically groups data points based on the abnormal feature vector set, classifies abnormal data according to the fit of the feature vector, aggregates similar features, and obtains abnormal data clustering results;
[0104] The clustering algorithm application submodule adopts the K-Means clustering algorithm based on the abnormal feature vector set, using the KMeans class of the Sklearn library. The parameter settings include setting n_clusters to 5 to divide the data points into five groups, selecting the initialization method 'k-means++' to optimize the selection of the initial clustering center, and setting the maximum number of iterations to 300. Through this process, the abnormal data are classified according to the fit of the feature vector, and the same features are clustered to obtain the abnormal data clustering results.
[0105] The abnormal pattern recognition submodule performs pattern analysis based on the abnormal data clustering results, identifies the abnormal transaction patterns represented by each category, extracts differentiated abnormal patterns from the clustering results, and generates abnormal transaction pattern clusters.
[0106] The abnormal pattern recognition submodule is based on the abnormal data clustering results, adopts the pattern analysis method, uses Python's Pandas library for data processing, sets the column label as the cluster label, uses the Matplotlib library for visualization, draws scatter plots of different clusters, and the parameters include different colors and marks. By observing and analyzing the distribution in the scatter plot, the abnormal trading pattern represented by each category is identified, and the differentiated abnormal patterns are extracted from the clustering results to generate abnormal trading pattern clusters.
[0107] See also Figure 8 ,The strategy generation and adjustment module includes the abnormal trading pattern analysis submodule, the ,strategy optimization testing submodule, and the real-time monitoring logic adjustment submodule;
[0108] The abnormal transaction pattern analysis submodule analyzes the clustered data based on abnormal transaction pattern clustering, identifies the target behavior characteristics of each cluster, identifies differentiated abnormal transaction patterns, and generates an abnormal transaction behavior feature set;
[0109] The abnormal trading pattern analysis submodule is based on the clustering of abnormal trading patterns. It uses the K-means algorithm for clustering analysis, uses the Scikit-learn library to implement the KMeans function, sets the number of clusters to 5, selects "k-means++" for the initialization method, and sets the maximum number of iterations to 300. The PCA algorithm is used to reduce the dimension of the clustered data to 2 dimensions for easy visualization analysis. The target behavior characteristics of each cluster are identified. By calculating the Euclidean distance between each cluster center and each point, the differentiated abnormal trading patterns are identified, and a set of abnormal trading behavior characteristics is generated.
[0110] The strategy optimization test submodule designs monitoring strategies based on the abnormal trading behavior feature set, including setting detection thresholds and monitoring frequencies, conducting simulation tests on the designed strategies, and establishing strategy optimization plans;
[0111] The strategy optimization test submodule uses the decision tree algorithm to design a monitoring strategy based on the abnormal trading behavior feature set, uses Python's Scikit-learn library to implement the DecisionTreeClassifier function, sets the decision tree depth to 10, selects "gini" as the evaluation standard for partitioning quality, conducts simulation tests on the designed strategy, and uses the cross-validation method to verify the effectiveness of the strategy. The cross-validation uses K-fold cross-validation, sets the K value to 5, and establishes a strategy optimization plan.
[0112] The real-time monitoring logic adjustment submodule adjusts the logic parameters of the real-time monitoring system based on the strategy optimization solution, including updating thresholds and monitoring indicators, matching the current abnormal transaction pattern, identifying and responding to abnormal transactions, and building an optimized monitoring strategy.
[0113] The real-time monitoring logic adjustment submodule is based on the strategy optimization solution and adopts the dynamic threshold adjustment method to adjust the logic parameters of the real-time monitoring system. Python is used to implement the automatic threshold adjustment logic, and the initial threshold is set to 0.5. The threshold is dynamically adjusted according to the abnormal transaction detection accuracy in the past hour. The monitoring indicator is updated using the weighted moving average method, and the weight decreases with time to ensure that the monitoring indicators reflect the most recent transaction patterns, match the current abnormal transaction patterns, identify and respond to abnormal transactions, and build an optimized monitoring strategy.
[0114] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in other forms. Any technician familiar with the profession may use the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes and apply them to other fields. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.
Claims
1. A financial transaction anomaly detection system, characterized in that: The system comprises: The frequency feature analysis module performs fast Fourier transform based on the time series of transaction data, extracts the key frequency components and energy distribution of transaction activities, and generates frequency domain features; The periodic anomaly detection module analyzes key frequency components based on the frequency domain characteristics, identifies repeated transaction behaviors at fixed time intervals and their anomalies, captures energy distribution, analyzes hidden periodic abnormal behaviors, and identifies periodic abnormal characteristics; The frequency domain mutation identification module analyzes atypical patterns in frequency components and energy distribution based on the frequency domain characteristics, identifies mutation indicators indicating sudden large-amount transactions or unconventional periodic transaction patterns, and generates frequency domain mutation indicators; The potential distribution learning module applies a variational autoencoder to learn the potential distribution of the transaction data based on the periodic abnormal characteristics and frequency domain mutation indicators, identifies data points with abnormal distribution, and generates potential space abnormal characteristics; The abnormal cluster analysis module performs cluster analysis based on the abnormal characteristics of the latent space, classifies abnormal transaction data points, identifies abnormal transaction patterns of differentiated types, and generates abnormal transaction pattern clusters; The strategy generation and adjustment module designs monitoring strategies based on the abnormal transaction pattern clustering, adjusts abnormal detection parameters, updates the model to match the newly identified abnormal patterns, and generates optimized monitoring strategies.
2. The financial transaction anomaly detection system according to claim 1, characterized in that: The frequency domain features include the main frequency of trading activities, the key energy distribution area, and the frequency fluctuation pattern. The periodic abnormal features specifically refer to the deviation of fixed-cycle trading patterns, the abnormal period intensity, and the irregular changes in period duration. The frequency domain mutation indicators include the appearance of unconventional frequency components, sudden peaks of energy distribution, and short-term changes in the frequency domain. The latent space abnormal features specifically include the distribution of abnormal data points, the clustering area of abnormal data points, and the distribution form in the latent space. The abnormal trading pattern clustering includes the grouping of differentiated abnormal types, the classification criteria of abnormal patterns, and the key feature descriptions in the clustering results. The optimized monitoring strategy specifically refers to the adjusted anomaly detection threshold, the current anomaly recognition model parameters, and the monitoring rules for the newly recognized abnormal patterns.
3. The financial transaction anomaly detection system according to claim 1, characterized in that: The frequency characteristic analysis module includes a transaction data analysis submodule, a periodicity detection submodule, and an energy spectrum analysis submodule; The transaction data analysis submodule identifies basic behavior patterns based on the transaction data time series, including trend analysis and volatility assessment, emphasizes the dynamic characteristics of the data, and generates behavior pattern recognition results; The periodicity detection submodule uses the behavior pattern recognition results and the Fourier transform method to analyze the periodicity of the transaction data, identify the repetitive patterns and periodic changes, highlight the repetitive characteristics of the data, and generate periodic characteristic data; The energy spectrum analysis submodule analyzes the periodic characteristic data, highlights the dominant frequency and energy concentration area of the trading activity, extracts the energy distribution corresponding to the frequency components, and generates frequency domain features; The Fourier transform method uses the formula: ; in, To improve the frequency The Fourier transform result at For at time point The signal sampling value is To adjust the signal strength weight coefficient, is the prediction error correction term based on the behavior pattern, is the total number of sampling points, is the sampling interval, is the rotation factor, is the weight coefficient of frequency correction, Based on frequency The cyclical fluctuation correction term.
4. The financial transaction anomaly detection system according to claim 1, characterized in that: The periodic anomaly detection module includes a frequency analysis submodule, an anomaly identification submodule, and a periodic feature extraction submodule; The frequency analysis submodule analyzes the key frequency components based on the frequency domain characteristics, captures the key information of energy distribution, sorts out the energy values of multiple frequency components, and generates key frequency and energy distribution diagrams; The abnormality identification submodule screens repeated transaction behaviors at fixed time intervals based on key frequencies and energy distribution diagrams, analyzes abnormalities, identifies abnormal transaction behaviors, and generates abnormal transaction behavior analysis results; The periodic feature extraction submodule uses the abnormal transaction behavior analysis results to parse the timestamps in the transaction data, presets the frequency parameters according to the time periodicity of the transaction data, decomposes the time series data into trend components, seasonal components and residual components, analyzes the seasonal components, and identifies periodic abnormal features.
5. The financial transaction anomaly detection system according to claim 1, characterized in that: The frequency domain mutation identification module includes a frequency component analysis submodule, an energy distribution analysis submodule, and a mutation index identification submodule; The frequency component analysis submodule performs frequency component analysis based on frequency domain characteristics, identifies atypical frequency patterns by performing statistics on the amplitude and phase information of the frequency, and generates atypical frequency pattern analysis results; The energy distribution analysis submodule analyzes the energy distribution of the frequency components based on the atypical frequency mode analysis results, identifies the abnormal modes in the energy distribution by calculating the energy value of each frequency component, and generates abnormal energy distribution analysis results; The mutation index identification submodule uses the abnormal energy distribution analysis results, comprehensively refers to the information of frequency components and energy distribution, makes logical judgments, identifies mutation indicators indicating sudden large transactions or unconventional periodic transaction patterns, and integrates frequency domain mutation indicators.
6. The financial transaction anomaly detection system according to claim 1, characterized in that: The potential distribution learning module includes a periodic anomaly detection submodule, a variational autoencoder training submodule, and an anomaly recognition and feature extraction submodule; The periodic anomaly detection submodule performs frequency domain conversion on the data based on the periodic anomaly characteristics and frequency domain mutation index, analyzes the amplitude of the converted data, uses the set threshold to determine the abnormal components in the frequency domain, performs inverse transformation on the abnormal components, extracts the periodic anomaly characteristics and frequency domain mutation characteristics, and generates a periodic frequency domain feature set; The variational autoencoder training submodule is based on the periodic frequency domain feature set and adopts the variational autoencoder algorithm to construct a variational autoencoder model, including the design of the encoder and the decoder, setting the activation function, selecting the optimizer, defining the loss function, performing model training, setting the batch size and the number of iterations, and using all the data in the periodic frequency domain feature set for training to obtain a potential distribution model; The anomaly identification and feature extraction submodule is based on the potential distribution model and applies the threshold judgment method to mark the data points in the latent space as abnormal, perform feature extraction on the abnormal data points, calculate the coordinate values and relative positions of the abnormal data points in the latent space, and generate the abnormal features of the latent space; The variational autoencoder algorithm uses the formula: ; in, is the weight coefficient of reconstruction loss, for The weight coefficient of the divergence loss, is the L1 regularization coefficient, is the L2 regularization coefficient, Indicates the model The value of the parameter, is the total number of model parameters, is the difference between the original input data and the decoder output, is the difference between the latent distribution and the prior distribution encoded.
7. The financial transaction anomaly detection system according to claim 1, characterized in that: The abnormal clustering analysis module includes an abnormal feature extraction submodule, a clustering algorithm application submodule, and an abnormal pattern recognition submodule; The abnormal feature extraction submodule performs feature vectorization based on the abnormal features of the latent space, encodes the characteristics of the abnormal data into a numerical vector, reflects the abnormal degree of each data point, and generates an abnormal feature vector set; The clustering algorithm application submodule automatically groups data points based on the abnormal feature vector set, classifies abnormal data according to the fit of the feature vector, aggregates similar features, and obtains abnormal data clustering results; The abnormal pattern recognition submodule performs pattern analysis based on the abnormal data clustering results, identifies the abnormal transaction pattern represented by each category, extracts differentiated abnormal patterns from the clustering results, and generates abnormal transaction pattern clusters.
8. The financial transaction anomaly detection system according to claim 1, characterized in that: The strategy generation and adjustment module includes an abnormal trading pattern analysis submodule, a strategy optimization test submodule, and a real-time monitoring logic adjustment submodule; The abnormal transaction pattern analysis submodule analyzes the clustered data based on abnormal transaction pattern clustering, identifies the target behavior characteristics of each cluster, identifies the differentiated abnormal transaction patterns, and generates an abnormal transaction behavior feature set; The strategy optimization test submodule designs a monitoring strategy based on the abnormal trading behavior feature set, including setting a detection threshold and a monitoring frequency, performs simulation tests on the designed strategy, and establishes a strategy optimization plan; The real-time monitoring logic adjustment submodule adjusts the logic parameters of the real-time monitoring system based on the strategy optimization solution, including updating thresholds and monitoring indicators, matching the current abnormal transaction mode, identifying and responding to abnormal transactions, and building an optimized monitoring strategy.
Citation Information
Patent Citations
Power transaction method and system based on multi-dimensional data analysis
CN117764637A
Risk control model decision-making method and system based on artificial intelligence
CN118052558A
Supply chain financial application method based on supervisible block chain private transaction
CN118229420A
Pre-sale fund supervision system
CN118279076A
System, Method, and Computer Program Product for Analyzing Multivariate Time Series Using a Convolutional Fourier Network
US20230143484A1
Cited By
Financial anomaly detection system based on artificial intelligence
CN122333248A
