Enterprise risk early warning method, device and equipment based on XGBoost algorithm and storage medium

Through the enterprise risk warning method based on the XGBoost algorithm, the problems of high computational overhead, overfitting risks and feature interactions in the existing technology are solved, and an efficient enterprise risk prediction model with strong generalization capabilities is built, achieving more accurate risk prediction and business decision-making.

CN119831332APending Publication Date: 2025-04-15SUZHOU ENTERPRISE CREDIT SERVICE CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411880389.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

The existing technology has problems such as large calculation overhead, overfitting risks, and neglect of feature interactions in enterprise risk warnings, and deep learning methods lack interpretability when processing structured data.

Method used

An enterprise risk warning method based on XGBoost algorithm is adopted to build an efficient enterprise risk prediction model with strong generalization capabilities through technologies such as feature extraction, feature encoding, model training, hyperparameter optimization and cross-validation.

Benefits of technology

Improves the accuracy and stability of the model, reduces computational complexity, and helps decision makers make more accurate risk predictions and business decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119831332A_ABST
    Figure CN119831332A_ABST
Patent Text Reader

Abstract

The invention discloses an enterprise risk early warning method and device based on an XGBoost algorithm, equipment and a storage medium, and the method comprises the steps: collecting enterprise index data, and carrying out the preprocessing of the enterprise index data; performing feature extraction and feature coding on the enterprise index data based on a plurality of dimensions, and dividing the enterprise index data into a training set and a test set; adopting the training set to train an enterprise risk prediction model based on an XGBoost algorithm; performing performance evaluation on the trained enterprise risk prediction model by adopting the test set; performing model evaluation on the trained enterprise risk prediction model by using cross validation; in the deployment stage, enterprise index data corresponding to the most important features are collected and input into the trained enterprise risk prediction model, and early warning is carried out on enterprise risks. According to the method, the XGBoost is used for performing feature screening in the enterprise risk model, so that the accuracy and the stability of the model can be improved, and the calculation complexity can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence technology, and specifically relates to an enterprise risk early warning method, device, equipment and storage medium based on an XGBoost algorithm. Background Art

[0002] In the process of business operation, the data and indicators involved are very large, usually including multiple dimensions, including basic information, management level, operating conditions, financial information, credit information and other dimensions of data, thousands of indicators, mainly including industrial and commercial, taxation, social security, provident fund, water, electricity, product quality inspection, customs import and export, financial institutions' credit records and other data. These indicators are sometimes interrelated and may have different forms of expression (such as numerical type, categorical type). How to select the most relevant and influential key indicators for enterprise development from these multi-dimensional and multi-sample data is a core issue in data analysis.

[0003] Feature selection is an important step in improving model performance in machine learning, especially in scenarios with extremely high data dimensions. Feature selection can reduce the complexity of the model, improve its generalization ability, and reduce computing costs. In enterprise analysis, indicator screening not only helps improve the efficiency of data processing, but also allows decision makers to focus on the most influential indicators, thereby improving business insights.

[0004] At present, there are many feature selection methods, the most common of which include traditional statistical methods (including filtering, packaging, embedding, etc.), model-based feature selection methods, and deep learning methods. The models involved in deep learning methods require a large amount of training data and computing resources, and the interpretability during the training process is poor, which limits its practical applications. Deep learning may be suitable for scenarios that require pattern recognition through large amounts of data, but for structured data commonly found in enterprises, the advantages of deep learning are not obvious, and there is a risk of overfitting.

[0005] The above methods have problems such as excessive manual intervention, high computational overhead, overfitting, lack of interpretability, and unsuitability for handling feature interactions. Summary of the invention

[0006] In order to solve the above technical problems, the present invention proposes an enterprise risk early warning method, device, equipment and storage medium based on XGBoost algorithm.

[0007] In order to achieve the above object, the technical solution of the present invention is as follows:

[0008] In a first aspect, the present invention discloses an enterprise risk early warning method based on an XGBoost algorithm, comprising:

[0009] Step S1: Collect enterprise indicator data and pre-process the enterprise indicator data;

[0010] Step S2: Extract and encode the enterprise indicator data based on basic information, financial data, operating data, credit history, and several dimensions of the external environment, and divide them into training sets and test sets;

[0011] Step S3: Using the training set to train the enterprise risk prediction model based on the XGBoost algorithm;

[0012] During the training process, the contribution of each feature is evaluated, the importance of each feature is calculated, and the features are sorted according to their importance to identify the most important features;

[0013] Use GridSearchCV or RandomizedSearchCV to optimize hyperparameters, then adjust and select several hyperparameter combinations for iteration, and finally use the optimal hyperparameter combination to train the enterprise risk prediction model;

[0014] Step S4: Use the test set to evaluate the performance of the trained enterprise risk prediction model;

[0015] Step S5: Use cross validation to evaluate the trained enterprise risk prediction model;

[0016] Step S6: During the deployment phase, enterprise indicator data corresponding to the most important features are collected and input into the trained enterprise risk prediction model to provide early warning for enterprise risks.

[0017] Based on the above technical solution, the following improvements can be made:

[0018] As a preferred solution, step S1 includes:

[0019] Step S1.1: Collect enterprise indicator data;

[0020] Step S1.2: Fill in the missing values ​​in the collected enterprise indicator data;

[0021] Step S1.3: Standardize and normalize the enterprise indicator data.

