Enterprise risk early warning method, device and equipment and storage medium
By applying preset predata processing and random forest algorithms in the enterprise risk control system and using vector databases to predict enterprise risk, the problem of insufficient timeliness and accuracy of risk prediction in the existing technology is solved, and more efficient enterprise risk management is achieved.
Patent Information
- Application Number
- CN202510047443.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-04-25
AI Technical Summary
The existing technology is difficult to ensure timeliness and accuracy in corporate risk prediction, resulting in the inability of corporate decision makers to take timely measures to deal with risks, which may result in unnecessary losses.
By applying preset predata processing, feature extraction and machine learning model training in enterprise risk control systems, risk prediction is used to use random forest algorithms and vector databases to ensure the timeliness, accuracy and credibility of risk prediction.
It improves the timeliness, accuracy and credibility of corporate risk prediction, so that corporate decision makers can take timely measures to reduce losses, thereby improving the efficiency of corporate risk management.
Smart Images

Figure CN119886453A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of investment service technology, and in particular to an enterprise risk early warning method, device, equipment and storage medium. Background Art
[0002] In modern enterprise management, enterprises face various risks, especially in legal and financial aspects. In existing risk identification schemes, risk prediction for a certain enterprise is often based only on a large amount of relevant data of the enterprise, and sometimes it is necessary to rely on manual experience to judge whether there is a risk. This will not guarantee the timeliness and accuracy of risk prediction, and may further lead to the decision makers of the enterprise being unable to take timely measures to deal with risks and incur unnecessary losses. Summary of the invention
[0003] In view of this, the purpose of the present invention is to provide an enterprise risk early warning method, device, equipment and storage medium, which can effectively improve the timeliness, accuracy and credibility of enterprise risk prediction, so that enterprise decision makers can take measures in advance to reduce losses according to risk prediction results, thereby improving the efficiency of enterprise risk management. The specific scheme is as follows:
[0004] In a first aspect, the present application provides an enterprise risk early warning method, which is applied to an enterprise risk control system, comprising:
[0005] Based on the preset pre-data processing, the original enterprise data is subjected to enterprise feature extraction and enterprise prediction variable definition, and the obtained enterprise features and enterprise prediction variables are processed according to the preset numerical feature conversion rules to obtain the target enterprise features and the corresponding target prediction variables;
[0006] Determine a corresponding enterprise feature vector based on the target enterprise feature, and store the enterprise feature vector and the corresponding target prediction variable in a preset vector database;
[0007] By extracting data from the preset vector database and dividing the data set, a corresponding training set and a test set are determined;
[0008] When training the machine learning model based on the random forest algorithm and the training set, a preset vector database search is performed by calculating the distance metric information corresponding to each of the enterprise feature vectors in the training set, so as to determine the corresponding risk prediction result based on the obtained search result and the current machine learning model, so as to complete the machine learning model training;
[0009] The test set is used to perform a machine learning model test on the current machine learning model after training, so that after the test passes, an enterprise risk warning operation is triggered based on the obtained target machine learning model.
[0010] Optionally, the processing of the obtained enterprise features and enterprise prediction variables according to preset numerical feature conversion rules includes:
[0011] Convert the establishment date in the enterprise characteristics into the years of establishment of the enterprise to obtain the corresponding first target enterprise characteristics;
[0012] Numerical representation or binary variable representation is performed on the cancellation risk parameters in the enterprise characteristics and the obtained enterprise prediction variables to obtain the corresponding second target enterprise characteristics and target prediction variables; the cancellation risk parameters include operating income information, debt ratio, market competition level and litigation record, and the enterprise prediction variables include cancellation variables and revocation variables;
[0013] The registration status information and the registration authority in the enterprise characteristics are converted into numerical features based on unique hot encoding to determine the corresponding third target enterprise characteristics.
[0014] Optionally, determining a corresponding enterprise feature vector based on the target enterprise feature includes:
[0015] The first target enterprise characteristics, the second target enterprise characteristics and the third target enterprise characteristics of each enterprise are counted, and a characteristic vector is constructed based on the statistical result to determine the enterprise characteristic vector corresponding to each of the enterprises.
[0016] Optionally, the performing machine learning model training based on the random forest algorithm and the training set includes:
[0017] Based on the random forest algorithm, the training set, and the first machine learning model and the second machine learning model in the current machine learning model, enterprise cancellation prediction and enterprise revocation prediction are performed respectively to complete the machine learning model training operations corresponding to the first machine learning model and the second machine learning model respectively.
[0018] Optionally, the performing a preset vector database search by calculating distance metric information corresponding to each of the enterprise feature vectors in the training set includes:
[0019] For any of the enterprise feature vectors in the training set, the cosine similarity and the Euclidean distance between the current enterprise feature vector and each of the enterprise feature vectors in the database are determined through the preset vector database to determine the distance measurement information corresponding to the current enterprise feature vector;
[0020] A vector search is performed on the preset vector database based on the distance metric information to obtain a search result corresponding to the current enterprise feature vector.
[0021] Optionally, determining a corresponding risk prediction result based on the obtained search result and the current machine learning model includes:
[0022] Based on the search results, feature fusion is performed on the current enterprise feature vector to obtain a fused feature vector;
[0023] The current machine learning model and the fused feature vector are used to perform risk prediction to determine a risk prediction result corresponding to the current enterprise feature vector; the risk prediction result is the predicted value of the corresponding target prediction variable.
[0024] Optionally, performing a machine learning model test on the trained current machine learning model using the test set includes:
[0025] The machine learning model is tested using the test set and the current machine learning model after training, and based on the obtained test results, enterprise feature importance analysis, machine learning model performance evaluation and confusion matrix construction are performed to determine whether the current machine learning model after training passes the test.
[0026] In a second aspect, the present application provides an enterprise risk early warning device, which is applied to an enterprise risk control system, including:
[0027] A data preprocessing module is used to extract enterprise features and define enterprise prediction variables from the original enterprise data based on preset pre-data processing, and process the obtained enterprise features and enterprise prediction variables according to preset numerical feature conversion rules to obtain target enterprise features and corresponding target prediction variables;
[0028] A vector storage module, used to determine a corresponding enterprise feature vector based on the target enterprise feature, and store the enterprise feature vector and the corresponding target prediction variable in a preset vector database;
[0029] A data extraction module, used to extract data from the preset vector database and divide the data set to determine a corresponding training set and a test set;
[0030] A machine learning model training module, used to perform a preset vector database search by calculating the distance metric information corresponding to each of the enterprise feature vectors in the training set when the machine learning model training is performed based on the random forest algorithm and the training set, so as to determine the corresponding risk prediction result based on the obtained search result and the current machine learning model, so as to complete the machine learning model training;
[0031] The risk warning module is used to use the test set to perform machine learning model testing on the current machine learning model after training, so as to trigger an enterprise risk warning operation based on the obtained target machine learning model after the test passes.
[0032] In a third aspect, the present application provides an electronic device, including:
[0033] Memory, used to store computer programs;
[0034] The processor is used to execute the computer program to implement the steps of the aforementioned enterprise risk early warning method.
[0035] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, which implements the steps of the aforementioned enterprise risk warning method when executed by a processor.
[0036] It can be seen that in this application, through the enterprise risk control system, firstly, the original enterprise data is subjected to enterprise feature extraction and enterprise prediction variable definition based on the preset pre-data processing, and the obtained enterprise features and enterprise prediction variables are processed according to the preset numerical feature conversion rules to obtain the target enterprise features and the corresponding target prediction variables; the corresponding enterprise feature vector is determined based on the target enterprise features, and the enterprise feature vector and the corresponding target prediction variables are stored in the preset vector database; the corresponding training set and test set are determined by extracting data from the preset vector database and dividing the data set; when the machine learning model is trained based on the random forest algorithm and the training set, the preset vector database is retrieved by calculating the distance metric information corresponding to each of the enterprise feature vectors in the training set, so as to determine the corresponding risk prediction result based on the obtained retrieval result and the current machine learning model, so as to complete the machine learning model training; the machine learning model is tested on the trained current machine learning model using the test set, so as to trigger the enterprise risk warning operation based on the obtained target machine learning model after the test passes. That is, in this application, the original enterprise data is collected through the enterprise risk control system, enterprise features are extracted, and prediction variables are defined to determine the enterprise feature vector and store it in the preset vector database. Then, the training set is determined using the preset vector database, and when the machine learning model is trained in combination with the random forest algorithm, the database is retrieved based on the distance measurement information of the feature vectors in the training set to complete the training using the current machine learning model. Then, the trained current machine learning model is tested using the test set, so that after the test passes, the target machine learning model is obtained and the enterprise risk warning operation is triggered. In this way, the timeliness, accuracy and credibility of enterprise risk prediction can be effectively improved, so that enterprise decision makers can take measures in advance to reduce losses based on the risk prediction results, thereby improving the efficiency of enterprise risk management. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0038] Figure 1 A flow chart of an enterprise risk early warning method provided for this application;
[0039] Figure 2 A specific enterprise risk early warning method framework diagram provided for this application;
[0040] Figure 3 A schematic diagram of the importance score of an enterprise feature provided for this application;
[0041] Figure 4 A confusion matrix diagram for cancellation risk prediction provided for this application;
[0042] Figure 5 A schematic diagram of the structure of an enterprise risk early warning device provided for this application;
[0043] Figure 6 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION
[0044] 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.
[0045] In existing risk identification schemes, when predicting risks for a certain enterprise, predictions are often made only based on a large amount of relevant data of the enterprise, and sometimes it is necessary to rely on manual experience to determine whether there is a risk. This will not guarantee the timeliness and accuracy of risk predictions, and may further cause the decision makers of the enterprise to be unable to take timely measures to deal with risks and incur unnecessary losses. To this end, this application provides an enterprise risk early warning scheme that can effectively improve the timeliness, accuracy and credibility of enterprise risk predictions, so that enterprise decision makers can take measures in advance to reduce losses based on risk prediction results in a timely manner, thereby improving the efficiency of enterprise risk management.
[0046] See also Figure 1 As shown, an embodiment of the present invention discloses an enterprise risk early warning method, which is applied to an enterprise risk control system, including:
[0047] Step S11, extracting enterprise features and defining enterprise prediction variables from the original enterprise data based on preset pre-data processing, and processing the obtained enterprise features and enterprise prediction variables according to preset numerical feature conversion rules to obtain target enterprise features and corresponding target prediction variables.
[0048] In this embodiment, the enterprise risk control system builds an enterprise risk early warning system based on a preset vector database and a machine learning model, specifically analyzing and predicting whether the enterprise is at risk of cancellation or revocation, wherein the preset vector database may be Milvus.
[0049] It should be understood that it is very important to select appropriate features as input data for processing and analysis, because whether the features are appropriate will directly affect the prediction effect of the model. In this embodiment, features will be extracted from the original enterprise data, including the legal representative (L i ), legal person title (T i )、Registration Status(S i )、Registration Authority (A i )、Registered capital( )、Paid-in capital( )、Years of establishment of the enterprise( )、Business Term(D i ), and the additional operating income ( )、Debt Ratio( )、Market competition level( ) and legal proceedings records ( , also known as litigation records). These characteristics can fully reflect the business status, financial health, and legal compliance of the enterprise, and help to deeply assess the risk status of the enterprise. In addition, it is also important to define predictive variables, setting them as whether to cancel (1 means cancellation, 0 means no cancellation) and whether it is revoked (1 means revoked, 0 means not revoked) to facilitate subsequent model training and evaluation.
[0050] Further, combined with Figure 2 As shown in the figure, in the data preprocessing stage, the original data needs to be processed first, the date field is converted into the company's establishment year, and the category features are converted into numerical format using one-hot encoding. This process not only ensures the uniformity and operability of the data, but also provides standardized input for subsequent machine learning algorithms. Specifically, regarding the conversion of each company's features: through the company's establishment year = current date - establishment date, the establishment date in the company feature (E i) is converted into the years of establishment of the enterprise to obtain the corresponding first target enterprise characteristics. The cancellation risk parameters in the enterprise characteristics and the obtained enterprise prediction variables are expressed numerically or as binary variables to obtain the corresponding second target enterprise characteristics and target prediction variables; the cancellation risk parameters include operating income information, debt ratio, market competition level and litigation records, and the enterprise prediction variables include cancellation variables and revocation variables; among them, legal litigation records are expressed as binary variables, and the remaining cancellation risk parameters can be expressed numerically. Based on unique hot coding, the registration status information (such as normal, cancelled, etc.) in the enterprise characteristics and the registration authority are converted into numerical features to determine the corresponding third target enterprise characteristics. The legal representative and the legal person title can be expressed using text embedding or unique hot coding. The registered capital and paid-in capital can be directly expressed numerically. The business term can be directly calculated to obtain the effective business term.
[0051] Step S12: determining a corresponding enterprise feature vector based on the target enterprise feature, and storing the enterprise feature vector and the corresponding target prediction variable in a preset vector database.
[0052] In this embodiment, a feature vector is then constructed and stored. That is, the first target enterprise feature, the second target enterprise feature, and the third target enterprise feature of each enterprise are counted, and a feature vector is constructed based on the statistical results to determine the enterprise feature vector corresponding to each of the enterprises. Constructing the enterprise feature vector X i :
[0053] .
[0054] Then, the enterprise feature vectors and target prediction variables corresponding to each enterprise are inserted into the Milvus database as the basis for subsequent analysis. As a high-performance vector database, Milvus can effectively manage large-scale feature data, support fast retrieval and similarity calculation, and provide strong technical support for risk assessment.
[0055] Step S13: extracting data from the preset vector database and dividing the data set to determine a corresponding training set and a test set.
[0056] In this embodiment, next, the enterprise feature vector and target prediction variables are extracted from Milvus and divided into a training set and a test set to start training the current machine learning model.
[0057] Step S14: When training the machine learning model based on the random forest algorithm and the training set, a preset vector database search is performed by calculating the distance measurement information corresponding to each of the enterprise feature vectors in the training set, so as to determine the corresponding risk prediction results based on the obtained retrieval results and the current machine learning model to complete the machine learning model training.
[0058] In this embodiment, the random forest algorithm is used to train two models: one for predicting whether the enterprise will be deregistered, and the other for predicting whether it will be revoked. The random forest algorithm is widely used for its high accuracy and good generalization ability, and is particularly suitable for processing high-dimensional data with complex nonlinear relationships. These models will be trained based on previously prepared features to improve the accuracy of the prediction. At the same time, cross-validation will be performed during the model training process to ensure that the model performs well on unseen data, thereby improving the credibility of the system. That is, based on the random forest algorithm, the training set, and the first machine learning model and the second machine learning model in the current machine learning model, enterprise deregistration prediction and enterprise revocation prediction are respectively performed to complete the machine learning model training operations corresponding to the first machine learning model and the second machine learning model, respectively.
[0059] It should be understood that during training, for any of the enterprise feature vectors in the training set, the cosine similarity and Euclidean distance between the current enterprise feature vector and each of the enterprise feature vectors in the database are determined through the preset vector database to determine the distance measurement information corresponding to the current enterprise feature vector; based on the distance measurement information, the preset vector database is searched for vectors to obtain the search results corresponding to the current enterprise feature vector. Among them, the cosine similarity is used to evaluate the similarity of enterprises, and the formula is as follows:
[0060] ;
[0061] In the formula, For enterprise i; For enterprise j; is the k-th enterprise feature from enterprise i; is the k-th enterprise feature from enterprise j; is the cosine similarity between enterprise i and other enterprises; n is the number of enterprise features.
[0062] At the same time, the Euclidean distance is also calculated to identify similar companies. The formula is as follows:
[0063] ;
[0064] In the formula, is the Euclidean distance between enterprise i and other enterprises.
[0065] Furthermore, after retrieving the preset vector database using the distance metric information obtained by cosine similarity and Euclidean distance, the current enterprise feature vector is feature fused based on the retrieval result to obtain a fused feature vector; the current machine learning model and the fused feature vector are used to perform risk prediction to determine the risk prediction result corresponding to the current enterprise feature vector; the risk prediction result is the corresponding predicted value of the target prediction variable. Regarding the use of random forest or other machine learning models for training, the output prediction risk of the model has:
[0066] ;
[0067] In the formula, is the risk prediction result of enterprise i; M is the number of trees in the current machine learning model; is the risk prediction result of the mth tree for enterprise i.
[0068] Final prediction of whether there is a risk of revocation:
[0069] ;
[0070] That is, if the model output exceeds the set threshold, it is predicted that the enterprise is at risk of being revoked. Combining the above content, it can be seen that if the model output is greater than the threshold, the value of the target prediction variable is 1, otherwise it is 0.
[0071] Step S15: Use the test set to perform a machine learning model test on the trained current machine learning model, so that after the test passes, an enterprise risk warning operation is triggered based on the obtained target machine learning model.
[0072] In this embodiment, after the training is completed, the test set and the current machine learning model after training are used to test the machine learning model, and based on the obtained test results, the enterprise feature importance analysis, machine learning model performance evaluation and confusion matrix construction are performed to determine whether the current machine learning model after training passes the test. After passing the test, the obtained target machine learning model can be used to predict the enterprise, specifically through the feature retrieval vector database of the enterprise and feature fusion to complete the model prediction, and the specific risk level can be determined based on the predicted results, and a report can be generated.
[0073] In a specific implementation, 1,000 pieces of real original enterprise data were used, and based on these data, a random forest algorithm was used to perform prediction training on enterprise deregistration risk. The training data included enterprise characteristics such as registered capital, paid-in capital, years of establishment, debt ratio, and market competition. Feature importance analysis was performed through testing, and the feature importance scores extracted from the model were as follows: Figure 3As shown, registered capital: 0.251; paid-in capital: 0.250; years of establishment: 0.177; debt ratio: 0.255; market competition: 0.067. Regarding the prediction accuracy of the model: the overall prediction accuracy of the model is 50.5%, indicating that the model's performance in cancellation prediction is relatively basic and may require more data or features to optimize. The generated classification report is: precision is 0.47 and 0.55, and recall is 0.54 and 0.47. In addition, the F1 score shows the balanced performance of the model for classification tasks, with a score close to 0.50. There is also a confusion matrix: the performance distribution of the model in predicting non-cancellation and cancellation of enterprises is as follows Figure 4 As shown, it helps to intuitively understand the prediction errors and correct classifications. If the result, that is, result['Is it cancelled'] is 1, it means that the enterprise is at risk of cancellation; if it is 0, it means there is no cancellation risk. If result['Is it revoked'] is 1, it means that the enterprise is at risk of revocation; if it is 0, it means there is no revocation risk.
[0074] In summary, this embodiment uses a vector database, and in the application scenario of model training, it uses advanced storage technology and retrieval algorithms, which can quickly locate and extract high-dimensional vector data required for model training. It not only shortens the time for data preparation, but also accelerates the overall process of model training, obtains training results faster, and thus accelerates product iteration and optimization. In addition, this embodiment combines cosine similarity with random forests, uses cosine similarity to measure the similarity between feature vectors, effectively processes high-dimensional sparse data, improves the accuracy of feature matching, and provides a more accurate data basis for enterprise risk prediction; by integrating multiple decision trees, the random forest algorithm can reduce the risk of overfitting and improve the generalization ability of the model, thereby optimizing the enterprise risk prediction model. In this way, the advantages of cosine similarity in processing high-dimensional data are utilized, and the powerful performance of random forests in classification and regression problems is brought into play, which jointly improves the accuracy and efficiency of enterprise risk prediction and provides strong support for risk management of financial institutions.
[0075] It can be seen that in the embodiment of the present application, through the enterprise risk control system, firstly, the original enterprise data is subjected to enterprise feature extraction and enterprise prediction variable definition based on the preset pre-data processing, and the obtained enterprise features and enterprise prediction variables are processed according to the preset numerical feature conversion rules to obtain the target enterprise features and the corresponding target prediction variables; the corresponding enterprise feature vector is determined based on the target enterprise features, and the enterprise feature vector and the corresponding target prediction variables are stored in the preset vector database; the corresponding training set and test set are determined by extracting data from the preset vector database and dividing the data set; when the machine learning model is trained based on the random forest algorithm and the training set, the preset vector database is retrieved by calculating the distance metric information corresponding to each of the enterprise feature vectors in the training set, so as to determine the corresponding risk prediction result based on the obtained retrieval result and the current machine learning model, so as to complete the machine learning model training; the machine learning model is tested on the trained current machine learning model using the test set, so as to trigger the enterprise risk warning operation based on the obtained target machine learning model after the test passes. That is, in the present application, the original enterprise data is collected through the enterprise risk control system, enterprise features are extracted, and prediction variables are defined to determine the enterprise feature vector and store it in the preset vector database. Then, the training set is determined using the preset vector database, and when the machine learning model is trained in combination with the random forest algorithm, the database is retrieved based on the distance measurement information of the feature vectors in the training set to complete the training using the current machine learning model. Then, the trained current machine learning model is tested using the test set, so that after the test passes, the target machine learning model is obtained and the enterprise risk warning operation is triggered. In this way, the timeliness, accuracy and credibility of enterprise risk prediction can be effectively improved, so that enterprise decision makers can take measures in advance to reduce losses based on the risk prediction results, thereby improving the efficiency of enterprise risk management.
[0076] See also Figure 5 As shown, the embodiment of the present application also discloses an enterprise risk early warning device, which is applied to the enterprise risk control system, including:
[0077] The data preprocessing module 11 is used to extract enterprise features and define enterprise prediction variables from the original enterprise data based on the preset pre-data processing, and process the obtained enterprise features and enterprise prediction variables according to the preset numerical feature conversion rules to obtain target enterprise features and corresponding target prediction variables;
[0078] A vector storage module 12, configured to determine a corresponding enterprise feature vector based on the target enterprise feature, and store the enterprise feature vector and the corresponding target prediction variable in a preset vector database;
[0079] A data extraction module 13 is used to extract data from the preset vector database and divide the data set to determine a corresponding training set and a test set;
[0080] The machine learning model training module 14 is used to perform a preset vector database search by calculating the distance metric information corresponding to each of the enterprise feature vectors in the training set when the machine learning model training is performed based on the random forest algorithm and the training set, so as to determine the corresponding risk prediction result based on the obtained search result and the current machine learning model to complete the machine learning model training;
[0081] The risk warning module 15 is used to use the test set to perform a machine learning model test on the trained current machine learning model, so as to trigger an enterprise risk warning operation based on the obtained target machine learning model after the test passes.
[0082] Among them, for more specific working processes of the above-mentioned modules, please refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.
[0083] It can be seen that in this application, the original enterprise data is collected through the enterprise risk control system, the enterprise characteristics are extracted, and the prediction variables are defined to determine the characteristic vector of the enterprise and store it in the preset vector database. Then the preset vector database is used to determine the training set, and when the machine learning model is trained in combination with the random forest algorithm, the database is retrieved based on the distance measurement information of the characteristic vector in the training set to complete the training using the current machine learning model. Then the current machine learning model after training is tested with the test set, so that after the test passes, the target machine learning model is obtained and the enterprise risk warning operation is triggered. In this way, the timeliness, accuracy and credibility of enterprise risk prediction can be effectively improved, so that enterprise decision makers can take measures in advance to reduce losses according to the risk prediction results in a timely manner, thereby improving the efficiency of enterprise risk management.
[0084] In some specific embodiments, the data preprocessing module 11 can be specifically used to convert the establishment date in the enterprise characteristics into the years of establishment of the enterprise to obtain the corresponding first target enterprise characteristics; to represent the cancellation risk parameters in the enterprise characteristics and the obtained enterprise prediction variables numerically or binary variables to obtain the corresponding second target enterprise characteristics and target prediction variables; the cancellation risk parameters include operating income information, debt ratio, market competition level and litigation records, and the enterprise prediction variables include cancellation variables and revocation variables; based on unique hot coding, the registration status information and registration authority in the enterprise characteristics are converted into numerical features to determine the corresponding third target enterprise characteristics.
[0085] In some specific embodiments, the vector storage module 12 can be specifically used to count the first target enterprise characteristics, the second target enterprise characteristics and the third target enterprise characteristics of each enterprise, and construct feature vectors based on the statistical results to determine the enterprise feature vectors corresponding to each of the enterprises.
[0086] In some specific embodiments, the machine learning model training module 14 can be specifically used to perform enterprise cancellation prediction and enterprise revocation prediction based on the random forest algorithm, the training set, and the first machine learning model and the second machine learning model in the current machine learning model, so as to complete the machine learning model training operations corresponding to the first machine learning model and the second machine learning model, respectively.
[0087] In some specific embodiments, the machine learning model training module 14 can be specifically used to determine, for any of the enterprise feature vectors in the training set, the cosine similarity and Euclidean distance between the current enterprise feature vector and each of the enterprise feature vectors in the database through the preset vector database, so as to determine the distance measurement information corresponding to the current enterprise feature vector; and perform vector retrieval on the preset vector database based on the distance measurement information to obtain a retrieval result corresponding to the current enterprise feature vector.
[0088] In some specific embodiments, the machine learning model training module 14 can be specifically used to perform feature fusion on the current enterprise feature vector based on the retrieval results to obtain a fused feature vector; use the current machine learning model and the fused feature vector to perform risk prediction to determine the risk prediction result corresponding to the current enterprise feature vector; the risk prediction result is the corresponding predicted value of the target prediction variable.
[0089] In some specific embodiments, the risk warning module 15 can also be used to perform machine learning model testing using the test set and the current machine learning model after training, and perform enterprise feature importance analysis, machine learning model performance evaluation, and confusion matrix construction based on the obtained test results to determine whether the current machine learning model after training has passed the test.
[0090] Furthermore, the embodiment of the present application also discloses an electronic device, Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0091] Figure 6A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the enterprise risk early warning method disclosed in any of the above embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0092] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0093] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0094] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, and can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the enterprise risk early warning method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include computer programs that can be used to complete other specific tasks.
[0095] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the enterprise risk early warning method disclosed above. The specific steps of the method can refer to the corresponding contents disclosed in the above embodiments, and will not be repeated here.
[0096] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0097] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0098] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0099] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0100] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. An enterprise risk early warning method, characterized in that: Applied to enterprise risk control systems, including: Based on the preset pre-data processing, the original enterprise data is subjected to enterprise feature extraction and enterprise prediction variable definition, and the obtained enterprise features and enterprise prediction variables are processed according to the preset numerical feature conversion rules to obtain the target enterprise features and the corresponding target prediction variables; Determine a corresponding enterprise feature vector based on the target enterprise feature, and store the enterprise feature vector and the corresponding target prediction variable in a preset vector database; By extracting data from the preset vector database and dividing the data set, a corresponding training set and a test set are determined; When training the machine learning model based on the random forest algorithm and the training set, a preset vector database search is performed by calculating the distance metric information corresponding to each of the enterprise feature vectors in the training set, so as to determine the corresponding risk prediction result based on the obtained search result and the current machine learning model, so as to complete the machine learning model training; The test set is used to perform a machine learning model test on the current machine learning model after training, so that after the test passes, an enterprise risk warning operation is triggered based on the obtained target machine learning model.
2. The enterprise risk early warning method according to claim 1, characterized in that: The processing of the obtained enterprise characteristics and enterprise prediction variables according to the preset numerical feature conversion rules includes: Convert the establishment date in the enterprise characteristics into the years of establishment of the enterprise to obtain the corresponding first target enterprise characteristics; Numerical representation or binary variable representation is performed on the cancellation risk parameters in the enterprise characteristics and the obtained enterprise prediction variables to obtain the corresponding second target enterprise characteristics and target prediction variables; the cancellation risk parameters include operating income information, debt ratio, market competition level and litigation record, and the enterprise prediction variables include cancellation variables and revocation variables; The registration status information and the registration authority in the enterprise characteristics are converted into numerical features based on unique hot encoding to determine the corresponding third target enterprise characteristics.
3. The enterprise risk early warning method according to claim 2 is characterized in that: The determining a corresponding enterprise feature vector based on the target enterprise feature includes: The first target enterprise characteristics, the second target enterprise characteristics and the third target enterprise characteristics of each enterprise are counted, and a characteristic vector is constructed based on the statistical result to determine the enterprise characteristic vector corresponding to each of the enterprises.
4. The enterprise risk early warning method according to claim 2 is characterized in that: The machine learning model training based on the random forest algorithm and the training set includes: Based on the random forest algorithm, the training set, and the first machine learning model and the second machine learning model in the current machine learning model, enterprise cancellation prediction and enterprise revocation prediction are performed respectively to complete the machine learning model training operations corresponding to the first machine learning model and the second machine learning model respectively.
5. The enterprise risk early warning method according to claim 1, characterized in that: The performing of searching the preset vector database by calculating the distance measurement information respectively corresponding to each of the enterprise feature vectors in the training set includes: For any of the enterprise feature vectors in the training set, determine the cosine similarity and Euclidean distance between the current enterprise feature vector and each of the enterprise feature vectors in the database through the preset vector database to determine the distance measurement information corresponding to the current enterprise feature vector; A vector search is performed on the preset vector database based on the distance metric information to obtain a search result corresponding to the current enterprise feature vector.
6. The enterprise risk early warning method according to claim 5, characterized in that: The determining of the corresponding risk prediction result based on the obtained search result and the current machine learning model includes: Based on the search results, feature fusion is performed on the current enterprise feature vector to obtain a fused feature vector; The current machine learning model and the fused feature vector are used to perform risk prediction to determine a risk prediction result corresponding to the current enterprise feature vector; the risk prediction result is the predicted value of the corresponding target prediction variable.
7. The enterprise risk early warning method according to any one of claims 1 to 6, characterized in that: The using the test set to perform a machine learning model test on the trained current machine learning model includes: The machine learning model is tested using the test set and the current machine learning model after training, and based on the obtained test results, enterprise feature importance analysis, machine learning model performance evaluation and confusion matrix construction are performed to determine whether the current machine learning model after training passes the test.
8. An enterprise risk early warning device, characterized in that: Applied to enterprise risk control systems, including: A data preprocessing module is used to extract enterprise features and define enterprise prediction variables from the original enterprise data based on preset pre-data processing, and process the obtained enterprise features and enterprise prediction variables according to preset numerical feature conversion rules to obtain target enterprise features and corresponding target prediction variables; A vector storage module, used to determine a corresponding enterprise feature vector based on the target enterprise feature, and store the enterprise feature vector and the corresponding target prediction variable in a preset vector database; A data extraction module, used to extract data from the preset vector database and divide the data set to determine a corresponding training set and a test set; A machine learning model training module, used to perform a preset vector database search by calculating the distance metric information corresponding to each of the enterprise feature vectors in the training set when the machine learning model training is performed based on the random forest algorithm and the training set, so as to determine the corresponding risk prediction result based on the obtained search result and the current machine learning model, so as to complete the machine learning model training; The risk warning module is used to use the test set to perform machine learning model testing on the current machine learning model after training, so as to trigger an enterprise risk warning operation based on the obtained target machine learning model after the test passes.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the enterprise risk early warning method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the enterprise risk early warning method as described in any one of claims 1 to 7.