Enterprise financial data risk prediction method based on big data and artificial intelligence

By adopting big data and artificial intelligence technology in enterprise financial risk assessment, a risk scoring system that integrates multiple models is solved, and the problem that traditional methods cannot dynamically monitor and predict corporate liquidity risks is achieved, achieving higher prediction accuracy and stability.

CN119904321APending Publication Date: 2025-04-29山东电子职业技术学院

Patent Information

Application Number
CN202510033533.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

Traditional financial risk assessment methods cannot dynamically and comprehensively reflect the financial health of an enterprise, especially when facing a complex and changeable modern business environment, it is difficult to effectively monitor and predict the liquidity risks of an enterprise.

Method used

Using the enterprise financial data risk prediction method based on big data and artificial intelligence, an enterprise financial risk scoring model composed of a random forest model and an XGBoost model is constructed through multi-source data acquisition and preprocessing, and the best weight vector is calculated through the Lasso method to optimize the model to improve the prediction accuracy.

Benefits of technology

It realizes more accurate and dynamic prediction of corporate financial risks, improves financial risk management capabilities, enhances the prediction accuracy, stability and robustness of the model, and avoids the overfitting or underfitting problems of a single model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119904321A_ABST
    Figure CN119904321A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of enterprise financial management and risk control, in particular to a financial data risk prediction method and system based on big data and artificial intelligence. The method comprises the following steps: constructing an internal data set and an external data set, and preprocessing the internal data set and the external data set to obtain a preprocessed data set; constructing an enterprise financial risk scoring model composed of a random forest model and an XGBoost model, inputting the preprocessed data into the model to obtain a prediction result, calculating an optimal weight vector of the model through a Lasso method according to the prediction result and an actual result, and embedding the obtained optimal weight vector into the model; training and optimizing the enterprise financial risk scoring model, and predicting a final result; and carrying out risk grade division according to the final prediction result of the enterprise, generating risk early warning according to the risk grade, and generating a detailed risk analysis report. The method can improve the precision and stability of enterprise financial risk prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of enterprise financial management and risk control, and in particular to an enterprise financial data risk prediction method based on big data and artificial intelligence. Background Art

[0002] In the current complex and ever-changing modern business environment, the monitoring and prediction of corporate financial risks has become an important part of corporate management. However, traditional financial risk assessment methods often rely on static and local data and cannot dynamically and comprehensively reflect the financial health of the enterprise. With the development of big data technology and artificial intelligence, more and more companies have begun to accumulate a large amount of business data, financial data, industry data and macroeconomic data. Therefore, how to build an efficient and accurate financial risk prediction system through multi-dimensional data fusion and intelligent algorithm optimization to help companies dynamically and comprehensively monitor their financial status and warn of potential dangers in advance has become a hot spot in technological development. Among them, the liquidity risk of an enterprise directly affects the survival and development of the enterprise. The higher the liquidity risk, the more likely it is to encounter difficulties and even fall into a financial crisis when facing sudden financial pressure. The management of liquidity risk is not only related to the stability of the daily operation of the enterprise, but also to its ability to achieve long-term sustainable development. Therefore, based on this background, the present invention proposes an innovative big data-driven intelligent prediction system and method for enterprise financial liquidity risk, which provides enterprises with more accurate financial risk prediction and warning by integrating multi-source data and applying adaptive machine learning models, and effectively improves financial risk management capabilities. Therefore, the present invention provides a method for predicting enterprise financial data risks based on big data and artificial intelligence to solve the above problems. Summary of the invention

[0003] In view of the shortcomings of the existing technology, the present invention has developed a method for predicting enterprise financial data risks based on big data and artificial intelligence. The main purpose is to integrate the prediction results of multiple strong learning algorithms, make full use of their respective advantages, and maximize the accuracy and stability of enterprise financial risk prediction.

[0004] The present invention proposes a method for predicting enterprise financial data risk based on big data and artificial intelligence, and the steps are as follows: S1. Multi-source data collection and data preprocessing: Multi-source data includes internal data and external data of the enterprise. Based on the two parts of data, internal data sets and external data sets are constructed respectively. Then, the data in the internal and external data sets are preprocessed to obtain the preprocessed data sets. S2. Construct an enterprise financial risk scoring model composed of a random forest model and an XGBoost model, input the preprocessed data into the model to obtain the prediction results, and then calculate the optimal weight vector of the model according to the prediction results and actual results using the Lasso method, and embed the obtained optimal weight vector into the model; S3. Train and optimize the enterprise financial risk scoring model embedded with the optimal weight vector, and predict the final prediction result of the enterprise through the trained model; S4. Risk levels are divided according to the final prediction result scores of the enterprise, and then risk warnings are generated according to the risk levels and detailed risk analysis reports are generated.