[0022] As a preferred solution, in step S3, during the training process, the contribution of each feature is evaluated, the importance of each feature is calculated, and the features are sorted according to their importance, the most important features are identified, and the most important features are visualized.

[0023] As a preferred solution, the hyperparameters include one or more of the following: learning rate, number of trees, depth of tree, subsampling ratio, regularization parameter, ratio of features randomly selected for each tree, and maximum number of leaf nodes.

[0024] In a second aspect, the present invention further discloses an enterprise risk early warning device based on the XGBoost algorithm, comprising:

[0025] The collection module is used to collect enterprise indicator data and pre-process the enterprise indicator data;

[0026] The processing module is used to extract and encode the features of enterprise indicator data based on basic information, financial data, operating data, credit history, and several dimensions in the external environment, and divide them into training sets and test sets;

[0027] A training module is used to train the enterprise risk prediction model based on the XGBoost algorithm using a training set;

[0028] During the training process, the contribution of each feature is evaluated, the importance of each feature is calculated, and the features are sorted according to their importance to identify the most important features;

[0029] Use GridSearchCV or RandomizedSearchCV to optimize hyperparameters, then adjust and select several hyperparameter combinations for iteration, and finally use the optimal hyperparameter combination to train the enterprise risk prediction model;

[0030] The testing module is used to evaluate the performance of the trained enterprise risk prediction model using a test set;

[0031] An evaluation module is used to evaluate the trained enterprise risk prediction model using cross-validation;

[0032] The deployment module is used to collect enterprise indicator data corresponding to the most important characteristics during the deployment phase, and input it into the trained enterprise risk prediction model to issue early warnings for enterprise risks.

[0033] As a preferred solution, the acquisition module includes:

[0034] A collection unit, used to collect enterprise indicator data;

[0035] A filling unit is used to fill in missing values ​​in the collected enterprise indicator data;

[0036] The processing unit is used to perform data standardization and normalization on enterprise indicator data.

[0037] As a preferred solution, during the training process, the training module evaluates the contribution of each feature, calculates the importance of each feature, sorts the features according to their importance, identifies the most important features, and visualizes the most important features.

[0038] As a preferred solution, the hyperparameters include one or more of the following: learning rate, number of trees, depth of tree, subsampling ratio, regularization parameter, ratio of features randomly selected for each tree, and maximum number of leaf nodes.

[0039] In a third aspect, the present invention further discloses a computing device, comprising:

[0040] one or more processors;

[0041] Memory;

[0042] And one or more programs, wherein the one or more programs are stored in a memory and configured to be executed by one or more processors, and the one or more programs include instructions of any of the above-mentioned enterprise risk early warning methods based on the XGBoost algorithm.

[0043] In a fourth aspect, the present invention further discloses a storage medium storing one or more computer-readable programs, wherein the one or more programs include instructions suitable for being loaded by a memory and executing any one of the above-mentioned enterprise risk warning methods based on the XGBoost algorithm.

[0044] The present invention discloses an enterprise risk early warning method, device, equipment and storage medium based on XGBoost algorithm, which has the following beneficial effects:

[0045] First, the present invention uses XGBoost to perform feature screening in the enterprise risk model, which can not only improve the accuracy and stability of the model, but also reduce the computational complexity.

[0046] Second, through techniques such as feature selection, hyperparameter optimization, and cross-validation, an efficient enterprise risk prediction model with strong generalization capabilities is constructed to help decision makers make more accurate risk predictions and business decisions. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0048] Figure 1 A flow chart of an enterprise risk early warning method provided by an embodiment of the present invention.

[0049] Figure 2 A block diagram of an enterprise risk early warning device provided in an embodiment of the present invention.

[0050] Figure 3 A block diagram of a computing device provided for an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0053] The expression of “comprising” an element is an “open” expression, which merely means that a corresponding component or step exists, and should not be interpreted as excluding additional components or steps.

[0054] In order to achieve the purpose of the present invention, in some embodiments of the enterprise risk early warning method based on the XGBoost algorithm, as Figure 1 As shown in the figure, enterprise risk early warning methods include:

[0055] Step S101: Collect enterprise index data and pre-process the enterprise index data;

[0056] Step S102: extracting and encoding features of enterprise indicator data based on basic information, financial data, operating data, credit history, and several dimensions of the external environment, and dividing the data into a training set and a test set;

[0057] Step S103: using the training set to train the enterprise risk prediction model based on the XGBoost algorithm;

[0058] During the training process, the contribution of each feature is evaluated, the importance of each feature is calculated, and the features are sorted according to their importance, the most important features are identified, and the most important features are visualized;

[0059] Use GridSearchCV or RandomizedSearchCV to optimize hyperparameters, then adjust and select several hyperparameter combinations for iteration, and finally use the optimal hyperparameter combination to train the enterprise risk prediction model;

[0060] Step S104: using the test set to perform performance evaluation on the trained enterprise risk prediction model;

[0061] Step S105: using cross validation to perform model evaluation on the trained enterprise risk prediction model;

[0062] Step S106: During the deployment phase, enterprise indicator data corresponding to the most important features are collected and input into the trained enterprise risk prediction model to provide early warning for enterprise risks.

