Credit loan bad debt analysis method, device and equipment based on LSTM (Long Short Term Memory) and medium

Through the LSTM-based bad debt analysis method for credit loans, the problem of large errors in bad debt prediction in the existing technology is solved, and more accurate and efficient bad debt prediction is achieved, helping lenders effectively manage risks and reduce operating costs.

CN119398908APending Publication Date: 2025-02-07PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411531239.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The prior art has a large error in the prediction of bad debts for credit loans, especially when the number of periods exceeds 12 periods, the prediction effect is worse, and it fails to effectively utilize the newly due repayment behavior and the fine splitting of the predictive factors.

Method used

Using the LSTM-based bad debt analysis method for credit loans, we can obtain the historical loan data of the lending institution, extract data features, generate feature vectors and data combination vectors, adjust and optimize the LSTM model parameters, and obtain the target LSTM model for bad debt probability on the test data. Analyze, and then calculate the total amount of bad debts released.

Benefits of technology

Improve the accuracy and efficiency of bad debt prediction, can better adapt to market changes and customer needs, reduce the pressure on data storage space, improve the generalization performance of the model, help lenders identify risks in a timely manner and take corresponding measures to reduce the number of bad loans and thus reduce clearance and operating costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119398908A_ABST
    Figure CN119398908A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of machine learning and finance, and discloses a credit loan bad debt analysis method and device based on LSTM, equipment and a medium, and the method comprises the steps: obtaining the historical loan data of a loan institution, and extracting the data features of the historical loan data; generating feature vectors according to the data features, and generating data combination vectors through combination of the feature vectors and loan periods corresponding to the historical loan data; adjusting and optimizing target parameters of the LSTM model according to the data combination vector to obtain a target LSTM model; acquiring test data, and performing bad debt probability analysis on the test data by using the target LSTM model to obtain a loan bad debt probability; and obtaining a loaning risk value, and carrying out analysis operation according to the loaning risk value and the bad debt probability to obtain the total loaning bad debt amount. And the future bad debt risk is accurately estimated and corresponding risk control measures are taken, so that the occurrence of bad loans can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of machine learning and financial technology, and in particular to a credit loan bad debt analysis method, device, equipment and medium based on LSTM. Background Art

[0002] Currently, the stricter control of capital imposed by Basel III on commercial banks and the new online lending regulations on consumer finance and small loans has caused lending institutions to begin to pay attention to bad debt forecasting. Accurate and timely forecasting of future bad debts plays an important role in risk warning, strategy adjustment and capital planning of credit business.

[0003] The current traditional method is the overdue migration rate, that is, first calculate the migration rate from Mn to Mn+1, and then roll over to calculate the total amount of bad debts at a certain point in time. However, the limitation of the traditional method is that the error is large, especially when the number of periods exceeds 12, the prediction effect is worse; secondly, everything is based on a fixed history, and the repayment behavior of the new due date is not used; and all factors affecting the prediction are not separated, and are not detailed enough. Summary of the invention

[0004] The present invention provides a credit loan bad debt analysis method, device, equipment and medium based on LSTM, which is used to predict the bad debt probability analysis of future loan amounts, and help lending institutions to conduct risk warning, strategy adjustment, and capital planning adjustment strategies for credit business.

[0005] Firstly, a credit loan bad debt analysis method based on LSTM is provided, including:

[0006] Obtaining historical loan data of a lending institution and extracting data features of the historical loan data;

[0007] Generate a feature vector according to the data feature, and generate a data combination vector by combining the feature vector and the loan period number corresponding to the historical loan data;

[0008] Adjust and optimize the target parameters of the LSTM model according to the data combination vector to obtain a target LSTM model;

[0009] Acquire test data, and use the target LSTM model to perform bad debt probability analysis on the test data to obtain the probability of bad debts in loans;

[0010] The risk value of the loan is obtained, and an analysis is performed based on the risk value of the loan and the probability of bad debts to obtain the total amount of bad debts of the loan.

[0011] In a second aspect, a credit loan bad debt analysis device based on LSTM is provided, comprising:

[0012] The module for obtaining loan data is used to obtain the historical loan data of lending institutions;

[0013] Extraction module, used to extract data features of historical loan data;

[0014] A vector generation module, used to generate a data combination vector by combining the feature vector and the loan period number corresponding to the historical loan data;

[0015] An adjustment and optimization module, used to adjust and optimize the target parameters of the LSTM model according to the data combination vector to obtain a target LSTM model;

[0016] Obtain a bad debt probability analysis module, which is used to perform bad debt probability analysis on the test data using the target LSTM model to obtain the probability of bad debts in loans;

[0017] The risk value acquisition module is used to obtain the risk value of the loan;

[0018] The analysis and calculation module is used to perform analysis and calculation based on the loan risk value and the probability of bad debts to obtain the total amount of bad debts of the loans.

[0019] In a third aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned LSTM-based credit loan bad debt analysis method when executing the computer program.

[0020] In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the steps of the above-mentioned LSTM-based credit loan bad debt analysis method are implemented.

[0021] In the above-mentioned scheme implemented by the LSTM-based credit loan bad debt analysis method, device, computer equipment and storage medium, by extracting features from the data, we can better understand the data, extracting meaningful features from the data and eliminating irrelevant information can improve the quality and accuracy of the data, so as to better adapt to market changes and customer needs, extracting some required features can reduce the pressure on data storage space, and the data combination vector can better reflect the repayment behavior of customers in different time periods. The model can better match the loan behavior in different time periods and improve the generalization performance of the model; by performing bad debt probability analysis on the data combination vector through the LSTM model, the combination vector can be quickly and accurately predicted. Risk level, helping risk control or corporate management to control risks and prevent losses; by evaluating the probability of bad debts in loans, banks and other financial institutions can understand the credit status and risk index of loan applicants, so as to adjust loan policies in a targeted manner and reduce bad debt risks; estimate the bad debt risks of loans in the future, so as to take corresponding risk control measures in time to prevent risks from occurring; through the analysis and comparison of historical and future data, loan companies can continuously improve their risk control capabilities, continuously improve and optimize risk control measures, and reduce the risk of non-performing loans; by accurately estimating future bad debt risks and taking corresponding risk control measures, the occurrence of non-performing loans can be reduced, thereby reducing collection fees and operating costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0023] Figure 1 This is a schematic diagram of an application environment of a credit loan bad debt analysis method based on LSTM in one embodiment of the present invention;