[0005] S1 is as follows: S1.1. Collect multi-source data to build a data set: The internal data collected includes Group data, each group of data contains Financial indicators include cash flow, debt ratio, return on assets, sales revenue, sales cost, current ratio and debt structure, which are set according to the number of financial indicator elements included. , build internal data sets based on the collected internal enterprise data , It is expressed as follows: , in, For internal datasets The elements in Indicates the internal data set The first financial indicators, , ; The collected external enterprise data includes Group data, each group of data contains Financial indicators include economic growth rate, interest rate, inflation rate, market demand changes, industry trends, stock market performance, tax policies and fiscal subsidies. , build external data sets based on the collected external enterprise data , It is expressed as follows: , in, For external datasets The elements in Indicates the external data set The first financial indicators, , ; S1.2, Data preprocessing: For internal datasets and external datasets Preprocess the financial indicator data in the internal data set and external datasets The data in the dataset together constitutes , the data set contains Financial indicators data, Representation dataset Middle financial indicators, , , for the dataset Each data in the data set is cleaned to remove incomplete and invalid data, and then the mean of the same financial indicator data of different groups is selected to replace the removed data. The specific process is as follows: , in, represents the dataset after data cleaning, Indicates the operation of judging whether the data is complete. Indicates the operation of determining whether the data is valid; Then the data set All data in the data set are standardized. The original financial indicators are subtracted from the mean of the same financial indicators in different groups, and then divided by the standard deviation of the same financial indicators in different groups to obtain the standardized financial indicators. The preprocessed data set is expressed as , and then The financial indicators of the internal data and external data of the same group are spliced ​​together, and the data set , , , , , Representation dataset Middle Group data, Indicates In the group data financial indicators, Indicates the total number of financial indicators.

[0006] S2 is as follows: The dataset Each group of data is input into the constructed enterprise financial risk scoring model to obtain the prediction results , Indicates The scoring results of the group data are then analyzed using the Lasso regression method based on the predicted results. and actual results Calculate the optimal weight vector for the model , the calculation process is as follows: , in, , represents the weight vector of financial indicators, Indicates The weight vector of financial indicators, represents the regularization coefficient; Then the optimal weight vector of the model is Embedded into the enterprise financial risk scoring model.

[0007] S3 is as follows: Embed Train and optimize the enterprise financial risk scoring model to obtain the optimized prediction results; S3.1. Model training: S3.1.1 Dataset And the prediction results constitute the training set , , Indicates sample pairs, multiple times from the training set Randomly extract several sample pairs with replacement from Subset , , , Indicates subsets, train a decision tree based on each subset, and randomly select financial indicators and an optimal financial indicator are split. , so that the information gain is maximized, the calculation process is as follows: , in, represents the optimal financial indicator, According to the optimal financial indicators The split subset, According to the optimal financial indicators The set of subsets of the split, Representation Subset The entropy of Subsets representing splits The entropy of According to the optimal financial indicators Subset The information gain maximization result of splitting; S3.1.2. Based on the prediction results and actual results Calculate the loss function that minimizes the overall , the calculation process is as follows: , in, represents the prediction error, represents the number of iterations, The index representing the number of iterations, Represents the iteration The regularization term, Represents iteration times to minimize the overall loss function.