[0063] With the advent of the big data era, enterprises are faced with the challenge of comprehensive analysis of massive data and multiple indicators. How to select the most influential and predictive indicators from these large and often multi-dimensional enterprise indicators has become one of the core issues of enterprise decision-making. Existing feature selection methods, such as traditional filtering methods, packaging methods, deep learning methods, etc., have significant limitations when processing high-dimensional complex data. The introduction of the XGBoost algorithm provides a new solution for enterprise indicator data analysis, which can effectively solve the problems of high computational overhead, overfitting risk, and neglect of feature interaction relationships in existing technologies.

[0064] When building a corporate risk prediction model, the XGBoost algorithm can effectively identify which features are most important for corporate risk prediction by screening a large number of corporate credit indicators. The following are the six common dimensions in corporate risk models. These dimensions and indicators help to comprehensively assess the credit status, financial health, and operating risks of a company.

[0065] (1) External environment: This mainly involves analyzing various factors such as the overall development trend, credit status, profitability, and industry investment situation of the industry or region to which a company belongs. Evaluation indicators are designed from two dimensions: industry and region, and this dimension is evaluated.

[0066] (2) Basic characteristics: The basic situation is mainly used to reflect the relationship between the enterprise's organizational form, operating cycle, shareholder composition, changes in shareholders and corporate credit.

[0067] (3) Operating level. The operating level of a company reflects the stability of its operations and management and is highly correlated with its credit risk. The operating level will be constructed by using the company's tax, social security, provident fund, water and electricity, import and export data to construct analytical indicators, and conduct a comprehensive evaluation of the company's management stability, operating stability and corporate competitiveness.

[0068] (4) Financial level: The company's financial level will be determined by utilizing the company's financial data to construct financial indicators and conduct a comprehensive evaluation of the company's profitability, enterprise scale, debt repayment ability, liquidity level, turnover level, leverage level, etc.

[0069] (5) Related risks. The operating risks of an enterprise are often not independent and are easily affected by its various related relationships. The focus is on conducting a comprehensive analysis of the enterprise's related companies, including its parent company, subsidiaries, sister companies, and related natural persons, exploring the potential risks behind the related companies, and analyzing the operating, financial, credit and other risks that the company may face through the credit evaluation of the related companies.

[0070] (6) Credit history: By analyzing multiple risk factors such as the company's compliance risk, litigation risk, credit record, and risk appetite, the company's credit history can be evaluated, which can fully reflect the company's credit behavior as well as its credit willingness, risk appetite, and financing capabilities during its operations.

[0071] In the enterprise risk model, using XGBoost (Extreme Gradient Boosting) for feature screening is an efficient and practical technical solution. XGBoost is a machine learning algorithm based on gradient boosting, which is widely used in tasks such as classification and regression, especially when dealing with large-scale data and high-dimensional features. Using XGBoost to screen the features of the enterprise risk model helps to identify the most important features for risk prediction, optimize model performance, and improve prediction accuracy.

[0072] XGBoost (eXtreme Gradient Boosting) is an efficient implementation of the Gradient Boosting Tree (GBDT). It combines ensemble learning, gradient boosting methods, decision trees, feature selection and other technologies to provide efficient and accurate solutions in multiple fields (such as enterprise data analysis, financial forecasting, etc.). The key advantages of XGBoost lie in automated feature selection, model optimization, parallel computing, and the ability to handle complex nonlinear relationships.

[0073] The XGBoost algorithm is a Boosting algorithm based on decision trees. The Boosting algorithm strategy is a common algorithm in machine learning algorithms. It achieves better classification results by combining multiple weak classifiers. In order to better understand the XGBoost algorithm, the principle of the Boosting algorithm is first explained.

[0074] Boosting is a method used to improve the accuracy of weak classification algorithms by constructing multiple prediction functions and then combining them into one prediction function in a certain way. Boosting is a method to improve the accuracy of any given learning algorithm. Its idea originated from the PAC (Probably Approximately Correct) learning model proposed by Valiant. The specific description is as follows:

[0075] Given a dataset D, which contains independent variables x and dependent variables y.

[0076]

[0077] Construct K different functions and sum them up to get the overall prediction result.

[0078]

[0079] The prediction of each function is implemented by an iterative method. Each iteration uses a greedy algorithm to solve the problem, and each time the residual predicted by the model is used as the target of the new model. All functions are obtained in sequence until the model converges or the number of iterations is limited. Different algorithms use different basic algorithms. The algorithm used by GBDT is CART regression decision tree. The XGBoost algorithm can use CART regression decision tree or linear classifier.

[0080] The loss function of the XGBoost algorithm is:

[0081]

[0082] A regularization term is added to the loss function to prevent the model from overfitting.

[0083] The present invention uses XGBoost for feature screening, which can: 1) automatically select the most relevant features. XGBoost can automatically evaluate the importance of each feature through model training, thereby screening out features that have a greater impact on risk prediction; 2) improve the accuracy and robustness of the model. Through feature selection, redundant and irrelevant features are removed, the prediction accuracy of the model is improved, and overfitting is avoided; 3) reduce the time and complexity of model training. Feature screening helps to reduce the amount of calculation and improve the efficiency of model training.

[0084] In the process of screening enterprise risk model features, XGBoost (Extreme Gradient Boosting) can automatically process high-dimensional and complex feature data through its powerful algorithm framework, and screen out the features that have the greatest impact on enterprise risk prediction.

[0085] Before starting feature screening, the enterprise indicator data needs to be preprocessed first. Specifically, the above step S101 includes:

[0086] Step S101.1: Collect enterprise indicator data;

[0087] Step S101.2: performing mean filling processing on the missing values ​​in the collected enterprise indicator data, such as filling the mean, forward filling, etc.;