[0024] Figure 2 It is a flow chart of a credit loan bad debt analysis method based on LSTM in one embodiment of the present invention;

[0025] Figure 3 It is a structural schematic diagram of a credit loan bad debt analysis device based on LSTM in one embodiment of the present invention;

[0026] Figure 4 is a structural schematic diagram of a computer device in one embodiment of the present invention;

[0027] Figure 5 It is another structural schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION

[0028] 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 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.

[0029] The LSTM-based credit loan bad debt analysis method provided by the embodiment of the present invention can be applied to Figure 1 In the application environment, the client communicates with the server through the network. The server can obtain the historical loan data of the lending institution, extract the data features of the historical loan data; generate a feature vector according to the data features, and generate a data combination vector by combining the feature vector and the loan period number corresponding to the historical loan data; adjust and optimize the target parameters of the LSTM model according to the data combination vector to obtain the target LSTM model; obtain test data, use the target LSTM model to perform bad debt probability analysis on the test data, and obtain the probability of bad debt of the loan; obtain the risk value of the loan, analyze and calculate according to the loan risk value and the probability of bad debt, obtain the total amount of bad debt of the loan, and feed the total amount of bad debt of the loan back to the client. The present invention provides A LSTM-based credit loan bad debt analysis device is provided. For the statistical loan bad debt business, the historical loan data of the loan institution is first obtained, the data features of the historical loan data are extracted, and a data combination vector is generated. Then, a solution for adjusting and optimizing the target parameters of the LSTM model according to the data combination vector is proposed to obtain a target LSTM model. The probability of bad debts of loans is analyzed by using the target LSTM model to analyze the test data, and the probability of bad debts of loans is obtained. According to the loan risk value and the probability of bad debts, the total amount of bad debts of loans is obtained, which can accurately estimate the future bad debt risk and take corresponding risk control measures, and can reduce the occurrence of non-performing loans, thereby reducing the collection costs and operating costs. Among them, the client can be but not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices. The server can be implemented by an independent server or a server cluster composed of multiple servers. The present invention is described in detail below through specific embodiments.

[0030] See also Figure 2 As shown, Figure 2 A flowchart of a credit loan bad debt analysis method based on LSTM provided by an embodiment of the present invention includes the following steps:

[0031] S1. Obtain historical loan data of a lending institution and extract data features of the historical loan data.

[0032] In the embodiment of the present invention, the historical loan data refers to historical loan disbursement data, the extraction refers to extracting information about each loan disbursement in the historical loan data, and the data feature refers to part of the data after the historical loan data is extracted.

[0033] In detail, first determine the historical loan data that needs to be obtained, and determine the keyword information required in the historical loan data, such as the historical loan amount and the number of loan periods for each loan, use database management tools such as SQL Server to connect to the database, open the lending institution information database, use SQL language to write query statements, query the historical loan data, and extract the historical loan amount based on the historical loan data.

[0034] In the embodiment of the present invention, the step of obtaining the historical loan data of the lending institution and extracting the data features of the historical loan data includes:

[0035] Retrieving historical loan data from the lending institution information database;

[0036] The historical loan data are queried one by one according to preset conditions to obtain data features corresponding to each piece of historical loan data.

[0037] In an embodiment of the present invention, the lending institution information database refers to a data set containing all input information of the lending institution, the calling refers to querying the data set through the SQL language with specific conditions to obtain the required historical loan data information, and the query refers to querying the required data information from the historical loan data according to a specifically written SQL statement.

[0038] Specifically, by using a database management tool (SQL Serveranagement Studio, etc.) or a programming language (such as Python, Java, etc.) to connect to the database, and open the lending institution information database, use the SQL language to write a query statement, and query the historical loan account data according to the conditions of the required information, such as the ID number of the historical loan account database. The statement needs to use keywords such as SELECT, FROM, WHERE, GROUP BY, ORDER BY for querying, and use wildcards (*) or specify column names to specify the columns to be queried. After obtaining the historical loan data, the data is queried using the set SQL language to query the number of overdue days for each repayment period of each loan data.

[0039] In the embodiment of the present invention, by calling the data features corresponding to the historical loan data in the lending institution information database, excessive use of system resources is avoided, the program operation efficiency is improved, and calling part of the data can avoid scanning and processing the entire database, thereby shortening the program running time, improving the program running speed and response speed, and making the data processing logic simpler, clearer and easier to understand.

[0040] In detail, extracting features from data can help us better understand the data. Extracting meaningful features from data and eliminating irrelevant information can improve the quality and accuracy of data and reduce interference and errors caused by noise, missing information, and errors. Extracting useful features from data can help us make better decisions and formulate better strategies to better adapt to market changes and customer needs. Extracting some required features can reduce the pressure on data storage space.

[0041] S2. Generate a feature vector according to the data feature, and generate a data combination vector by combining the feature vector and the loan period number corresponding to the historical loan data.

[0042] In an embodiment of the present invention, the feature vector refers to generating data in a computer-recognizable form, such as data of types 0, 1, and 2. The feature vector value reflects the attribute information of the corresponding data feature. The combined generation refers to the process of combining the feature vector obtained above and the period vector generated by the loan period.

[0043] In detail, the number of overdue repayment days for each loan period is extracted from the data features corresponding to the historical loan data, the feature values ​​are normalized to avoid the impact of the difference in value ranges between different features, and the code of each data feature and the loan period vector are merged into one vector to form a data vector.