[0008] S3.2, Model Optimization: S3.2.1. Parameter adjustment: adjust the parameters in the random forest model and XGBoost model respectively; (1) For the random forest model, the hyperparameter to be adjusted is the number of trees included , the maximum depth of each tree, the random sampling ratio of samples and financial indicators, and the optimal hyperparameter combination is determined by grid search and Bayesian optimization methods within the model; First, the enterprise financial risk scoring model uses the random forest model with default parameters to make predictions, and obtains the prediction results described in step S2. The performance of the random forest model with default parameters is judged based on the comparison between the prediction results and the actual results. Then, through the grid search and Bayesian optimization methods, efficient exploration is performed in multiple parameter spaces to select the best hyperparameter combination. Finally, the cross-validation method is used to evaluate the performance of the selected hyperparameter combination. Specific choice of hyperparameters: For the number of trees , the initial range is 50-500, the step size is 50, and the number of trees determined after grid search is the optimal choice; for the depth of the tree, the initial range is 3-15, and after gradual convergence using Bayesian optimization, the maximum depth of 8 is determined to be the optimal result; for the random sampling ratio of samples, the initial ratio is 0.6-1.0, and the optimal value is determined to be 0.8 after optimization; for the random sampling ratio of financial indicators, the initial range is 0.4-1.0, and the optimal value is determined to be 0.6 after optimization; (2) For the XGBoost model, the hyperparameters adjusted include learning rate, maximum tree depth, and regularization parameter; First, the enterprise financial risk scoring model uses the XCBoost model with default parameters to make predictions, and obtains the prediction results described in step S2. The performance of the XGBoost model with default parameters is judged based on the comparison between the prediction results and the actual results. Then, the parameter space is roughly searched through random search to narrow the candidate range, and then Bayesian optimization is used to refine and adjust the hyperparameters. For the learning rate, the initial range is 0.01-0.3, and after optimization, 0.05 is determined to be the best value; for the tree depth, the initial range is 3-10, and after optimization, 6 is determined to be the best value; for the regularization coefficient, the initial range is 0-10, and after optimization, , is the best value, and represents two different regularization coefficients.

[0009] S3.2.2 Prediction output: (1) The prediction calculation process of the random forest model is as follows: , in, represents the number of trees in the random forest model, express The index of Indicates The depth of the tree, Indicates The information gain maximization result of the tree is: Indicates The subset corresponding to the tree, Indicates The optimal financial indicators of the tree, Represents the adaptively generated The first The predicted value of a tree, Indicates The prediction results of sample pairs; (2) The prediction calculation process of the XGBoost model is as follows: , in, represents the number of trees in the XGBoost model, express The index of Indicates The depth of the tree, Indicates The regularization coefficient of the tree, Indicates Another regularization coefficient for each tree, Represents the adaptively generated The first The predicted value of a tree, Indicates The prediction results for the sample pairs.

[0010] S3.2.3、Prediction result fusion: The prediction results of the random forest model and the XGBoost model are combined to obtain the final prediction result through weighted calculation. , the calculation formula is as follows: , in, and Represents two different adjustable weight parameters, satisfying ; In the process of prediction result fusion, the weight parameters are dynamically adjusted based on the minimization of the error rate, and the mean square error is used. The calculation formula is as follows: , in, represents the mean square error result, Indicates The true result of sample pairs, Indicates The final prediction result of sample pairs; Then by minimizing To select the best adjustable weight parameter and , the calculation process is as follows: , in, Represents the optimal adjustable weight parameter selected and , Represents a minimize operation.

[0011] S4 is as follows: According to the final prediction results , the results are divided into different risk levels, namely low risk, medium risk and high risk, and the risk classification threshold is and ; when When, low risk; when When, medium risk; when When, high risk; Then, based on the predicted risk level, a risk warning is generated and a detailed risk analysis report is generated. The risk analysis report includes analysis of various indicators, predicted financial risk levels and corresponding risk response measures.

[0012] The effects provided in the content of the invention are only the effects of the embodiments, rather than all the effects of the invention. The above technical solution has the following advantages or beneficial effects: The present invention proposes a model fusion method based on ensemble learning. The method weightedly fuses the prediction results of the random forest model and the XGBoost model, combines their respective advantages, and maximizes the performance of financial risk score prediction, which can improve the prediction accuracy, generalization ability and robustness of the model, and can also avoid relying on a single model so that the prediction results may not achieve high accuracy and stability, and may even cause overfitting or underfitting problems; at the same time, in order to fuse the prediction results of the two models, the present invention proposes an adaptive weight adjustment mechanism, which dynamically assigns appropriate weight parameters to the prediction results of each model, so as to adjust the influence of each model according to its performance in a specific task. The innovation of this weighted fusion strategy lies in that by dynamically adjusting the weight of each tree, the complexity of the model itself, the depth of the tree and the information gain when the node is split are fully considered, ensuring that the contribution of each sub-model is adjusted according to its performance in a specific task. This adaptive weighted fusion not only improves the prediction accuracy, but also greatly enhances the robustness and generalization ability of the model.