[0088] Step S101.3: Standardize and normalize the enterprise indicator data.

[0089] For most machine learning models, standardization (e.g. z-score standardization) and normalization (e.g. MinMaxScaler) are sometimes necessary, especially when the magnitude of features varies greatly. XGBoost is not sensitive to feature scale, but this step can help model training in some cases.

[0090] XGBoost provides a method to calculate feature importance, which can screen out the most influential features. After training the XGBoost model, different feature importance metrics are used to evaluate the contribution of the features to the model.

[0091] Feature selection is a crucial step in enterprise risk prediction models. The XGBoost algorithm can automatically select the most relevant features based on their importance.

[0092] Step S102 extracts features from enterprise indicator data based on basic information, financial data, operating data, credit history, and several dimensions of the external environment.

[0093] Basic information: basic industrial and commercial information, such as the number of shareholders, registered capital, years of establishment, registered area, etc.

[0094] Financial data: Extract features related to the financial status of the company, such as total assets, net assets, debt ratio, revenue, profit, cash flow, etc.

[0095] Operating data: extract inventory turnover rate, accounts receivable turnover rate, debt-to-asset ratio, number of social security employees, number of provident fund employees, etc.

[0096] Credit history: extract relevant data such as corporate loan records, credit records, litigation situations, etc.

[0097] External environment: development trends, financial level, competition level, litigation risks, and leverage level.

[0098] The feature encoding is as follows:

[0099] Categorical variable processing: Encode categorical data (such as industry type, enterprise size, etc.). Common encoding methods include One-Hot Encoding, Label Encoding, etc.

[0100] Time series data processing: For data containing time features (such as quarterly financial reports, annual operating data, etc.), features can be extracted using methods such as time window aggregation (such as sliding windows) and periodic adjustment.

[0101] Select target variables: The target variable of the enterprise risk prediction model is usually a binary classification problem (such as whether the enterprise defaults) or a regression problem. The target variable and the feature variable are used as input for model training.

[0102] XGBoost provides multiple ways to evaluate the importance of features. Through the trained model, XGBoost can output the contribution of each feature. Common feature importance evaluation methods include:

[0103] XGBoost's built-in feature importance evaluation mechanism can evaluate the contribution of each feature during the training process. XGBoost measures the importance of each feature through the splitting rule of the decision tree. The specific methods include:

[0104] 1) Gain-based: measures the contribution of each feature to the loss function when split in the tree model.

[0105] 2) Coverage-based: measures the extent to which samples are covered when features are split.

[0106] 3) Frequency-based: measures the frequency with which each feature is used in all trees.

[0107] The above metrics can help identify the most important features.

[0108] Common hyperparameters include:

[0109] learning_rate: determines the contribution of each tree. A lower learning rate usually improves the generalization ability of the model, but requires more trees.

[0110] n_estimators (number of trees): the number of trees, that is, the number of iterations.

[0111] max_depth (depth of the tree): controls the maximum depth of the tree. Deeper trees can capture more complex feature relationships and avoid overfitting.

[0112] Subsample: The proportion of data samples used by each tree to prevent overfitting.

[0113] colsample_bytree (proportion of features randomly selected for each tree): the proportion of features used by each tree.

[0114] Regularization parameters (lambda, alpha): Reduce overfitting through L1 (Lasso) and L2 (Ridge) regularization.

[0115] Use GridSearchCV or RandomizedSearchCV for hyperparameter optimization.

[0116] Step S104: The present invention evaluates performance on the test set.

[0117] Step S105 The present invention can further evaluate the performance of the model and ensure its generalization ability by using cross validation. Use cross_val_score (cross_val_score is a function in the scikit-learn library for K-fold cross validation) to perform cross validation and calculate performance indicators such as AUC.

[0118] The present invention can explain which features play a key role in the prediction of the model through feature importance assessment. In practical applications, data collection, feature engineering and enterprise decision-making processes can be optimized based on these results.

[0119] Step S106 is deployment. In the deployment stage, the most important features screened out will be used to build the final enterprise risk prediction model. The present invention can regularly update the model to adapt to new data changes.

[0120] The present invention has the following advantages: 1) high efficiency: XGBoost can process large-scale data and provide a built-in feature selection mechanism; 2) accuracy: through tree models and feature importance evaluation, it can effectively identify the most valuable features and improve the accuracy of the model; 3) scalability: XGBoost supports parallel computing and can process large-scale enterprise indicator data; 4) prevention of overfitting: through regularization and hyperparameter tuning, it can effectively avoid model overfitting.

[0121] In summary, XGBoost has shown unique advantages in enterprise indicator screening. It can not only handle large-scale data and high-dimensional features, but also has good computational efficiency and powerful feature selection capabilities. Compared with traditional filtering methods, packaging methods and other methods, XGBoost can automatically identify and select the most predictive features, avoiding manual intervention and interference from redundant features. In addition, XGBoost's regularization technology and decision tree integration method effectively reduce the risk of overfitting and can handle complex interactions between features. Therefore, XGBoost has obvious advantages in enterprise indicator data analysis and decision support, especially in tasks that require efficient processing of a large number of enterprise indicators.

[0122] By innovatively screening enterprise indicator data, XGBoost can help enterprises quickly discover key information in the data, thereby improving the quality and efficiency of decision-making.

