Enterprise financial risk early warning and management and control system based on big data analysis
By crawling and processing enterprise financial data, building a decision tree prediction model and drawing a risk trend chart, the problem of heterogeneous database data integration is solved, real-time monitoring and early warning of enterprise financial risks is realized, and financial risk management capabilities are enhanced.
Patent Information
- Application Number
- CN202411076385.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-12-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology is difficult to effectively integrate corporate financial data in heterogeneous databases, resulting in strong dependence on data quality and model algorithm selection during the construction and optimization of financial risk warning models, and multi-dimensional data analysis under small-scale data is difficult to match with big data. results of corporate financial data analysis.
Provide enterprise financial risk warning and control system based on big data analysis, including data acquisition module, data preprocessing module, risk assessment module and early warning control module. By crawling enterprise financial data, building database tables, and converting it into enterprise financial feature sets. Machine training is performed using the decision tree prediction model and the C5.0 algorithm, calculating the information gain ratio, drawing a risk trend chart and triggering early warnings.
Real-time updates and accurate risk assessments of corporate financial data have been realized, the company's financial risks have been enhanced, and the company's early warning and control capabilities have been strengthened, providing guarantees for the sustainable development of the company.
Smart Images

Figure CN119168786A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of enterprise operation technology, and in particular to an enterprise financial risk early warning and control system based on big data analysis. Background Art
[0002] The enterprise financial risk early warning system based on big data is a tool that identifies and warns of potential risks by analyzing large amounts of enterprise financial data. It obtains key indicators such as financial status, market dynamics, supply chain management, etc. through real-time monitoring of enterprise big data, and evaluates the data to identify potential risk factors, helping enterprises take preventive measures to avoid losses, improve their risk management capabilities, and enhance their market competitiveness and sustainable development capabilities.
[0003] However, the corporate financial data obtained from the Internet comes from multiple heterogeneous databases with different data formats and structures, which are difficult to integrate. Therefore, when building an early warning model for corporate financial risks, the technical requirements are high. The construction and optimization process of the early warning model for corporate financial risks is more dependent on data quality and the selection of model algorithms. In addition, the multi-dimensional data analysis results integrated under traditional small-volume data are difficult to match the corporate financial data analysis results under big data. Summary of the invention
[0004] The purpose of the present invention is to provide an enterprise financial risk early warning and control system based on big data analysis to solve the problems raised in the above background technology.
[0005] To achieve the above-mentioned purpose, the present invention provides the following technical solutions: an enterprise financial risk early warning and control system based on big data analysis, comprising a data acquisition module, a data preprocessing module, a risk assessment module and an early warning control module;
[0006] The data acquisition module is used to crawl the enterprise financial data after initiating a request from the designated website, construct a database and establish database tables in sequence, respectively establish a financial report information table, an investment activity information table, a tax information table, an audit report information table, a financing activity information table and a shareholder equity information table according to the information category of the enterprise financial data, and write the crawled enterprise financial data into each database table according to the information category;
[0007] The data preprocessing module is used to obtain data from each database table and convert it into an enterprise financial feature set, build a decision tree prediction model and use the c5.0 algorithm to perform machine training on the enterprise financial feature set, and build an enterprise financial risk label based on the information gain ratio generated by the machine training;
[0008] The risk assessment module is used to obtain the target decision path in each decision tree through the decision tree prediction model according to the enterprise financial data in the selected enterprise financial feature set, wherein the target decision path includes a plurality of sub-nodes, and calculate the information gain ratio of the corresponding target decision path end point according to the information gain of the sub-nodes in the decision tree;
[0009] The early warning control module is used to obtain the information gain ratio and convert it into an indicator result, and draw a trend chart of the enterprise's indicator results in chronological order to show the changing trend of enterprise risks, and add enterprise financial risk labels according to the indicator results. When the enterprise financial risk label exceeds the threshold, a warning is triggered, and the client generates a warning icon based on the enterprise financial risk label rendering.
[0010] Preferably, the enterprise financial feature set includes financial report data, investment data, tax data, audit data, financing data and shareholder equity data;
[0011] The information entropy calculation formula for the decision tree prediction of enterprise financial data by the risk calculation module is:
[0012] Among them, S is the enterprise financial feature set, P i is the probability of the i-th operating risk category in the enterprise financial characteristics set, Among them, s i is the number of samples of the i-th category of the enterprise financial feature set, |S| is the total number of samples of the enterprise financial feature set, and the information entropy calculation formula is used to evaluate the degree of confusion of the current enterprise financial feature set;
[0013] The conditional entropy calculation formula for the decision tree prediction of enterprise financial data by the risk calculation module is:
[0014] Among them, s j is a subset of the enterprise financial feature set, |S j | is a subset of s j The number of samples, u is n possible values {v1, v2…, v n};
[0015] The information gain formula of the risk calculation module for decision tree prediction of enterprise financial data is: Gain(S, A)=Ent(S)-Ent(S, A), and the corresponding information gain value is obtained by calculating the entropy difference between the conditional entropy Ent(S, A) and the information entropy Ent(S);
[0016] The risk calculation module calculates the split information formula for decision tree prediction of enterprise financial data as follows:
[0017] The split information calculation formula can normalize the information gain;
[0018] The information gain ratio calculation formula for the decision tree prediction of enterprise financial data by the risk calculation module is:
[0019] Preferably, after inputting the enterprise financial feature set, the data preprocessing module reads 20% of the data for decision tree prediction model training and reads 80% of the data for decision tree prediction model testing.
[0020] Preferably, the data preprocessing module divides the enterprise financial risk labels into four enterprise risk categories:
[0021] If the information gain ratio is 0-0.2, the risk level is four;
[0022] If the information gain ratio is 0.21-0.4, the risk level is three;
[0023] If the information gain ratio is 0.41-0.6, the risk level is two;
[0024] If the information gain ratio is 0.61-0.8, the risk level is one.
[0025] Preferably, the enterprise information data in the database module is obtained, and combined with the enterprise financial risk labels, a trend chart is drawn in chronological order.
[0026] Preferably, the horizontal axis of the trend chart represents time, and the vertical axis represents risk level, and different colors or marks are used to distinguish different risk levels.
[0027] Preferably, a prominent point is set on the trend chart according to the warning triggering time to highlight the warning event that occurs when the risk exceeds the threshold.
[0028] Preferably, the early warning control module is also used to send early warning text messages and emails.
[0029] Preferably, the data preprocessing module reads the enterprise financial data in the database. If the current enterprise financial data is missing or repeated, the missing value is filled by selecting the mean, median or mode through interpolation, and the repeated records in the enterprise financial data are identified and removed.
[0030] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention crawls the enterprise financial data on the Internet in real time and stores it as CSV, thereby realizing real-time updating of the enterprise financial data, and performing data processing and conversion to improve the accuracy of risk assessment. In addition, the data is converted into an enterprise financial feature set through data preprocessing, and a decision tree prediction model is constructed using the C5.0 algorithm to predict the decision path and information gain ratio of enterprise risks. A trend chart of enterprise indicators is drawn according to the model results, and corresponding warning icons are displayed, which effectively helps enterprises monitor risks in real time, obtain dynamic risk warnings, and enhance the warning and management capabilities of enterprise financial risks, providing a strong guarantee for the sustainable development of enterprises. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 This is a schematic diagram of the structure of an enterprise financial risk early warning and control system based on big data analysis according to an embodiment of the present invention;
[0032] Figure 2 This is a flow chart of an enterprise financial risk early warning and control system based on big data analysis according to an embodiment of the present invention;
[0033] Figure 3 Another structural schematic diagram of the enterprise financial risk early warning and control system based on big data analysis according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] 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.
[0035] See also Figure 1-Figure 2 The embodiment of the present invention provides an enterprise financial risk early warning and control system based on big data analysis, including: a data acquisition module, a data preprocessing module, a risk assessment module and an early warning control module.
[0036] like Figure 1 and Figure 2 As shown, the data acquisition module is used to build in Python, and returns the enterprise financial data after initiating an HTTP request from a specified website and stores it in a CSV file. The enterprise financial data includes but is not limited to basic enterprise information, public financial information, business scope information, contract management information, intellectual property information, industrial and commercial penalty information and enterprise litigation record information within five years.
[0037] Furthermore, a database is constructed, and database tables are established in sequence according to the enterprise financial data. The CSV files in the enterprise information crawling module are read in real time and written into the database tables. Among them, the database tables establish financial report information tables, investment activity information tables, tax information tables, audit report information tables, financing activity information tables and shareholder equity information tables according to the information categories of the enterprise financial data.
[0038] The data preprocessing module is used to obtain data from each database table, fill in missing values in the enterprise financial data using the interpolation method, use the mean, median or mode, identify and remove duplicate records in the enterprise financial data, complete the enterprise financial data cleaning and deduplication operations in the database, and finally convert the cleaned and deduplicated enterprise financial data into an enterprise financial feature set, build a decision tree prediction model, and use the c5.0 algorithm to machine train the enterprise financial feature set, and build an enterprise financial risk label based on the information gain ratio generated by the machine training.
[0039] After inputting the enterprise financial feature set, the data preprocessing module reads 20% of the data for decision tree prediction model training and reads 80% of the data for decision tree prediction model testing.
[0040] like Figure 1 and Figure 3 As shown, the risk assessment module is used to obtain the target decision path in each decision tree through the decision tree prediction model based on the enterprise financial data in the selected enterprise financial feature set. The target decision path includes multiple sub-nodes. According to the information gain of the sub-nodes in the decision tree, the information gain ratio of the corresponding target decision path end point is calculated.
[0041] The enterprise financial feature set includes financial report data, investment data, tax data, audit data, financing data, and shareholder equity data;
[0042] The information entropy calculation formula for the risk calculation module to make decision tree predictions on corporate financial data is:
[0043] Among them, S is the enterprise financial feature set, P i is the probability of the i-th operating risk category in the enterprise financial characteristics set, Among them, s i is the number of samples of the i-th category of the enterprise financial feature set, |S| is the total number of samples of the enterprise financial feature set, and the information entropy calculation formula is used to evaluate the degree of confusion of the current enterprise financial feature set;
[0044] The risk calculation module uses the following conditional entropy calculation formula to predict the enterprise financial data through decision tree:
[0045] Among them, s jis a subset of the enterprise financial feature set, |S j | is a subset of s j The number of samples, u is n possible values {v1, v2…, v n};
[0046] The information gain formula of the risk calculation module for decision tree prediction of enterprise financial data is: Gain(S, A) = Ent(S) - Ent(S, A), and the corresponding information gain value is obtained by calculating the entropy difference between the conditional entropy Ent(S, A) and the information entropy Ent(S);
[0047] The risk calculation module uses the split information calculation formula for decision tree prediction of enterprise financial data as follows:
[0048] The split information calculation formula can normalize the information gain;
[0049] The information gain ratio calculation formula of the risk calculation module for decision tree prediction of enterprise financial data is:
[0050]
[0051] The Enterprise Financial Risk Label divides enterprise risks into four categories:
[0052] If the information gain ratio is 0-0.2, the risk level is four;
[0053] If the information gain ratio is 0.21-0.4, the risk level is three;
[0054] If the information gain ratio is 0.41-0.6, the risk level is two;
[0055] If the information gain ratio is 0.61-0.8, the risk level is one.
[0056] In another embodiment, the specific calculation process of information entropy calculation is:
[0057] Assume that the enterprise risk categories are divided into four categories M1-M4, select the financial report data, investment data, tax data and audit data in the enterprise financial feature set to supplement M1-M4 respectively, M1 (financial report data) = 40, M2 (investment data) = 30, M3 (tax data) = 20, M4 (audit data) = 10, the total number of samples |M| is: M1+M2+M3+M4=100, calculate the probability of each category according to the total number of samples and the number of sample categories, the probability Probability Probability Probability Calculate the information entropy of the data set S, Ent(S) = (-0.528-0.521-0.464-0.332) = 1.845;
[0059] The specific calculation process of conditional entropy calculation is:
[0060] Assume that u takes three values {v1, v2, v3}, and |S j | is divided into three subsets |S1|, |S2|, |S3|, the number of samples in each subset is |S3|=50, |S2|=30, |S1|=20, and the entropy of each subset is: Ent(S1)=1, Ent(S1)=0.9, Ent(S1)=0.8, and the conditional entropy is calculated.
[0061] The calculation process of the information gain value is: Gain(S, A)=1.845-0.93=0.915;
[0062] The specific calculation process of split information calculation is:
[0063]
[0064] The calculation process for calculating the information gain ratio is: Therefore, according to the calculated information gain ratio, it can be concluded that the information gain ratio is between 0.61-0.8, so the financial risk level of the enterprise is two.
[0065] refer to Figure 3 The early warning control module is used to obtain the information gain ratio and convert it into indicator results, and draw a trend chart of the enterprise's indicator results in chronological order to show the changing trend of enterprise risks, and add enterprise financial risk labels according to the indicator results. When the enterprise financial risk label exceeds the threshold, the early warning is triggered. The client renders and generates an early warning icon based on the enterprise financial risk label, and at the same time obtains the enterprise information data in the database module, and draws a trend chart in chronological order in combination with the enterprise financial risk label.
[0066] The horizontal axis of the trend chart represents time, and the vertical axis represents the risk level. Different colors or marks are used to distinguish different risk levels, and prominent points are set on the trend chart according to the warning trigger time to highlight the warning events that occur when the risk exceeds the threshold.
[0067] Please refer to Figure 2 and Figure 3 This embodiment also provides an enterprise financial risk early warning and control method based on big data analysis, including the following steps:
[0068] S1. Initialize the crawler program and initiate an HTTP request to the specified website to crawl the enterprise financial data, and store the obtained enterprise financial data in a CSV file;
[0069] S2. Build a database and establish database tables in sequence. According to the information categories of the enterprise financial data, establish financial report information tables, investment activity information tables, tax information tables, audit report information tables, financing activity information tables, and shareholder equity information tables, and write the crawled enterprise financial data into each database table according to the information categories;
[0070] S3. Obtain data from each database table and convert it into a corporate financial feature set, build a decision tree model, and use the C5.0 algorithm to train the model on the database corporate financial data to generate information gain ratios and corporate financial risk labels;
[0071] S4, selecting enterprise financial data in the enterprise financial feature set and inputting it into the decision tree prediction model to obtain a target decision path in each decision tree, wherein the target decision path includes a plurality of sub-nodes, and calculating the information gain ratio of the end point of the corresponding target decision path according to the information gain of the sub-nodes in the decision tree;
[0072] S5. Draw a trend chart based on the information gain ratio indicator results, and add corporate financial risk labels based on the indicator results. When the corporate financial risk label exceeds the threshold, an early warning is triggered. The front end generates an early warning icon based on the corporate financial risk label rendering.
[0073] In summary: the present invention realizes real-time update of enterprise financial data by crawling enterprise financial data from the Internet in real time and storing it as CSV, and performs data processing and conversion to improve the accuracy of risk assessment. In addition, the data is converted into an enterprise financial feature set through data preprocessing.
[0074] The present invention uses the C5.0 algorithm to construct a decision tree prediction model to predict the decision path and information gain ratio of enterprise risks, and draws an enterprise indicator trend chart and displays the corresponding early warning icon based on the model results, which effectively helps enterprises monitor risks in real time, obtain dynamic risk warnings and enhance the early warning and management capabilities of enterprise financial risks.
[0075] Parts not involved in the present invention are the same as the prior art or can be implemented by the prior art. Although the embodiments of the present invention have been shown and described, it is understood by those skilled in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. An enterprise financial risk early warning and control system based on big data analysis, including a data acquisition module, a data preprocessing module, a risk assessment module and an early warning control module, characterized in that: The data acquisition module is used to crawl the enterprise financial data after initiating a request from the designated website, construct a database and establish database tables in sequence, respectively establish a financial report information table, an investment activity information table, a tax information table, an audit report information table, a financing activity information table and a shareholder equity information table according to the information category of the enterprise financial data, and write the crawled enterprise financial data into each database table according to the information category; The data preprocessing module is used to obtain data from each database table and convert it into an enterprise financial feature set, build a decision tree prediction model and use the c5.0 algorithm to perform machine training on the enterprise financial feature set, and build an enterprise financial risk label based on the information gain ratio generated by the machine training; The risk assessment module is used to obtain the target decision path in each decision tree through the decision tree prediction model according to the enterprise financial data in the selected enterprise financial feature set, wherein the target decision path includes a plurality of sub-nodes, and calculate the information gain ratio of the corresponding target decision path end point according to the information gain of the sub-nodes in the decision tree; The early warning control module is used to obtain the information gain ratio and convert it into an indicator result, and draw a trend chart of the enterprise's indicator results in chronological order to show the changing trend of enterprise risks, and add enterprise financial risk labels according to the indicator results. When the enterprise financial risk label exceeds the threshold, a warning is triggered, and the client generates a warning icon based on the enterprise financial risk label rendering.
2. The enterprise financial risk early warning and control system based on big data analysis according to claim 1 is characterized by: The enterprise financial feature set includes financial report data, investment data, tax data, audit data, financing data and shareholder equity data; The information entropy calculation formula for the decision tree prediction of enterprise financial data by the risk calculation module is: Among them, S is the enterprise financial feature set, P i is the probability of the i-th operating risk category in the enterprise financial characteristics set, Among them, s i is the number of samples of the i-th category of the enterprise financial feature set, |S| is the total number of samples of the enterprise financial feature set, and the information entropy calculation formula is used to evaluate the degree of confusion of the current enterprise financial feature set; The conditional entropy calculation formula for the decision tree prediction of enterprise financial data by the risk calculation module is: Among them, s j is a subset of the enterprise financial feature set, |S j | is a subset of s j The number of samples, u is n possible values {v1, v2…, v n }; The information gain formula of the risk calculation module for decision tree prediction of enterprise financial data is: Gain(S, A)=Ent(S)-Ent(S, A), and the corresponding information gain value is obtained by calculating the entropy difference between the conditional entropy Ent(S, A) and the information entropy Ent(S); The risk calculation module calculates the split information formula for decision tree prediction of enterprise financial data as follows: The split information calculation formula can normalize the information gain; The information gain ratio calculation formula for the decision tree prediction of enterprise financial data by the risk calculation module is:
3. The enterprise financial risk early warning and control system based on big data analysis according to claim 1 is characterized by: After inputting the enterprise financial feature set, the data preprocessing module reads 20% of the data for decision tree prediction model training and reads 80% of the data for decision tree prediction model testing.
4. The enterprise financial risk early warning and control system based on big data analysis according to claim 2 is characterized by: The data preprocessing module divides the enterprise financial risk labels into four enterprise risk categories: If the information gain ratio is 0-0.2, the risk level is four; If the information gain ratio is 0.21-0.4, the risk level is three; If the information gain ratio is 0.41-0.6, the risk level is two; If the information gain ratio is 0.61-0.8, the risk level is one.
5. The enterprise financial risk early warning and control system based on big data analysis according to claim 2 is characterized by: The enterprise information data in the database module is obtained, and a trend chart is drawn in chronological order in combination with the enterprise financial risk labels.
6. The enterprise financial risk early warning and control system based on big data analysis according to claim 5 is characterized by: The horizontal axis of the trend chart represents time, and the vertical axis represents risk level. Different colors or marks are used to distinguish different risk levels.
7. The enterprise financial risk early warning and control system based on big data analysis according to claim 5 is characterized by: A prominent point is set on the trend chart according to the warning triggering time to highlight the warning event that occurs when the risk exceeds the threshold.
8. The enterprise financial risk early warning and control system based on big data analysis according to claim 1 is characterized by: The early warning control module is also used to send early warning text messages and emails.
9. The enterprise financial risk early warning and control system based on big data analysis according to claim 1 is characterized by: The data preprocessing module reads the enterprise financial data in the database. If the current enterprise financial data is missing or repeated, the missing value is filled by selecting the mean, median or mode through interpolation, and the repeated records in the enterprise financial data are identified and removed.
10. The enterprise financial risk early warning and control method based on big data analysis is characterized by: The method comprises the following steps: S1. Initialize the crawler program and initiate an HTTP request to the specified website to crawl the enterprise financial data, and store the obtained enterprise financial data in a CSV file; S2. Build a database and establish database tables in sequence. According to the information categories of the enterprise financial data, establish financial report information tables, investment activity information tables, tax information tables, audit report information tables, financing activity information tables, and shareholder equity information tables, and write the crawled enterprise financial data into each database table according to the information categories; S3. Obtain data from each database table and convert it into a corporate financial feature set, build a decision tree model, and use the C5.0 algorithm to train the model on the database corporate financial data to generate information gain ratios and corporate financial risk labels; S4, selecting enterprise financial data in the enterprise financial feature set and inputting it into the decision tree prediction model to obtain a target decision path in each decision tree, wherein the target decision path includes a plurality of sub-nodes, and calculating the information gain ratio of the end point of the corresponding target decision path according to the information gain of the sub-nodes in the decision tree; S5. Draw a trend chart based on the information gain ratio indicator results, and add corporate financial risk labels based on the indicator results. When the corporate financial risk label exceeds the threshold, an early warning is triggered. The front end generates an early warning icon based on the corporate financial risk label rendering.