[0013] In addition, the present invention is based on big data analysis and adopts the technical means of multi-source data integration, machine learning algorithms and intelligent decision-making models, which can accurately predict the financial liquidity risk of enterprises and improve the accuracy and timeliness of risk warnings. Among them, multi-source data integration technology integrates the internal financial data of the enterprise and the external market data, so that the system can comprehensively consider multi-dimensional factors and identify key variables that affect the financial health of the enterprise. This integrated data processing method avoids the limitations of a single data source, improves the accuracy and comprehensiveness of model predictions, and ensures a multi-angle assessment of the financial status of the enterprise; machine learning algorithms can not only process large amounts of data by automatically learning patterns from historical data, but also identify complex nonlinear relationships, making up for the simplified assumptions of variable relationships in traditional financial analysis methods; cross-validation technology improves the robustness of the model and reduces the risk of overfitting, and the machine learning algorithm can automatically optimize feature selection and model parameters, significantly improving prediction accuracy and reducing human intervention and bias.

[0014] Overall, the present invention identifies the key factors affecting liquidity risk by analyzing multi-dimensional internal and external data of the enterprise, and provides accurate financial risk forecasts and effective decision-making support for the enterprise. Compared with traditional financial analysis methods, the present invention can update data in real time, quickly respond to changes in the market and operating environment, warn of risks in advance, and reduce the incidence of financial crises of enterprises. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0016] Figure 1 It is a schematic diagram of the method flow of the present invention. DETAILED DESCRIPTION

[0017] In order to clearly illustrate the technical features of the present invention, the present invention is described in detail below through specific implementation methods and in conjunction with the accompanying drawings.

[0018] Example 1 like Figure 1 As shown in the figure, a method for predicting enterprise financial data risk based on big data and artificial intelligence is as follows: S1. Multi-source data collection and data preprocessing: Multi-source data includes internal data and external data of the enterprise. Based on the two parts of data, internal data sets and external data sets are constructed respectively. Then, the data in the internal and external data sets are preprocessed to obtain the preprocessed data sets. S2. Construct an enterprise financial risk scoring model composed of a random forest model and an XGBoost model, input the preprocessed data into the model to obtain the prediction results, and then calculate the optimal weight vector of the model according to the prediction results and actual results through the Lasso linear regression method, and embed the obtained optimal weight vector into the model; XGBoost stands for eXtreme Gradient Boosting, which is an optimized gradient boosting decision tree algorithm; S3. Train and optimize the enterprise financial risk scoring model embedded with the optimal weight vector, and predict the final prediction result of the enterprise through the trained model; S4. Risk levels are divided according to the final prediction result scores of the enterprise, and then risk warnings are generated according to the risk levels and detailed risk analysis reports are generated.

[0019] S1 is as follows: S1.1. Collect multi-source data to build a data set: The internal data collected includes Group data, each group of data contains Financial indicators include cash flow, debt ratio, return on assets, sales revenue, sales cost, current ratio and debt structure, which are set according to the number of financial indicator elements included. , build internal data sets based on the collected internal enterprise data , It is expressed as follows: , in, For internal datasets The elements in Indicates the internal data set The first financial indicators, , ; The collected external enterprise data includes Group data, each group of data contains Financial indicators include economic growth rate, interest rate, inflation rate, market demand changes, industry trends, stock market performance, tax policies and fiscal subsidies. , build external data sets based on the collected external enterprise data , It is expressed as follows: , in, For external datasets The elements in Indicates the external data set The first financial indicators, , ; S1.2, Data preprocessing: For internal datasets and external datasets Preprocess the financial indicator data in the internal data set and external datasets The data in the dataset together constitutes , the data set contains Financial indicators data, Representation dataset Middle financial indicators, , , for the dataset Each data in the data set is cleaned to remove incomplete and invalid data, and then the mean of the same financial indicator data of different groups is selected to replace the removed data. The specific process is as follows: , in, represents the dataset after data cleaning, Indicates the operation of judging whether the data is complete. Indicates the operation of determining whether the data is valid; Then the data set All data in the data set are standardized. The original financial indicators are subtracted from the mean of the same financial indicators in different groups, and then divided by the standard deviation of the same financial indicators in different groups to obtain the standardized financial indicators. The preprocessed data set is expressed as , and then The financial indicators of the internal data and external data of the same group are spliced ​​together, and the data set , , , , , Representation dataset Middle Group data, Indicates In the group data financial indicators, Indicates the total number of financial indicators.

[0020] S2 is as follows: The dataset Each group of data is input into the constructed enterprise financial risk scoring model to obtain the prediction results , Indicates The scoring results of the group data are then analyzed using the Lasso regression method based on the predicted results. and actual results Calculate the optimal weight vector for the model , the calculation process is as follows: , in, , represents the weight vector of financial indicators, Indicates The weight vector of financial indicators, represents the regularization coefficient; Then the optimal weight vector of the model is Embedded into the enterprise financial risk scoring model.