[0123] In traditional XGBoost applications, feature screening usually relies on the independent evaluation and importance ranking of each feature. However, enterprise indicator data is often complex, hierarchical, and multi-dimensional, so traditional feature selection methods may not meet actual business needs.

[0124] To this end, the present invention proposes several innovative points, which not only improve the accuracy of feature selection, but also enable the XGBoost algorithm to better adapt to the diverse needs of enterprises.

[0125] 1) Automated multi-dimensional feature screening.

[0126] Innovation: The characteristics of enterprise indicator data come from multiple dimensions (such as basic information, finance, operations, etc.), and the characteristics of different dimensions may have different data types (such as numerical, categorical, time series, etc.). The traditional XGBoost feature screening method is mainly based on the ranking and evaluation of the impact of a single feature on the model, and fails to consider the cross-dimensional interactions and joint impacts between features. The present invention introduces a multi-dimensional feature screening mechanism to automatically fuse and optimize features from different dimensions, handle the complex relationships between cross-dimensional features, and comprehensively evaluate their contribution to the model output.

[0127] Feature interaction: Based on the tree structure model of XGBoost, the interactive features of data of different dimensions are automatically identified and constructed during the feature selection process. For example, new combined features are generated by combining market indicators (such as advertising expenditures and market demand) and operational data (such as production efficiency and inventory turnover) to further optimize the feature set.

[0128] Feature importance assessment: By calculating the gain value and Shapley value of the feature, it not only evaluates the importance of each individual feature to the model, but also automatically identifies the interaction between features and the potential contribution of combined features. For a manufacturing company, XGBoost can combine cross-dimensional features by combining business operations (social security, provident fund indicators, etc.) and financial data (such as gross profit margin, debt-to-asset ratio, turnover rate, etc.), thereby screening out indicators with high correlation with the risk of the enterprise and improving prediction accuracy.

[0129] 2) Targeted screening mechanism embedded in enterprise business rules.

[0130] Innovation: In business operations, many features are not directly driven by data, but are closely related to the business rules and industry standards of the enterprise. Enterprises may decide whether to consider certain financial indicators as valid features based on specific thresholds. The traditional XGBoost model only evaluates the importance of features through the data itself, and fails to directly embed industry experience and the business rules of the enterprise into the feature selection process. To this end, the present invention introduces a directional screening mechanism embedded in business rules, which combines domain knowledge and experience to filter out irrelevant or invalid features, thereby improving the efficiency and relevance of feature selection.

[0131] Business rule embedding: Before feature selection, some domain-specific rules are manually set (for example, the financial leverage ratio should not exceed a certain threshold, and the market share must be within a certain range to have a high predictive value) to automatically filter out features that do not meet business requirements.

[0132] Weighted feature screening: Combined with industry experience, weights are assigned to features to influence the model training process. For example, some features, such as net profit margin, have higher weights in the company's financial model, while some outlier features, such as operating cash flow, are given lower weights to avoid affecting model training.

[0133] 3) Dynamic feature updating mechanism based on model feedback.

[0134] Innovation: Enterprise indicator data and business environment are changing dynamically. The features selected during the XGBoost model training process may change over time, resulting in a decrease in model performance. Most existing XGBoost methods rely on one-time training and fixed feature sets, while ignoring the dynamic changes of data and the timeliness of features during enterprise operations. In order to solve this problem, the present invention proposes a dynamic feature update mechanism based on model feedback, which automatically updates the feature set and training set by regularly evaluating the model's predictive performance and data changes to ensure the accuracy and adaptability of the model in a dynamic environment.

[0135] Model feedback mechanism: Set regular checkpoints (such as monthly or quarterly) to automatically evaluate the current feature set and model performance based on the latest business data and prediction errors. If the accuracy of the model is lower than the predetermined threshold, the system will automatically update the feature set and retrain the model.

[0136] Data flow monitoring and feature update: Real-time monitoring of business data flow, combined with feedback from model prediction results, dynamically adjust feature weights or delete inefficient features. Adopt incremental learning methods to integrate new data into existing models to avoid wasting computing resources during retraining.

[0137] 4) Deep feature interaction and combination optimization.

[0138] Innovation: Enterprise indicator data is often highly nonlinear and complex, and individual features may not be able to fully express the diversity and interactivity of the data. XGBoost's tree model can mine some nonlinear feature relationships, but the optimization of high-order feature interactions and complex combinations is relatively limited. To this end, the present invention proposes the use of GridSearchCV for hyperparameter optimization.

[0139] Feature interaction layer: Design a feature interaction layer to automatically generate and evaluate the contribution of different feature combinations. When generating features, nonlinear combinations of features are performed to discover potential important features.

[0140] Specifically, the present invention performs data preprocessing, data interaction and combination.

[0141] Multi-dimensional data integration: Enterprise indicator data usually comes from multiple departments and business modules. First, data preprocessing is needed to unify the format of data from different sources, standardize numerical data, encode categorical data, and fill in missing values.

[0142] Feature interaction and combination: Based on the feature screening mechanism of XGBoost, it automatically generates and evaluates cross-dimensional feature interactions, and optimizes high-order feature combinations with deep learning technology.

[0143] The present invention performs model training and feedback mechanism.

[0144] Model training: Train the preliminary model based on the XGBoost algorithm, optimize the decision tree structure, and calculate the importance score of the features.

[0145] Dynamic feedback mechanism: The feature set is re-evaluated regularly and the training set is automatically updated based on changes in new data and model prediction errors.

