A financial risk intelligent analysis method based on big data
Through the attention mechanism-based LSTM model and wavelet packet decomposition technology, combined with stacked ensemble learning and concept drift detection, the problems of low accuracy and inaccurate abnormal detection in large-scale high-dimensional data are solved, and the problem of further development is achieved. Efficient financial risk prediction and model adaptability.
Patent Information
- Application Number
- CN202410675569.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2044-05-29
AI Technical Summary
When facing large-scale and high-dimensional financial data, the prediction accuracy is not high, making it difficult to capture complex time series features and nonlinear relationships, and the abnormal detection is inaccurate, which affects the prediction accuracy.
The LSTM model based on attention mechanism is used to extract time series features, combine wavelet packet decomposition and logarithmic energy entropy for multi-scale decomposition, obtain multi-scale time series features, and combine multiple through stacking ensemble learning methods and concept drift detection mechanisms. The prediction results of the basic model, feature selection and model adaptive adjustment.
It improves the accuracy and reliability of financial risk prediction, enhances feature representation ability, can adapt to data distribution changes, maintain high prediction performance, and reduces the risk of model overfitting.
Smart Images

Figure CN118505394B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial data processing, and in particular to a financial risk intelligent analysis method based on big data. Background Art
[0002] With the continuous development of financial markets and the continuous innovation of financial products, financial risk management has become increasingly important. Financial institutions and investors need to be able to accurately predict market fluctuations, credit risks and other potential risks so that they can take appropriate measures to avoid risks and gain profits. However, traditional financial risk prediction methods often face problems such as low prediction accuracy and poor generalization ability, especially when faced with large-scale and high-dimensional financial data, the limitations of traditional methods are more prominent.
[0003] In the current technological context, although machine learning technologies such as deep learning have been applied to financial risk prediction, a single model often has difficulty capturing the complex time series characteristics and nonlinear relationships in financial data, resulting in limited prediction accuracy. In addition, the characteristics of financial data include high dynamics, nonlinearity, noise interference, etc. Traditional feature extraction methods often have difficulty in fully mining the information in the data. Therefore, how to effectively use big data technology, extract rich features and integrate multiple models has become the key to improving the accuracy of financial risk prediction.
[0004] In the related art, for example, Chinese patent document CN117994026A provides a financial risk intelligent analysis method based on big data, which involves the field of financial data processing, including: obtaining a user's loan history data set, which contains the user's behavior preferences and transaction pattern information; extracting the user's loan amount and repayment record as key features; removing redundant features to obtain the optimal feature subset; combining the extracted key features and the optimal feature subset as a feature engineering data set; performing outlier detection; using DBSCAN to obtain data after anomaly detection based on the user's behavior preferences, transaction pattern information and outlier detection results; establishing a long short-term memory network LSTM based on the gated recurrent unit GRU to obtain data after time series analysis; using the data after anomaly detection and the data after time series analysis as input, and using a random forest model for risk prediction. However, when this scheme uses clustering algorithms such as DBSCAN for anomaly detection, there may be inaccurate identification of anomalies. If the anomaly is not correctly identified or is incorrectly classified as normal data, it will interfere with the training and prediction of subsequent models and affect the prediction accuracy. Summary of the invention
[0005] In response to the problem of low accuracy in financial risk prediction in the prior art, the present application provides a financial risk intelligent analysis method based on big data, which improves the prediction accuracy through multi-scale time series feature extraction, model ensemble learning, etc.
[0006] The purpose of this application is achieved through the following technical solutions.
[0007] This specification provides a method for intelligent analysis of financial risks based on big data, including: obtaining financial data and preprocessing the obtained financial data. Financial data may include but are not limited to user attribute data, macroeconomic data, market industry data and social network data. Among them, user attribute data may include user's personal information, credit record, transaction record, etc.; macroeconomic data may include indicators such as GDP, CPI, interest rate, etc.; market industry data may include market indexes and industry trends of different industries; social network data may include user's social relations, public opinion information, etc. The obtained financial data is preprocessed, including operations such as data cleaning, data integration, data transformation and data reduction. The data cleaning process identifies and corrects errors, inconsistencies and missing values in the data; the data integration process merges and integrates data from multiple data sources; the data transformation process performs transformation operations such as normalization and attribute construction on the data; the data reduction process reduces the size of the data set through dimension reduction and quantity reduction methods.
[0008] The preprocessed financial data is input into the LSTM model based on the attention mechanism, and the weights of the features at different time steps are adjusted through the attention mechanism layer to obtain the time series features. The LSTM model based on the attention mechanism includes an input layer, an LSTM layer, an attention mechanism layer, and an output layer. The preprocessed financial time series data is input into the input layer of the model, and the long-term dependency features of the time series are extracted through the LSTM layer. An attention mechanism layer is set after the LSTM layer, and the weight distribution of the features at different time steps is calculated through the attention mechanism, and the features extracted by the LSTM layer are weighted combined.
[0009] The calculation process of the attention mechanism layer is as follows: first, calculate the correlation score between the hidden state output by the LSTM layer and the attention query vector; then, normalize the correlation score to the attention weight distribution through the softmax function; finally, use the attention weight to perform weighted summation on the hidden state to obtain the aggregated time series feature representation. The attention mechanism layer gives different importance to features at different time steps, highlighting the impact of key moments.
[0010] The obtained time series features are processed by wavelet transform, and multi-scale time series features are obtained by multi-scale decomposition of the time series features. The Coiflets wavelet basis function is used to decompose the time series features into two sub-bands of low frequency and high frequency in each layer of decomposition. The decomposition is recursively performed until the preset number of decomposition layers is reached to obtain the wavelet packet coefficient tree. The logarithmic energy entropy is calculated for each node in the wavelet packet coefficient tree as an evaluation index, and the optimal wavelet packet basis is selected by the designed combined node coefficient evaluation function. The combined evaluation function includes power function, exponential function and logarithmic function. By adjusting the combined weights and parameters of different nonlinear transformations, the importance of the node is evaluated. The multi-scale sub-band coefficients in the wavelet packet coefficient tree are extracted according to the optimal wavelet packet basis, and the statistical characteristics (mean and variance) of the coefficients in each sub-band are calculated to form a local feature vector of the corresponding scale. The local feature vectors of different scales are spliced to form a multi-scale time series feature vector to characterize the characteristics of the time series at different frequencies and time scales.
[0011] The obtained multi-scale time series features are combined with other risk features in financial data as the input of the stacked ensemble learning model; the stacked ensemble learning method is used to combine the prediction results of multiple basic models, and the weights are combined by training the meta-model to obtain the output of the stacked ensemble learning model as the initial financial risk prediction result. The multi-scale time series features are combined with risk features such as user attribute features, macroeconomic features, market industry features and social network features to form a complete feature set. The information gain method is used to select the feature set to select the feature subset with the highest correlation with financial risk; then the relief algorithm is used to weight the selected feature subset to highlight the impact of key risk features. Decision trees and support vector machines are selected as basic models, and the weighted feature vectors are input into the basic model for training to obtain multiple trained basic model instances. The prediction probability of each basic model is post-processed and calibrated, and the prediction probability is mapped to the calibrated probability by the Isotonic Regression method to improve the reliability of probability prediction. The calibrated probability is used as the final prediction result of the basic model, and the prediction results of all basic models are combined to form the training set of the meta-model. The Logistic regression model is used as the meta-model, and the meta-model is trained by minimizing the cross entropy loss function. At the same time, L1 and L2 regularization terms are introduced for feature selection and parameter shrinkage to avoid overfitting. During the meta-model training process, the Bayesian optimization method is used to search for the optimal hyperparameter combination, including regularization parameters and learning rates. The trained meta-model and the basic model form a complete stacked ensemble learning model, and the new feature input is predicted to obtain the probability result of financial risk prediction as the initial risk prediction result.
[0012] According to the acquired financial data and the initial financial risk prediction results, the change of data distribution is detected through the concept drift detection mechanism; according to the detected data distribution change, the parameters of the stacked ensemble learning model are adjusted to obtain the adjusted stacked ensemble learning model. The continuously acquired new financial data batches are input into the concept drift detection module together with the initial prediction results. The distribution difference between the current data batch and the historical data batch is measured by indicators such as Wasserstein distance or Kullback-Leibler divergence. When the difference measure exceeds the set threshold, it is determined that a significant data distribution change has occurred, triggering a concept drift alarm. According to the concept drift detection results, the stacked ensemble learning model is adaptively adjusted. Using an incremental learning strategy, new data batches are added to the training set, the basic model is fine-tuned and updated, and the meta-model is retrained so that the model can adapt to changes in data distribution. By dynamically updating model parameters, the drift of data distribution is captured in time to maintain the prediction performance of the model.
[0013] Use the adjusted stacked ensemble learning model to perform risk analysis. Input new financial data into the adjusted stacked ensemble learning model to obtain the corresponding financial risk prediction results. The prediction results are given in the form of probability, indicating the possibility that the sample belongs to different risk levels. According to the size of the predicted probability value, the samples are divided into different risk levels, such as high risk, medium risk and low risk. Use the predicted risk level information to analyze and evaluate financial risks. Generate a risk analysis report, perform statistical analysis on the distribution and feature differences of samples of different risk levels, and explore the common characteristics and laws of risk samples. Through visualization technology, the risk analysis results are intuitively presented in the form of charts, radar charts, etc., which is convenient for managers to monitor and make decisions on risks. According to the risk analysis results, provide corresponding risk warning and control suggestions. For high-risk samples, give suggestions for focus and verification, and prompt possible risk factors; for medium-risk samples, give suggestions for further follow-up observation; for low-risk samples, give suggestions for maintaining the current status. Through feedback and tracking of risk warning results, continuously optimize and improve risk prediction models and improve the effectiveness of risk management. Apply risk prediction and analysis results to the actual financial risk management process to assist business decisions such as credit approval, risk pricing, and capital allocation. Carry out differentiated management of customers according to risk levels and formulate targeted risk control strategies and measures. Through continuous model prediction, risk analysis, and business application, a closed-loop risk management process is formed to enhance the risk management capabilities and level of financial institutions.
[0014] Further, the obtained time series features are processed by wavelet transform, and multi-scale time series features are obtained by multi-scale decomposition of the time series features. Specifically, the Coiflets wavelet basis function is used to perform wavelet packet decomposition on the time series features. The Coiflets wavelet basis function is a commonly used compactly supported orthogonal wavelet basis with good symmetry and smoothness, and can provide good localization capabilities in the time and frequency domains. By selecting a suitable Coiflets wavelet basis function, the local feature information of the time series features at different scales can be effectively captured. In each layer of decomposition, the time series features are decomposed into two sub-bands, low frequency and high frequency. The low frequency sub-band represents the approximate information of the time series, including the main trend and low frequency components of the sequence; the high frequency sub-band represents the detailed information of the time series, including the local fluctuations and high frequency components of the sequence. Through recursive decomposition, each sub-band is further decomposed into two sub-bands, low frequency and high frequency, until the preset number of decomposition layers is reached. The selection of the number of decomposition layers requires a trade-off between computational complexity and feature representation capabilities, and can usually be adjusted according to the length and complexity of the time series. After recursive decomposition, a complete wavelet packet coefficient tree is obtained. Each node in the tree corresponds to a time series subband at a specific scale and frequency range. In order to evaluate the importance of each subband, the logarithmic energy entropy is introduced as an evaluation index. The logarithmic energy entropy describes the energy distribution of the subband coefficient and can reflect the amount of information in the subband. For each node in the wavelet packet coefficient tree, the logarithmic energy entropy of its corresponding subband coefficient is calculated to obtain the evaluation index value of each node. The larger the evaluation index value, the richer the information contained in the subband corresponding to the node, and the higher its importance in the representation of time series features. According to the evaluation index value of each node, the optimal wavelet packet basis is selected. The optimal wavelet packet basis is the node path with the largest evaluation index value in the path from the root node to the leaf node of the wavelet packet coefficient tree. By comparing the evaluation index values of nodes on different paths, the optimal wavelet packet basis can be found. The optimal wavelet packet basis represents the most informative subband combination of time series features at different scales, which can retain the key feature information of the time series to the greatest extent. According to the selected optimal wavelet packet basis, the subband coefficients corresponding to the nodes on the optimal wavelet packet basis path in the wavelet packet coefficient tree are extracted as information quantum bands of time series features at different scales. Each information quantum band contains the local feature information of the time series at a specific scale. By extracting these subband coefficients, multi-scale representations of time series features at different scales can be obtained.
[0015] For the coefficient of each information quantum band, its statistical characteristics are calculated as the local feature vector at the corresponding scale. Common statistical characteristics include mean and variance. The mean reflects the central position of the subband coefficient, and the variance reflects the degree of discreteness of the subband coefficient. By calculating these statistical characteristics, each information quantum band can be represented as a compact local feature vector, reducing the feature dimension while retaining key statistical information. Finally, the local feature vectors at different scales are sequentially spliced into a multi-scale time series feature vector as a multi-scale representation of the time series features. The multi-scale time series feature vector contains the local feature information of the time series at different frequencies and time scales, which can comprehensively characterize the multi-scale characteristics of the time series and provide a more effective feature representation for subsequent risk prediction.
[0016] Furthermore, the logarithmic energy entropy of each node is calculated using the following formula:
[0017] Among them, C i is the coefficient of the i-th node in the wavelet packet coefficient tree, f(x) is the evaluation function of the node coefficient, ∑f(C i ) is the sum of the evaluation function values of all nodes, and E is the logarithmic energy entropy.
[0018] Furthermore, when calculating the logarithmic energy entropy of each node in the wavelet packet coefficient tree, the evaluation function f(x) of the node coefficient is introduced. The evaluation function f(x) uses a combination of power function, exponential function and logarithmic function to evaluate the node coefficient through nonlinear transformation, highlighting the importance of the node coefficient. Specifically, the evaluation function f(x) is defined as: Among them, C i is the coefficient of the ith node in the wavelet packet coefficient tree, and |C_i| represents the absolute value of the node coefficient. The evaluation function f(x) consists of three parts: power function, exponential function and logarithmic function. Power function part: w1×|C i | p , w1 is the combined weight of the power function, which is used to control the proportion of the power function in the combined function. p is the power exponent of the power function, which is used to control the degree of power transformation of the node coefficient, p>0. By transforming the node coefficients through the power function, the difference between the node coefficients can be amplified and the influence of important nodes can be highlighted. Exponential function part: w2 is the combined weight of the exponential function, which is used to control the proportion of the exponential function in the combined function. α is the scale parameter of the exponential function, which is used to control the degree of exponential transformation of the node coefficient, α>0. By transforming the node coefficient through the exponential function, the weight of important nodes can be nonlinearly enhanced and the influence of unimportant nodes can be suppressed. Logarithmic function part: w3×log(1+β×|C i|), w3 is the combined weight of the logarithmic function, which is used to control the proportion of the logarithmic function in the combined function. β is the scale parameter of the logarithmic function, which is used to control the degree of logarithmic transformation of the node coefficient, β>0. By transforming the node coefficients through the logarithmic function, the differences between the node coefficients can be smoothed and the dominant effect of the maximum value can be reduced. The combined weights w1, w2, and w3 satisfy w1+w2+w3=1, which are used to control the proportion of different nonlinear transformations in the combined function. By adjusting the combined weights, the contributions of different nonlinear transformations can be flexibly balanced to adapt to different types of time series characteristics. By introducing the combined evaluation function f(x), the node coefficients can be nonlinearly transformed and evaluated from multiple angles, comprehensively considering the power, exponential and logarithmic characteristics of the node coefficients. The combined evaluation function enhances the sensitivity to important nodes and smoothes the differences between nodes, providing a more comprehensive and flexible way to evaluate node importance.
[0019] Specifically, the ability of logarithmic energy entropy to evaluate the amount of node information is improved. By introducing an evaluation function to perform nonlinear transformation on node coefficients, the key features of node coefficients can be highlighted, the influence of non-important features can be suppressed, and the logarithmic energy entropy can more accurately reflect the amount of node information, thereby selecting the optimal wavelet packet basis and extracting more effective multi-scale time series features. The adaptability and flexibility of logarithmic energy entropy are enhanced. The evaluation function is designed using a combination function, which can combine the advantages of multiple nonlinear transformations. By adjusting parameters such as combination weights, power exponents, and scale parameters, it can flexibly adapt to different time series characteristics and problem requirements, thereby improving the applicability and performance of logarithmic energy entropy in different scenarios. The performance of intelligent analysis of financial risks is improved. By improving the calculation method of logarithmic energy entropy, a more optimized wavelet packet basis can be selected to extract more accurate and effective multi-scale time series features, enhance the feature representation ability and prediction performance of the financial risk analysis model, and thus improve the overall performance of intelligent analysis of financial risks.
[0020] Further, obtaining the initial financial risk prediction results includes the following steps: Feature combination: The multi-scale time series features obtained by wavelet packet decomposition and logarithmic energy entropy are combined with other risk features in financial data to form a risk feature set. Other risk features may include financial indicators, macroeconomic indicators, industry indicators, etc. These features, together with the multi-scale time series features, form a comprehensive risk feature representation. Through feature combination, different types of risk factors can be comprehensively considered to provide richer and more multi-dimensional feature information. Feature selection: The information gain method is used to select the risk feature set to obtain a feature subset. Information gain measures the contribution of each feature to the risk prediction target, and the importance of the feature is evaluated by calculating the mutual information between the feature and the target variable. Features with higher information gain have stronger distinguishing and predictive capabilities for risk prediction. Through feature selection, the most discriminative feature subset can be screened out, the feature dimension can be reduced, and the generalization ability and computational efficiency of the model can be improved.
[0021] Feature weighting: The Relief algorithm is used to weight the obtained feature subset to obtain a weighted feature vector. The Relief algorithm evaluates the contribution of features to sample differentiation by calculating the distance difference between each feature and its nearest similar and heterogeneous samples. Features with larger distance differences have stronger discriminative power in distinguishing sample categories. Through the Relief algorithm, weights can be assigned to each feature to highlight the influence of important features and suppress the interference of noise features. The weighted feature vector can better represent the feature information of the sample and improve the accuracy of risk prediction.
[0022] Basic model training: Choose a decision tree or support vector machine as the basic model, use the weighted feature vector as input, and train the selected basic model. The decision tree recursively builds a tree structure, splits according to the value of the feature, and generates easy-to-interpret rules. The support vector machine maps samples to a high-dimensional space by finding the maximum margin hyperplane to achieve nonlinear classification. By training the basic model, the relationship between the feature and the risk prediction target can be learned, and the decision rules or classification boundaries for risk prediction can be established.
[0023] Ensemble learning: Use boosting ensemble method to generate multiple trained basic model instances. Boosting generates multiple weak learners by iteratively training the basic model and adjusting the sample weights according to the error rate of the sample. Each weak learner focuses on the samples that were misclassified by the previous learner, and the predictions of the strong learner are obtained by weighted combination of the prediction results of multiple weak learners. Common boosting algorithms include AdaBoost, GBDT, etc. Ensemble learning can improve the generalization ability and robustness of the model and reduce the bias and variance of a single model.
[0024] Model prediction: Use the trained basic model instance to predict the weighted feature vector and obtain the predicted probability vector. Each basic model instance predicts the input feature vector according to the learned decision rules or classification boundaries, and outputs the probability that the sample belongs to different risk categories. By combining the prediction results of multiple basic model instances, the prediction probability vector of the integrated model is obtained, which reflects the risk probability distribution of the sample.
[0025] Probability calibration: The Isotonic Regression method is used to convert the predicted probability vector into a calibrated probability vector as the final prediction result of the basic model. Isotonic Regression is a non-parametric probability calibration method that calibrates the predicted probability by learning a monotonically increasing function between the predicted probability and the true probability. The calibrated probability vector is more consistent with the true probability distribution, which improves the accuracy and reliability of probability prediction. Through probability calibration, the probability estimation bias that may exist in the model can be corrected, making the prediction results more credible.
[0026] Furthermore, obtaining the initial financial risk prediction results also includes the following: Constructing a meta-model training set: Using the final prediction results of each basic model as the input features of the meta-model, a meta-model training set is constructed. Specifically, for each training sample, its prediction results (calibrated probability vectors) in different basic models are used as the input features of the meta-model to form a feature matrix of the meta-model training set. At the same time, the true risk labels of the training samples are used as the target variables of the meta-model training set. By constructing a meta-model training set, the prediction results of different basic models can be combined to capture the prediction preferences and characteristics of different models, providing more comprehensive and diverse feature information for the training of the meta-model.
[0027] Training metamodel: Using the stacking method, the metamodel training set is used as input to train the metamodel and obtain the trained stacked ensemble learning model. Stacking is a commonly used ensemble learning method. By using the prediction results of different basic models as new features, a high-level metamodel is trained to achieve model combination and integration. The metamodel can select various machine learning algorithms, such as logistic regression, decision tree, support vector machine, etc., according to task requirements and data characteristics. By training the metamodel, the relationship and weight between the prediction results of different basic models can be learned, the optimal model combination method can be found, and the overall prediction performance can be improved.
[0028] Model prediction: The trained stacked ensemble learning model is used to predict the weighted feature vector to obtain the financial risk prediction result vector as the initial financial risk prediction result. Specifically, for each sample to be predicted, its weighted feature vector is input into the trained basic model to obtain the prediction results of different basic models. Then, these prediction results are used as the input features of the meta-model and predicted by the trained meta-model to obtain the final financial risk prediction result vector. The prediction result vector represents the probability that the sample belongs to different risk categories and reflects the risk probability distribution of the sample. Through the prediction of the stacked ensemble learning model, the prediction capabilities of different basic models can be combined to obtain more accurate and reliable risk prediction results.
[0029] Furthermore, in the process of obtaining the initial financial risk prediction results, training the stacked ensemble learning model is a key step. Specifically, by adopting the Logistic regression model as the meta-model and using the cross-entropy loss function to train the meta-model, a trained stacked ensemble learning model can be obtained. The Logistic regression model is a commonly used binary classification model that linearly combines the input features with the weights and applies the Sigmoid function to map the results to a probability range of (0, 1). In this application, the Logistic regression model has high training efficiency and low computational complexity, and is suitable for processing large-scale data. In order to train the Logistic regression model, a suitable loss function needs to be constructed. In the binary classification problem, the commonly used loss function is the cross-entropy loss function. The cross-entropy loss function measures the difference between the predicted probability distribution and the true probability distribution, and the formula is as follows: L = -∑(y i ×logp i +(1-y i )×log(1-p i )), where y i is the true label (0 or 1) of the i-th sample, p i is the probability that the model predicts that the i-th sample is a positive example. The cross entropy loss function has the following characteristics: when the predicted probability is close to the true label, the value of the loss function is small; when the predicted probability is significantly different from the true label, the value of the loss function is large. The cross entropy loss function is a convex function, which is easy to optimize and converge. The cross entropy loss function penalizes the probability prediction results and encourages the model to output probabilities close to the true label.
[0030] Take the meta-model training set as input and train the Logistic Regression model by minimizing the cross entropy loss function. The specific steps are as follows: Input the feature matrix and label vector of the meta-model training set into the Logistic Regression model. Initialize the weight parameters of the model, usually by random initialization. Use an optimization algorithm (such as gradient descent) to iteratively update the weight parameters of the model, with the goal of minimizing the cross entropy loss function. In each iteration, calculate the cross entropy loss of the current model on the training set, and perform gradient updates on the weight parameters according to the loss function. Repeat the iterative process until the preset number of iterations is reached or the loss function converges to a certain threshold.
[0031] The trained Logistic regression model is obtained, and its weight parameters have been optimized to better fit the meta-model training set. The trained Logistic regression model is used as a stacked ensemble learning model to predict financial risks for new input samples. Specifically, for a new sample: the feature vector of the sample is input into the trained basic model to obtain the prediction results of different basic models. The prediction results of the basic models are combined into the input feature vector of the meta-model. The input feature vector of the meta-model is input into the trained Logistic regression model to obtain the final financial risk prediction probability. The predicted probability is compared with the set threshold to obtain the final risk prediction result (high risk or low risk).
[0032] Furthermore, when training the Logistic regression model, by introducing L1 regularization terms and L2 regularization terms into the cross entropy loss function, a loss function containing L1 and L2 regularization can be constructed. Regularization technology can be used to effectively perform feature selection and parameter shrinkage, thereby improving the generalization ability and robustness of the model. Based on the cross entropy loss function, L1 regularization terms and L2 regularization terms are introduced to construct a loss function containing regularization. The form of the loss function is as follows: Among them, the first term is the cross entropy loss function, which measures the difference between the predicted probability and the true label; the second term is the L1 regularization term, ∑|w j | represents the sum of the absolute values of the model weights; the third term is the L2 regularization term, represents the sum of squares of model weights; λ1 and λ2 are regularization strength parameters that control the influence of the regularization term.
[0033] L1 regularization term (Lasso regularization): By adding the sum of the absolute values of the weights to the loss function, L1 regularization can force some weights to become 0, achieving the effect of feature selection. L1 regularization tends to produce sparse weight vectors, which can automatically identify and eliminate unimportant features, improving the interpretability and generalization ability of the model. L2 regularization term (Ridge regularization): By adding the sum of the squares of the weights to the loss function, L2 regularization can force the elements of the weight vector to be close to 0, achieving the effect of parameter shrinkage. L2 regularization tends to produce smaller and evenly distributed weight vectors, which can reduce the risk of overfitting of the model and improve the robustness and stability of the model. The meta-model training set and the constructed loss function containing L1 and L2 regularization are used as inputs. The Logistic Regression model is trained using the gradient descent algorithm by minimizing the constructed loss function. The specific steps are as follows: Input the feature matrix and label vector of the meta-model training set into the Logistic Regression model. Initialize the weight parameters of the model, usually by random initialization. Use the gradient descent algorithm to iteratively update the weight parameters of the model, with the goal of minimizing the constructed loss function containing regularization. In each iteration, the loss function value of the current model on the training set is calculated, including cross entropy loss, L1 regularization term, and L2 regularization term. The gradient of the weight parameter is calculated according to the loss function, and the weight parameter is updated according to the gradient and learning rate. For the L1 regularization term, the sub-gradient descent method is used for updating; for the L2 regularization term, the standard gradient descent method is used for updating. The iterative process is repeated until the preset number of iterations is reached or the loss function converges to a certain threshold. The trained Logistic regression model is obtained, whose weight parameters have been optimized, and has been constrained by L1 and L2 regularization, and has the effect of feature selection and parameter shrinkage. The trained Logistic regression model is used as a stacked ensemble learning model containing L1 and L2 regularization for financial risk prediction of new input samples.
[0034] Furthermore, when training the Logistic regression model, in addition to introducing L1 and L2 regularization terms, the performance of the model can be further improved by optimizing hyperparameters. By setting the hyperparameter search space of the Logistic regression model and searching using the Bayesian optimization method, the global optimal hyperparameter combination can be obtained, thereby obtaining an optimized stacked ensemble learning model. Hyperparameters are parameters set before model training and have an important impact on the performance of the model. For the Logistic regression model, the following hyperparameters need to be set: Regularization strength parameter (λ1 and λ2): Controls the degree of influence of the L1 and L2 regularization terms, usually in the range of [0, 1]. Learning rate: Controls the step size of weight updates in the gradient descent algorithm, usually in the range of [0.0001, 0.1]. Number of iterations: Controls the number of iterations of the gradient descent algorithm, usually in the range of [100, 1000]. Batch size: Controls the number of samples used in each iteration, usually in the range of [32, 256]. By setting the value range of hyperparameters, a hyperparameter search space is constructed to lay the foundation for subsequent hyperparameter optimization. Bayesian optimization is an efficient hyperparameter optimization method. It approximates the objective function (such as the cross entropy loss function) by constructing a Gaussian process surrogate model, and searches in the hyperparameter search space to obtain the global optimal hyperparameter combination. The specific steps are as follows: Initialize the hyperparameter search space and define the value range of each hyperparameter. Randomly select a set of initial hyperparameter combinations, and use these hyperparameter combinations to train the Logistic regression model and calculate the corresponding cross entropy loss function value. Construct a Gaussian process surrogate model, use the evaluated hyperparameter combinations and the corresponding loss function values as training data, and fit the surrogate model. Based on the Gaussian process surrogate model, calculate the expected improvement (EI) of each unevaluated hyperparameter combination, and select the hyperparameter combination with the largest EI as the next evaluation point. Use the selected hyperparameter combination to train the Logistic regression model, calculate the corresponding cross entropy loss function value, and add it to the evaluated hyperparameter combination set. Repeat until the preset number of evaluations is reached or a certain convergence condition is met.
[0035] The hyperparameter combination with the smallest cross entropy loss function value is selected from the evaluated hyperparameter combinations as the global optimal hyperparameter combination. Through the Bayesian optimization method, the hyperparameter search space can be effectively explored within a relatively small number of evaluations to obtain the global optimal hyperparameter combination, avoiding the high computational cost of exhaustive search. The meta-model training set, the constructed loss function containing L1 and L2 regularization, and the obtained global optimal hyperparameter combination are used as input to train the Logistic Regression model by minimizing the loss function. The specific steps are as follows: Input the feature matrix and label vector of the meta-model training set into the Logistic Regression model. Initialize the model with the obtained global optimal hyperparameter combination, including regularization strength parameter, learning rate, number of iterations, and batch size. Use the gradient descent algorithm to iteratively update the weight parameters of the model, with the goal of minimizing the constructed loss function containing L1 and L2 regularization. In each iteration, according to the current hyperparameter settings, the loss function value of the model on the training set is calculated, and the weight parameters are updated according to the gradient. Repeat the iterative process until the preset number of iterations is reached or the loss function converges to a certain threshold. The Logistic regression model trained based on the global optimal hyperparameter combination is obtained as the optimized stacked ensemble learning model. The Logistic regression model trained based on the global optimal hyperparameter combination is used as the optimized stacked ensemble learning model to predict financial risks for new input samples.
[0036] Furthermore, the hyperparameters include the L1 regularization coefficient, the L2 regularization coefficient, and the learning rate. The L1 regularization coefficient controls the weight of the L1 regularization term in the loss function and determines the degree of sparsification of the model weights. Through methods such as cross-validation, the optimal λ1 value can be searched and selected to balance the model's fitting ability and feature selection ability. The L2 regularization coefficient controls the weight of the L2 regularization term in the loss function and determines the degree of contraction of the model weights. When λ2>0, the L2 regularization term will cause the elements of the weight vector to approach 0, achieving the effect of parameter contraction. The larger the λ2, the closer the elements of the weight vector are to 0, and the smoother the model. When λ1>0, the L1 regularization term will cause some weights to become 0, achieving the effect of feature selection. The larger the λ1, the more zero elements in the weight vector, and the sparser the model. The learning rate controls the step size of the weight update in the gradient descent algorithm and determines the optimization speed and convergence of the model. Through the learning rate decay strategy, the learning rate can be dynamically adjusted during the training process. A larger learning rate is used in the early stage to accelerate convergence, and a smaller learning rate is used for fine-tuning in the later stage.
[0037] Compared with the prior art, the advantages of this application are:
[0038] By introducing the LSTM model with attention mechanism and using the attention mechanism layer to adjust the weights of features at different time steps, we can adaptively focus on the time series features that are more critical to financial risk prediction and suppress the influence of redundant or noise features, thereby improving the effectiveness of time series feature extraction and enhancing feature representation capabilities.
[0039] The time series features are decomposed at multiscale by combining wavelet packet decomposition and logarithmic energy entropy. By extracting local features at different scales, the characteristic information of the time series at different frequencies and time scales can be captured, the multiscale characteristics of the time series can be comprehensively characterized, the feature representation can be enriched, and more effective feature input can be provided for subsequent risk prediction.
[0040] Combining multi-scale time series features with other risk features in financial data and performing feature selection and weighting through the information gain method and the Relief algorithm can optimize the feature subset, highlight the role of key risk features, reduce the interference of redundant features, improve feature quality, and thus enhance the accuracy of financial risk prediction.
[0041] By adopting the stacking ensemble learning method and combining the prediction results of multiple basic models through training meta-models, we can make full use of the complementarity and diversity of different basic models, balance the bias and variance, improve the generalization ability and robustness of the model, and make the financial risk prediction results more reliable and stable.
[0042] Introducing L1 and L2 regularization during the meta-model training process, achieving feature selection through L1 regularization and parameter shrinkage through L2 regularization can effectively prevent model overfitting and improve the generalization performance of the model. At the same time, the Bayesian optimization method is used to search for the optimal hyperparameter combination, which can automatically adjust the model hyperparameters to obtain better model performance and reduce the workload of manual parameter adjustment.
[0043] Through the concept drift detection mechanism, changes in the distribution of financial data are monitored in real time. When significant changes in data distribution are detected, model adaptive adjustment is triggered. By fine-tuning and incremental learning the basic model and meta-model of the stacked ensemble learning model, the model parameters are dynamically updated, so that the model can adapt to changes in data distribution, maintain high prediction performance, and improve the model's adaptability and practical application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 is an exemplary flow chart of a financial risk intelligent analysis method based on big data according to some embodiments of this specification;
[0045] Figure 2 is an exemplary flow chart of obtaining a multi-scale representation of time series features according to some embodiments of this specification;
[0046] Figure 3 is an exemplary flow chart for obtaining the final prediction result of the basic model according to some embodiments of this specification;
[0047] Figure 4 This is an exemplary flowchart for obtaining initial financial risk prediction results according to some embodiments of this specification. DETAILED DESCRIPTION
[0048] The method and system provided in the embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0049] Figure 1 The present invention is an exemplary flow chart of a financial risk intelligent analysis method based on big data according to some embodiments of the present specification, comprising: obtaining financial data and preprocessing the obtained financial data; inputting the preprocessed financial data into an LSTM model based on an attention mechanism, adjusting the weights of features at different time steps through the attention mechanism layer, and obtaining time series features; performing wavelet transform processing on the obtained time series features, and obtaining multi-scale time series features by performing multi-scale decomposition on the time series features; combining the obtained multi-scale time series features with other risk features in the financial data as input to a stacked ensemble learning model; adopting a stacked ensemble learning method to perform a multi-scale time series analysis on the obtained time series features; and obtaining a multi-scale time series feature. acking combines the prediction results of multiple basic models, combines the weights by training a meta-model, and obtains the output of the stacked ensemble learning model as the initial financial risk prediction result; wherein, other risk characteristics in the financial data include at least one of user attribute characteristics, macroeconomic characteristics, market industry characteristics and social network characteristics; based on the acquired financial data and the initial financial risk prediction results, the change of data distribution is detected through the concept drift detection mechanism; according to the detected data distribution changes, the parameters of the stacked ensemble learning model are adjusted to obtain the adjusted stacked ensemble learning model; and the adjusted stacked ensemble learning model is used for risk analysis.
[0050] Obtain financial data and pre-process the obtained financial data. User attribute data: Obtain attribute information of 100,000 users from the bank database, including age, gender, education level, occupation, income level, credit score, etc. Macroeconomic data: Obtain macroeconomic indicators of the past 10 years from the National Bureau of Statistics, including GDP growth rate, inflation rate, unemployment rate, loan base rate, etc., totaling 2,000 records. Market industry data: Obtain market data of 50 industries from industry associations and research institutions, including industry scale, growth rate, competition pattern, risk factors, etc., totaling 500 records. Social network data: Obtain social network data of 50,000 users from social platforms through crawler technology, including users' attention relationships, interactive behaviors, emotional tendencies, etc. Processing missing values: For user attribute data, fill missing values of age with the median of 35 years old, and fill missing values of income level with the average of 5,000 yuan / month. Processing outliers: For macroeconomic data, records with GDP growth rates exceeding 20% or below -10% are considered outliers and deleted, and a total of 5 records are deleted. Handling inconsistencies: For market industry data, the industry names "e-commerce" and "online retail" were unified into "e-commerce", and a total of 20 records were modified. For high-dimensional social network data, the principal component analysis (PCA) method was used for dimensionality reduction, and the original 50 features were reduced to 10 principal components, retaining 95% of the information. For the comprehensive data set, 10,000 samples were randomly sampled as the training set of the model, and the remaining samples were used as the test set.
[0051] The preprocessed financial data includes 100 users, each user has 50 time steps, and each time step contains 20 features. Construct an LSTM model based on the attention mechanism: define the LSTM layer, set the hidden state dimension to 64, and the input data shape to (50, 20), representing 50 time steps and 20 features per time step. Define the attention mechanism layer and set the query vector dimension to 64, which is consistent with the LSTM hidden state dimension. Input the financial data with the shape of (100, 50, 20) into the LSTM layer to obtain a hidden state sequence with the shape of (100, 50, 64), representing the hidden state of each user in 50 time steps. Calculate the correlation between the query vector and the hidden state sequence to obtain an attention weight matrix with the shape of (100, 50). Normalize the attention weight matrix so that the sum of the attention weights of each user is 1. Perform a weighted combination of the normalized attention weights and the hidden state sequence to obtain a time series feature representation with the shape of (100, 64). The attention weight matrix of a user is as follows: [0.1, 0.05, 0.2, 0.15, 0.3, ..., 0.02, 0.08]. The normalized attention weight matrix is as follows: [0.08, 0.04, 0.16, 0.12, 0.24, ..., 0.02, 0.06]. The normalized attention weights are weighted combined with the corresponding hidden states to obtain the time series feature representation of the user. The time series feature representations of all users are combined into a matrix of shape (100, 64) as the input feature of the subsequent model.
[0052] Figure 2This is an exemplary flow chart for obtaining a multi-scale representation of time series features according to some embodiments of this specification, and the obtained time series features are a vector of length 64. Select the Coiflets wavelet basis function and set the number of layers of wavelet packet decomposition to 3. Perform wavelet packet decomposition on the time series features. In each layer of decomposition, decompose the feature vector into two sub-bands of low frequency and high frequency, and recursively decompose until the third layer is reached. A wavelet packet coefficient tree with a depth of 3 is obtained, with a total of 2^3=8 leaf nodes, and each node corresponds to a sub-band. Set the parameters of the node coefficient evaluation function: w_1=0.4, w_2=0.3, w_3=0.3, p=2, α=0.5, β=1. For each node, calculate the absolute value of the wavelet packet coefficient of the corresponding sub-band, and apply the node coefficient evaluation function f(x) for nonlinear transformation. Calculate the logarithmic energy entropy of each node as the evaluation index value of the node. For the first node of the first layer (low-frequency subband), its wavelet packet coefficient is [0.8, -0.5, 0.3, -0.2], then: f(C_1) = 0.4*(0.8^2+0.5^2+0.3^2+0.2^2)+0.3*(exp(0.50.8)+exp(0.50.5)+exp(0.50.3)+exp(0.50.2))+0.3*(log(1+0.8)+log(1+0.5)+log(1+0.3)+log(1+0.2)) = 1.92, logarithmic energy entropy E_1 = -((1.92 / ∑f(C_i))*log(1.92 / ∑f(C_i))) = 0.35. According to the logarithmic energy entropy of each node, the node path with the largest evaluation index value is selected as the optimal wavelet packet basis. The node path corresponding to the optimal wavelet packet basis is: first layer low frequency subband -> second layer low frequency subband -> third layer high frequency subband. According to the optimal wavelet packet basis, the subband coefficients corresponding to the nodes on the optimal path are extracted. In this example, the coefficients of the first layer low frequency subband, the second layer low frequency subband and the third layer high frequency subband are extracted, which represent the information quantum bands of the time series characteristics at different scales. For the coefficients of each information quantum band, the mean and variance are calculated as statistical features. The mean of the first layer low frequency subband is 0.6 and the variance is 0.1; the mean of the second layer low frequency subband is 0.4 and the variance is 0.05; the mean of the third layer high frequency subband is 0.2 and the variance is 0.02. The statistical features at different scales are spliced in sequence to form a multi-scale time series feature vector. In this example, the multi-scale time series feature vector is [0.6, 0.1, 0.4, 0.05, 0.2, 0.02], with a length of 6.
[0053] Figure 3This is an exemplary flow chart for obtaining the final prediction result of the basic model according to some embodiments of this specification. The dimension of the multi-scale time series feature vector obtained in step S3 is 6, and other risk features in financial data include 10 features such as user age, credit score, and income level. The multi-scale time series feature vector is combined with other risk features to form a 16-dimensional risk feature set. The dimension of the risk feature set is 6+10=16. The information gain method is used to select the risk feature set. The information gain of each feature on the target variable is calculated, and the features are sorted from high to low according to the information gain. The information gain of the sorted features is: [0.8, 0.7, 0.6, 0.55, 0.5, 0.45, 0.4, 0.35, 0.3, 0.25, 0.2, 0.15, 0.1, 0.08, 0.05, 0.02]. Select the features with information gain greater than or equal to 0.5 to obtain an optimized feature subset containing 5 features. The Relief algorithm is used to weight the optimized feature subset.
[0054] Calculate the correlation between each feature and the target variable to obtain the feature weight. The feature weight obtained by the Relief algorithm is: [0.3, 0.25, 0.2, 0.15, 0.1]. Multiply the feature weight with the corresponding eigenvalue to obtain the weighted feature vector. Select decision tree and support vector machine as the basic model. Take the weighted feature vector as input and train multiple decision tree and support vector machine instances. Five decision trees and three support vector machines were trained. Predict the test samples to obtain the prediction probability of each basic model. The prediction probability of the decision tree is: [0.8, 0.7, 0.6, 0.75, 0.65], and the prediction probability of the support vector machine is: [0.85, 0.7, 0.75]. Calibrate the prediction probability. Use the Platt Scaling method to calibrate the prediction probability of the support vector machine. Use the Isotonic Regression method to calibrate the prediction probability of the decision tree. The prediction probability of the calibrated decision tree is: [0.82, 0.73, 0.62, 0.78, 0.67], and the prediction probability of the calibrated support vector machine is: [0.88, 0.72, 0.79]. The calibrated prediction probability is used as the final prediction result of the basic model. The final prediction result of the decision tree is: [0.82, 0.73, 0.62, 0.78, 0.67], and the final prediction result of the support vector machine is: [0.88, 0.72, 0.79].
[0055] Figure 4This is an exemplary flow chart for obtaining initial financial risk prediction results according to some embodiments of this specification, to obtain initial financial risk prediction results: the dimension of multi-scale time series features obtained by wavelet packet decomposition and logarithmic energy entropy is 10, the dimension of other risk features in financial data is 20, and the dimension of the risk feature set after combination is 30. The information gain method is used to select features from the risk feature set, and features with information gain greater than 0.1 are selected to obtain a feature subset containing 15 features. The Relief algorithm is used to weight the feature subset to obtain a weighted feature vector, and the weights of the first 5 features are 0.3, 0.25, 0.2, 0.15, and 0.1, respectively. Decision tree and support vector machine are selected as basic models, and the weighted feature vector is used as input to train 10 decision tree instances and 5 support vector machine instances. The weighted feature vector is predicted to obtain the predicted probability vector of each basic model. The predicted probability vector of the decision tree is [0.8, 0.7, 0.6, 0.75, 0.65, 0.55, 0.7, 0.8, 0.6, 0.7], and the predicted probability vector of the support vector machine is [0.85, 0.7, 0.75, 0.8, 0.7]. The Isotonic Regression method is used to calibrate the predicted probability vector, and the calibrated probability vector is used as the final prediction result of the basic model. The calibrated probability vector of the decision tree is [0.82, 0.72, 0.62, 0.77, 0.67, 0.57, 0.72, 0.82, 0.62, 0.72], and the calibrated probability vector of the support vector machine is [0.87, 0.72, 0.77, 0.82, 0.72]. The final prediction results of each basic model are used as the input features of the meta-model to construct the meta-model training set, which has a total of 15 features.
[0056] The Logistic regression model is used as the meta-model, and a cross entropy loss function with L1 and L2 regularization is constructed. The L1 regularization coefficient is set to 0.01, and the L2 regularization coefficient is set to 0.1. The hyperparameter search space of the Logistic regression model is set, and the learning rate range is [0.001, 0.01, 0.1], the L1 regularization coefficient range is [0.001, 0.01, 0.1], and the L2 regularization coefficient range is [0.01, 0.1, 1]. The Bayesian optimization method is used to search for the optimal hyperparameter combination, and the learning rate is 0.01, the L1 regularization coefficient is 0.01, and the L2 regularization coefficient is 0.1. The meta-model training set, the loss function, and the optimal hyperparameter combination are used as input, and the Logistic regression model is trained by the gradient descent algorithm to obtain the optimized stacked ensemble learning model. The trained stacked ensemble learning model is used to predict the weighted feature vector to obtain the initial financial risk prediction result vector, which is [0.85, 0.92, 0.78, 0.88, 0.8].
[0057] Calculate the Wasserstein distance between the current batch and the historical batch data, and divide the historical data into multiple batches, each containing 1000 samples. There are 10 historical batches, numbered B1, B2, ..., B10. Use the trained stacked ensemble learning model to predict the data of each batch. Get the initial risk prediction results for each batch, which are default probability values ranging from 0 to 1. Calculate the Wasserstein distance between the current batch (such as B10) and the historical batch (such as B1 to B9) data. The Wasserstein distance is used to measure the difference between two probability distributions. The larger the distance, the greater the distribution difference. The calculated Wasserstein distances are as follows: the distance between B10 and B9: 0.05, the distance between B10 and B8: 0.08, the distance between B10 and B7: 0.12, the distance between B10 and B6: 0.15, the distance between B10 and B5: 0.20, the distance between B10 and B4: 0.22, the distance between B10 and B3: 0.25, the distance between B10 and B2: 0.28, and the distance between B10 and B1: 0.30. The threshold of the Wasserstein distance is set to 0.2, which means that when the distance exceeds 0.2, the data distribution is considered to have changed significantly. According to the calculated Wasserstein distance, it is found that the distance between B10 and B5 and the previous batches exceeds the threshold of 0.2. The concept drift alarm is triggered, indicating that the data distribution may have changed significantly. According to the triggered concept drift alarm, take corresponding measures to adapt to the change in data distribution.
[0058] The concept drift detection mechanism found that the data distribution has changed significantly. In order to adapt to the new data distribution, the stacked ensemble learning model needs to be dynamically adjusted. Get a new data batch (such as B11) containing 1000 samples. The data distribution of the new batch is different from the previous data distribution, reflecting the change in data distribution. Incremental learning and fine-tuning of basic models such as decision trees and support vector machines. Add the new batch of data to the training set and retrain the basic model. The original training set has 10,000 samples, the new batch has 1,000 samples, and the updated training set has 11,000 samples. Through incremental learning, the basic model can adapt to the new data distribution while retaining the previously learned knowledge. Use the updated basic model to predict the training set to obtain a new meta-model training set. Divide the new meta-model training set into a training set and a validation set with a ratio of 8:2. Retrain the Logistic Regression meta-model using the training set and update the model parameters. The parameters of the original meta-model are as follows: weight parameters: [0.5, 0.3, 0.2, 0.1, ...], bias parameter: 0.8. After retraining, the parameters of the meta-model are updated to: weight parameters: [0.6, 0.4, 0.3, 0.2, ...], bias parameter: 0.9. Use the validation set to evaluate the performance of the adjusted stacked ensemble learning model. Calculate the performance indicators of the model on the validation set, such as accuracy, AUC value, etc. The performance indicators of the adjusted model on the validation set are as follows: accuracy: 0.85, AUC value: 0.92. Compare with the performance indicators of the model before adjustment to evaluate the effect of model adjustment. If the performance of the adjusted model is improved, it will be used as the new stacked ensemble learning model. Use the adjusted model to predict new financial data to obtain more accurate financial risk prediction results. The adjusted model is used to predict 100 new loan applications, and the default probability prediction results are as follows: [0.15, 0.28, 0.42, 0.08, 0.31, ...]. Based on the prediction results, risk assessment and decision-making are performed on the loan applications, such as approving or rejecting the loan applications.
Claims
1. A financial risk intelligent analysis method based on big data, comprising: Acquire financial data, and pre-process the acquired financial data; The preprocessed financial data is input into the LSTM model based on the attention mechanism, and the weights of the features at different time steps are adjusted through the attention mechanism layer to obtain the time series features; The obtained time series features are processed by wavelet transform, and multi-scale time series features are obtained by multi-scale decomposition of the time series features; The obtained multi-scale time series features are combined with other risk features in the financial data as the input of the stacking ensemble learning model; the prediction results of multiple basic models are combined by using the stacking ensemble learning method stacking, and the weights are combined by training the meta-model to obtain the output of the stacking ensemble learning model as the initial financial risk prediction result; wherein the other risk features in the financial data include at least one of user attribute features, macroeconomic features, market industry features and social network features; According to the acquired financial data and the initial financial risk prediction results, the change of data distribution is detected through the concept drift detection mechanism; according to the detected data distribution change, the parameters of the stacked ensemble learning model are adjusted to obtain the adjusted stacked ensemble learning model; Risk analysis using the tuned stacked ensemble learning model; Obtain initial financial risk forecast results, including: The multi-scale time series features obtained by wavelet packet decomposition and logarithmic energy entropy are combined with other risk features in financial data to form a risk feature set; The information gain method is used to select the risk feature set and obtain the feature subset; The Relief algorithm is used to perform feature weighting on the obtained feature subset to obtain a weighted feature vector; Select a decision tree or support vector machine as the base model, use the weighted feature vector as input, and train the selected base model; Use boosting ensemble method to generate multiple trained basic model instances; Using the trained basic model instance, predict the weighted feature vector to obtain the predicted probability vector; The Isotonic Regression method is used to convert the predicted probability vector into a calibrated probability vector as the final prediction result of the basic model; Obtaining initial financial risk prediction results also includes: The final prediction results of each basic model are used as the input features of the meta-model to construct the meta-model training set; The stacking method is used to train the meta-model with the meta-model training set as input to obtain the trained stacked ensemble learning model. The trained stacked ensemble learning model is used to predict the weighted feature vector to obtain the financial risk prediction result vector as the initial financial risk prediction result.
2. The method for intelligent analysis of financial risks based on big data according to claim 1 is characterized by: The obtained time series features are processed by wavelet transform, and multi-scale time series features are obtained by multi-scale decomposition of the time series features, including: The Coiflets wavelet basis function is used to perform wavelet packet decomposition on the time series features. In each decomposition layer, the time series features are decomposed into two sub-bands, low frequency and high frequency. The decomposition is performed recursively until the preset number of decomposition layers is reached to obtain the wavelet packet coefficient tree. According to the wavelet packet coefficient tree, the logarithmic energy entropy of each node is calculated as the evaluation index value of each node; According to the evaluation index value of each node, the optimal wavelet packet basis is selected; wherein the optimal wavelet packet basis represents the node path with the largest evaluation index value from the root node to the leaf node of the wavelet packet coefficient tree; According to the selected optimal wavelet packet basis, the subband coefficients corresponding to the nodes on the optimal wavelet packet basis path in the wavelet packet coefficient tree are extracted as the information quantum bands of the time series characteristics at different scales; For the coefficients of each information quantum band, the statistical features are calculated as the local feature vectors at the corresponding scale; wherein the statistical features include the mean and variance; The local feature vectors at different scales are sequentially concatenated into a multi-scale time series feature vector as a multi-scale representation of the time series features.
3. The financial risk intelligent analysis method based on big data according to claim 2 is characterized by: Calculate the logarithmic energy entropy of each node using the following formula: Among them, C i is the coefficient of the i-th node in the wavelet packet coefficient tree, f(x) is the evaluation function of the node coefficient, ∑f(C i ) is the sum of the evaluation function values of all nodes, and E is the logarithmic energy entropy.
4. The method for intelligent analysis of financial risks based on big data according to claim 3 is characterized by: The evaluation function f(x) of the node coefficient takes the form of a combination function, specifically: Among them, w1, w2, w3 are the combined weights of power function, exponential function and logarithmic function, which are used to control the proportion of different nonlinear transformations in the combined function; p is the power exponent of the power function, which is used to control the degree of power transformation of the node coefficient; α is the scale parameter of the exponential function, which is used to control the degree of exponential transformation of the node coefficient; β is the scale parameter of the logarithmic function, which is used to control the degree of logarithmic transformation of the node coefficient; |C i | represents the absolute value of the coefficient of the i-th node.
5. The financial risk intelligent analysis method based on big data according to claim 1 is characterized by: The trained stacked ensemble learning model is obtained, including: The Logistic regression model is used as the meta-model, and the loss function of the meta-model is the cross entropy loss function; Take the meta-model training set as input and train the Logistic Regression model by minimizing the cross entropy loss function; The trained Logistic regression model is used as the trained stacked ensemble learning model.
6. The method for intelligent analysis of financial risks based on big data according to claim 5 is characterized by: The Logistic Regression model is trained by minimizing the cross entropy loss function, including: Set L1 regularization term and L2 regularization term in the cross entropy loss function to construct a loss function containing L1 and L2 regularization; among them, L1 regularization term is used for feature selection, and L2 regularization term is used for parameter shrinkage; The meta-model training set and the constructed loss function with L1 and L2 regularization are used as input, and the Logistic Regression model is trained using the gradient descent algorithm by minimizing the constructed loss function. The trained Logistic Regression model is obtained as a stacked ensemble learning model with L1 and L2 regularization.
7. The method for intelligent analysis of financial risks based on big data according to claim 6 is characterized by: The Logistic Regression model is trained by minimizing the cross entropy loss function, which also includes: Set the hyperparameter search space for the Logistic regression model; The Bayesian optimization method is used to construct a Gaussian process proxy model to search in the hyperparameter search space to obtain the global optimal hyperparameter combination. Take the meta-model training set, the constructed loss function including L1 and L2 regularization, and the globally optimal hyperparameter combination as input, and train the Logistic regression model by minimizing the loss function; The Logistic regression model trained based on the global optimal hyperparameter combination is obtained as the optimized stacked ensemble learning model.
8. The method for intelligent analysis of financial risks based on big data according to claim 7 is characterized by: Hyperparameters include L1 regularization coefficient, L2 regularization coefficient, and learning rate.
Citation Information
Patent Citations
Financial risk intelligent analysis method based on big data
CN117994026A
A multivariable time sequence prediction method based on adaptive noise reduction and integrated LSTM
CN109919364A
Risk control method and device based on biased sample and electronic equipment
CN111160733A