[0044] In the embodiment of the present invention, the generating of the feature vector according to the data feature and the generating of the data combination vector by combining the feature vector and the loan period number corresponding to the historical loan data include:

[0045] Normalizing the data features one by one to obtain feature vectors corresponding to the data features;

[0046] The loan periods are converted one by one into period vectors corresponding to the feature vectors, and the period vectors are combined with the corresponding feature vectors to obtain a data combination vector.

[0047] In the embodiment of the present invention, the normalization processing refers to placing the value range of data features within a fixed range for processing, the feature vector refers to the vector value corresponding to each data feature value, the period vector refers to a vector converted from a numerical value obtained according to the loan period, and the combination refers to a new vector formed by combining the period vector and the corresponding feature vector.

[0048] In detail, the number of overdue repayment days for each loan period is extracted from the data features corresponding to the historical loan data. For example, if the repayment is on time, the overdue number of days is 0, if the repayment is more than 3 days, the overdue number of days is 1, and if the repayment is more than 30 days (including 30 days), the overdue number of days is 30. The eigenvalues ​​are normalized to avoid the impact of the value range differences between different features. Each data feature is assigned a coded value, and the loan period is converted into a dimensional vector of the corresponding feature vector, and combined with the corresponding feature vector to obtain a data combination vector.

[0049] Specifically, for example, in a set of historical loan data, there is a loan with 6 loan periods, and the first period is repaid on time, the second period is repaid on time, the third period is overdue for 6 days, the fourth period is overdue for 30 days, the fifth period is overdue for more than 30 days, and the sixth period is overdue for more than 30 days. In order to align different overdue days, all overdue days exceeding 30 days are assigned a value of 30. Then the repayment behavior of this set of loans can be represented by an N-dimensional vector as

[0050] [0,,,,,,]

[0051] [0,0,,,,]

[0052] [0,0,6,,,]

[0053] [0,0,6,30,,,]

[0054] [0,0,6,30,30,,]

[0055] [0,0,6,30,30,30]

[0056] Here, N refers to the number of loan periods.

[0057] In the embodiment of the present invention, by normalizing the data features, the impact of different dimensions of various indicators in the feature vector can be reduced, avoiding different importance of various indicators due to different dimensions, and improving the accuracy of the model. At the same time, normalization can make the weights between various features more balanced, avoiding some features from being overestimated or underestimated, and after the feature values ​​are processed, their value range becomes significantly smaller, and the training speed of the model will be improved accordingly. By combining the loan period information, a dimension can be added to the feature vector, so that the model's analysis of time series characteristics is more comprehensive and accurate, and at the same time, more comprehensive information can be provided, better reflecting the customer's loan behavior, and also better predicting the customer's credit risk.

[0058] In an embodiment of the present invention, by combining the feature vector and the corresponding loan periods of historical loan data, the loan period information of the loan can be added to the feature vector to better reflect the customer's loan behavior, further improving the model's analysis ability and prediction accuracy of data features. The data combination vector contains the period information, and the period is an independent variable. As time goes by, the customer's loan behavior and other related variables will also change accordingly. The data combination vector can better reflect the customer's repayment behavior in different time periods. The model can better match the loan behavior in different time periods and improve the generalization performance of the model.

[0059] S3. Adjust and optimize the target parameters of the LSTM model according to the data combination vector to obtain a target LSTM model.

[0060] In the example of the present invention, the adjustment optimization refers to the process of adjusting the parameters of the model according to the data combination vector, including the weight and bias of the model, so as to obtain the adjusted LSTM model.

[0061] In an embodiment of the present application, according to actual conditions, the data can be trained in batches to avoid problems such as overfitting. Specifically, the LSTM model is trained multiple times by inputting a data combination vector into the LSTM model, and the model parameters are optimized through multiple iterations. After each iteration, the test set data is used to evaluate the model performance, and the model parameters (such as learning rate, number of neurons, etc.) are adjusted according to the verification results. The adjusted model is saved, and then the data combination vector is input for bad debt probability analysis to obtain the data combination vector bad debt probability.

[0062] In the embodiment of the present invention, the step of adjusting and optimizing the target parameters of the LSTM model according to the data combination vector to obtain the target LSTM model includes:

[0063] Performing time series analysis on the data combination vector using the LSTM model to obtain an analysis value of the data combination vector;

[0064] Calculating the analysis value of the data combination vector and the true value of the data combination vector to obtain a residual value;

[0065] The target parameters of the LSTM model are adjusted and optimized according to the residual value to obtain a target LSTM model.

[0066] In an embodiment of the present invention, the time series analysis refers to analyzing the data combination vector using the LSTM model in order to predict future values ​​or find out the patterns and regularities in the data by analyzing the time series, the calculation refers to comparing the analysis value of the data combination vector with the true value of the data combination vector, and the adjustment and optimization refers to adjusting the parameter values ​​in the LSTM model.

[0067] Specifically, the data combination vector has multiple groups of vectors. For example, there is a 3-term loan. The first term is repaid on time, X=[0,,], and X is used to train the model in the first round; the second term is repaid 3 days overdue, X=[0,3,], and X is used to train the second round; the third term is repaid on time again, X=[0,3,0], and X is used to train the third round. When the training set is put into the LSTM model for training, the parameters of the training model, including the weights and biases of the model; specifically, the sample data in the training set will be input into the LSTM model one by one, and the model will process it to get an output; then by comparing the error between the output of the model and the true value of the sample data, the error is back-propagated, and the weights and biases of the model are adjusted to minimize the loss function to obtain the target LSTM model.

[0068] In the example of the present invention, the target parameters of the LSTM model are adjusted and optimized according to the residual value to obtain a target LSTM model, including:

[0069] Converting the residual value into a residual sequence;

[0070] Draw a residual graph, an autocorrelation graph, and a partial autocorrelation graph according to the residual sequence, and construct a correlation result among the residual graph, the autocorrelation graph, and the partial autocorrelation graph;