[0146] The present invention has enhanced interpretability.

[0147] Feature importance evaluation: Combined with interpretability techniques such as SHAP value, output the contribution of each feature to the model prediction results.

[0148] Business rule embedding: Combine enterprise domain rules to selectively screen key features that meet enterprise strategies and business needs.

[0149] The innovation of XGBoost algorithm in screening enterprise indicators is not only reflected in the optimization of algorithm performance, but also in the proposal of multiple innovative technical solutions by combining the actual business needs of enterprises. Through methods such as automated multi-dimensional screening, embedded business rules, dynamic feature updates, and deep feature interaction optimization, enterprises can efficiently screen key indicators in complex business environments and provide more valuable information for decision-making.

[0150] It is worth noting that, based on the above embodiments, the present invention can also select adaptive adjustments based on the characteristics of the business scenario.

[0151] The characteristics and indicators required by enterprises in different business scenarios will be different. For example, in the manufacturing industry, financial indicators may fluctuate greatly in the short term, while in the retail industry, operating conditions may be a more critical predictive factor.

[0152] In the XGBoost feature selection process, the feature set is dynamically adjusted according to the specific business scenario. For example, by designing an adaptive mechanism, different features are automatically selected according to preset business rules (such as industry changes, seasonal changes, etc.) during model training. This design can automatically adjust the importance calculation of features according to real-time data changes.

[0153] A business rule engine is embedded in the XGBoost model to adjust feature weights and screening strategies based on corporate business goals and market changes.

[0154] Use time-series data and feedback mechanisms to dynamically adjust feature sets, such as increasing focus on relevant features during financial reporting season or market research cycles.

[0155] It is worth noting that, based on the above embodiments, the present invention can also combine deep integrated learning with XGBoost.

[0156] XGBoost is usually a tree-based ensemble learning algorithm that can efficiently handle nonlinear features in data sets, but it may not be as flexible as deep learning methods when dealing with complex feature interactions. In enterprise indicator data, complex feature combinations often have strong nonlinear relationships, and XGBoost may not perform well at this time.

[0157] Combine deep learning models (such as neural networks) with XGBoost to form a deep ensemble learning framework. Deep neural networks are used to model feature interactions, and then XGBoost is used to perform final screening and prediction on the optimized features.

[0158] Use neural networks to perform nonlinear combinations of features, generate high-order feature interactions, and output them to the XGBoost model for further screening. Utilize the characteristics of deep neural networks to perform multi-level nonlinear mapping of features to address the limitations of XGBoost in handling high-order interactions.

[0159] In consumer behavior analysis, neural networks are used to extract deep user behavior features (such as click patterns, purchase preferences, etc.), and then these interactive features are passed to XGBoost for final prediction and screening.

[0160] It is worth noting that, based on the above embodiments, the present invention can also strengthen learning-driven dynamic feature selection.

[0161] Traditional XGBoost usually relies on static feature importance evaluation when selecting features, but enterprise data and business needs change over time. Existing models do not consider how to flexibly adjust feature selection strategies in an environment with real-time data flow.

[0162] The reinforcement learning (RL) method is used to optimize the feature selection process. By introducing an agent to gradually learn during the training process, the feature selection strategy is dynamically adjusted. Whenever new data arrives, the reinforcement learning model will update the feature set in real time based on the model's feedback (such as prediction error, accuracy, etc.) to adapt to data changes.

[0163] When applying the reinforcement learning model to the XGBoost training process, the agent interacts with the environment and decides whether to select or remove features based on the performance feedback of the current features. The goal of reinforcement learning is to maximize long-term prediction accuracy, rather than relying solely on short-term performance improvements. This provides companies with a more accurate and adaptive feature screening solution.

[0164] In the field of financial risk control, key financial indicators are dynamically selected through reinforcement learning to respond to market changes and economic fluctuations in a timely manner, thereby improving the accuracy of the model's default predictions.

[0165] It is worth noting that, based on the above embodiments, the present invention can also combine Federated Learning with XGBoost.

[0166] In some scenarios, enterprises may face data privacy and security issues between multiple data sources (such as different departments, partners or branches), and cannot centralize all data in one place for analysis. Traditional XGBoost models need to access all data sources, which will be challenged when data privacy is restricted.

[0167] Introducing federated learning technology into XGBoost feature screening allows the model to be trained in a distributed environment. Each data source only retains local data and shares model parameters in an encrypted manner instead of original data, thereby performing joint training and feature screening without leaking data privacy.

[0168] The training process of XGBoost is designed as a federated learning framework, which supports distributed training on multiple nodes (such as different departments or partners). Each node only calculates the gain of local features and regularly updates shared model parameters. Encryption algorithms (such as homomorphic encryption) are introduced to ensure that data privacy is not leaked while optimizing the global model.

[0169] Data analysis collaboration between multiple multinational companies or business units allows companies to jointly train XGBoost models and screen out the most important business indicators worldwide without leaking sensitive information.

[0170] It is worth noting that, based on the above embodiments, the present invention can also combine incremental learning with XGBoost.

[0171] XGBoost is a batch training algorithm that usually trains each new model from scratch, but in some scenarios that require real-time updates, retraining the entire model may waste a lot of computing resources and time. Incremental Learning provides an effective solution that allows the model to be gradually updated as new data arrives without retraining the entire model.