[0021] S3 is as follows: Embed Train and optimize the enterprise financial risk scoring model to obtain the optimized prediction results; S3.1. Model training: S3.1.1 Dataset And the prediction results constitute the training set , , Indicates sample pairs, multiple times from the training set Randomly extract several sample pairs with replacement from Subset , , , Indicates subsets, train a decision tree based on each subset, and randomly select financial indicators and an optimal financial indicator are split. , so that the information gain is maximized, the calculation process is as follows: , in, represents the optimal financial indicator, According to the optimal financial indicators The split subset, According to the optimal financial indicators The set of subsets of the split, Representation Subset The entropy of Subsets representing splits The entropy of According to the optimal financial indicators Subset The information gain maximization result of splitting; S3.1.2. Based on the prediction results and actual results Calculate the loss function that minimizes the overall , the calculation process is as follows: , in, represents the prediction error, represents the number of iterations, The index representing the number of iterations, Represents the iteration The regularization term, Represents iteration times to minimize the overall loss function.

[0022] S3.2. Model optimization: S3.2.1. Parameter adjustment: adjust the parameters in the random forest model and XGBoost model respectively; (1) For the random forest model, the hyperparameter to be adjusted is the number of trees included , the maximum depth of each tree, the random sampling ratio of samples and financial indicators, and the optimal hyperparameter combination is determined by grid search and Bayesian optimization methods within the model; First, the enterprise financial risk scoring model uses the random forest model with default parameters to make predictions, and obtains the prediction results described in step S2. The performance of the random forest model with default parameters is judged based on the comparison between the prediction results and the actual results. Then, through the grid search and Bayesian optimization methods, efficient exploration is performed in multiple parameter spaces to select the best hyperparameter combination. Finally, the cross-validation method is used to evaluate the performance of the selected hyperparameter combination. Specific choice of hyperparameters: For the number of trees , the initial range is 50-500, the step size is 50, and the number of trees determined after grid search is the optimal choice; for the depth of the tree, the initial range is 3-15, and after gradual convergence using Bayesian optimization, the maximum depth of 8 is determined to be the optimal result; for the random sampling ratio of samples, the initial ratio is 0.6-1.0, and the optimal value is determined to be 0.8 after optimization; for the random sampling ratio of financial indicators, the initial range is 0.4-1.0, and the optimal value is determined to be 0.6 after optimization; (2) For the XGBoost model, the hyperparameters adjusted include learning rate, maximum tree depth, and regularization parameter; First, the enterprise financial risk scoring model uses the XCBoost model with default parameters to make predictions, and obtains the prediction results described in step S2. The performance of the XGBoost model with default parameters is judged based on the comparison between the prediction results and the actual results. Then, the parameter space is roughly searched through random search to narrow the candidate range, and then Bayesian optimization is used to refine and adjust the hyperparameters. For the learning rate, the initial range is 0.01-0.3, and after optimization, 0.05 is determined to be the best value; for the tree depth, the initial range is 3-10, and after optimization, 6 is determined to be the best value; for the regularization coefficient, the initial range is 0-10, and after optimization, , is the best value, and represents two different regularization coefficients.

[0023] S3.2.2 Prediction output: (1) The prediction calculation process of the random forest model is as follows: , in, represents the number of trees in the random forest model, express The index of Indicates The depth of the tree, Indicates The information gain maximization result of the tree is: Indicates The subset corresponding to the tree, Indicates The optimal financial indicators of the tree, Represents the adaptively generated The first The predicted value of a tree, Indicates The prediction results of sample pairs; (2) The prediction calculation process of the XGBoost model is as follows: , in, represents the number of trees in the XGBoost model, express The index of Indicates The depth of the tree, Indicates The regularization coefficient of the tree, Indicates Another regularization coefficient for each tree, Represents the adaptively generated The first The predicted value of a tree, Indicates The prediction results for the sample pairs.

[0024] S3.2.3、Prediction result fusion: The prediction results of the random forest model and the XGBoost model are combined to obtain the final prediction result through weighted calculation. , the calculation formula is as follows: , in, and Represents two different adjustable weight parameters, satisfying ; In the process of prediction result fusion, the weight parameters are dynamically adjusted based on the minimization of the error rate, and the mean square error is used. The calculation formula is as follows: , in, represents the mean square error result, Indicates The true result of sample pairs, Indicates The final prediction result of sample pairs; Then by minimizing To select the best adjustable weight parameter and , the calculation process is as follows: , in, Represents the optimal adjustable weight parameter selected and , Represents a minimize operation.