[0071] Testing the independence and randomness of the residual sequence to obtain independence and randomness results;

[0072] The residual sequence is checked by a normality test to approximately obey the normal distribution, and a result of approximately obeying the normal distribution is obtained;

[0073] Judging whether the LSTM model meets the preset LSTM parameter requirements according to the results of the correlation between the residuals, the results of independence and randomness, and the results of approximate normal distribution;

[0074] If the LSTM model meets the parameter requirements of the LSTM, the target parameters of the LSTM model are used as the target parameters of the target LSTM model to obtain the target LSTM model;

[0075] If the LSTM model does not meet the parameter requirements of the LSTM, the target parameters of the LSTM model are updated by a gradient descent algorithm to obtain a target LSTM model.

[0076] In the embodiment of the present invention, the conversion refers to converting the form of the residual value into the form of the residual sequence, the drawing refers to drawing a graph of the residual changing over time, the test refers to checking whether the residual exhibits randomness and independence, and the checking for approximate normal distribution refers to checking whether the residual exhibits normality.

[0077] The analysis of the deviation of LSTM performed in the embodiment of the present application is a residual analysis of the predicted value and the true value; residual analysis is a method for checking the fitting quality of a time series model, which helps to check whether the model can capture the structure in the data and determine whether there are patterns that are not captured; residual refers to the difference between the actual observed value and the model predicted value, and the goal of residual analysis is to check whether the residual exhibits randomness, stationarity, independence, and normality.

[0078] Plot the residual sequence in chronological order to see if there are obvious rules or trends, as well as outliers and large fluctuations; if there are regularities or outliers, it means that the model has some defects and needs further analysis and correction; the autocorrelation diagram reflects the linear correlation between the residuals, which is used to detect whether the residuals are correlated; the partial correlation indicates whether the correlation between the residuals is significant after a given lag period, and whether it is related to the previous lag order. Each point in the PACF diagram represents the partial correlation between the residuals after a given lag period, that is, the correlation between the residuals after eliminating the influence of the previous lag order.

[0079] Specifically, in the jung-Box test, it is first necessary to calculate the jung-Box statistic of the residual sequence, which reflects whether the residual sequence obeys the normal distribution and is independent and random. Usually, the significance level α is set, and the corresponding critical value of the jung-Box test is obtained according to the distribution table to determine whether the residual significantly obeys the normal distribution and independent randomness at this significance level; if the jung-Box statistic of the residual sequence is less than the corresponding critical value of the jung-Box test, the original hypothesis that the residual sequence does not obey the normal distribution and independent randomness is rejected, that is, the residual sequence is independent and random. On the contrary, if the jung-Box statistic of the residual sequence is greater than the corresponding jung-Box test critical value, the original hypothesis that the residual sequence does not obey the normal distribution and independent randomness cannot be rejected, that is, the residual has a certain correlation or does not meet the assumption of normal distribution.

[0080] In detail, input the residual sequence data, and give the significance level of the test, which is generally set to 0.05, calculate the test statistic, and draw the test conclusion based on the significance level and the test statistic; if the residual sequence approximately obeys the normal distribution, then whether it is the z value, p value or W value, it should not be significant at the test level; if the z value, p value, and W value are not significant, then the conclusion of the test can be drawn as "the residual sequence approximately obeys the normal distribution"; otherwise it is not true.

[0081] In an embodiment of the present invention, by determining the target parameters of the model and optimizing the model, a LSTM model with better performance can be obtained. Such a model will show better fitting ability on new data, can more accurately predict the future or other related data, and has important value for practical applications and scientific research; after performance testing, if the LSTM model can meet the preset performance requirements, the target LSTM model can be obtained. Compared with the basic model initially constructed, the parameters of this model have been more finely tuned, and the model performance has been significantly improved, which has greater value for practical applications and scientific research; for practical applications, it can more accurately predict the future or other related data, improve decision-making quality and business benefits; for scientific research, it can more deeply understand the laws of sequence data and reveal the regular patterns and mechanisms behind them.

[0082] In the embodiment of the present invention, the bad debt probability analysis of the data combination vector is performed through the LSTM model, so that the risk level of the combination vector can be quickly and accurately predicted, helping risk control or enterprise management to control risks and prevent losses; at the same time, the LSTM model can predict future bad debt situations based on the rules of historical data, identify risks in advance, and provide support for enterprise development.

[0083] S4. Acquire test data, and use the target LSTM model to perform bad debt probability analysis on the test data to obtain the probability of bad debts in loans.

[0084] In the embodiment of the present invention, the bad debt probability analysis refers to predicting the probability of bad debts of the loan amount that has not yet been repaid.

[0085] Specifically, the target parameters in the target LSTM model are the target parameters in the LSTM model trained with the previous round of historical data, verified by the error value, and adjusted by the gradient descent algorithm. When test data is needed, for example, today's date is October 18, 2024, and a loan issued by a lending institution starts on October 1, 2024, and the loan repayment date has not yet arrived, this loan data can be input into the target LSTM model for prediction to predict the probability of bad debt of this loan.

[0086] In the embodiment of the present invention, the target LSTM model is used to perform bad debt probability analysis on the test data to obtain the probability of bad debt of the loan, including:

[0087] Dividing the test data into multiple groups of batch data according to preset instructions;

[0088] Decomposing the batch data into multiple groups of input data one by one according to preset time steps;

[0089] Using the forget gate of the target LSTM model to forget the input data, to obtain forgotten data;

[0090] Using the input gate of the target LSTM model to jointly analyze the input data and the forgotten data to obtain input processing data;

[0091] Using the output gate of the target LSTM model to filter the input data, the forgotten data, and the input processing data to obtain final output data;

[0092] The probability of bad debts of loans is generated according to the final output data.

