Financial transaction risk assessment method and system based on multi-layer neural network
By combining multi-layer neural networks with two-dimensional convolutional neural networks and multi-layer perceptrons, the problem of incomplete risk feature extraction in financial transactions is solved, enabling comprehensive, accurate, real-time assessment and dynamic early warning of financial transaction risks, thereby improving the operability and decision-making value of risk assessment.
Patent Information
- Application Number
- CN202510530535.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-04-25
AI Technical Summary
Existing neural network risk assessment methods in financial transactions suffer from problems such as a single data representation format, lack of utilization of temporal patterns and spatial correlations, and incomplete extraction of risk features. Furthermore, the assessment results lack interpretability and dynamic tracking capabilities, failing to meet the needs of refined risk management.
By employing a multi-layer neural network combined with a two-dimensional convolutional neural network CNN-TA and a multi-layer perceptron, and through the collection of multi-dimensional risk indicators and the conversion of time series data into images, the system extracts spatiotemporal correlation patterns and fuses risk features from financial transaction data, providing a nine-level refined risk rating and dynamic early warning.
It enables comprehensive, accurate, and real-time assessment of financial transaction risks, provides traceability of risk sources and prediction of evolution trends, and enhances the operability and decision-making value of risk assessment.
Smart Images

Figure CN120494828B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular to a financial transaction risk assessment method and system based on a multi-layer neural network. BACKGROUND
[0002] With the globalization and increasing complexity of financial markets, financial transaction risk assessment has become a core concern for investment institutions and financial regulatory authorities. Traditional financial risk assessment methods mainly rely on statistical models, such as Value at Risk (VaR), Expected Shortfall (ES), and stress testing. These methods are usually based on statistical analysis of historical data, assuming that market conditions follow a specific probability distribution model. In recent years, with the development of computer science and artificial intelligence technology, machine learning methods have begun to be applied in the field of financial risk assessment. Among them, neural network models show obvious advantages in handling complex financial data due to their strong non-linear modeling capabilities. The current mainstream neural network risk assessment methods include risk scoring models based on multi-layer perceptron (MLP), time series risk prediction systems based on recurrent neural network (RNN), and financial anomaly detection methods based on long short-term memory network (LSTM), etc. These methods have made certain progress in risk classification, anomaly detection, and risk trend prediction.
[0003] However, existing neural network risk assessment methods still have many technical limitations. First, most models only focus on a single type of financial data representation, either processing raw time series data or derived financial indicators, lacking comprehensive utilization of multi-dimensional financial risk characteristics. Second, existing models usually adopt a single neural network structure, which cannot simultaneously capture the time series patterns and spatial correlations of financial data, resulting in incomplete risk feature extraction. Third, the risk assessment results generally lack interpretability, and the risk level output by the model is difficult to trace back to specific risk sources, limiting the application value of the assessment results in actual decision-making. Fourth, most methods only provide simple high, medium, and low three-level risk classification, which is too coarse to meet the needs of fine-grained risk management. Fifth, the risk assessment results are usually static judgments, lacking dynamic tracking and prediction capabilities for risk evolution trends, and unable to prospectively identify potential risk accumulation. These technical limitations seriously restrict the practical application effect of neural network methods in the field of financial risk management. SUMMARY
[0004] The present application provides a financial transaction risk assessment method and system based on a multi-layer neural network, which utilizes the time series characteristics and spatial correlations of financial data, provides fine-grained multi-level risk rating results, and has risk source traceability and risk evolution trend prediction capabilities, thereby realizing comprehensive and dynamic assessment of financial transaction risks.
[0005] In a first aspect, the application provides a financial transaction risk assessment method based on a multi-layer neural network, which comprises: collecting and calculating multi-dimensional risk indicators of financial market data to obtain a financial risk feature matrix comprising market volatility, liquidity ratio, systemic risk value and macroeconomic factors; processing time series into images based on the financial risk feature matrix to obtain a risk feature spectrum dataset suitable for two-dimensional convolution analysis; training a two-dimensional convolutional neural network transaction model CNN-TA and a multi-layer perceptron according to the risk feature spectrum dataset to obtain a financial transaction risk assessment network; inputting real-time transaction data into the financial transaction risk assessment network to calculate and classify risk levels, and obtaining a hierarchical structured risk rating report and a transaction early warning signal.
[0006] In a second aspect, the application provides a financial transaction risk assessment system based on a multi-layer neural network, which comprises:
[0007] A collection module is configured to collect and calculate multi-dimensional risk indicators of financial market data to obtain a financial risk feature matrix comprising market volatility, liquidity ratio, systemic risk value and macroeconomic factors;
[0008] A conversion module is configured to process time series into images based on the financial risk feature matrix to obtain a risk feature spectrum dataset suitable for two-dimensional convolution analysis;
[0009] A training module is configured to train a two-dimensional convolutional neural network transaction model CNN-TA and a multi-layer perceptron according to the risk feature spectrum dataset to obtain a financial transaction risk assessment network;
[0010] A classification module is configured to input real-time transaction data into the financial transaction risk assessment network to calculate and classify risk levels, and obtain a hierarchical structured risk rating report and a transaction early warning signal.
[0011] In a third aspect, a financial transaction risk assessment device based on a multi-layer neural network is provided, which comprises a memory and at least one processor, the memory stores instructions; the at least one processor invokes the instructions in the memory to enable the financial transaction risk assessment device based on a multi-layer neural network to perform the above-mentioned financial transaction risk assessment method based on a multi-layer neural network.
[0012] In a fourth aspect, a computer readable storage medium is provided, which stores instructions, when running on a computer, enables the computer to perform the above-mentioned financial transaction risk assessment method based on a multi-layer neural network.
[0013] The technical solution provided in this application achieves accurate assessment and early warning of financial transaction risks through a combination of technical features, including multi-dimensional risk indicator collection and calculation, time series to image processing, fusion training of two-dimensional convolutional neural networks and multilayer perceptrons, and real-time risk level calculation and classification. This results in significant technical effectiveness. First, the multi-dimensional risk indicator collection and calculation process transforms complex market information into a structured financial risk feature matrix, comprehensively capturing risk signals from multiple perspectives, such as market volatility, liquidity ratios, systemic risk values, and macroeconomic factors. This overcomes the limitations of traditional single-indicator assessments and significantly improves the comprehensiveness and accuracy of risk identification. Second, the time series to image processing technology converts one-dimensional financial data into a two-dimensional risk feature map, creatively transforming the changing patterns of financial time series into spatial distribution features. This allows the subsequent two-dimensional convolutional neural network to effectively extract the spatiotemporal correlation patterns of financial risks. This algorithm fully leverages the advantages of convolutional neural networks in image recognition, successfully transferring them to the field of financial risk assessment, achieving deep integration of the algorithm and application scenarios. Third, the combined training mechanism of the two-dimensional convolutional neural network CNN-TA and the multilayer perceptron enables multimodal feature extraction and fusion. CNN-TA focuses on capturing spatial correlation patterns in the risk feature map, while the multilayer perceptron focuses on learning the complex nonlinear relationships of the original risk indicators. The two complement each other, forming a more comprehensive risk representation capability. This combination of algorithmic features significantly enhances the model's ability to identify complex financial risk patterns. Fourth, the real-time risk level calculation and classification technology realizes the transformation from risk assessment to actual decision support. Through nine-level refined risk classification and three-layer structured risk rating reports, it not only provides risk level judgments but also deeply analyzes the sources and evolution trends of risks, greatly improving the operability and decision value of risk assessment results. It is particularly worth emphasizing that the introduction of the two-dimensional convolutional neural network CNN-TA algorithm features in this scheme fully considers the spatiotemporal correlation characteristics of financial risk data. By transforming time series features into spatial feature maps, the local receptive field and hierarchical feature extraction capabilities of the convolutional neural network are fully utilized, achieving efficient extraction of financial risk patterns. This algorithmic feature is deeply compatible with the application field of financial risk assessment and is the key to the excellent results of the scheme. In summary, this method significantly improves the comprehensiveness, accuracy, real-time performance, and interpretability of financial transaction risk assessment by precisely matching algorithmic features with application requirements. Attached Figure Description
[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.
[0015] Figure 1 An embodiment of the financial transaction risk assessment method based on a multi-layer neural network in the present application;
[0016] Figure 2 An embodiment of the financial transaction risk assessment system based on a multi-layer neural network in the present application;
[0017] Figure 3 An embodiment of the financial transaction risk assessment system based on a multi-layer neural network in the present application; DETAILED DESCRIPTION
[0018] The present application provides a financial transaction risk assessment method and system based on a multi-layer neural network. The terms "first", "second", "third", "fourth" and the like (if any) in the specification and claims of the present application and the above drawings are used to distinguish similar objects, and do not necessarily mean a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the term "comprising" or "having" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0019] For the sake of understanding, the specific process of the embodiments of the present application will be described below. Please refer to Figure 1 An embodiment of the financial transaction risk assessment method based on a multi-layer neural network in the present application includes:
[0020] Step S101, multi-dimensional risk index collection and calculation are performed on financial market data to obtain a financial risk feature matrix including market volatility, liquidity ratio, systemic risk value and macroeconomic factors;
[0021] Step S102, time series to image processing is performed on historical transaction data based on the financial risk feature matrix to obtain a risk feature spectrum data set suitable for two-dimensional convolution analysis;
[0022] Step S103, training a two-dimensional convolutional neural network transaction model CNN-TA and a multi-layer perceptron according to the risk feature map data set, to obtain a financial transaction risk assessment network;
[0023] Step S104, inputting real-time transaction data into the financial transaction risk assessment network to calculate and classify the risk level, to obtain a hierarchical structured risk rating report and a transaction early warning signal.
[0024] It can be understood that the execution subject of the present application can be a financial transaction risk assessment system based on a multi-layer neural network, and can also be a terminal or a server, which is not limited here. The server is taken as an example for illustration in the embodiments of the present application.
[0025] In the embodiments of the present application, first, the historical transaction data of the main stock indexes such as DJIA, NASDAQ 100 and NIKKEI 225 are collected, and the time span covers at least 10 years of market cycles. These original financial market data are segmented according to day, week and month, forming a multi-time dimension financial data set. Then, the market volatility index, liquidity ratio index, systemic risk value index and macroeconomic factor are extracted from the data set. The market volatility index includes historical volatility, Bollinger Band width, etc.; the liquidity ratio index includes transaction volume change rate, bid-ask spread ratio, etc.; the systemic risk value index includes market beta value, system importance index, etc.; the macroeconomic factor includes GDP growth rate expectation, inflation rate, etc. These indexes form their own feature sub-matrix, which is then combined to form a comprehensive risk feature matrix, and standardized to convert all index values to a standard normal distribution form with a mean of 0 and a standard deviation of 1. Finally, a financial risk feature matrix is obtained. Based on the financial risk feature matrix, the historical transaction data is processed by time series to image. 15 different risk indicators are selected from the financial risk feature matrix to form a risk indicator subset, and different parameter combinations are set for these indicators to form an indicator parameter matrix. Each risk indicator extracts 15 consecutive days of time series data, and these time dimension expanded risk data are reconstructed into a 15x15 two-dimensional matrix structure to form an initial risk feature map. The initial risk feature map is subjected to numerical normalization to obtain a feature image with uniform pixel value distribution. According to the actual risk results of the historical transaction, the feature image is labeled as "high risk", "medium risk" or "low risk" to form a labeled risk feature map. Finally, the labeled risk feature map is divided into training set, validation set and test set according to the ratio of 7:2:1 to obtain the final risk feature map data set.
[0026] The two-dimensional convolutional neural network transaction model CNN-TA and the multilayer perceptron are trained according to the risk feature map data set. The risk feature map data set is input into the two-dimensional convolutional neural network CNN-TA, which contains three convolutional layers, the first layer uses 32 5x5 convolutional kernels, the second layer uses 64 3x3 convolutional kernels, and the third layer uses 128 3x3 convolutional kernels. The output of the convolutional layer is subjected to a maximum pooling operation to obtain a reduced dimension feature map, and a risk feature vector of the CNN-TA is obtained through a fully connected layer conversion. At the same time, the financial risk feature matrix is input into the multilayer perceptron, which contains three fully connected layers with neuron numbers of 256, 128 and 64, respectively, to obtain a MLP risk feature vector. The risk feature vectors of the CNN-TA and the MLP are fused to obtain a comprehensive risk feature representation. This feature representation is mapped to a risk level through an output layer containing 9 neurons, corresponding to nine risk labels: extremely high risk, high risk, medium-high risk, medium-high risk, medium risk, medium-low risk, low risk, low risk and extremely low risk, to obtain a risk probability distribution. Finally, through batch training and parameter optimization, a financial transaction risk assessment network is obtained using a cross-entropy loss function and an Adam optimizer with a learning rate of 0.001.
[0027] Real-time transaction data is input into the financial transaction risk assessment network for risk level calculation and classification. Multi-dimensional risk indicators are extracted from real-time transaction data to form a real-time risk feature matrix consistent with the training data format, which is converted into a 15x15 two-dimensional risk feature image to obtain a real-time risk feature spectrum. The spectrum is input into the financial transaction risk assessment network for forward calculation to obtain the risk probability distribution of real-time transactions. The risk probability distribution is subjected to threshold judgment and level classification to determine the nine-level risk rating results of the transaction. Based on these results, an overall risk level, risk trend analysis and key risk indicator analysis are generated to form a three-layer structured risk rating report. The nine-level risk rating results are compared with the preset risk threshold to generate targeted transaction warning signals. The warning signals are recorded and stored according to the day, week and month time scales to form a multi-period warning signal database, and the warning trigger frequency of different risk levels is calculated to generate a risk warning heat map and time series trend. Taking foreign exchange transactions of a financial institution as an example, ten years of historical data of the exchange rate of US dollars against euros is collected, and various risk indicators are extracted to form a 150-dimensional feature matrix. From the matrix, 15 key indicators such as short-term volatility, liquidity indicators, and political risk indices are selected to construct a 15x15 risk feature spectrum. After training the CNN-TA and the multilayer perceptron, the risk level of a new foreign exchange transaction is evaluated in real time. When the system detects that a transaction triggers an extremely high risk level, a warning signal is generated and a detailed risk report is output, indicating that the key risk source is the combined influence of recent liquidity decline and systemic risk increase, helping traders adjust their trading strategies in time and effectively avoid potential risks. The entire process does not require human intervention and the precise risk assessment and warning are automatically completed through the deep learning capabilities of the neural network.
[0028] In a specific embodiment, the process of performing step S101 can specifically include the following steps:
[0029] Collect historical transaction data of DJIA, NASDAQ 100 and NIKKEI 225 stock indexes to obtain original financial market data spanning at least 10 years;
[0030] Segment the original financial market data according to the day, week and month time scales to obtain a multi-time dimension financial data set;
[0031] Extract market volatility indicators from the multi-time dimension financial data set to obtain a market volatility feature sub-matrix;
[0032] Extract liquidity risk indicators from the multi-time dimension financial data set to obtain a liquidity risk feature sub-matrix;
[0033] Extract systemic risk indicators from the multi-time dimension financial data set to obtain a systemic risk feature sub-matrix;
[0034] The market fluctuation feature sub-matrix, the liquidity risk feature sub-matrix and the systemic risk feature sub-matrix are combined to obtain a comprehensive risk feature matrix;
[0035] The comprehensive risk feature matrix is normalized to obtain a final financial risk feature matrix.
[0036] Specifically, multi-dimensional risk indicators are collected and calculated from financial market data. This process begins with the collection of historical trading data for major stock indices such as DJIA, NASDAQ 100 and NIKKEI 225, forming original financial market data spanning at least 10 years. These data are obtained through professional financial databases, including basic trading information such as daily opening price, closing price, highest price, lowest price and trading volume. In the data collection process, linear interpolation of adjacent trading day data is used to fill in possible data gaps, ensuring data continuity and integrity. After collecting complete original financial market data, the data is segmented into day, week and month dimensions to obtain a multi-time dimension financial data set. Day-scale data directly uses original trading day data; week-scale data is obtained by aggregating and calculating the data of the five trading days in each week, including weekly opening price (Monday opening price), weekly closing price (Friday closing price), weekly highest price (the highest price in a week), weekly lowest price (the lowest price in a week) and weekly trading volume (the total trading volume in a week); month-scale data is obtained by similar aggregation and calculation of about 20 trading days in each month. This multi-time scale segmentation allows subsequent risk assessment to capture short-term, medium-term and long-term market dynamic characteristics.
[0037] Market volatility indicators are extracted from the multi-time dimension financial dataset to obtain a market volatility feature sub-matrix. The market volatility indicators include historical volatility, Bollinger Band width, average true range, and CBOE Volatility Index, etc. The historical volatility is calculated as the standard deviation of the return rate of the past N trading days; the Bollinger Band width is the distance between the upper track and the lower track divided by the median track value; the average true range (ATR) is calculated as the N-day moving average of the maximum value among the difference between the highest price and the lowest price of the day, the difference between the highest price of the day and the closing price of the previous day, and the difference between the lowest price of the day and the closing price of the previous day. These volatility indicators are calculated according to different time windows (such as 5 days, 10 days, 20 days) to form a market volatility feature sub-matrix containing multiple time dimensions. At the same time, liquidity risk indicators are extracted from the multi-time dimension financial dataset to obtain a liquidity risk feature sub-matrix. The liquidity risk indicators include trading volume change rate, bid-ask spread ratio, market depth indicator, and Amihud illiquidity indicator, etc. The trading volume change rate is calculated as the ratio of the current trading volume to the average trading volume of the past N days; the bid-ask spread ratio is the difference between the sell price and the buy price divided by the mid-price; the market depth indicator reflects the number and price distribution of buy and sell orders on the market; the Amihud illiquidity indicator is calculated as the absolute value of the daily return rate divided by the daily trading volume. These liquidity indicators are also calculated according to different time windows to form a liquidity risk feature sub-matrix.
[0038] Systemic risk indicators are also extracted from the multi-time dimension financial dataset to obtain a systemic risk feature sub-matrix. The systemic risk indicators include market beta, systemic importance index, financial stress index, and conditional value at risk, etc. The market beta measures the volatility of an individual stock relative to the overall market; the systemic importance index assesses the impact of a specific financial institution or market sector on the overall financial system; the financial stress index comprehensively reflects the market stress state; the conditional value at risk (CoVaR) calculates the risk value of a specific asset when the market is in a stress state. These systemic risk indicators form a systemic risk feature sub-matrix. The market volatility feature sub-matrix, the liquidity risk feature sub-matrix, and the systemic risk feature sub-matrix are combined to obtain a comprehensive risk feature matrix. In the feature combination process, first, the sub-matrices are aligned by rows (ensuring that each row represents data at the same time point), and then they are spliced by columns to form a comprehensive matrix with the same number of rows but increased number of columns. Each row in the matrix represents a complete set of risk features at a certain time point, and each column represents the value of a specific risk indicator at all time points.
[0039] The comprehensive risk feature matrix is standardized to obtain a final financial risk feature matrix. The Z-score standardization method is used for standardization, each feature value is subtracted by the mean value of the feature and then divided by the standard deviation, so that the distribution of each feature has a mean value of 0 and a standard deviation of 1. This standardization eliminates the dimensional differences between different indicators, making the subsequent neural network model training more stable and efficient.
[0040] In a specific embodiment, the process of performing step S102 can specifically include the following steps:
[0041] Select 15 different risk indicators from the financial risk feature matrix to obtain a risk indicator subset;
[0042] Set different parameter combinations for the risk indicator subset to obtain a multi-dimensional indicator parameter matrix;
[0043] Extract the time series data of each indicator for 15 consecutive days based on the indicator parameter matrix to obtain risk data with time dimension expansion;
[0044] Reconstruct the risk data with time dimension expansion into a 15x15 two-dimensional matrix structure to obtain an initial risk feature map;
[0045] Perform numerical normalization on the initial risk feature map to obtain a feature image with uniform pixel value distribution;
[0046] Label the feature image as high risk, medium risk or low risk according to the actual risk results of historical transactions to obtain a labeled risk feature map;
[0047] Split the labeled risk feature map into a training set, a validation set and a test set according to a 7:2:1 ratio to obtain a risk feature map dataset.
[0048] Specifically, the time series data is converted into an image format suitable for processing by a two-dimensional convolutional neural network. First, 15 different risk indicators are selected from the financial risk feature matrix obtained in the previous step, resulting in a subset of risk indicators. The selection of these 15 indicators is based on their importance to risk prediction, determined by a feature importance scoring method, including market volatility indicators (such as historical volatility, ATR, etc.), liquidity indicators (such as trading volume change rate, bid-ask spread, etc.), systemic risk indicators (such as beta, financial stress index, etc.), and macroeconomic indicators. This selection ensures that the selected indicators can comprehensively reflect the multi-dimensional risk state of the market while maintaining the manageability of data dimensions. Different parameter combinations are set for the selected subset of risk indicators, resulting in a multi-dimensional indicator parameter matrix. Parameter setting mainly targets the time window size, and the values of three time windows (short-term (5 days), medium-term (10 days), and long-term (20 days)) are calculated for each risk indicator. For example, for the historical volatility indicator, the historical volatility of 5 days, 10 days, and 20 days is calculated; for the trading volume change rate, the trading volume change rate of 5 days, 10 days, and 20 days is calculated. In this way, 15 basic indicators are expanded to 45 indicator parameter combinations through different parameter combinations, forming a more comprehensive indicator parameter matrix.
[0049] Based on the indicator parameter matrix, the time series data of each indicator for 15 consecutive days is extracted, resulting in risk data with time dimension expanded. Specifically, for each trading day, the data of the previous 15 days including the current day is extracted, and these time series data are arranged in chronological order. This process actually creates a sliding window with a size of 15 days, which slides along the time axis, extracts all indicator values within the current window every day. The time dimension expanded risk data retains the time series characteristics of the indicators, capturing the patterns and trends of the indicator values over time. The time dimension expanded risk data is reconstructed into a 15x15 two-dimensional matrix structure to obtain the initial risk feature map. This step is a key conversion step that converts one-dimensional time series into two-dimensional image format. The specific method is to arrange 15 different risk indicators as rows of the matrix and 15-day time series data of each indicator as columns of the matrix, forming a 15x15 two-dimensional matrix. This arrangement makes each row of the matrix represent a risk indicator, each column represent a specific time point, and the entire matrix represent a complete risk state snapshot.
[0050] The initial risk feature map is subjected to numerical normalization processing to obtain a feature image with uniform pixel value distribution. Normalization processing maps all values in the matrix to the [0, 1] interval, facilitating subsequent convolutional neural network processing. Normalization uses the minimum-maximum scaling method, that is, for each element in the matrix, subtract the minimum value of the index and divide by the difference between the maximum and minimum values of the index. The normalized matrix value is similar to the pixel value of an image, and the distribution is more uniform, which is beneficial for neural network to extract effective features.
[0051] The feature image is labeled as high risk, medium risk or low risk according to the actual risk result of historical transactions to obtain a labeled risk feature map. The labeling process is based on the actual risk performance after the transaction. The specific method is to calculate the price volatility rate and maximum drawdown rate 1 day, 5 days, 10 days and 20 days after the transaction, and to synthesize a comprehensive risk index according to the weight of 4:6. Then, according to the distribution of the risk index, the samples located in the front 25% quantile are labeled as "high risk", the samples located in the rear 25% quantile are labeled as "low risk", and the remaining samples are labeled as "medium risk". This labeling method based on historical data provides the label information required for supervised learning of the neural network. The labeled risk feature map is divided into a training set, a validation set and a test set according to the ratio of 7:2:1 to obtain the final risk feature map dataset. The division uses stratified random sampling method to ensure that the proportion of high, medium and low risk samples in each subset is consistent with the original dataset. The training set is used for parameter learning of the model, the validation set is used for model selection and hyperparameter adjustment, and the test set is used for evaluating the generalization ability of the model.
[0052] In a specific embodiment, the process of performing step S103 can specifically include the following steps:
[0053] The risk feature map dataset is input into a two-dimensional convolutional neural network CNN-TA to obtain a feature extraction structure containing three convolutional layers, wherein the first convolutional layer uses 32 5x5 convolutional kernels, the second convolutional layer uses 64 3x3 convolutional kernels, and the third convolutional layer uses 128 3x3 convolutional kernels;
[0054] The output of the three convolutional layers is subjected to a max-pooling operation to obtain a reduced dimension feature map;
[0055] The reduced dimension feature map is subjected to feature conversion through a fully connected layer to obtain a risk feature vector of CNN-TA;
[0056] The financial risk feature matrix is input into a multilayer perceptron, which contains three fully connected layers with neuron numbers of 256, 128 and 64 respectively to obtain a MLP risk feature vector;
[0057] The risk feature vector based on the CNN-TA is fused with the MLP risk feature vector to obtain a comprehensive risk feature representation;
[0058] The comprehensive risk feature representation is mapped to a risk level by an output layer containing nine neurons corresponding to nine risk labels to obtain a risk probability distribution.
[0059] Batch training and parameter optimization are performed on the risk probability distribution, and the training uses a cross-entropy loss function and an Adam optimizer with a learning rate of 0.001 to obtain a financial transaction risk assessment network.
[0060] Specifically, the risk feature map dataset is input into a two-dimensional convolutional neural network CNN-TA to obtain a feature extraction structure containing three convolutional layers. CNN-TA is a convolutional neural network specially designed for time series analysis, which can effectively capture the spatio-temporal features of financial data. The first convolutional layer uses 32 5x5 convolutional kernels to perform convolution operations on the 15x15 input image, with a convolution step size of 1 and edge padding of'same' to maintain the size of the feature map unchanged. Convolution operation extracts local features by sliding the convolution kernel over the input image and calculating the dot product of the kernel and the corresponding region of the image. The convolution is followed by a ReLU activation function, which sets negative values to zero and preserves positive values unchanged, introducing nonlinearity. The second convolutional layer uses 64 3x3 convolutional kernels to process the output feature map of the first layer to extract higher-level feature representations. Similarly, a convolution step size of 1 and a ReLU activation function are used. The third convolutional layer uses 128 3x3 convolutional kernels to further extract more abstract features using the same convolution method and activation function. The stacking of the three convolutional layers enables the network to learn risk features hierarchically, from simple edge features to complex pattern recognition.
[0061] Max-pooling is performed on the output of the three convolutional layers to obtain a reduced dimension feature map. Max-pooling is a common method for reducing the dimension of a feature map, which selects the maximum value within a 2x2 window as the representative of the region, with a step size of 2, reducing the height and width of the feature map by half. Max-pooling not only reduces the dimension of the data and reduces the computational complexity, but also provides a certain degree of translation invariance, making the feature detection insensitive to position changes. After the pooling operation, the dimension of the feature map is significantly reduced, but the most significant features are preserved. The reduced dimension feature map is converted through a fully connected layer to obtain the risk feature vector of CNN-TA. The fully connected layer first flattens the feature map into a one-dimensional vector, and then processes it through a fully connected neural network. The fully connected layer contains 256 neurons, uses a ReLU activation function, and is followed by a Dropout layer (dropout rate 0.3) to prevent overfitting. The output of the fully connected layer is a 128-dimensional feature vector representing the risk features extracted by CNN-TA from the image data.
[0062] The financial risk feature matrix is input into a multi-layer perceptron, which includes three fully connected layers with neuron numbers of 256, 128, and 64, respectively. The financial risk feature matrix contains original financial index data, which retains more direct financial information compared to the risk feature map. The multi-layer perceptron (MLP) is a kind of feedforward neural network that transforms input features through multiple fully connected layers. The first layer receives the original feature matrix and includes 256 neurons; the second layer includes 128 neurons; and the third layer includes 64 neurons. Each layer uses a ReLU activation function to introduce nonlinearity, and a BatchNormalization layer is added after each layer for data standardization. A Dropout layer (dropout rate of 0.3) is also added after each layer to prevent overfitting. The output of the multi-layer perceptron is a 64-dimensional MLP risk feature vector, representing the risk features extracted from the original financial data. The risk feature vector based on CNN-TA is fused with the MLP risk feature vector to obtain a comprehensive risk feature representation. Feature fusion is achieved through a concatenation operation, which concatenates the 128-dimensional CNN-TA feature vector and the 64-dimensional MLP feature vector into a 192-dimensional joint vector. The concatenated vector is passed through a fully connected layer with 128 neurons and uses a ReLU activation function to integrate the information of the two types of features, obtaining the final comprehensive risk feature representation. This feature fusion mechanism combines the ability of convolutional neural networks to extract image features and the ability of multi-layer perceptrons to process original financial data, forming a more comprehensive risk representation.
[0063] The comprehensive risk feature representation is mapped to risk levels through the output layer. The output layer contains nine neurons corresponding to nine risk levels, resulting in a risk probability distribution. The output layer is a fully connected layer that receives the comprehensive risk feature representation as input and outputs nine values corresponding to nine risk levels: extremely high risk, high risk, medium-high risk, moderately high risk, medium risk, moderately low risk, medium-low risk, low risk, and extremely low risk. The output layer uses the Softmax activation function to convert the output values into a probability distribution, where each value represents the probability that a sample belongs to the corresponding risk level, and the sum of all probabilities is 1. Batch training and parameter optimization are performed on the risk probability distribution. Training uses the cross-entropy loss function and the Adam optimizer, with a learning rate set to 0.001, resulting in the financial transaction risk assessment network. The cross-entropy loss function is a commonly used loss function for classification problems, measuring the difference between the predicted and true distributions. Batch training uses mini-batch gradient descent, with each batch containing 64 samples. The gradient of one batch is calculated and the parameters are updated in each iteration. The Adam optimizer combines the advantages of momentum and RMSProp, adaptively adjusting the learning rate for different parameters to accelerate convergence. The model training runs for 100 epochs, with each epoch iterating through the entire training set once. During training, performance is monitored on the validation set, and an early stopping strategy is implemented: training stops when the validation loss fails to improve for 10 consecutive epochs to prevent overfitting.
[0064] In one specific embodiment, the process of mapping the comprehensive risk feature representation to a risk level through the output layer may specifically include the following steps:
[0065] The comprehensive risk characteristics are represented by a residual connection layer to retain information, resulting in enhanced risk characteristics.
[0066] The enhanced risk features are mapped and transformed through a fully connected layer with 128 neurons to obtain intermediate feature representations.
[0067] The intermediate feature representation is subjected to a nonlinear transformation by applying the Leaky ReLU activation function to obtain the activated feature representation;
[0068] The activated feature representations are randomly deactivated using a Dropout layer with a Dropout rate of 0.3 to obtain overfit-resistant feature representations.
[0069] The anti-overfit feature representation is transformed through a fully connected layer with nine output neurons to obtain the original risk score;
[0070] The original risk score is normalized by applying a Softmax function to obtain probability values for each risk level. The nine-level risk labels are: extremely high risk, high risk, medium-high risk, medium-high risk, medium risk, medium-low risk, low risk, and extremely low risk. The risk labels correspond to the combined risk index of price volatility and maximum drawdown rate at different time periods after the transaction.
[0071] The probability values of the risk levels are threshold calibrated, and the risk probability distribution is obtained by equal interval binning and Brier score evaluation.
[0072] Specifically, the integrated risk feature representation is passed through a residual connection layer to retain information and obtain enhanced risk features. The residual connection layer is an effective structure in deep neural networks to solve the problem of gradient vanishing. Its core idea is to create a "shortcut" from input to output, so that the original feature information can be directly passed to the subsequent layer. The specific operation is to add the integrated risk feature representation (denoted as X) directly to the feature (denoted as F(X)) processed by a fully connected network, i.e. X+F(X), to form the final enhanced risk feature. This structure ensures that the original financial risk features will not be lost during the transmission process in the deep network, and is particularly suitable for scenarios in financial risk assessment that require consideration of both original indicators and deep features. The enhanced risk features are mapped and transformed by a fully connected layer with 128 neurons to obtain intermediate feature representations. The fully connected layer is a basic component of neural networks, connecting each input neuron to each output neuron to form a fully connected structure. Each connection has a weight parameter corresponding to the importance of the input feature. The specific calculation is to multiply the enhanced risk feature vector by the weight matrix and add the bias vector to obtain a 128-dimensional intermediate feature representation. This fully connected layer realizes the mapping from enhanced risk features to more compact feature representations, reducing the feature dimension and focusing on the most critical risk information.
[0073] The intermediate feature representation is applied with a Leaky ReLU activation function for nonlinear transformation to obtain an activated feature representation. Leaky ReLU is an improvement of the traditional ReLU function, which returns the input value itself for positive input and returns the input value multiplied by a small coefficient (usually 0.01) for negative input. This design avoids the problem of ReLU function completely "dying" in the negative input region, and maintains the transmission of a small amount of negative value information. The Leaky ReLU function introduces nonlinear characteristics to the intermediate feature representation, enhances the expression ability of the model to complex financial risk patterns, and at the same time alleviates the gradient vanishing problem, making it easier to train deep networks. The activated feature representation is subjected to a Dropout layer to perform a random inactivation operation, and the Dropout rate is set to 0.3 to obtain an anti-overfitting feature representation. Dropout is a regularization technique that randomly "turns off" a portion of neurons during training, so that they do not participate in forward calculation and back propagation. The specific operation is to generate a binary mask vector with the same shape as the feature vector, with a 30% probability of 0 (inactivation) and a 70% probability of 1 (retention) for each element. The activated feature representation is multiplied by this mask vector to produce a result in which some neurons are zeroed, i.e., the anti-overfitting feature representation. The Dropout technique forces the network to learn more robust feature representations and prevents over-reliance on certain specific neurons. During training, it is equivalent to integrating multiple sub-networks of different structures, thereby improving the model's generalization ability to face complex changes in the financial market. The anti-overfitting feature representation is converted through a fully connected layer of nine output neurons to obtain the original risk score. This fully connected layer maps the reduced anti-overfitting feature representation to nine numerical values corresponding to the nine risk labels. Each output neuron calculates the weighted sum of the anti-overfitting feature representation plus the bias to obtain the original score of that risk level. These original scores directly reflect the model's evaluation of the sample in different risk levels, but have not yet been converted into probability form.
[0074] The original risk scores are normalized by applying a Softmax function to obtain probability values for each risk level. The Softmax function is a standard output layer for multi-classification problems that converts any real number value to a probability value between 0 and 1, and the sum of all probabilities is 1. The specific calculation is to subtract the maximum score from each original score (to avoid numerical overflow), then take the exponential, and then divide by the sum of all exponentially processed scores. After this processing, the nine output neurons correspond to the nine risk labels: extremely high risk, high risk, medium-high risk, moderately high risk, medium risk, moderately low risk, low risk, and extremely low risk. These risk labels correspond to the combined risk indices of price volatility and maximum drawdown rate at different time periods after trading, reflecting the multi-dimensional characteristics of risk assessment. The probability values of the risk levels are threshold calibrated, and the final risk probability distribution is obtained through equal interval binning and Brier score evaluation. Probability calibration is an important step to ensure that the probability values output by the model truly reflect the actual risk level. Equal interval binning sorts samples by predicted probability and divides them into several equal-sized bins, calculating the difference between the actual positive example ratio and the average predicted probability for each bin. The Brier score is a measure of the accuracy of probability prediction, calculating the mean squared error between the predicted probability and the actual result (0 or 1). Based on these evaluation results, the original Softmax output is fine-tuned to make the predicted probability more accurately reflect the actual risk level, resulting in the final risk probability distribution.
[0075] In a specific embodiment, the process of step S104 can specifically include the following steps:
[0076] Multi-dimensional risk indicators are extracted from real-time trading data to obtain a real-time risk feature matrix consistent with the training data format;
[0077] The real-time risk feature matrix is converted into a 15x15 two-dimensional risk feature image to obtain a real-time risk feature spectrum;
[0078] The real-time risk feature spectrum is input into the financial transaction risk assessment network for forward calculation to obtain the risk probability distribution of real-time trading;
[0079] The risk probability distribution is threshold judged and classified into levels to obtain nine-level risk rating results including extremely high risk to extremely low risk;
[0080] Based on the nine-level risk rating results, an overall risk level, risk trend analysis, and key risk indicator analysis are generated to obtain a three-layer structured risk rating report;
[0081] According to the comparison between the nine-level risk rating results and the preset risk threshold, a targeted transaction warning signal is obtained;
[0082] The risk early warning heat map and time series change trend are obtained by periodically updating and cumulatively analyzing the transaction early warning signals.
[0083] Specifically, after the financial transaction risk assessment method based on the multi-layer neural network completes the model training, it enters the actual application stage to assess and warn the real-time transaction data. First, the multi-dimensional risk indicators of the real-time transaction data are extracted to obtain the real-time risk feature matrix consistent with the format of the training data. This process uses the same indicator extraction method as the training stage to calculate various risk indicators for the current transaction-related market data, including market volatility indicators (historical volatility, Bollinger band width, etc.), liquidity risk indicators (transaction volume change rate, bid-ask spread ratio, etc.), and systemic risk indicators (market beta, financial stress index, etc.). The sliding window method is used for index calculation to analyze the latest transaction data in real time, ensuring the timeliness of the features. The calculated indicators are standardized to ensure the same scale as the training data, forming a real-time risk feature matrix.
[0084] The real-time risk feature matrix is converted into a 15x15 two-dimensional risk feature image to obtain the real-time risk feature spectrum. The conversion process is consistent with the processing method in the training stage. First, 15 key risk indicators are selected from the real-time risk feature matrix, and then the latest 15 days of continuous data for each indicator are extracted to reconstruct a 15x15 two-dimensional matrix. This conversion allows the risk features of real-time transaction data to be represented in the form of a two-dimensional image, facilitating subsequent convolutional neural network processing. The converted risk feature spectrum retains the time series characteristics of the risk indicators while introducing spatial relationships between different indicators, providing a richer feature representation for the model.
[0085] The real-time risk feature spectrum is input into the financial transaction risk assessment network for forward calculation to obtain the risk probability distribution of real-time transactions. Forward calculation is the process of executing inference by the neural network, in which data is processed step by-step from the input layer through each layer of the network to finally obtain the output result. This process can be represented by the formula:
[0086] P(R|I) = Softmax(f θ (I))
[0087] where P(R|I) represents the risk level probability distribution given the input feature I, f θ(I) represents a financial transaction risk assessment network function with parameter θ, and Softmax represents a function that converts the original output into a probability distribution. The specific calculation process is as follows: first, the real-time risk feature map I is extracted through the three-layer convolution structure of CNN-TA to obtain the CNN-TA risk feature vector; at the same time, the original financial risk feature matrix is input into the multilayer perceptron to obtain the MLP risk feature vector; then the two feature vectors are fused to form a comprehensive risk feature representation; finally, through a series of processes such as residual connection, fully connected layer, Leaky ReLU activation, Dropout and output layer, the probability values of the nine risk levels are calculated to form a risk probability distribution.
[0088] The risk probability distribution is subjected to threshold judgment and level classification to obtain a nine-level risk rating result including extremely high risk to extremely low risk. Threshold judgment is the process of determining the final risk level according to the probability distribution. The most direct method is to select the highest probability level as the risk rating result, but in risk management, a more complex judgment strategy is usually adopted. One commonly used method is to set a probability threshold, when the probability of a certain level exceeds the preset threshold, the transaction is classified into that risk level; another method is to consider the combination of multiple high probability levels, and determine the final level according to specific rules. The nine-level risk labels include extremely high risk, high risk, medium-high risk, medium-high risk, medium risk, medium-low risk, low risk, and extremely low risk. This fine-grained risk level division makes the risk assessment more accurate.
[0089] Based on the nine-level risk rating result, the overall risk level, risk trend analysis and key risk indicator analysis are generated to obtain a three-layer structured risk rating report. The three-layer structure design aims to provide risk information from macro to micro. The first layer of overall risk level directly displays the nine-level risk rating result, giving a risk profile; the second layer of risk trend analysis is based on historical risk rating data to calculate the change trend and volatility of risk level and predict the future risk development direction; the third layer of key risk indicator analysis identifies the indicators that contribute most to the current risk rating by analyzing the model internal parameters and feature importance, and explains the risk source. This structured report not only provides risk level information, but also analyzes the causes and development trend of risk, providing comprehensive support for transaction decision-making.
[0090] According to the comparison between the nine-level risk rating results and the preset risk threshold, a targeted transaction early warning signal is obtained. The early warning signal is the key output of risk management, which directly guides the transaction behavior. The preset risk threshold is set based on the risk preference of the institution and the market environment, and different risk levels correspond to different early warning levels and processing strategies. When the risk rating exceeds a certain threshold, the corresponding early warning signal is triggered, such as "high risk warning" or "medium risk attention". The early warning signal also contains targeted risk response suggestions, such as "suggest increasing hedge" or "suggest reducing position", which directly guide the adjustment of transaction strategy.
[0091] The risk early warning heat map and the time series trend are obtained by periodically updating and cumulatively analyzing the transaction early warning signal. Periodic updating of early warning signals is the core link of continuous risk monitoring, usually on a daily, weekly, and monthly time scale. Cumulative analysis of historical early warning signals is performed to calculate the early warning trigger frequency of different risk levels, generate a risk early warning heat map, and visually display the risk distribution. At the same time, through time series analysis, the trend component, seasonal component and residual component of the early warning signal are extracted, the risk change trend is predicted, and the risk evolution prediction result is formed. These analysis results provide the basis for long-term risk management strategy, helping institutions adjust overall risk exposure.
[0092] Taking a commodity futures trading company as an example, real-time risk assessment is performed on its copper futures trading. First, multi-dimensional risk indicators of copper futures are extracted from market data, including 20-day historical volatility (28.5%), 5-day trading volume change rate (1.45), bid-ask spread ratio (0.12%), etc., forming a real-time risk feature matrix. The 15 key indicators in the matrix and their 15-day historical data are reconstructed into a 15x15 risk feature map, which is input into the trained financial transaction risk assessment network. The network extracts image features through convolutional layers, and processes original indicator data with multi-layer perceptron, and fuses to generate comprehensive risk features. After residual connection, full connection, activation, Dropout, etc., the nine-level risk probability distribution is calculated: extremely high risk (0.01), high risk (0.03), medium-high risk (0.45), medium-high risk (0.30), medium risk (0.15), etc. The current transaction risk level is determined to be "medium-high risk", and a three-layer structured report containing risk causes (market volatility intensifies, liquidity decreases) and trend prediction is generated. The system triggers a "medium-high risk warning" signal, suggesting reducing the position by 20% and increasing the hedge strategy. Continuous monitoring shows that the risk level of copper futures trading has shown an upward trend in the past week, and the risk early warning heat map shows that the risk is concentrated in the volatility and liquidity dimensions, providing effective guidance for the trading team to adjust the strategy in time.
[0093] In a specific embodiment, the process of performing the step of periodically updating and cumulatively analyzing the transaction early warning signal can specifically include the following steps:
[0094] The transaction early warning signals are recorded and stored in daily, weekly and monthly time scales to obtain a multi-period early warning signal database;
[0095] The early warning signals in the multi-period early warning signal database are subjected to frequency statistical analysis to obtain an early warning trigger frequency matrix of different risk levels;
[0096] The early warning trigger frequency matrix is converted into a color-coded two-dimensional heat map to obtain a risk early warning heat map;
[0097] The multi-period early warning signal database is subjected to time series decomposition to obtain trend components, seasonal components and residual components of the early warning signals;
[0098] A risk evolution curve is constructed based on the trend components to obtain a long-term risk change trend graph;
[0099] The risk change trend graph is subjected to correlation analysis with a market benchmark index to obtain a risk and market correlation quantification index;
[0100] The risk and market correlation quantification index is matched and compared with historical risk events to obtain a risk evolution prediction result based on historical patterns.
[0101] Specifically, the transaction early warning signals are recorded and stored at daily, weekly, and monthly time scales to obtain a multi-period early warning signal database. The daily scale early warning signal directly records the risk rating results and early warning levels of each trading day. The weekly scale early warning signal is obtained by aggregating the data of five trading days in a week, and records the highest risk level, the average risk level, and the risk change trend in a week. The monthly scale early warning signal aggregates the data of about 20 trading days, and records the monthly risk overview. The early warning signals at the three time scales are stored in a relational database to form a structured multi-period early warning signal database. The table structure includes fields such as transaction identification, evaluation date, risk level, early warning level, and key risk indicators, and corresponding indexes are established to support efficient query and analysis. Frequency statistical analysis is performed on the early warning signals in the multi-period early warning signal database to obtain the early warning trigger frequency matrix of different risk levels. Frequency statistical analysis is a basic analysis method for risk distribution characteristics, and statistical calculation is performed for different risk dimensions. The analysis process first determines the statistical dimensions, including the time dimension (day, week, month), the risk level dimension (nine-level risk label), and the risk type dimension (market risk, liquidity risk, credit risk, etc.). Then the number of early warning triggers under each dimension combination is calculated, such as the number of triggers of the "monthly-high risk-market volatility" combination. The statistical results are organized into a multi-dimensional frequency matrix, and each element of the matrix represents the early warning trigger frequency of a specific dimension combination. The frequency calculation method is to divide the number of triggers of the dimension combination by the total number of observations to obtain the trigger frequency in percentage form. This frequency matrix fully reveals the multi-dimensional characteristics of risk distribution, providing a data basis for subsequent analysis.
[0102] The early warning trigger frequency matrix is converted into a color-coded two-dimensional heat map to obtain a risk early warning heat map. The heat map is an effective visualization tool for visually displaying multidimensional data. The numerical value is mapped to the color depth, making the data pattern obvious at a glance. The conversion process first selects two dimensions of the heat map. Usually, the time dimension is selected as the horizontal axis, and the risk level dimension is selected as the vertical axis to generate a two-dimensional view of time-risk level. For a frequency matrix of three or more dimensions, the other dimension values need to be fixed or the other dimension data needs to be aggregated to reduce it to two dimensions. Then a color mapping scheme is designed. The typical approach is to map low frequency to cold color (blue series) and high frequency to warm color (red series), and the color transition reflects the frequency change. The boundary, axis label, color legend and other elements of the heat map also need to be carefully designed to ensure readability. The final risk early warning heat map visually displays the spatiotemporal pattern of risk distribution, making it easy to identify risk concentration areas and evolution trends. The time series decomposition is performed on the multi-period early warning signal database to obtain the trend component, seasonal component and residual component of the early warning signal. Time series decomposition is a classic method for analyzing the internal structure of time series data, which decomposes the original sequence into several components with clear explanations. The specific implementation uses the STL (Seasonal-Trend decomposition using Loess) algorithm, which is suitable for seasonal time series data. Before decomposition, the risk level is encoded into a numerical value (such as extremely high risk = 9, extremely low risk = 1) to form a quantifiable risk index sequence. The STL decomposition process includes an inner loop and an outer loop. The inner loop performs iterative extraction of the trend and seasonal components, and the outer loop processes outliers to enhance robustness. The decomposition results include the trend component (reflecting the long-term change direction), the seasonal component (reflecting the periodic fluctuation pattern) and the residual component (reflecting the random fluctuation). This decomposition separates different aspects of risk changes and allows them to be analyzed separately, revealing the internal laws of risk evolution.
[0103] A risk evolution curve is constructed based on the trend component, resulting in a long-term risk change trend graph. The trend component reflects the long-term change direction after removing seasonal and random fluctuations, and is an important basis for predicting future risk trends. The process of constructing the risk evolution curve first smooths the trend component data to eliminate residual short-term fluctuations and make the long-term trend more obvious. The smoothing method uses a window size of 7 median filter to smooth the trend data twice. Then the smoothed trend data is plotted as a continuous curve, with the horizontal axis representing time and the vertical axis representing risk index value. Mark key turning points on the curve, such as local maximum, minimum and inflection points of risk index, which often correspond to important market events or risk accumulation critical points. The risk evolution curve can clearly show the long-term accumulation and release process of risk, providing a macro perspective for risk management. Correlation analysis is performed between the risk change trend graph and the market benchmark index to obtain a risk and market correlation quantitative indicator. The correlation analysis aims to reveal the relationship between risk change and market trend, and to quantify the forward-looking and lagging nature of risk indicators. The analysis process first selects an appropriate market benchmark index, such as the main index of the stock market, the volatility index or the industry index. Then calculate the correlation coefficient between the risk trend and the market index at different time lags, usually set to -30 to +30 trading days, negative lag means that risk change leads market, positive lag means that risk change lags market. The correlation coefficient calculation uses the Pearson correlation coefficient method to measure the linear correlation degree of two variables. The analysis results form a correlation coefficient sequence, recording the correlation strength at different lag periods, from which the maximum correlation coefficient and its corresponding time lag are found as the quantitative indicator of risk and market correlation. This indicator reflects the predictive ability or reaction speed of risk assessment results to market changes.
[0104] The risk and market correlation quantitative indicator is matched and compared with historical risk events to obtain risk evolution prediction results based on historical patterns. This step is to compare the current risk state in the historical background, identify similar patterns and predict future development. The matching and comparison process first establishes a historical risk event library to record the risk evolution trajectory of major market adjustments, financial crises or industry impact events. Then use the dynamic time warping (DTW) algorithm to flexibly match the current risk trend curve with historical patterns to find the most similar historical case. Similarity calculation considers multiple factors such as curve shape, risk level and market correlation, and comprehensive scoring determines the most matched historical case. Based on the matching results, reference the subsequent development trajectory of the historical case, combined with the special factors of the current market environment, generate risk evolution prediction results, including risk peak prediction, duration estimation and impact assessment. This prediction based on historical patterns provides an important reference for risk management decisions.
[0105] Taking the fixed income product portfolio of an investment company as an example, the company uses a multi-layer neural network risk assessment method to monitor the risk of its bond investment. Daily risk rating results are generated for the trading portfolio, recording nine risk labels and early warning signals to form daily early warning records. Every week, the data for the week is summarized, and the highest risk level and the average risk level are calculated to form weekly early warning records. At the end of each month, the monthly data is summarized to form a monthly risk overview. These multi-period early warning signals are stored in a structured database, recording the risk assessment history of the past two years. Frequency statistical analysis is performed on the database to calculate the frequency of the nine risk labels in each time period, forming a risk frequency matrix. The matrix is converted into a heat map with months on the horizontal axis and risk levels on the vertical axis, with colors from deep blue to deep red representing low to high frequencies. The heat map shows a significant increase in recent high-risk and medium-high-risk frequencies, indicating potential risk accumulation. Time series decomposition is performed on the two-year risk data to extract the long-term upward trend component, the quarterly seasonal component, and the short-term random fluctuations. Based on the trend component, a risk evolution curve is constructed, showing a steady increase in risk levels from a low point, with an accelerated increase in recent times. Comparing the risk curve with the credit spread index, it is found that the risk rating leads the market spread by about 12 trading days, proving the model's good risk warning ability. Searching the historical database, it is found that the current risk evolution pattern is highly similar to that before a credit risk event three years ago. Based on this historical pattern and the current trend, it is predicted that credit risk will continue to rise in the next month, and it is recommended to adjust the investment portfolio in advance, increase the proportion of high credit rating bonds, and appropriately increase liquidity reserves to cope with possible market adjustments.
[0106] The above describes the financial transaction risk assessment method based on a multi-layer neural network in the embodiments of the present application. The following describes the financial transaction risk assessment system based on a multi-layer neural network in the embodiments of the present application. Please refer to Figure 2 An embodiment of the financial transaction risk assessment system based on a multi-layer neural network in the embodiments of the present application includes:
[0107] The acquisition module is configured to acquire and calculate multi-dimensional risk indicators of financial market data to obtain a financial risk feature matrix including market volatility, liquidity ratio, systemic risk value, and macroeconomic factors.
[0108] The conversion module is configured to perform time series-to-image processing on historical transaction data based on the financial risk feature matrix to obtain a risk feature spectrum dataset suitable for two-dimensional convolution analysis.
[0109] The training module is configured to train a two-dimensional convolutional neural network transaction model CNN-TA and a multi-layer perceptron based on the risk feature spectrum dataset to obtain a financial transaction risk assessment network.
[0110] The classification module is used for inputting real-time transaction data into the financial transaction risk assessment network to calculate and classify risk levels, and obtain a hierarchical structured risk rating report and a transaction early warning signal.
[0111] Through the synergistic cooperation of the above-mentioned components, through the combination of the technical features of multi-dimensional risk index collection and calculation, time series to image processing, the fusion training of two-dimensional convolutional neural network and multilayer perceptron, and real-time risk level calculation and classification, the precise evaluation and early warning of financial transaction risk are realized, which has remarkable technical effects. First, the multi-dimensional risk index collection and calculation process converts complex market information into a structured financial risk feature matrix, fully capturing market volatility, liquidity ratio, systemic risk value and macroeconomic factors from multiple angles, overcoming the limitations of traditional single indicator evaluation, and significantly improving the comprehensiveness and accuracy of risk identification. Secondly, the time series to image processing technology converts one-dimensional financial data into two-dimensional risk feature maps, creatively converting the change pattern of financial time series into spatial distribution characteristics, so that the subsequent two-dimensional convolutional neural network can effectively extract the spatio-temporal correlation pattern of financial risk. This algorithm feature fully utilizes the advantages of convolutional neural network in image recognition and successfully migrates it to the field of financial risk assessment, realizing the deep integration of algorithm and application scenario. Thirdly, the combination training mechanism of two-dimensional convolutional neural network CNN-TA and multilayer perceptron realizes multi-modal feature extraction and fusion. CNN-TA focuses on capturing the spatial correlation pattern in the risk feature map, while the multilayer perceptron focuses on learning the complex nonlinear relationship of the original risk indicators. The two complement each other to form a more comprehensive risk representation capability. This combination of algorithm features significantly enhances the model's ability to identify complex financial risk patterns. Fourth, the real-time risk level calculation and classification technology realizes the transformation from risk assessment to actual decision support. Through nine levels of refined risk classification and three layers of structured risk rating report, not only the risk level is judged, but also the risk source and evolution trend are analyzed in depth, greatly improving the operability and decision value of the risk assessment result. It is particularly worth emphasizing that the introduction of two-dimensional convolutional neural network CNN-TA algorithm feature in this scheme fully considers the spatio-temporal correlation characteristics of financial risk data. By converting time series features into spatial feature maps, the local receptive field and hierarchical feature extraction capability of convolutional neural network are fully utilized, realizing efficient extraction of financial risk patterns. This algorithm feature is deeply integrated with the field of financial risk assessment, which is the key to the excellent effect of the scheme. In summary, through the precise matching of algorithm features and application needs, this method realizes the significant improvement of the comprehensiveness, accuracy, real-time and explainability of financial transaction risk assessment.
[0112] The above Figure 2The multi-layer neural network-based financial transaction risk assessment system in the embodiments of the present application is described in detail from the perspective of a modular functional entity. The multi-layer neural network-based financial transaction risk assessment device in the embodiments of the present application is described in detail from the perspective of hardware processing.
[0113] Figure 3 FIG. 3 is a structural schematic diagram of a multi-layer neural network-based financial transaction risk assessment device provided by the embodiments of the present application. The multi-layer neural network-based financial transaction risk assessment device 300 can have great differences due to different configurations or performances, and can include one or more processors (central processing units, CPUs) 310 (for example, one or more processors) and a memory 320, one or more storage media 330 (for example, one or more mass storage device ends) storing application programs 333 or data 332. The memory 320 and the storage media 330 can be temporary storage or persistent storage. The programs stored in the storage media 330 can include one or more modules (not shown in the figure), and each module can include a series of instruction operations in the multi-layer neural network-based financial transaction risk assessment device 300. Furthermore, the processor 310 can be configured to communicate with the storage media 330 and execute the series of instruction operations in the storage media 330 on the multi-layer neural network-based financial transaction risk assessment device 300 to implement the steps of the above-mentioned multi-layer neural network-based financial transaction risk assessment method.
[0114] The multi-layer neural network-based financial transaction risk assessment device 300 can further include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input and output interfaces 360, and / or one or more operating systems 331, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, and the like. Those skilled in the art can understand that the multi-layer neural network-based financial transaction risk assessment device 300 can further include other components that are not shown in the figure, such as a bus, an input / output controller, a display controller, a memory controller, and the like. Figure 3 The structure of the multi-layer neural network-based financial transaction risk assessment device shown in the figure does not constitute a limitation on the multi-layer neural network-based financial transaction risk assessment device provided by the present application, and can include more or fewer components than shown in the figure, or combine certain components, or different component arrangements.
[0115] The present application also provides a computer readable storage medium, which can be a non-volatile computer readable storage medium or a volatile computer readable storage medium. The computer readable storage medium stores instructions, and when the instructions are run on a computer, the computer executes the steps of the multi-layer neural network-based financial transaction risk assessment method.
[0116] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described system, system and unit can refer to the corresponding processes in the foregoing method embodiments, and will not be described here.
[0117] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or the entire or part of the technical solutions that essentially contribute to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of instructions for causing a multi-layer neural network-based financial transaction risk assessment device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.
[0118] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for financial transaction risk assessment based on a multi-layer neural network, characterized by, The method comprises: Multi-dimensional risk indicator collection and calculation are performed on financial market data to obtain a financial risk characteristic matrix including market volatility, liquidity ratio, systemic risk value, and macroeconomic factors; Based on the financial risk characteristic matrix, time series to image processing is performed on historical transaction data to obtain a risk characteristic map data set suitable for two-dimensional convolution analysis, including: selecting 15 different risk indicators from the financial risk characteristic matrix to obtain a risk indicator subset; setting different parameter combinations for the risk indicator subset to obtain a multi-dimensional indicator parameter matrix; extracting time series data of each indicator for 15 consecutive days based on the indicator parameter matrix to obtain risk data expanded in the time dimension; and reconstructing the risk data expanded in the time dimension into a 15x15 two-dimensional matrix structure to obtain an initial risk characteristic map; A two-dimensional convolution neural network transaction model CNN-TA and a multilayer perceptron are trained according to the risk characteristic map data set to obtain a financial transaction risk assessment network, including: inputting the risk characteristic map data set into the two-dimensional convolution neural network CNN-TA to obtain a feature extraction structure including three convolution layers, wherein the first convolution layer uses 32 5x5 convolution kernels, the second convolution layer uses 64 3x3 convolution kernels, and the third convolution layer uses 128 3x3 convolution kernels; performing a maximum pooling operation on the outputs of the three convolution layers to obtain a reduced feature map; performing feature conversion on the reduced feature map through a fully connected layer to obtain a risk feature vector of the CNN-TA; inputting the financial risk characteristic matrix into the multilayer perceptron, which includes three fully connected layers with neuron numbers of 256, 128, and 64, respectively, to obtain an MLP risk feature vector; and performing feature fusion based on the risk feature vector of the CNN-TA and the MLP risk feature vector to obtain a comprehensive risk feature representation; Real-time transaction data is input into the financial transaction risk assessment network for risk level calculation and classification to obtain a hierarchical structured risk rating report and a transaction early warning signal. 2.The method of claim 1, wherein, The multi-dimensional risk indicator collection and calculation on the financial market data to obtain the financial risk characteristic matrix including market volatility, liquidity ratio, systemic risk value, and macroeconomic factors comprises: The historical transaction data of DJIA, NASDAQ 100, and NIKKEI 225 stock indexes are collected to obtain original financial market data spanning at least 10 years; The original financial market data is segmented according to daily, weekly, and monthly time scales to obtain a multi-time dimension financial data set; Market volatility indicators are extracted from the multi-time dimension financial data set to obtain a market volatility characteristic sub-matrix; Liquidity risk indicators are extracted from the multi-time dimension financial data set to obtain a liquidity risk characteristic sub-matrix; Systemic risk indicators are extracted from the multi-time dimension financial data set to obtain a systemic risk characteristic sub-matrix; The market fluctuation feature sub-matrix, the liquidity risk feature sub-matrix and the systemic risk feature sub-matrix are combined to obtain a comprehensive risk feature matrix; The comprehensive risk feature matrix is standardized to obtain a final financial risk feature matrix. 3.The method of claim 1, wherein, The financial risk feature matrix is used for time series to image processing on historical transaction data to obtain a risk feature atlas data set suitable for two-dimensional convolution analysis, and the method further comprises: The initial risk feature atlas is subjected to numerical normalization processing to obtain a feature image with uniform pixel value distribution; The feature image is labeled as high risk, medium risk or low risk according to the actual risk result of historical transactions to obtain a labeled risk feature atlas; The labeled risk feature atlas is divided into a training set, a validation set and a test set according to a ratio of 7:2:1 to obtain a risk feature atlas data set. 4.The method of claim 1, wherein, The risk feature atlas data set is used to train a two-dimensional convolutional neural network transaction model CNN-TA and a multilayer perceptron to obtain a financial transaction risk assessment network, and the method further comprises: The comprehensive risk feature representation is mapped to a risk level through an output layer, the output layer contains nine neurons corresponding to nine risk labels, and a risk probability distribution is obtained; The risk probability distribution is subjected to batch training and parameter optimization, a cross-entropy loss function and an Adam optimizer are used for training, and a learning rate is set to 0.001 to obtain the financial transaction risk assessment network. 5.The method of claim 4, wherein, The comprehensive risk feature representation is mapped to a risk level through an output layer, the output layer contains nine neurons corresponding to nine risk labels, and a risk probability distribution is obtained, and the method further comprises: The comprehensive risk feature representation is subjected to information reservation through a residual connection layer to obtain an enhanced risk feature; The enhanced risk feature is subjected to mapping transformation through a fully connected layer, the number of neurons of the fully connected layer is 128, and an intermediate feature representation is obtained; The intermediate feature representation is subjected to nonlinear transformation through a Leaky ReLU activation function to obtain an activated feature representation; The activated feature representation is subjected to a random inactivation operation through a Dropout layer, and a Dropout rate is set to 0.3 to obtain an anti-overfitting feature representation; The anti-overfitting feature representation is converted through a fully connected layer of nine output neurons to obtain an original risk score; The original risk score is subjected to normalization processing through a Softmax function to obtain probability values of each risk level, wherein the nine risk labels are: extremely high risk, high risk, medium-high risk, medium-high risk, medium risk, medium-low risk, low risk and extremely low risk, and the risk labels correspond to a combined risk index of a price fluctuation rate and a maximum drawdown rate at different time periods after a transaction; The risk probability distribution is obtained by threshold calibration, equal interval binning and Brier score evaluation. 6.The method of claim 1, wherein, Real-time transaction data is input into the financial transaction risk assessment network to calculate and classify a risk level, and a hierarchical structured risk rating report and a transaction early warning signal are obtained, and the method further comprises: Multi-dimensional risk indicator extraction is performed on the real-time transaction data to obtain a real-time risk feature matrix consistent with the format of the training data; The real-time risk feature matrix is converted into a 15x15 two-dimensional risk feature image to obtain a real-time risk feature spectrum; The real-time risk feature spectrum is input into the financial transaction risk assessment network for forward calculation to obtain a risk probability distribution of the real-time transaction; Threshold judgment and grade classification are performed on the risk probability distribution to obtain a nine-level risk rating result including extremely high risk to extremely low risk; Based on the nine-level risk rating result, an overall risk level, risk trend analysis, and key risk indicator analysis are generated to obtain a three-layer structured risk rating report; According to the comparison between the nine-level risk rating result and the preset risk threshold, a targeted transaction early warning signal is obtained; Periodic updating and cumulative analysis are performed on the transaction early warning signal to obtain a risk early warning heat map and a time series change trend.
7. The method of claim 6, wherein the method further comprises: The periodic updating and cumulative analysis of the transaction early warning signal to obtain the risk early warning heat map and the time series change trend include: The transaction early warning signal is recorded and stored according to daily, weekly, and monthly time scales to obtain a multi-period early warning signal database; Frequency statistical analysis is performed on the early warning signals in the multi-period early warning signal database to obtain an early warning trigger frequency matrix of different risk levels; The early warning trigger frequency matrix is converted into a two-dimensional heat map with color coding to obtain a risk early warning heat map; Time series decomposition is performed on the multi-period early warning signal database to obtain trend components, seasonal components, and residual components of the early warning signal; Based on the trend components, a risk evolution curve is constructed to obtain a long-term risk change trend graph; Correlation analysis is performed between the risk change trend graph and a market benchmark index to obtain a risk and market correlation quantification index; The risk and market correlation quantification index is matched and compared with historical risk events to obtain a risk evolution prediction result based on historical patterns.
8. A financial transaction risk assessment system based on a multi-layer neural network, characterized by, The multi-layer neural network-based financial transaction risk assessment system for implementing the multi-layer neural network-based financial transaction risk assessment method of any one of claims 1-7 includes: A collection module for collecting and calculating multi-dimensional risk indicators from financial market data to obtain a financial risk feature matrix including market volatility, liquidity ratio, systemic risk value, and macroeconomic factors; A conversion module for time series to image processing of historical transaction data based on the financial risk feature matrix to obtain a risk feature spectrum dataset suitable for two-dimensional convolution analysis; A training module for training a two-dimensional convolutional neural network transaction model CNN-TA and a multi-layer perceptron based on the risk feature spectrum dataset to obtain a financial transaction risk assessment network; A classification module for inputting real-time transaction data into the financial transaction risk assessment network for risk level calculation and classification to obtain a hierarchical structured risk rating report and a transaction early warning signal.
9. A financial transaction risk assessment device based on a multi-layer neural network, characterized by, An apparatus comprising a memory storing a computer program run on a processor, wherein the processor implements the method of financial transaction risk assessment based on a multi-layer neural network according to any one of claims 1 to 7 when running the computer program.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program, when run on the processor, causes the processor to implement the method of financial transaction risk assessment based on a multi-layer neural network according to any one of claims 1 to 7.
Citation Information
Patent Citations
Financial risk data management method based on machine learning
CN117726439A
Water environment monitoring and intelligent early warning system
CN117973613A
Fire early warning method and system based on smoke image joint feature analysis
CN119181197A