[0025] S4 is as follows: According to the final prediction results , the results are divided into different risk levels, namely low risk, medium risk and high risk, and the risk classification threshold is and ; when When, low risk; when When, medium risk; when When, high risk; Then, based on the predicted risk level, a risk warning is generated and a detailed risk analysis report is generated. The risk analysis report includes analysis of various indicators, predicted financial risk levels and corresponding risk response measures.

[0026] Example 2 In order to better demonstrate the actual application process of the present invention, the following takes the financial data of a certain enterprise as an example to describe how the present invention works in practice: Assuming that the financial data of a company in the four quarters of 2023 are as follows, the liquidity risk score for the first quarter of 2024 is predicted as shown in Table 1, where Q1, Q2, Q3 and Q4 represent the financial data of the first, second, third and fourth quarters of 2023 respectively, and Q5 represents the financial data of the first quarter at the end of 2024.

[0027] Table 1 Financial indicators for the five quarters The present invention predicts the debt ratio, current ratio, return on assets, operating income, accounts receivable turnover rate, operating cash flow, industry growth rate, and macroeconomic index in Q5 through the debt ratio, current ratio, return on assets, operating income, accounts receivable turnover rate, operating cash flow, industry growth rate, and macroeconomic index in Q1, Q2, Q3, and Q4, compares the predicted result in Q5 with the actual result, and adjusts the parameters of the enterprise financial risk scoring model in the present invention to make the prediction result more accurate, that is, the model in the present invention is trained through the known financial indicators in Q1, Q2, Q3, Q4, and Q5, and then the trained model is used to predict the result in Q5 according to the known liquidity risk scores in Q1, Q2, Q3, and Q4.

[0028] In the specific calculation: Process abnormal data. For example, the current ratio of Q4 is 0.9, which is significantly lower than the other three sets of data. This may be due to the increase of some short-term liabilities. Through outlier detection, it is identified that the current ratio data of Q4 is low, so the data is updated and the revised value of the data is obtained by averaging the previous and next three sets of data (1.2+1.2+0.9) / 3=1.1. The system uses Lasso regression for feature selection, which is a linear regression method based on L1 regularization. By penalizing the regression coefficient, it can automatically select the most influential features; After Lasso regression analysis, the system found that the following features have the greatest influence on liquidity risk prediction: debt ratio ( )、Current Ratio( )、Accounts receivable turnover rate( ) and industry growth rate ( ); These features are selected to enter the next step of model training and risk prediction. After feature selection, the appropriate training model is selected according to the data type. The data is suitable for the random forest model. Next, the data is embedded in the model for training. Due to the limited amount of data, cross-validation technology is used to optimize the model parameters. In this process, 5-fold cross-validation is used to divide the four groups of data into five subsets. Four of the subsets are used for training each time, and the remaining subset is used for verification. During each training process, the model will adjust the parameters and evaluate the performance of the model based on the verification set. Finally, based on the results of cross-validation, the model with the best prediction effect is selected.

[0029] After training, the model was used to predict the liquidity risk of the company in the four quarters from Q1 to Q4, with a prediction score of 0.48; The system is set , , the predicted liquidity risk score in Q5 is medium risk; Relevant suggestions are given: The company's liquidity risk increased slightly in Q5. It is recommended to strengthen cash flow management, especially to improve accounts receivable turnover rate, to prevent future risk accumulation.

[0030] In summary, by analyzing and predicting the company's financial data in different quarters, the system can not only identify potential liquidity risks, but also provide customized decision support based on the company's actual situation. This intelligent prediction method based on big data analysis can help companies effectively identify financial risks and take preventive measures in advance, thereby ensuring the company's financial health and stable development.

[0031] Although the above describes the specific implementation mode of the invention in conjunction with the drawings, it is not intended to limit the scope of protection of the invention. Based on the technical solution of the present invention, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present invention.

Claims