[0093] In an embodiment of the present invention, the division refers to dividing the test data into groups of small batches of data, the forgetting refers to inputting the first group of input data into the first computing unit for processing to obtain information data that needs to be forgotten, the control analysis refers to discarding the forgotten data that needs to be forgotten in the sequence data, retaining the remaining information data, and obtaining new data, and the screening refers to merging the input data, the forgotten data, and the input processing data, and determining which information to retain and which information to discard.

[0094] Specifically, for example, consider a data set with 1,000 groups of data, each of which represents a repayment behavior vector for a loan period. The original data is cut and the time window is set to 20 data points. Each window contains the past 20 repayment behavior vectors to form a sample. Finally, a sample set of 980 is formed, and each sample consists of 20 time steps. Next, we convert each sample into a tensor form as the input of the LSTM model; the predicted value is used as the repayment behavior vector value.

[0095] In detail, the computing unit in the LSTM model is divided into a forget gate, an input gate, and an output gate. The forget gate is as follows:

[0096] f t =σ(w f x t +u f y t-1 +b f )

[0097] Among them, f t refers to the output of the forgetting layer; σ refers to the gate activation function Sigmoid; w f is the same as the current input value x t The associated forget gate weight value; u f It refers to the output value y at the previous moment t-1 The weight of the associated forget gate, b f is the bias weight vector of the forget gate.

[0098] The input gate is as follows;

[0099] i t =σ(w i x t +u i y t-1 +b i )

[0100] c′ t =tanh(w c x t +u i y t-1 )

[0101] c t =f t c t-1 +i t c′ t

[0102] Among them, i t is the input gate output; w i u i w c They are the input gate weight values, bi is the bias weight vector of the input gate, c′ t refers to the new cell state candidate value vector, c t is the new cell state, c t-1 is the cell state at the previous moment.

[0103] The output gate is as follows:

[0104] o t =σ(w o x t +u o y t-1 +b o )

[0105] h t =o t tan(c t )

[0106] Among them, t is the output gate input at the current moment; w o is the current input value x t The associated output gate weight value; u o is the output value y at the previous moment t-1 The weight of the associated output gate; b o is the bias weight vector of the output gate; h t The final output result at the current moment.

[0107] In the example of the present invention, the forget gate of the target LSTM model can control the retention of historical information in the long-term memory unit to prevent the information at earlier times from being lost in the long sequence, so as to learn features from the input data, and use the output gate and the forget gate to control the influence of information to adapt to different input sequences, improve the robustness of LSTM to noise information and abnormal data, and use multiple gating mechanisms to dynamically adjust and process the data, so as to more accurately capture the characteristics of the data and avoid the gradient disappearance and explosion problems in long sequences.

[0108] In the embodiment of the present invention, by evaluating the bad debt probability of loans, banks and other financial institutions can understand the credit status and risk index of loan applicants, so as to adjust loan policies in a targeted manner and reduce bad debt risks. By using the LSTM model to analyze the bad debt probability of test data, compared with traditional methods, it can more accurately predict the risk of loan default and avoid misjudgment caused by problems such as sample imbalance and insufficient features. By evaluating the bad debt probability of loans, banks and other financial institutions can determine whether to decide to lend and how much loan amount should be given, so as to achieve more optimized decision-making.

[0109] S5. Obtain a risk value of the loan, perform analysis and calculation based on the risk value of the loan and the probability of bad debts, and obtain the total amount of bad debts of the loan.

[0110] In the embodiment of the present invention, the risk value of the loan refers to the probability of default or bad debt of the loan in the future, and the analytical operation refers to the operation based on the amount of each loan, the bad debt probability of the data combination vector (the bad debt probability predicted by the current repayment), and the risk value of the loan.

[0111] Specifically, the loan risk values ​​are divided into historical loan risk values ​​and future loan risk values, and the loan risk values ​​within the historical preset period and the loan risk values ​​within the future preset period are calculated. For example, if today is October 16, 2024, then the loan risk values ​​in May, June, and July 2024 belong to the loan risk values ​​within the historical preset period, and the loan risk values ​​in November and December 2024 belong to the loan risk values ​​within the future preset period.

[0112] In the embodiment of the present invention, the step of obtaining the risk value of loan issuance includes:

[0113] Obtaining the amount of each loan within a preset historical period and the preset model score of each loan from the historical loan data;

[0114] Perform a weighted average calculation on the amount of each loan disbursed during the historical preset period and the model score corresponding to each loan disbursed, to obtain a model score of the weighted average of the amount of loans disbursed during the historical preset period;

[0115] Obtaining the amount of each historical loan and the preset model score of each loan from the historical loan data;

[0116] Calculate the weighted average of each historical loan amount and the model score preset for each loan to obtain a model score of the weighted average of the historical loan amounts;

[0117] Calculate the ratio of the model score of the weighted average of the loan amounts during the historical preset period to the model score of the weighted average of the historical loan amounts, and use the result of the ratio calculation to generate a loan risk value during the historical preset period;

[0118] The risk value of loans in the future preset period is calculated based on the risk value of loans in the historical preset period and the amount of future loans, so as to obtain the risk value of loans in the future preset period.

[0119] In the embodiment of the present invention, the model score refers to the A card model score, that is, the preset model score for each loan, the weighted average calculation refers to the operation process of multiplying the amount of each loan and the model score corresponding to each loan and dividing the result by the total loan amount, and the generation refers to the risk value of future loans obtained by summing and averaging the risk values ​​of historical loans.

[0120] Specifically, assuming that a lending institution makes N loans in January 2024 and the loan structure has a history of making M loans, the numerical formula for calculating the loan risk in January 2024 is as follows:

[0121]

[0122] In the formula, atmn represents the loan amount of the nth loan in January 2024, aScrn represents the model score corresponding to the loan amount of the nth loan, xtmm represents the loan amount of the mth loan in history, xScrm represents the model score corresponding to the loan amount of the mth loan, mdl1 refers to the weighted average model score of the loan amount in January 2024, mdl2 refers to the weighted average model score of the historical loan amounts, and s represents the loan risk value in January 2024.