[0172] Combining incremental learning with XGBoost, online learning and feature selection are achieved. Whenever new data arrives, the model can be dynamically updated, and features can be selected and optimized without losing previous training information. This method not only saves computing resources, but also improves the real-time performance of the model.

[0173] Use incremental learning frameworks (such as partial_fit in Scikit-learn) to implement online updates of XGBoost models. Regularly evaluate and adjust feature selection strategies, using sliding windows or other update mechanisms so that new data can have a continuous impact on the feature selection process.

[0174] In e-commerce or social media analysis, as user behavior continues to change, the incremental learning model can timely update the recommendation system, dynamically adjust product recommendation features, and improve user experience.

[0175] It is worth noting that, based on the above embodiments, the present invention can also be used as a multi-task learning framework for feature selection.

[0176] In many enterprise applications, different prediction tasks may share the same or similar feature sets. For example, tasks such as predicting sales, predicting inventory demand, and predicting customer churn may all use similar indicators. In traditional XGBoost, each task is usually processed independently, but this approach ignores the commonalities between multiple tasks.

[0177] The Multi-task Learning (MTL) framework is used to make multiple prediction tasks share certain features, thereby improving the efficiency of feature selection. Through joint optimization, XGBoost can simultaneously select shared features for multiple tasks instead of training a model for each task separately.

[0178] Based on XGBoost, a multi-task learning framework is introduced to improve the learning effect between multiple tasks by sharing the feature representation of some layers. Combined with the correlation between tasks, the model is trained through a joint loss function, so that the objectives of different tasks are optimized together.

[0179] In the retail business, a multi-task learning framework is used to simultaneously perform inventory forecasting, sales forecasting, and market demand forecasting. The model is optimized by sharing features to improve the forecasting accuracy of different tasks.

[0180] For the design or variation of XGBoost when screening enterprise indicators, more suitable optimization strategies can be proposed based on different application scenarios and needs by introducing deep learning, reinforcement learning, federated learning, incremental learning and other technologies, or by combining the business characteristics of the enterprise and the dynamic changes of data. These innovative design solutions can not only improve the performance of the XGBoost model, but also expand its application scope, improve the adaptability and real-time performance of the model, and provide enterprises with more efficient and accurate decision support.

[0181] In other embodiments, Figure 2 As shown, the present invention also discloses an enterprise risk early warning device based on the XGBoost algorithm, comprising:

[0182] The collection module 201 is used to collect enterprise index data and pre-process the enterprise index data;

[0183] Processing module 202, used to extract and encode the enterprise indicator data based on basic information, financial data, operating data, credit history, and several dimensions of the external environment, and divide it into a training set and a test set;

[0184] A training module 203 is used to train the enterprise risk prediction model based on the XGBoost algorithm using a training set;

[0185] During the training process, the contribution of each feature is evaluated, the importance of each feature is calculated, and the features are sorted according to their importance to identify the most important features;

[0186] Use GridSearchCV or RandomizedSearchCV to optimize hyperparameters, then adjust and select several hyperparameter combinations for iteration, and finally use the optimal hyperparameter combination to train the enterprise risk prediction model;

[0187] A testing module 204 is used to evaluate the performance of the trained enterprise risk prediction model using a test set;

[0188] An evaluation module 205 is used to perform model evaluation on the trained enterprise risk prediction model using cross validation;

[0189] The deployment module 206 is used to collect enterprise indicator data corresponding to the most important characteristics during the deployment phase, and input the data into the trained enterprise risk prediction model to issue early warnings for enterprise risks.

[0190] Further, the acquisition module 201 includes:

[0191] A collection unit, used to collect enterprise indicator data;

[0192] A filling unit is used to fill in missing values ​​in the collected enterprise indicator data;

[0193] The processing unit is used to perform data standardization and normalization on enterprise indicator data.

[0194] Furthermore, during the training process, the training module 203 evaluates the contribution of each feature, calculates the importance of each feature, sorts the features according to their importance, identifies the most important features, and visualizes the most important features.

[0195] Furthermore, the hyperparameters include one or more of the following: learning rate, number of trees, depth of trees, subsampling ratio, regularization parameter, ratio of features randomly selected for each tree, and maximum number of leaf nodes.

[0196] Furthermore, it should be noted that the enterprise risk warning device based on the XGBoost algorithm provided in the above embodiment only uses the division of the above-mentioned functional modules as an example when performing enterprise risk warning. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the enterprise risk warning device based on the XGBoost algorithm is divided into different functional modules to complete all or part of the functions described above.

[0197] In addition, the enterprise risk warning device based on the XGBoost algorithm provided in the above embodiment and the embodiment of the enterprise risk warning method based on the XGBoost algorithm belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0198] In addition, in some other embodiments, Figure 3 As shown, the present invention also discloses a computing device, including:

[0199] One or more processors 301;

[0200] Memory 302;

[0201] And one or more programs, wherein the one or more programs are stored in the memory 302 and are configured to be executed by one or more processors 301, and the one or more programs include instructions of the enterprise risk early warning method based on the XGBoost algorithm disclosed in the above embodiment.

[0202] The processor 301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 301 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 301 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 301 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0203] The memory 302 may include one or more computer-readable storage media, which may be non-transitory. The memory 302 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 302 is used to store at least one instruction, which is used to be executed by the processor 301 to implement the enterprise risk warning method based on the XGBoost algorithm provided in the method embodiment of the present invention.