1. A method for predicting enterprise financial data risk based on big data and artificial intelligence, characterized in that: The following steps are involved: S1. Multi-source data collection and data preprocessing: Multi-source data includes internal data and external data of the enterprise. Based on the two parts of data, internal data sets and external data sets are constructed respectively. Then, the data in the internal and external data sets are preprocessed to obtain the preprocessed data sets. S2. Construct an enterprise financial risk scoring model composed of a random forest model and an XGBoost model, input the preprocessed data into the model to obtain the prediction results, and then calculate the optimal weight vector of the model according to the prediction results and actual results using the Lasso method, and embed the obtained optimal weight vector into the model; S3. Train and optimize the enterprise financial risk scoring model embedded with the optimal weight vector, and predict the final prediction result of the enterprise through the trained model; S4. Risk levels are divided according to the final prediction result scores of the enterprise, and then risk warnings and detailed risk analysis reports are generated based on the risk levels.

2. According to claim 1, a method for predicting enterprise financial data risk based on big data and artificial intelligence is characterized in that: S1 is as follows: S1.

1. Collect multi-source data to build a data set: The internal data collected includes Group data, each group of data contains Financial indicators include cash flow, debt ratio, return on assets, sales revenue, sales cost, current ratio and debt structure, which are set according to the number of financial indicator elements included. , build internal data sets based on the collected internal enterprise data , It is expressed as follows: , in, For internal datasets The elements in Indicates the internal data set The first financial indicators, , ; The collected external enterprise data includes Group data, each group of data contains Financial indicators include economic growth rate, interest rate, inflation rate, market demand changes, industry trends, stock market performance, tax policies and fiscal subsidies. , build external data sets based on the collected external enterprise data , It is expressed as follows: , in, For external datasets The elements in Indicates the external data set The first financial indicators, , ; S1.

2. Data preprocessing: For internal datasets and external datasets Preprocess the financial indicator data in the internal data set and external datasets The data in the dataset together constitutes , the data set contains Financial indicators data, Representation dataset Middle financial indicators, , , for the dataset Each data in the data set is cleaned to remove incomplete and invalid data, and then the mean of the same financial indicator data of different groups is selected to replace the removed data. The specific process is as follows: , in, represents the dataset after data cleaning, Indicates the operation of judging whether the data is complete. Indicates the operation of determining whether the data is valid; Then the data set All data in the data set are standardized. The original financial indicators are subtracted from the mean of the same financial indicators in different groups, and then divided by the standard deviation of the same financial indicators in different groups to obtain the standardized financial indicators. The preprocessed data set is expressed as , and then The financial indicators of the internal data and external data of the same group are spliced ​​together, and the data set , , , , , Representation dataset Middle Group data, Indicates In the group data financial indicators, Indicates the total number of financial indicators.

3. The enterprise financial data risk prediction method based on big data and artificial intelligence according to claim 2 is characterized in that: S2 is as follows: The dataset Each group of data is input into the constructed enterprise financial risk scoring model to obtain the prediction results , Indicates The scoring results of the group data are then analyzed using the Lasso regression method based on the predicted results. and actual results Calculate the optimal weight vector for the model , the calculation process is as follows: , in, , represents the weight vector of financial indicators, Indicates The weight vector of financial indicators, represents the regularization coefficient; Then the optimal weight vector of the model is Embedded into the enterprise financial risk scoring model.

4. The enterprise financial data risk prediction method based on big data and artificial intelligence according to claim 3 is characterized in that: S3 is as follows: Embed Train and optimize the enterprise financial risk scoring model to obtain the optimized prediction results; S3.

1. Model training: S3.1.1 Dataset And the prediction results constitute the training set , , Indicates sample pairs, multiple times from the training set Randomly extract several sample pairs with replacement from Subset , , , Indicates subsets, train a decision tree based on each subset, and randomly select financial indicators and an optimal financial indicator are split. , so that the information gain is maximized, the calculation process is as follows: , in, represents the optimal financial indicator, According to the optimal financial indicators The split subset, According to the optimal financial indicators The set of split subsets, Representation Subset The entropy of Subsets representing splits The entropy of According to the optimal financial indicators Subset The information gain maximization result of splitting; S3.1.

2. Based on the prediction results and actual results Calculate the loss function that minimizes the overall , the calculation process is as follows: , in, represents the prediction error, represents the number of iterations, The index representing the number of iterations, Represents the iteration The regularization term, Represents iteration times to minimize the overall loss function.

5. The enterprise financial data risk prediction method based on big data and artificial intelligence according to claim 4 is characterized by: S3.2, Model Optimization: S3.2.