[0123] In detail, assuming that today is October 16, 2024, the numerical formula for calculating the loan risk in November and December 2024 is as follows:

[0124]

[0125] In the formula, S 11 is the loan risk value in November 2024, S 12 is the loan risk value in December 2024, among which S5, S6, S7, S8, S9, S 10 These are the risk values ​​for loans in May, June, July, August, September and October 2024 respectively.

[0126] In the embodiment of the present invention, the analyzing and calculating based on the loan risk value and the bad debt probability of the data combination vector to obtain the total bad debt amount of the loan includes:

[0127] Selecting each loan amount and the risk value corresponding to each loan amount, and the bad debt probability of the data combination vector one by one for analysis and calculation, and obtaining the bad debt amount of each loan;

[0128] The amounts of bad debts of the multiple loans are calculated to obtain the total amount of bad debts of the loans.

[0129] In the embodiment of the present invention, the analytical operation refers to the operation of multiplying the amount of each loan and the risk value corresponding to each loan amount and the bad debt probability of the data combination vector, and the calculation refers to adding up the amounts of bad debts of multiple loans.

[0130] Specifically, the formula for calculating the amount of bad debts for each loan is as follows:

[0131] z n =atm*s*p

[0132] In the formula, z n represents the amount of bad debt of the nth loan, atm represents the loan amount of the nth loan, s represents the risk value corresponding to the loan amount of the nth loan, and p represents the bad debt probability of the data combination vector.

[0133] In detail, the formula for calculating the total amount of bad debts for loans is as follows:

[0134] Z=Z1+Z2+···+Z n

[0135] In the formula, Z n represents the amount of bad debt of the nth loan, and Z represents the total amount of bad debt of all loans.

[0136] In an embodiment of the present invention, a loan risk value for the historical preset period is generated by calculating the ratio of the model score of the weighted average of the loan amounts for the historical preset period to the model score of the weighted average of the total loan amounts for the historical preset period, which can more objectively and accurately assess the risk level for the period. By taking the loan amount as a weight factor, loans of different amounts are taken into consideration, thereby enabling a more comprehensive risk assessment. By assessing the loan risk level for the historical preset period, loan companies can formulate targeted business strategies, adjust product design, risk control measures, etc., to improve risk control capabilities and business benefits. They can conduct a comprehensive assessment of the risks and benefits of the business during the historical period, which can be used as a basis for formulating performance indicators to assess the operating performance of banks or credit card companies.

[0137] In the embodiment of the present invention, the total amount of bad debts of the loans is obtained by analyzing and calculating the loan risk value and the bad debt probability of the data combination vector, and the bad debt risk of the loans in the future can be estimated based on the historical and future risk data, so that corresponding risk control measures can be taken in time to prevent the occurrence of risks; by analyzing and comparing historical and future data, the loan company can continuously improve its own risk control capabilities, continuously improve and optimize risk control measures, and reduce the risk of non-performing loans; by accurately estimating future bad debt risks and taking corresponding risk control measures, the occurrence of non-performing loans can be reduced, thereby reducing collection costs and operating costs.

[0138] It can be seen that in the above scheme, for the statistical loan bad debt business, the historical loan data of the lending institution is first obtained, the data features of the historical loan data are extracted, and a data combination vector is generated. Then, it is proposed to adjust and optimize the target parameters of the LSTM model according to the data combination vector to obtain a scheme for the target LSTM model. By using the target LSTM model to perform bad debt probability analysis on the test data, the probability of loan bad debts is obtained. According to the loan risk value and the probability of bad debts, the total amount of bad debts of the loans is obtained. It can accurately predict future bad debt risks and take corresponding risk control measures, which can reduce the occurrence of non-performing loans, thereby reducing collection costs and operating costs.

[0139] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0140] In one embodiment, a LSTM-based credit loan bad debt analysis device is provided, and the LSTM-based credit loan bad debt analysis device corresponds one-to-one to the LSTM-based credit loan bad debt analysis method in the above embodiment. Figure 3 As shown, the LSTM-based credit loan bad debt analysis device includes a loan data acquisition module 101, an extraction module 102, a vector generation module 103, an adjustment optimization module 104, a bad debt probability acquisition analysis module 105, a risk value acquisition module 106 and an analysis and calculation module 107. The functional modules are described in detail as follows:

[0141] The module 101 for obtaining loan data is used to obtain historical loan data of a lending institution;

[0142] Extraction module 102, used to extract data features of historical loan data;

[0143] A vector generation module 103, used to generate a data combination vector by combining the feature vector and the loan period number corresponding to the historical loan data;

[0144] An adjustment and optimization module 104 is used to adjust and optimize the target parameters of the LSTM model according to the data combination vector to obtain a target LSTM model;

[0145] Obtaining a bad debt probability analysis module 105, for performing bad debt probability analysis on the test data using the target LSTM model to obtain the probability of bad debts in loans;

[0146] A risk value acquisition module 106 is used to acquire a risk value of a loan;

[0147] The analysis and calculation module 107 is used to perform analysis and calculation based on the risk value of the loan and the probability of bad debt to obtain the total amount of bad debt of the loan.

[0148] In one embodiment, the module 101 for obtaining loan data, when executing the acquisition of historical loan data of a lending institution, is used to:

[0149] Retrieve historical loan data from the lending institution information database.

[0150] In one embodiment, the extraction module 102, when performing the extraction of data features of historical loan data, is used to:

[0151] The historical loan data are queried one by one according to preset conditions to obtain data features corresponding to each piece of historical loan data.

[0152] In one embodiment, when the adjustment and optimization module 104 performs adjustment and optimization on the target parameters of the LSTM model according to the data combination vector to obtain the target LSTM model, it is used to:

[0153] Performing time series analysis on the data combination vector using the LSTM model to obtain an analysis value of the data combination vector;

[0154] Calculating the analysis value of the data combination vector and the true value of the data combination vector to obtain a residual value;

