Account receivable risk prediction method and device, and medium
The method enhances accounts receivable risk prediction by standardizing data, evaluating feature importance, and using a random forest algorithm to address nonlinear interactions, improving accuracy and adaptability, and optimizing financial decision-making.
Patent Information
- Application Number
- CN202411264561.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-31
AI Technical Summary
Traditional bad debt prediction methods in ERP systems suffer from limited accuracy, subjectivity, and difficulties in handling nonlinear feature interactions, leading to high implementation costs and poor interpretability, failing to meet the needs of modern enterprises with large data volumes.
A method involving data standardization, feature importance evaluation, node segmentation, and the construction of a random forest algorithm to predict accounts receivable risk, leveraging the random forest algorithm's ability to capture nonlinear relationships.
Improves prediction accuracy, enhances model adaptability to complex business scenarios, and provides deeper understanding and management of bad debt risk, optimizing financial decision-making and improving corporate liquidity and financial health.
Smart Images

Figure CN119228565A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing and machine learning technology, and in particular to a method, device and medium for predicting accounts receivable risk. Background Art
[0002] In the financial management of ERP systems, accurately predicting the bad debt risk of accounts receivable is crucial to the capital flow and risk control of enterprises. However, traditional bad debt prediction methods are often based on simple financial indicators and manual experience, with limited prediction accuracy and strong subjectivity.
[0003] With the continuous expansion of enterprise scale and the intensification of market competition, ERP systems are increasingly used in enterprise financial management. However, traditional bad debt prediction methods can no longer meet the requirements of modern enterprises for large data volumes and more accurate prediction values, and there is an urgent need for a more efficient and accurate prediction method. Traditional bad debt prediction methods mainly focus on using complex machine learning algorithms such as neural networks and support vector machines to predict bad debts. Currently, these methods have limitations in predicting nonlinear feature interactions, which affects the prediction accuracy, and have problems such as high implementation costs and poor interpretability. Summary of the invention
[0004] The embodiments of the present application provide a method, device and medium for predicting accounts receivable risk, which are used to solve the following technical problems: the existing bad debt prediction methods have limited accuracy, strong subjectivity of human judgment, large limitations in predicting nonlinear feature interactions and inaccurate evaluation.
[0005] The present application embodiment adopts the following technical solutions:
[0006] On the one hand, an embodiment of the present application provides a method for predicting accounts receivable risk, including: merging different historical accounts receivable related data tables extracted from an ERP system to obtain an accounts receivable data set; and performing abnormal processing on data feature values of the accounts receivable data set; performing standardization processing on the accounts receivable data set for relevant matrices to obtain a sample data matrix; performing feature importance evaluation on each feature in the sample data matrix to obtain a feature importance order; and performing node segmentation processing on each feature in the sample data matrix to determine the optimal value of the node splitting condition; based on the feature importance order and the optimal value of the node splitting condition, performing repeated regression processing on the training set in the accounts receivable data set to construct a random forest algorithm based on the accounts receivable data set; using the random forest algorithm, performing model training on the accounts receivable data set to obtain an accounts receivable bad debt risk prediction model; using the accounts receivable bad debt risk prediction model, performing probability prediction on the current accounts receivable related data table under the root node of the regression tree to obtain bad debt risk information.
[0007] The embodiment of the present application standardizes data, integrates multiple features that affect bad debt risk and evaluates feature importance, obtains the optimal regression tree splitting optimal value, and leverages the advantages of the random forest algorithm in capturing nonlinear relationships. This not only improves prediction accuracy and enhances the model's adaptability to complex business scenarios, but also provides companies with a deeper understanding and management basis for bad debt risk through feature weight analysis, effectively optimizing the financial decision-making process, reducing bad debt risk, and improving corporate liquidity and financial health.
[0008] In a feasible implementation, based on the historical accounts receivable related data table extracted from the ERP system, different historical accounts receivable related data tables are merged to obtain an accounts receivable data set; the accounts receivable data set is subjected to abnormal processing of data feature values, specifically including: extracting the historical accounts receivable related data table through the ERP system; wherein the relevant data in the historical accounts receivable related data table at least includes: customer credit score, customer unit nature, historical overdue information, historical transaction information and historical collection days; based on customer ID information, the historical accounts receivable related data table is subjected to keyword classification and aggregation processing to obtain the accounts receivable data set under the same customer ID information; and the missing value features in the accounts receivable data set are classified by type. class; if the missing value feature is a numerical feature, the missing value feature is filled with the average value; wherein the numerical feature at least includes: the customer credit score and the historical transaction information; if the missing value feature is a categorical feature, the missing value feature is created into a new category; wherein the categorical feature at least includes: the nature of the customer unit and historical overdue information; through the preset box analysis technology, the abnormal value data in the receivables data set is deleted; and based on the receivables data set, a receivables data set matrix is generated; wherein each row in the receivables data set matrix represents a predicted data record, each column represents a feature vector, and each feature value contains relevant data in the historical receivables related data table.
[0009] In a feasible implementation, the receivables data set is subjected to a matrix-related standardization process to obtain a sample data matrix, specifically comprising: performing mean-variance standardization process on the numerical features in the receivables data set matrix corresponding to the receivables data set according to the same customer ID information dimension to obtain a standardized matrix; wherein, according to Get the standardized value b of the standardized matrix ij ;x ij is the eigenvalue of the i-th row and j-th column in the receivables dataset matrix, x ijavgis the average value of the j-th column features of all rows of the customer ID information belonging to the i-th row in the accounts receivable data set matrix, and w is the standard deviation of the eigenvalues in the accounts receivable data set matrix; based on the standardized matrix, the accounts receivable data set matrix is transformed into a matrix to obtain the sample data matrix.
[0010] In a feasible implementation, feature importance is evaluated for each feature in the sample data matrix to obtain a feature importance order, specifically including: randomly extracting several sample subsets from the sample data matrix, and using the sample subsets as sample training sets for random forest regression trees; recording the number of times each feature in the sample training set is used as a split node and the Gini coefficient of the current split node; and adding the number of times each feature is used and the Gini coefficient in all regression trees to obtain the total number of times each feature is used in the entire random forest and the total Gini coefficient; normalizing the total number of times and the total Gini coefficient, and determining a first order of the total number of times and a second order of the total Gini coefficient; and obtaining the feature importance order of each feature in the sample data matrix based on the first order and the second order.
[0011] In a feasible implementation, node segmentation processing is performed on each feature in the sample data matrix to determine the optimal value of the node splitting condition, specifically including: traversing the segmentation points of each feature in the sample data matrix through the root node of the random forest algorithm regression tree; calculating the residual square sum of the left subtree and the right subtree in each of the segmentation points in turn, and determining the minimized residual square and the corresponding segmentation point as the optimal value of the node splitting condition for the current node.
[0012] In a feasible implementation, based on the feature importance order and the optimal value of the node splitting condition, the training set in the accounts receivable data set is repeatedly regressed to construct a random forest algorithm based on the accounts receivable data set, specifically including: performing feature importance screening on the sample training set of the random forest regression tree according to the feature importance order to obtain importance features; using the importance features as splitting features, and splitting the regression tree leaf nodes according to the optimal value of the node splitting condition; repeating the splitting process of the regression tree leaf nodes until a decision tree is generated for each sample training set, and then obtaining the random forest algorithm based on the accounts receivable data set.
[0013] In a feasible implementation, the receivables data set is trained with the random forest algorithm to obtain a receivables bad debt risk prediction model, which specifically includes: determining the remaining several sample subsets in the sample data matrix as sample test sets; adjusting the hyperparameters of the sample test set with respect to accuracy, recall rate and score indicators with the random forest algorithm to obtain a hyperparameter combination; adjusting and judging the hyperparameter combination through cross-validation and grid search to determine the best hyperparameter combination; wherein the hyperparameters include at least: the number of decision trees, the maximum depth, the minimum number of samples required to split internal nodes, the minimum number of samples for leaf nodes and the maximum number of features; constructing the receivables bad debt risk prediction model based on model training of the sample training set and model verification and optimization under the best hyperparameter combination in the sample test set.
[0014] In a feasible implementation, the receivables bad debt risk prediction model is used to perform probability prediction on the current receivables related data table under the root node of the regression tree to obtain bad debt risk information, specifically including: inputting the current receivables feature set in the current receivables related data table into the root node of each regression tree of the receivables bad debt risk prediction model; splitting all the current receivables information in the current receivables feature set to sub-leaf nodes according to the feature importance order and the optimal value of the node splitting condition in the receivables bad debt risk prediction model; calculating the bad debt probability information on each regression tree split leaf node, and calculating the average value of the bad debt probability information in the bad debt probability set in each regression tree, to determine the bad debt risk probability information of all regression trees; and performing risk threshold judgment on the bad debt risk probability information to obtain the bad debt risk information.
[0015] In a second aspect, an embodiment of the present application also provides an accounts receivable risk prediction device, the device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor so that the at least one processor can execute an accounts receivable risk prediction method described in any of the above-mentioned embodiments.
[0016] In a third aspect, an embodiment of the present application further provides a non-volatile computer storage medium, characterized in that the storage medium is a non-volatile computer-readable storage medium, and the non-volatile computer-readable storage medium stores at least one program, each of which includes instructions, and when the instructions are executed by a terminal, the terminal executes a method for predicting accounts receivable risk described in any of the above-mentioned embodiments.
[0017] The present application provides a method, device and medium for predicting accounts receivable risk. Compared with the prior art, the embodiments of the present application have the following beneficial technical effects:
[0018] The embodiment of the present application standardizes data, integrates multiple features that affect bad debt risk and evaluates feature importance, obtains the optimal regression tree splitting optimal value, and leverages the advantages of the random forest algorithm in capturing nonlinear relationships. This not only improves prediction accuracy and enhances the model's adaptability to complex business scenarios, but also provides companies with a deeper understanding and management basis for bad debt risk through feature weight analysis, effectively optimizing the financial decision-making process, reducing bad debt risk, and improving corporate liquidity and financial health. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0020] Figure 1 A flow chart of a method for predicting accounts receivable risk provided in an embodiment of the present application;
[0021] Figure 2 A schematic diagram of the structure of an accounts receivable risk prediction device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0023] The present application embodiment provides a method for predicting accounts receivable risk, such as Figure 1 As shown, the accounts receivable risk prediction method specifically includes steps S101-S106:
[0024] S101. According to the historical accounts receivable related data tables extracted from the ERP system, different historical accounts receivable related data tables are merged to obtain an accounts receivable data set, and the data characteristic value exception processing is performed on the accounts receivable data set.
[0025] It should be noted that there are many factors that affect the normal and timely collection of accounts receivable, such as customer credit, nature of customer unit, account age, transaction frequency and total amount, due date and overdue situation, monthly balance trend of accounts receivable, whether the enterprise has a strategic relationship with the customer, market dynamics, etc. The present invention selects 11 factors, including customer credit, unit nature, historical transaction total amount, historical transaction number, historical average transaction amount, historical overdue transaction ratio, historical maximum / minimum / average overdue days, historical average collection days, and monthly balance of accounts receivable, as the initial prediction feature vector, and the influencing factors are specifically described as follows:
[0026] 1) Customer credit score: The higher the customer's credit score, the lower the bad debt risk; the lower the credit score, the higher the bad debt risk.
[0027] 2) Nature of client unit: refers to the client category, such as state-owned enterprises, private enterprises, foreign-funded enterprises, state agencies, private enterprises, etc.
[0028] 3) Historical overdue transaction ratio: The ratio of the number of overdue payments by customers to the total number of payable transactions, based on the characteristic value derived from historical transaction records.
[0029] 4) Historical overdue number: The number of times a customer's payment is overdue, based on a characteristic value derived from historical transaction records.
[0030] 5) Historical maximum / minimum / average overdue days: characteristic values derived from historical transaction records, referring to the maximum, minimum and average overdue days for customer payables.
[0031] 6) Total historical transaction amount: a characteristic value derived from historical transaction records, which refers to the total amount of payments previously made by the customer.
[0032] 7) Number of historical transactions: A characteristic value derived from historical transaction records, which refers to the total number of payments the customer has made previously.
[0033] 8) Historical average transaction amount: a characteristic value derived from historical transaction records, which refers to the average amount of payment paid by the customer for each transaction.
[0034] 9) Historical average collection days: a characteristic value derived from historical transaction records.
[0035] 10) Bad debt label: a binary variable, where 0 means it has not become a bad debt and 1 means it has become a bad debt.
[0036] Specifically, the historical accounts receivable related data table is extracted through the ERP system, wherein the relevant data in the historical accounts receivable related data table at least includes: customer credit score, customer unit nature, historical overdue information, historical transaction information and historical collection days.
[0037] Furthermore, according to the customer ID information, the historical accounts receivable related data table is classified and aggregated by keywords to obtain the accounts receivable data set under the same customer ID information. In addition, it is also necessary to generate an accounts receivable data set matrix based on the accounts receivable data set. Among them, each row in the accounts receivable data set matrix represents a predicted data record, each column represents a feature vector, and each feature value contains relevant data in the historical accounts receivable related data table.
[0038] In one embodiment, all historical accounts receivable related data tables are correctly extracted from the ERP system, including but not limited to accounts receivable records, customer information, transaction history, etc. The information scattered in different tables is merged by keywords such as customer ID to form a comprehensive data set, namely the accounts receivable data set. This data set is recorded as the accounts receivable data set matrix:
[0039]
[0040] Each row represents a predicted data record, and each column represents a feature vector. ij It refers to the i-th eigenvalue, i=1,2,3…n, j represents characteristics such as customer credit, unit nature, and historical overdue transaction ratio.
[0041] Furthermore, the missing value features in the receivables dataset are classified by type. If the missing value feature is a numerical feature, the missing value feature is filled with the average value. The numerical feature at least includes: customer credit score and historical transaction information. If the missing value feature is a categorical feature, the missing value feature is processed by creating a new category. The categorical feature at least includes: customer unit nature and historical overdue information.
[0042] Furthermore, the outlier data in the accounts receivable data set is deleted through the preset box analysis technology.
[0043] As a feasible implementation method, for the missing feature values in the accounts receivable data set, the feature type is distinguished. For numerical features (such as customer credit and transaction times), the average value is used for filling. For categorical features (such as the nature of customer units), a new category is created to represent missing values. For outlier data, the box plot analysis method is used to directly delete them.
[0044] S102, performing matrix standardization processing on the accounts receivable data set to obtain a sample data matrix.
[0045] Specifically, according to the same customer ID information dimension, the numerical features in the accounts receivable data set matrix corresponding to the accounts receivable data set are subjected to mean-variance normalization processing to obtain a normalized matrix.
[0046] Among them, according to Get the standardized value b of the standardized matrix ij .x ij is the eigenvalue of the i-th row and j-th column in the receivables dataset matrix, x ijavg is the average value of the jth column features of all rows of the customer ID information belonging to the i-th row in the accounts receivable data set matrix, w is the standard deviation of the eigenvalues in the accounts receivable data set matrix, and
[0047] Furthermore, based on the standardized matrix, the matrix of the corresponding receivables data set is transformed to obtain a sample data matrix.
[0048] As a feasible implementation method, according to Get the sample data matrix after standardized processing.
[0049] S103, evaluate the feature importance of each feature in the sample data matrix to obtain the feature importance order, and perform node splitting processing on each feature in the sample data matrix to determine the optimal value of the node splitting condition.
[0050] Specifically, several sample subsets are randomly extracted from the sample data matrix, and the sample subsets are used as sample training sets for the random forest regression tree.
[0051] As a feasible implementation method, a sub-sample set C = {c1, c2, ..., c n}, get a new sample set According to the above method, k sub-sample sets are extracted as training sets, and used as sample training sets for initializing k regression trees (Regression Tree) of online random forest. The remaining samples are used as sample test sets. The ratio of sample training set to sample test set is 8:2.
[0052] Furthermore, it is necessary to record the number of times each feature in the sample training set is used as a split node and the Gini coefficient of the current split node. The number of times each feature is used and the Gini coefficient in all regression trees are added together to obtain the total number of times each feature is used in the entire random forest and the total Gini coefficient.
[0053] Furthermore, the total number of uses and the total Gini coefficient are normalized, and the first order of the total number of uses and the second order of the total Gini coefficient are determined. Then, based on the first order and the second order, the feature importance order of each feature in the sample data matrix is obtained.
[0054] As a feasible implementation method, firstly, for each regression tree, a feature is randomly used as the root node to start splitting, and the number of times each feature is used as a split node and the Gini coefficient of the current split node are recorded. Then, the number of times each feature is used and the Gini coefficient of each feature in all trees are added to obtain the total number of times each feature is used and the Gini coefficient in the entire random forest. Finally, the total number of times all features are used and the Gini coefficients are normalized respectively so that the sum of the importance of all features is 1. The total number of times the features are used is arranged from high to low, and the Gini coefficients of the features are arranged from low to high. The more times they are used and the smaller the Gini coefficient is, the greater the contribution of the feature to the classification. Comprehensive comparative analysis is performed to obtain the relative importance order of the features, that is, the feature importance order of each feature.
[0055] In addition, it is necessary to traverse the split points of each feature in the sample data matrix through the root node of the random forest algorithm regression tree. The residual sum of squares of the left subtree and the right subtree at each split point is calculated in turn, and the minimized residual square and the corresponding split point are determined as the optimal value of the node splitting condition of the current node.
[0056] As a feasible implementation method, each tree will be split according to the features during the construction process, and the best split point will be selected in the process, that is, starting from the root node, each feature and all possible split points of the feature are traversed (for numerical features, the median of its value is selected as the split point). For each split point, according to the residual sum of squares D of the samples in the left subtree and the right subtree, the feature and split point that minimize the RSS are selected as the best split condition for the current node. Taking the root node of the i-th regression tree as an example, starting from the root node, whenever the average variance of the leaf node features exceeds M, it indicates that the leaf node begins to split. Then, with feature F i The maximum value F imax and the minimum value F imin Take the average value as the split condition F iavg , with F iavg After the node operators are divided into two parts by the dividing line, the average variances of the contribution rates of the left and right child node operators are:
[0057]
[0058] Among them, using feature F i The average variance to split the node is expressed as: Select M(F i )The smallest characteristic F i As the split feature of this node, the average value F iavg is the optimal value of the splitting condition of the node, that is, it is determined as the optimal value of the node splitting condition of the current node.
[0059] S104. Based on the order of feature importance and the optimal value of the node splitting condition, repeated regression processing is performed on the training set in the accounts receivable data set to construct a random forest algorithm based on the accounts receivable data set.
[0060] Specifically, the feature importance order is used to screen the sample training set of the random forest regression tree to obtain important features.
[0061] Furthermore, the importance feature is used as the split feature, and the regression tree leaf nodes are split according to the optimal value of the node splitting condition.
[0062] Furthermore, the process of splitting the leaf nodes of the regression tree is repeated until a decision tree is generated for each sample training set, and then a random forest algorithm based on the accounts receivable data set is obtained.
[0063] In one embodiment, for a set of k regression tree samples, the top 6 features (important features) in feature importance evaluation are selected from all feature values as split features to split leaf nodes. Different splitting condition values are adopted for node splitting according to different features. The optimal value of the node splitting condition is used to ensure accuracy and performance. The node splitting process is repeated until the stop condition (the number of sample rows in the node <= 10) is met. No pruning is performed to retain the integrity of the decision tree. The above process is repeated to generate a decision tree for each training subset, thereby forming a random forest.
[0064] S105. Perform model training on the accounts receivable data set using a random forest algorithm to obtain an accounts receivable bad debt risk prediction model.
[0065] Specifically, the remaining several sample subsets in the sample data matrix are determined as sample test sets.
[0066] Furthermore, the random forest algorithm is used to adjust the hyperparameters of the sample test set regarding accuracy, recall, and score indicators to obtain a hyperparameter combination.
[0067] Furthermore, through cross-validation and grid search, the hyperparameter combination is adjusted and judged to determine the best hyperparameter combination. Among them, the hyperparameters at least include: the number of decision trees, the maximum depth, the minimum number of samples required to split the internal nodes, the minimum number of samples of leaf nodes, and the maximum number of features.
[0068] Furthermore, based on model training of the sample training set and model verification and optimization under the best hyperparameter combination in the sample test set, a bad debt risk prediction model for accounts receivable was constructed.
[0069] As a feasible implementation method, each regression tree needs to be trained independently and is not affected by other trees. When using the sample test set to verify the random forest, the accuracy, recall rate, and F1 score indicators are used to determine whether the hyperparameter combination needs to be adjusted, and the optimal hyperparameter combination is automatically found through cross-validation and grid search to effectively ensure prediction accuracy. The hyperparameters include: the number of decision trees, the maximum depth, the minimum number of samples required to split internal nodes, the minimum number of samples for leaf nodes, and the maximum number of features. Finally, based on the model training of the sample training set and the model verification and optimization under the optimal hyperparameter combination in the sample test set, a bad debt risk prediction model for accounts receivable is constructed.
[0070] S106. Using the accounts receivable bad debt risk prediction model, a probability prediction is performed on the current accounts receivable related data table under the root node of the regression tree to obtain bad debt risk information.
[0071] Specifically, the current accounts receivable feature set in the current accounts receivable related data table is input into the root node of each regression tree of the accounts receivable bad debt risk prediction model.
[0072] Furthermore, all current accounts receivable information in the current accounts receivable feature set is split onto sub-leaf nodes according to the feature importance order in the accounts receivable bad debt risk prediction model and the optimal value of the node splitting condition.
[0073] Furthermore, the bad debt probability information on the split leaf nodes of each regression tree is first calculated, and the average value of the bad debt probability information in the bad debt probability set in each regression tree is calculated to determine the bad debt risk probability information of all regression trees.
[0074] Furthermore, the bad debt risk probability information is subjected to risk threshold judgment to obtain bad debt risk information.
[0075] In one embodiment, for new accounts receivable data, the customer's credit rating, company nature, number of overdue payments, overdue ratio and other characteristics are input, and the trained random forest model is used for prediction. The prediction results of all regression trees are comprehensively considered to obtain the final prediction result:
[0076] 1) Put the current accounts receivable feature set into the root node of each regression tree in the online random forest of the accounts receivable bad debt risk prediction model.
[0077] 2) Starting from the root node, split according to the feature importance order of the node splitting feature value and the optimal value of the splitting condition, recursively divide the current accounts receivable information in the current accounts receivable feature set into the left and right child nodes of the node until all the accounts receivable information is split into child leaf nodes until it cannot be split anymore.
[0078] 3) First, calculate the probability that the conclusion of each regression tree split leaf node is equal to the bad debt, such as the accounts receivable information c i The conclusion of falling into a certain split leaf node is equal to bad debt, the total number of samples of the parent node is I, and the number of leaves divided by this split leaf node is s, then the bad debt risk probability of this split node is Then, calculate the prediction results of each regression tree. For example, the prediction result of the jth regression tree is the accounts receivable information c i The bad debt probability set f represented by the leaf node that falls into j ={f j1 ,f j2 ,…,f jn The average value of The online random forest prediction result, that is, the bad debt risk probability information is the average of the prediction results of all k regression trees
[0079]
[0080] 4) If the data of the predicted bad debt risk probability information exceeds a certain threshold It will be identified as bad debt risk information.
[0081] In a feasible implementation, the trained accounts receivable bad debt risk prediction model is integrated into the ERP system, and training is performed every week to improve the accuracy of model prediction. The prediction results can be visualized, and the predicted trend of accounts receivable in different months, the comparison between prediction and actual, etc. are generated, and warnings are automatically issued to business and financial personnel to achieve accurate prediction and effective management of bad debt risks in financial automation.
[0082] In addition, the present application embodiment also provides a device for predicting the risk of accounts receivable, such as Figure 2 As shown, the accounts receivable risk prediction equipment specifically includes:
[0083] At least one processor 201. And a memory 202 in communication with the at least one processor 201. The memory 202 stores instructions that can be executed by the at least one processor 201, so that the at least one processor 201 can execute:
[0084] According to the historical accounts receivable related data tables extracted from the ERP system, different historical accounts receivable related data tables are merged to obtain the accounts receivable data set; and the data characteristic value exception processing is performed on the accounts receivable data set;
[0085] The receivables data set is subjected to the standardization of the relevant matrix to obtain the sample data matrix;
[0086] Perform feature importance evaluation on each feature in the sample data matrix to obtain the feature importance order; and perform node splitting processing on each feature in the sample data matrix to determine the optimal value of the node splitting condition;
[0087] Based on the order of feature importance and the optimal value of node splitting conditions, repeated regression processing is performed on the training set in the receivables dataset to construct a random forest algorithm based on the receivables dataset;
[0088] The receivables dataset is trained using the random forest algorithm to obtain a receivables bad debt risk prediction model.
[0089] Through the accounts receivable bad debt risk prediction model, the probability prediction of the current accounts receivable related data table under the root node of the regression tree is carried out to obtain the bad debt risk information.
[0090] The embodiment of the present application standardizes data, integrates multiple features that affect bad debt risk and evaluates feature importance, obtains the optimal regression tree splitting optimal value, and leverages the advantages of the random forest algorithm in capturing nonlinear relationships. This not only improves prediction accuracy and enhances the model's adaptability to complex business scenarios, but also provides companies with a deeper understanding and management basis for bad debt risk through feature weight analysis, effectively optimizing the financial decision-making process, reducing bad debt risk, and improving corporate liquidity and financial health.
[0091] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0092] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0093] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0094] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0095] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0096] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0097] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0098] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the embodiments of the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for predicting accounts receivable risk, characterized in that: The method comprises: According to the historical accounts receivable related data tables extracted from the ERP system, different historical accounts receivable related data tables are merged to obtain an accounts receivable data set; and the data characteristic value of the accounts receivable data set is processed abnormally; Performing matrix standardization on the accounts receivable data set to obtain a sample data matrix; Performing feature importance evaluation on each feature in the sample data matrix to obtain a feature importance order; and performing node splitting processing on each feature in the sample data matrix to determine an optimal value of a node splitting condition; Based on the feature importance order and the optimal value of the node splitting condition, repeated regression processing is performed on the training set in the accounts receivable data set to construct a random forest algorithm based on the accounts receivable data set; Using the random forest algorithm, model training is performed on the accounts receivable data set to obtain an accounts receivable bad debt risk prediction model; Through the receivables bad debt risk prediction model, the probability prediction under the root node of the regression tree is performed on the current receivables related data table to obtain bad debt risk information.
2. The method for predicting accounts receivable risk according to claim 1, characterized in that: According to the historical accounts receivable related data tables extracted from the ERP system, different historical accounts receivable related data tables are merged to obtain the accounts receivable data set; The abnormal data characteristic value processing is performed on the receivables data set, specifically including: Extracting the historical accounts receivable related data table through the ERP system; wherein the relevant data in the historical accounts receivable related data table at least includes: customer credit score, customer unit nature, historical overdue information, historical transaction information and historical collection days; According to the customer ID information, the historical accounts receivable related data table is subjected to keyword classification and aggregation processing to obtain the accounts receivable data set under the same customer ID information; the missing value features in the accounts receivable data set are classified by type; If the missing value feature is a numerical feature, the missing value feature is filled with an average value; wherein the numerical feature at least includes: the customer credit score and the historical transaction information; If the missing value feature is a categorical feature, the missing value feature is processed to create a new category; wherein the categorical feature at least includes: the nature of the customer unit and historical overdue information; By using a preset box analysis technique, outlier data in the accounts receivable data set is deleted; and based on the accounts receivable data set, an accounts receivable data set matrix is generated; wherein each row in the accounts receivable data set matrix represents a predicted data record, each column represents a eigenvector, and each eigenvalue contains relevant data in the historical accounts receivable related data table.
3. The method for predicting accounts receivable risk according to claim 1, characterized in that: The receivables data set is subjected to relevant matrix standardization processing to obtain a sample data matrix, which specifically includes: According to the same customer ID information dimension, the numerical features in the accounts receivable data set matrix corresponding to the accounts receivable data set are subjected to mean-variance normalization processing to obtain a normalized matrix; Among them, according to Get the standardized value b of the standardized matrix ij ;x ij is the eigenvalue of the i-th row and j-th column in the receivables dataset matrix, x ijavg is the average value of the jth column features of all rows of the customer ID information belonging to the ith row in the receivables dataset matrix, and w is the standard deviation of the feature values in the receivables dataset matrix; Based on the standardized matrix, the receivables data set matrix is transformed into a matrix to obtain the sample data matrix.
4. The method for predicting accounts receivable risk according to claim 1, characterized in that: The feature importance of each feature in the sample data matrix is evaluated to obtain the feature importance order, which specifically includes: Randomly extracting a number of sample subsets from the sample data matrix, and using the sample subsets as sample training sets for the random forest regression tree; Record the number of times each feature in the sample training set is used as a split node and the Gini coefficient of the current split node; and add the number of times each feature is used and the Gini coefficient in all regression trees to obtain the total number of times each feature is used in the entire random forest and the total Gini coefficient; Normalizing the total number of times of use and the total Gini coefficient, and determining a first order of the total number of times of use and a second order of the total Gini coefficient; Based on the first order and the second order, a feature importance order of each feature in the sample data matrix is obtained.
5. The method for predicting accounts receivable risk according to claim 1, characterized in that: Performing node segmentation processing on each feature in the sample data matrix to determine the optimal value of the node splitting condition specifically includes: Through the root node of the random forest algorithm regression tree, traverse the segmentation point of each feature in the sample data matrix; The residual square sum of the left subtree and the right subtree in each segmentation point is calculated in turn, and the minimum residual square sum and the corresponding segmentation point are determined as the optimal value of the node splitting condition of the current node.
6. The method for predicting accounts receivable risk according to claim 1, characterized in that: Based on the feature importance order and the optimal value of the node splitting condition, the training set in the accounts receivable data set is repeatedly regressed to construct a random forest algorithm based on the accounts receivable data set, specifically including: Using the feature importance order, the sample training set of the random forest regression tree is screened for feature importance to obtain important features; Using the importance feature as a split feature, and splitting the regression tree leaf nodes according to the optimal value of the node splitting condition; The splitting process of the tree leaf nodes is repeated until a decision tree is generated for each sample training set, and then a random forest algorithm based on the accounts receivable data set is obtained.
7. The method for predicting accounts receivable risk according to claim 1, characterized in that: The receivables data set is trained by the random forest algorithm to obtain a receivables bad debt risk prediction model, which specifically includes: Determine the remaining several sample subsets in the sample data matrix as sample test sets; Using the random forest algorithm, adjusting the hyperparameters of the accuracy, recall and score indicators of the sample test set to obtain a hyperparameter combination; Through cross-validation and grid search, the hyperparameter combination is adjusted and judged to determine the best hyperparameter combination; wherein the hyperparameters at least include: the number of decision trees, the maximum depth, the minimum number of samples required to split internal nodes, the minimum number of samples for leaf nodes, and the maximum number of features; Based on model training of the sample training set and model verification and optimization under the best hyperparameter combination in the sample test set, the accounts receivable bad debt risk prediction model is constructed.
8. The method for predicting accounts receivable risk according to claim 1, characterized in that: Through the receivables bad debt risk prediction model, the probability prediction of the current receivables related data table under the root node of the regression tree is performed to obtain bad debt risk information, specifically including: Inputting the current accounts receivable feature set in the current accounts receivable related data table into the root node of each regression tree of the accounts receivable bad debt risk prediction model; According to the feature importance order in the receivables bad debt risk prediction model and the optimal value of the node splitting condition, all the current receivables information in the current receivables feature set is split to the sub-leaf nodes; Calculate the bad debt probability information on the split leaf nodes of each regression tree, and calculate the average value of the bad debt probability information in the bad debt probability set in each regression tree, and determine the bad debt risk probability information of all regression trees; The bad debt risk probability information is subjected to risk threshold judgment to obtain the bad debt risk information.
9. An accounts receivable risk prediction device, characterized in that: The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, so that the at least one processor can execute a method for predicting accounts receivable risk according to any one of claims 1-8.
10. A non-volatile computer storage medium, characterized in that: The storage medium is a non-volatile computer-readable storage medium, and the non-volatile computer-readable storage medium stores at least one program, each of which includes instructions, and when the instructions are executed by a terminal, the terminal executes a method for predicting accounts receivable risk according to any one of claims 1-8.
Citation Information
Cited By
Account receivable management method and device based on multi-layer perceptron and medium
CN120070078A
A method, device and medium for managing accounts receivable based on a multi-layer perceptron
CN120070078B
Book review generation method, system and equipment based on multi-modal data and medium
CN120296162A