1. Parameter adjustment: adjust the parameters in the random forest model and XGBoost model respectively; (1) For the random forest model, the hyperparameter to be adjusted is the number of trees included , the maximum depth of each tree, the random sampling ratio of samples and financial indicators, and the optimal hyperparameter combination is determined by grid search and Bayesian optimization methods within the model; First, the enterprise financial risk scoring model uses the random forest model with default parameters to make predictions, and obtains the prediction results described in step S2. The performance of the random forest model with default parameters is judged based on the comparison between the prediction results and the actual results. Then, through the grid search and Bayesian optimization methods, efficient exploration is performed in multiple parameter spaces to select the best hyperparameter combination. Finally, the cross-validation method is used to evaluate the performance of the selected hyperparameter combination. Specific choice of hyperparameters: For the number of trees , the initial range is 50-500, the step size is 50, and the number of trees determined after grid search is the optimal choice; for the depth of the tree, the initial range is 3-15, and after gradual convergence using Bayesian optimization, the maximum depth of 8 is determined to be the optimal result; for the random sampling ratio of samples, the initial ratio is 0.6-1.0, and the optimal value is determined to be 0.8 after optimization; for the random sampling ratio of financial indicators, the initial range is 0.4-1.0, and the optimal value is determined to be 0.6 after optimization; (2) For the XGBoost model, the hyperparameters adjusted include learning rate, maximum tree depth, and regularization parameter; First, the enterprise financial risk scoring model uses the XCBoost model with default parameters to make predictions, and obtains the prediction results described in step S2. The performance of the XGBoost model with default parameters is judged based on the comparison between the prediction results and the actual results. Then, the parameter space is roughly searched through random search to narrow the candidate range, and then Bayesian optimization is used to refine and adjust the hyperparameters. For the learning rate, the initial range is 0.01-0.3, and after optimization, 0.05 is determined to be the best value; for the tree depth, the initial range is 3-10, and after optimization, 6 is determined to be the best value; for the regularization coefficient, the initial range is 0-10, and after optimization, , is the best value, and represents two different regularization coefficients.

6. The enterprise financial data risk prediction method based on big data and artificial intelligence according to claim 5 is characterized by: S3.2.2 Prediction output: (1) The prediction calculation process of the random forest model is as follows: , in, represents the number of trees in the random forest model, express The index of Indicates The depth of the tree, Indicates The information gain maximization result of the tree is: Indicates The subset corresponding to the tree, Indicates The optimal financial indicators of the tree, Represents the adaptively generated The first The predicted value of a tree, Indicates The prediction results of sample pairs; (2) The prediction calculation process of the XGBoost model is as follows: , in, represents the number of trees in the XGBoost model, express The index of Indicates The depth of the tree, Indicates The regularization coefficient of the tree, Indicates Another regularization coefficient for each tree, Represents the adaptively generated The first The predicted value of a tree, Indicates The prediction results for the sample pairs.

7. The enterprise financial data risk prediction method based on big data and artificial intelligence according to claim 6 is characterized by: S3.2.3、Prediction result fusion: The prediction results of the random forest model and the XGBoost model are combined to obtain the final prediction result through weighted calculation. , the calculation formula is as follows: , in, and Represents two different adjustable weight parameters, satisfying ; In the process of prediction result fusion, the weight parameters are dynamically adjusted based on the minimization of the error rate, and the mean square error is used. The calculation formula is as follows: , in, represents the mean square error result, Indicates The true result of sample pairs, Indicates The final prediction result of sample pairs; Then by minimizing To select the best adjustable weight parameter and , the calculation process is as follows: , in, Represents the optimal adjustable weight parameter selected and , Represents a minimize operation.

8. The enterprise financial data risk prediction method based on big data and artificial intelligence according to claim 7 is characterized in that: S4 is as follows: According to the final prediction results , the results are divided into different risk levels, namely low risk, medium risk and high risk, and the risk classification threshold is and ; when When, low risk; when When, medium risk; when When, high risk; Then, based on the predicted risk level, a risk warning is generated and a detailed risk analysis report is generated. The risk analysis report includes analysis of various indicators, predicted financial risk levels and corresponding risk response measures.

Citation Information

Patent Citations

  • Enterprise growth evaluation modeling method and system, computer and readable storage medium

    CN115081950A

  • Financial risk intelligent analysis method based on big data

    CN118505394A

  • Data risk assessment method and system based on big data

    CN118710406A

  • Dynamic identification method for financial fraud clues

    CN118981696A

  • Accurate financial risk identification method based on multiple models

    CN119006182A

Cited By

  • Security event determination method and device, computer equipment and storage medium

    CN120567644A