[0155] The target parameters of the LSTM model are adjusted and optimized according to the residual value to obtain a target LSTM model.

[0156] In one embodiment, when the adjustment and optimization module 104 performs adjustment and optimization on the target parameters of the LSTM model according to the residual value to obtain the target LSTM model, it is used to:

[0157] Converting the residual value into a residual sequence;

[0158] Draw a residual graph, an autocorrelation graph, and a partial autocorrelation graph according to the residual sequence, and construct the result of the correlation between the residuals;

[0159] Testing the independence and randomness of the residual sequence to obtain independence and randomness results;

[0160] The residual sequence is checked by a normality test to approximately obey the normal distribution, and a result of approximately obeying the normal distribution is obtained;

[0161] Judging whether the LSTM model meets the parameter requirements of the target LSTM according to the results of the correlation between the residuals, the results of independence and randomness, and the results of approximate normal distribution;

[0162] If the LSTM model meets the parameter requirements of the LSTM, the target parameters of the LSTM model are used as the target parameters of the target LSTM model to obtain the target LSTM model;

[0163] If the LSTM model does not meet the parameter requirements of the LSTM, the target parameters of the LSTM model are updated by a gradient descent algorithm to obtain a target LSTM model.

[0164] In one embodiment, when the bad debt probability analysis module 105 performs bad debt probability analysis on the test data using the target LSTM model to obtain the probability of bad debts, it is used to:

[0165] Dividing the test data into multiple groups of batch data according to preset instructions;

[0166] Decomposing the batch data into multiple groups of input data one by one according to preset time steps;

[0167] Using the forget gate of the target LSTM model to forget the input data, to obtain forgotten data;

[0168] Using the input gate of the target LSTM model to jointly analyze the input data and the forgotten data to obtain input processing data;

[0169] Using the output gate of the target LSTM model to filter the input data, the forgotten data, and the input processing data to obtain final output data;

[0170] The probability of bad debts of loans is generated according to the final output data.

[0171] In one embodiment, when executing the process of obtaining the risk value of a loan, the risk value obtaining module 106 is used to:

[0172] Obtaining the amount of each loan within a preset historical period and the preset model score of each loan from the historical loan data;

[0173] Calculate the weighted average of each loan amount within the historical preset period and the model score preset for each loan, to obtain the model score of the weighted average of the loan amounts within the historical preset period;

[0174] Obtaining the amount of each historical loan and the preset model score of each loan from the historical loan data;

[0175] Calculate the weighted average of each historical loan amount and the model score preset for each loan to obtain a model score of the weighted average of the historical loan amounts;

[0176] Calculate the ratio of the model score of the weighted average of the loan amounts during the historical preset period to the model score of the weighted average of the historical loan amounts, and use the result of the ratio calculation to generate a loan risk value during the historical preset period;

[0177] The risk value of loans in the future preset period is calculated based on the risk value of loans in the historical preset period and the amount of future loans, so as to obtain the risk value of loans in the future preset period.

[0178] In one embodiment, when the analysis and calculation module 107 performs analysis and calculation based on the risk value of the loan and the probability of bad debts to obtain the total amount of bad debts of the loan, it is used to:

[0179] Selecting each loan amount and the risk value corresponding to each loan amount, and the bad debt probability of the data combination vector one by one for analysis and calculation, and obtaining the bad debt amount of each loan;

[0180] The amounts of bad debts of the multiple loans are calculated to obtain the total amount of bad debts of the loans.

[0181] The present invention provides a credit loan bad debt analysis device based on LSTM. For the statistical loan bad debt business, the historical loan data of the loan institution is firstly obtained, the data features of the historical loan data are extracted, and a data combination vector is generated. Then, a scheme of adjusting and optimizing the target parameters of the LSTM model according to the data combination vector is proposed to obtain a target LSTM model. The bad debt probability analysis of the test data is performed by using the target LSTM model to obtain the probability of loan bad debts. The total amount of bad debts of the loans is obtained by performing analysis and calculation according to the risk value of the loans and the probability of bad debts. The future bad debt risk can be accurately estimated and corresponding risk control measures can be taken, so as to reduce the occurrence of non-performing loans, thereby reducing the collection fee and operating cost.

[0182] For the specific definition of a credit loan bad debt analysis device based on LSTM, please refer to the definition of a credit loan bad debt analysis method based on LSTM above, which will not be repeated here. Each module in the above-mentioned credit loan bad debt analysis device based on LSTM can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0183] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client through a network connection. When the computer program is executed by the processor, it realizes the functions or steps of a service-side method for analyzing bad debts of credit loans based on LSTM.

[0184] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, it realizes the functions or steps of the client side of a credit loan bad debt analysis method based on LSTM.

[0185] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0186] Obtaining historical loan data of a lending institution and extracting data features of the historical loan data;

[0187] Generate a feature vector according to the data feature, and generate a data combination vector by combining the feature vector and the loan period number corresponding to the historical loan data;

[0188] Adjust and optimize the target parameters of the LSTM model according to the data combination vector to obtain a target LSTM model;

[0189] Acquire test data, and use the target LSTM model to perform bad debt probability analysis on the test data to obtain the probability of bad debts in loans;

[0190] The risk value of the loan is obtained, and an analysis is performed based on the risk value of the loan and the probability of bad debts to obtain the total amount of bad debts of the loan.

[0191] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0192] Obtaining historical loan data of a lending institution and extracting data features of the historical loan data;

[0193] Generate a feature vector according to the data feature, and generate a data combination vector by combining the feature vector and the loan period number corresponding to the historical loan data;

[0194] Adjust and optimize the target parameters of the LSTM model according to the data combination vector to obtain a target LSTM model;

[0195] Acquire test data, and use the target LSTM model to perform bad debt probability analysis on the test data to obtain the probability of bad debts in loans;

[0196] The risk value of the loan is obtained, and an analysis is performed based on the risk value of the loan and the probability of bad debts to obtain the total amount of bad debts of the loan.