[0204] In addition, the computing device may also optionally include: a peripheral device interface and at least one peripheral device. The processor 301, the memory 302 and the peripheral device interface may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface via a bus, a signal line or a circuit board. Schematically, the peripheral devices include but are not limited to: a radio frequency circuit, a touch display screen, an audio circuit, and a power supply.

[0205] Of course, the computing device may also include fewer or more components, which is not limited in this embodiment.

[0206] In addition, in some other embodiments, the present invention also discloses a storage medium, which stores one or more computer-readable programs, and the one or more programs include instructions, and the instructions are suitable for being loaded by a memory and executing the enterprise risk warning method based on the XGBoost algorithm disclosed in the above embodiment.

[0207] The present invention discloses an enterprise risk early warning method, device, equipment and storage medium based on XGBoost algorithm, which has the following beneficial effects:

[0208] First, the present invention uses XGBoost to perform feature screening in the enterprise risk model, which can not only improve the accuracy and stability of the model, but also reduce the computational complexity.

[0209] Second, through techniques such as feature selection, hyperparameter optimization, and cross-validation, an efficient enterprise risk prediction model with strong generalization capabilities is constructed to help decision makers make more accurate risk predictions and business decisions.

[0210] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for illustrating the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which shall fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. An enterprise risk early warning method based on XGBoost algorithm, characterized in that: include: Step S1: Collect enterprise indicator data and pre-process the enterprise indicator data; Step S2: Extract and encode the enterprise indicator data based on basic information, financial data, operating data, credit history, and several dimensions of the external environment, and divide them into training sets and test sets; Step S3: Using the training set to train the enterprise risk prediction model based on the XGBoost algorithm; During the training process, the contribution of each feature is evaluated, the importance of each feature is calculated, and the features are sorted according to their importance to identify the most important features; Use GridSearchCV or RandomizedSearchCV to optimize hyperparameters, then adjust and select several hyperparameter combinations for iteration, and finally use the optimal hyperparameter combination to train the enterprise risk prediction model; Step S4: Use the test set to evaluate the performance of the trained enterprise risk prediction model; Step S5: Use cross validation to evaluate the trained enterprise risk prediction model; Step S6: During the deployment phase, enterprise indicator data corresponding to the most important features are collected and input into the trained enterprise risk prediction model to provide early warning for enterprise risks.

2. The enterprise risk early warning method according to claim 1, characterized in that: The step S1 comprises: Step S1.1: Collect enterprise indicator data; Step S1.2: Fill in the missing values ​​in the collected enterprise indicator data; Step S1.3: Standardize and normalize the enterprise indicator data.

3. The enterprise risk early warning method according to claim 1 is characterized in that: In step S3, during the training process, the contribution of each feature is evaluated, the importance of each feature is calculated, and the features are sorted according to their importance, the most important features are identified, and the most important features are visualized.

4. The enterprise risk early warning method according to claim 1, characterized in that: The hyperparameters include one or more of the following: learning rate, number of trees, depth of trees, subsampling ratio, regularization parameter, ratio of features randomly selected for each tree, and maximum number of leaf nodes.

5. The enterprise risk early warning device based on XGBoost algorithm is characterized by: include: The collection module is used to collect enterprise indicator data and pre-process the enterprise indicator data; The processing module is used to extract and encode the features of enterprise indicator data based on basic information, financial data, operating data, credit history, and several dimensions in the external environment, and divide them into training sets and test sets; A training module is used to train the enterprise risk prediction model based on the XGBoost algorithm using a training set; During the training process, the contribution of each feature is evaluated, the importance of each feature is calculated, and the features are sorted according to their importance to identify the most important features; Use GridSearchCV or RandomizedSearchCV to optimize hyperparameters, then adjust and select several hyperparameter combinations for iteration, and finally use the optimal hyperparameter combination to train the enterprise risk prediction model; The testing module is used to evaluate the performance of the trained enterprise risk prediction model using a test set; An evaluation module is used to evaluate the trained enterprise risk prediction model using cross-validation; The deployment module is used to collect enterprise indicator data corresponding to the most important characteristics during the deployment phase, and input it into the trained enterprise risk prediction model to issue early warnings for enterprise risks.

6. The enterprise risk early warning device according to claim 5, characterized in that: The acquisition module comprises: A collection unit, used to collect enterprise indicator data; A filling unit is used to fill in missing values ​​in the collected enterprise indicator data; The processing unit is used to perform data standardization and normalization on enterprise indicator data.

7. The enterprise risk early warning device according to claim 5, characterized in that: During the training process, the training module evaluates the contribution of each feature, calculates the importance of each feature, sorts the features according to their importance, identifies the most important features, and visualizes the most important features.

8. The enterprise risk early warning device according to claim 5, characterized in that: The hyperparameters include one or more of the following: learning rate, number of trees, depth of trees, subsampling ratio, regularization parameter, ratio of features randomly selected for each tree, and maximum number of leaf nodes.

9. A computing device, characterized in that include: one or more processors; Memory; And one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, and one or more of the programs include instructions for the enterprise risk early warning method based on the XGBoost algorithm as described in any one of claims 1-4.

10. A storage medium, characterized in that The storage medium stores one or more computer-readable programs, and the one or more programs include instructions, and the instructions are suitable for being loaded by the memory and executing the enterprise risk early warning method based on the XGBoost algorithm as described in any one of claims 1-8.

Citation Information

Cited By

  • Method and system for generating interpretable financial risk attribution abstract

    CN120782563A