[0197] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.

[0198] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0199] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0200] The above-described embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some of the technical features therein by equivalents; and these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should be included in the protection scope of the present invention. It should be noted that if software tools or components other than those of the company appear in the embodiments of this application, they are only used for example introduction and do not represent actual use.

Claims

1. A credit loan bad debt analysis method based on LSTM, characterized in that: include: Obtaining historical loan data of a lending institution and extracting data features of the historical loan data; Generate a feature vector according to the data feature, and generate a data combination vector by combining the feature vector and the loan period number corresponding to the historical loan data; Adjust and optimize the target parameters of the LSTM model according to the data combination vector to obtain a target LSTM model; Acquire test data, and use the target LSTM model to perform bad debt probability analysis on the test data to obtain the probability of bad debts in loans; The risk value of the loan is obtained, and an analysis is performed based on the risk value of the loan and the probability of bad debts to obtain the total amount of bad debts of the loan.

2. The LSTM-based credit loan bad debt analysis method according to claim 1, characterized in that: The step of obtaining the historical lending data of the lending institution and extracting data features of the historical lending data includes: Retrieving historical loan data from the lending institution information database; The historical loan data are queried one by one according to preset conditions to obtain data features corresponding to each piece of historical loan data.

3. The LSTM-based credit loan bad debt analysis method according to claim 1, characterized in that: The generating of a feature vector according to the data feature, and generating a data combination vector by combining the feature vector and the loan period number corresponding to the historical loan data, comprises: Normalizing the data features one by one to obtain feature vectors corresponding to the data features; The loan periods are converted one by one into period vectors corresponding to the feature vectors, and the period vectors are combined with the corresponding feature vectors to obtain a data combination vector.

4. The LSTM-based credit loan bad debt analysis method according to claim 1, characterized in that: The step of adjusting and optimizing the target parameters of the LSTM model according to the data combination vector to obtain the target LSTM model includes: Performing time series analysis on the data combination vector using the LSTM model to obtain an analysis value of the data combination vector; Calculating the analysis value of the data combination vector and the true value of the data combination vector to obtain a residual value; The target parameters of the LSTM model are adjusted and optimized according to the residual value to obtain a target LSTM model.

5. The LSTM-based credit loan bad debt analysis method according to claim 4, characterized in that: The step of adjusting and optimizing the target parameters of the LSTM model according to the residual value to obtain a target LSTM model includes: Converting the residual value into a residual sequence; Draw a residual graph, an autocorrelation graph, and a partial autocorrelation graph according to the residual sequence, and construct a correlation result among the residual graph, the autocorrelation graph, and the partial autocorrelation graph; Testing the independence and randomness of the residual sequence to obtain independence and randomness results; The residual sequence is checked by a normality test to approximately obey the normal distribution, and a result of approximately obeying the normal distribution is obtained; Judging whether the LSTM model meets the preset LSTM parameter requirements according to the results of the correlation between the residuals, the results of independence and randomness, and the results of approximate normal distribution; If the LSTM model meets the parameter requirements of the LSTM, the target parameters of the LSTM model are used as the target parameters of the target LSTM model to obtain the target LSTM model; If the LSTM model does not meet the parameter requirements of the LSTM, the target parameters of the LSTM model are updated by a gradient descent algorithm to obtain a target LSTM model.

6. The LSTM-based credit loan bad debt analysis method according to claim 1, characterized in that: The using the target LSTM model to perform bad debt probability analysis on the test data to obtain the probability of bad debts of loans includes: Dividing the test data into multiple groups of batch data according to preset instructions; Decomposing the batch data into multiple groups of input data one by one according to preset time steps; Using the forget gate of the target LSTM model to forget the input data, to obtain forgotten data; Using the input gate of the target LSTM model to jointly analyze the input data and the forgotten data to obtain input processing data; Using the output gate of the target LSTM model to filter the input data, the forgotten data, and the input processing data to obtain final output data; The probability of bad debts of loans is generated according to the final output data.

7. The LSTM-based credit loan bad debt analysis method according to claim 1, characterized in that: The risk value of obtaining the loan includes: Obtaining the amount of each loan within a preset historical period and the preset model score of each loan from the historical loan data; Perform a weighted average calculation on the amount of each loan disbursed during the historical preset period and the model score corresponding to each loan disbursed, to obtain a model score of the weighted average of the amount of loans disbursed during the historical preset period; Obtaining the amount of each historical loan and the preset model score of each loan from the historical loan data; Calculate the weighted average of each historical loan amount and the model score preset for each loan to obtain a model score of the weighted average of the historical loan amounts; Calculate the ratio of the model score of the weighted average of the loan amounts during the historical preset period to the model score of the weighted average of the historical loan amounts, and use the result of the ratio calculation to generate a loan risk value during the historical preset period; The risk value of loans in the future preset period is calculated based on the risk value of loans in the historical preset period and the amount of future loans, so as to obtain the risk value of loans in the future preset period.

8. A credit loan bad debt analysis device based on LSTM, characterized in that: include: The module for obtaining loan data is used to obtain the historical loan data of lending institutions; Extraction module, used to extract data features of historical loan data; A vector generation module, used to generate a data combination vector by combining the feature vector and the loan period number corresponding to the historical loan data; An adjustment and optimization module, used to adjust and optimize the target parameters of the LSTM model according to the data combination vector to obtain a target LSTM model; Obtain a bad debt probability analysis module, which is used to perform bad debt probability analysis on the test data using the target LSTM model to obtain the probability of bad debts in loans; The risk value acquisition module is used to obtain the risk value of the loan; The analysis and calculation module is used to perform analysis and calculation based on the risk value of the loan and the probability of bad debts to obtain the total amount of bad debts of the loan.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the LSTM-based credit loan bad debt analysis method as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the LSTM-based credit loan bad debt analysis method as described in any one of claims 1 to 7 are implemented.