Personal credit risk identification method and device, equipment and medium
Through large language models, personal credit data is characterized by mining, personal profile data is generated, and personal credit risk identification is combined with personal credit data, which solves the problem of insufficient characteristics of personal credit data and improves the performance and reliability of risk identification.
Patent Information
- Application Number
- CN202411684846.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-04-18
AI Technical Summary
Due to the privacy attributes of personal credit data, complete personal credit data is difficult to obtain, resulting in obvious insufficient characteristics of personal credit risk identification, which limits the potential of deep learning models and may cause overfitting.
Through large language models, personal credit data are mined, personal portrait data is generated, and personal credit risk identification is combined with personal credit data.
It effectively overcomes the overfitting problem when only using personal credit data for risk identification, improves the performance of personal credit risk identification, and ensures its reliability and accuracy.
Smart Images

Figure CN119850323A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and in particular to a method, device, equipment and medium for identifying personal credit risk. Background Art
[0002] The rapid development of artificial intelligence technology has led to increasingly in-depth application of personal credit data in financial risk prevention and control.
[0003] However, due to the privacy attributes of personal credit data, complete personal credit data is often difficult to obtain, which makes the characteristics of personal credit data obviously insufficient in risk prevention and control, directly limits the potential of deep learning models in personal credit risk identification, and may cause overfitting. Summary of the invention
[0004] The present invention provides a personal credit risk identification method, device, equipment and medium, which are used to solve the defect of poor risk identification reliability due to insufficient personal credit data characteristics in related technologies.
[0005] The present invention provides a method for identifying personal credit risk, comprising: Obtain personal credit data; Based on a large language model, the personal credit data is mined for character features to obtain personal portrait data; Based on the personal credit data and the personal portrait data, personal credit risk identification is performed.
[0006] According to a personal credit risk identification method provided by the present invention, the personal credit data is mined for character features based on a large language model to obtain personal portrait data, including: Generate prompt text based on the personal credit data and a mining prompt template, wherein the mining prompt template is used to instruct a large language model to mine character features and associations between character features in the personal credit data; The prompt text is input into the large language model to obtain the personal portrait data output by the large language model.
[0007] According to a personal credit risk identification method provided by the present invention, the personal credit risk identification is performed based on the personal credit data and the personal portrait data, including: Determining a first credit feature based on the personal credit data and the personal portrait data; Inputting the first credit feature into a plurality of first risk classification models respectively to obtain first classification results outputted by the plurality of first risk classification models respectively, wherein the plurality of first risk classification models are trained based on different sample data; Based on the multiple first classification results, personal credit risk identification is performed.
[0008] According to a personal credit risk identification method provided by the present invention, the personal credit risk identification is performed based on the plurality of first classification results, including: combining the first credit feature and a plurality of the first classification results to obtain a second credit feature; Personal credit risk is identified based on the second credit feature.
[0009] According to a personal credit risk identification method provided by the present invention, the personal credit risk identification based on the second credit feature includes: inputting the second credit feature into a plurality of second risk classification models respectively, to obtain second classification results respectively output by the plurality of second risk classification models; Based on the plurality of the second classification results, an identification result of the personal credit risk is determined.
[0010] According to a personal credit risk identification method provided by the present invention, the step of determining the personal credit risk identification result based on the plurality of second classification results includes: Inputting the plurality of the second classification results into a regression model to obtain an identification result of the personal credit risk output by the regression model; The regression model is obtained by joint training with the multiple first risk classification models and the multiple second risk classification models.
[0011] The present invention also provides a personal credit risk identification device, comprising: An acquisition unit, used for acquiring personal credit data; A portrait unit, used to mine the personal characteristics of the personal credit data based on a large language model to obtain personal portrait data; An identification unit is used to identify personal credit risk based on the personal credit data and the personal portrait data.
[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned personal credit risk identification methods is implemented.
[0013] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the personal credit risk identification method as described in any one of the above is implemented.
[0014] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the personal credit risk identification method as described above is implemented.
[0015] The personal credit risk identification method, device, equipment and medium provided by the present invention mine personal credit data based on a large language model to obtain personal portrait data, thereby realizing feature enhancement for the personal credit data through the personal portrait data, and combining the personal credit data and the personal portrait data to perform personal credit risk identification, which can effectively overcome the overfitting problem when only personal credit data is used for risk identification, improve the performance of personal credit risk identification, and ensure the reliability and accuracy of personal credit risk identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 This is one of the flow charts of the personal credit risk identification method provided by the present invention.
[0018] Figure 2 It is a structural diagram of the Stacking model in the related technology.
[0019] Figure 3 It is a structural schematic diagram of the Stacking model for personal credit risk identification provided by the present invention.
[0020] Figure 4 It is a schematic diagram of the vector representation of personal credit data provided by the present invention.
[0021] Figure 5 This is the second flow chart of the personal credit risk identification method provided by the present invention.
[0022] Figure 6 It is a structural schematic diagram of the personal credit risk identification device provided by the present invention.
[0023] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings 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.
[0025] The rapid development of artificial intelligence technology has led to increasingly in-depth application of personal credit data in financial risk prevention and control.
[0026] However, due to the privacy attributes of personal credit data, complete personal credit data is often difficult to obtain, which not only limits the feature richness of personal credit data, but also affects the potential of deep learning models in personal credit risk identification, and may cause overfitting.
[0027] Taking the above issues into consideration, when selecting a model for personal credit risk identification, it is usually necessary to avoid using a deep learning architecture with a large parameter scale, which constrains the performance of personal credit risk identification.
[0028] In addition, personal credit data inherently contains complex internal connections, and mainstream traditional machine learning and ensemble learning methods often simplify problems through feature selection, which may inadvertently ignore the subtle relationships between data and cause valuable information loss. In addition, manual feature extraction may lack the ability to capture deep-level features of data, limiting the improvement of personal credit risk identification performance. Although deep learning has significant advantages in automatic feature extraction, its application in financial structured data is not yet widespread, and its end-to-end black box characteristics may also pose a challenge to the interpretability of personal credit risk identification.
[0029] In view of the above problems, an embodiment of the present invention provides a method for identifying personal credit risk. Figure 1 This is one of the flow charts of the personal credit risk identification method provided by the present invention, such as Figure 1 As shown, the method includes: Step 110, obtaining personal credit data.
[0030] Here, personal credit data refers to data related to personal credit collected for credit risk identification of individuals, which may specifically include the individual's age, income, family situation, loan status, etc.
[0031] Among them, age can be reflected in the form of age groups, income can be reflected in the form of monthly income or annual income, family situation can include the number of family members, and loan situation can further include the recycling of secured loans, debt ratio, number of non-serious overdue payments from 35 to 59 days, open credit lines, number of loans, number of overdue payments exceeding 90 days, number of real estate loans or lines, number of non-serious overdue payments from 60 to 89 days, etc.
[0032] It should be noted that, considering the privacy attributes of personal credit data, the personal credit data that can be obtained in the embodiments of the present invention are all authorized data, and the data contained in the personal credit data may include part or all of the above-mentioned examples, and the embodiments of the present invention do not specifically limit this.
[0033] Step 120: Based on a large language model, perform character feature mining on the personal credit data to obtain personal portrait data.
[0034] Specifically, considering that the feature richness of the personal credit data obtained in step 110 is limited, a large language model can be used to mine the personal features of the personal credit data, thereby obtaining richer information related to personal credit.
[0035] Here, Large Language Model (LLM) is referred to as large model, which refers to a natural language processing (NLP) model with a large parameter scale. The number of model parameters and / or the complexity of the model structure exceeds the preset threshold. The model processes a large amount of text data during training and has the ability to understand and generate natural language. For example, large language models can include Spark large models, etc.
[0036] Furthermore, the large language model here can be a large language model in a general field, or a large language model obtained by fine-tuning data in the financial field or in the field of personal credit. For example, a large language model can be obtained by fine-tuning a pre-trained large language model using various sample personal credit data, which is not specifically limited in the embodiments of the present invention.
[0037] After determining the personal credit data, character feature mining for the personal credit data can be realized based on the large language model. For example, the personal credit data can be included in the input text of the large language model, or the personal credit data and the description of various types of data in the personal credit data can be included in the input text of the large language model, and the input text can be input into the large language model, and then the large language model can mine the character features for the personal credit data contained in the input text. In this process, the character features related to personal credit reflected by one type of data in the personal credit data can be mined, and the character features related to personal credit reflected by the combination of multiple types of data in the personal credit data can also be mined, thereby obtaining personal portrait data that can reflect the character features related to personal credit.
[0038] It is understandable that large-scale language models, with their powerful language understanding and reasoning and prediction capabilities, can accurately and efficiently mine subtle and implicit character features from complex personal credit data. The personal portrait data obtained in this way can make up for the lack of feature richness in personal credit data, thereby avoiding the loss of valuable information in personal credit risk identification.
[0039] Moreover, since large language models can output the logic of character feature mining for personal credit data in the form of natural language, the personal portrait data obtained based on large language models has good interpretability, which provides a basis for the interpretability of feature selection for personal credit risk identification.
[0040] Step 130: Identify personal credit risk based on the personal credit data and the personal portrait data.
[0041] Specifically, after obtaining personal credit data and personal portrait data, the two can be combined to identify personal credit risk. It can be understood that the combination of personal credit data and personal portrait data can greatly improve the feature richness used in personal credit risk identification, and the application of personal portrait data also provides a more in-depth and detailed perspective for personal credit risk identification, enhancing the practicality and value of personal credit data in personal credit risk identification.
[0042] For example, when combining personal credit data and personal portrait data to identify personal credit risk, the vector representation of the personal credit data and the vector representation of the personal portrait data can be spliced, and the spliced vector representation can be input into a pre-trained personal credit risk identification model to achieve personal credit risk identification.
[0043] It is understandable that the result obtained through personal credit risk identification, that is, the credit risk of the person corresponding to the personal credit data, may be the existence of credit risk, or the absence of credit risk, or may be a credit risk level, and the embodiments of the present invention do not specifically limit this.
[0044] In the method provided in the embodiment of the present invention, personal credit data is mined based on a large language model to obtain personal portrait data, thereby achieving feature enhancement for the personal credit data through the personal portrait data, and combining the personal credit data and the personal portrait data to perform personal credit risk identification, which can effectively overcome the overfitting problem when only personal credit data is used for risk identification, improve the performance of personal credit risk identification, and ensure the reliability and accuracy of personal credit risk identification.
[0045] Based on the above embodiment, in step 120, the personal credit data is mined for personal characteristics based on a large language model to obtain personal portrait data, including: Generate prompt text based on the personal credit data and a mining prompt template, wherein the mining prompt template is used to instruct a large language model to mine character features and associations between character features in the personal credit data; The prompt text is input into the large language model to obtain the personal portrait data output by the large language model.
[0046] Specifically, in order to implement character feature mining for personal credit data through a large language model, an input for the large language model can be constructed based on the personal credit data and the prompt of the large language model. In the embodiment of the present invention, the prompt for the large language model used to implement character feature mining is recorded as a mining prompt template, and the input for the large language model is recorded as a prompt text.
[0047] Here, the mining prompt template is used to prompt the large language model to perform character feature mining at the input stage of the large language model, that is, to mine character features in personal credit data and to mine the associations between character features in personal credit data. The mining prompt template is an instruction in the form of natural language text that instructs the large language model to mine character features. The application of the mining prompt template in the prompt text can serve as a bridge for the large language model to describe personal portrait data and introduce personal credit data, and the construction of the mining prompt model is directly related to the unique nature of personal credit data and the need to mine personal portrait data.
[0048] It is understandable that mining from two aspects, namely, character features in personal credit data and the relationship between character features, can capture subtle information in personal credit data and the relationship between information, thereby ensuring that the information contained in the personal portrait data generated by the large language model can be richer and more detailed, and can contain more contextual information of individual behavior, so that in the process of personal credit risk identification, the credit status of an individual can be more comprehensively understood and evaluated. For example, personal portrait data can include character features in terms of consumption habits, payment ability, social networks, etc.
[0049] After obtaining the personal credit data, a prompt text may be generated based on the personal credit data and the mining prompt template. For example, the personal credit data and the mining prompt template may be spliced to obtain the prompt text; or the personal credit data may be filled into the mining prompt template to obtain the prompt text, which is not specifically limited in the embodiment of the present invention.
[0050] After obtaining the prompt text, the prompt text can be input into a large language model, and the large language model mines the personal features of the personal credit data in the prompt text, thereby obtaining and outputting personal credit risk identification.
[0051] The method provided by the embodiment of the present invention generates prompt text as input of a large language model based on personal credit data and a mining prompt template, thereby realizing the generation of personal portrait data based on the large language model, and realizing data enhancement for personal credit data by calling on the excellent semantic understanding and analysis and mining capabilities of the large language model.
[0052] In related technologies, personal credit risk identification is often performed based on the Stacking model. Here, the Stacking model, also known as stacked generalization, is an integrated learning method that improves the overall prediction performance by combining the predictions of multiple models.
[0053] For example, Figure 2 It is a schematic diagram of the structure of the Stacking model in the related technology. Figure 2 As shown in the figure, the Stacking model adopts a hierarchical structure and usually contains two layers. Models 1 to n are base learners (also called first-level models), and model m is a meta learner (also called second-level model or meta-model).
[0054] In order to realize the construction of the Stacking model, in the related technology, the pre-collected personal credit data set is usually divided into multiple subsets, namely training sets 1 to n, and cross-validation is used to ensure that each subset can be used for training and verification. Subsequently, a set of basic learning models can be selected as base learners. The models here can be built based on different types of algorithms, such as decision trees, neural networks, support vector machines, etc., and then these models are trained on each subset to obtain models 1 to n; then, the prediction results of these models are input as new features into the meta-model, namely model m. Model m usually selects a relatively simple algorithm, such as logistic regression, to make the final prediction. Finally, the predictions of the base learners are integrated by training the meta-model to obtain the final prediction results.
[0055] Applying the Stacking model to personal credit risk identification can effectively capture the complex nonlinear relationship in personal credit data and reduce the risk of overfitting. The Stacking model also shows strong performance in processing unbalanced sample data where the number of credit abnormal samples is far less than the number of credit normal samples. In the Internet financial environment, the Stacking model provides a new perspective for personal credit scoring, especially in terms of the recognition rate and stability of default risk samples.
[0056] However, the sample data used to train the Stacking model is unbalanced, that is, the number of credit abnormality samples is far less than the number of credit normal samples, which weakens the ability of the Stacking model to identify the minority class of abnormal credit. If the imbalance of sample data is ignored, it is easy to introduce systematic bias in the training of the Stacking model, resulting in a loss of accuracy in predicting personal credit risk.
[0057] To solve this problem, based on any of the above embodiments, in step 130, the personal credit risk identification based on the personal credit data and the personal portrait data includes: Determining a first credit feature based on the personal credit data and the personal portrait data; Inputting the first credit feature into a plurality of first risk classification models respectively to obtain first classification results outputted by the plurality of first risk classification models respectively, wherein the plurality of first risk classification models are trained based on different sample data; Based on the multiple first classification results, personal credit risk identification is performed.
[0058] Specifically, after obtaining the personal credit data and the personal portrait data, the two can be converted into vector forms respectively, that is, the vector representation of the personal credit data and the vector representation of the personal portrait data are obtained, and then the vector representation of the personal credit data and the vector representation of the personal portrait data are combined to obtain the first credit feature. For example, the first credit feature can be the splicing result of the vector representation of the personal credit data and the vector representation of the personal portrait data.
[0059] After obtaining the first credit feature, the first credit feature can be used as an input for personal credit risk identification, and risk identification can be performed based on the first credit feature through multiple first risk classification models. Here, the output of each first risk classification model is recorded as a first classification result. It can be understood that the number of first classification results is consistent with the number of first risk classification models, and each first risk classification model will output a first classification result based on the input first credit feature.
[0060] Here, multiple first risk classification models can be regarded as multiple base learners in the Stacking model, that is, as multiple first-level models in the Stacking model. Multiple first risk classification models can be models built based on different types of algorithms. For example, there can be three first risk classification models, which are built based on XGBoost (eXtreme GradientBoosting), LightGBM (Light Gradient Boosting Machine) and Random Forest.
[0061] Considering the unbalanced characteristics of sample data when training each first risk classification model, in order to ensure the generalization ability of personal credit risk identification, in the embodiment of the present invention, not only different types of models are selected as the first risk classification model, but also different sample data are used when training each first risk classification model. That is, for each first risk classification model, the sample data used in training is different, and the sample data applied to different first risk classification models during training is different, which can be specifically reflected in that the sample first credit characteristics applied to different first risk classification models during training come from different individuals.
[0062] It is understandable that applying different sample data to train different first risk classification models can increase the differences in outputs of different first risk classification models, thereby improving the overall generalization ability of personal credit risk identification.
[0063] After obtaining the first classification results output by each first risk classification model, the identification result of the personal credit risk can be determined based on each first classification result. For example, each first classification result can be input into the secondary model in the Stacking model, and the output of the secondary model is used as the identification result of the personal credit risk.
[0064] In the method provided in the embodiment of the present invention, different first risk classification models are trained by using different sample data, thereby increasing the differences in outputs of different first risk classification models, thereby achieving an improvement in the overall generalization ability of personal credit risk identification when the sample data is unbalanced.
[0065] In addition, in the related art, when personal credit risk identification is performed based on the Stacking model, since there are multiple base learners in the Stacking model, the multiple base learners themselves are too complex and easily capture the noise in the personal credit data rather than the potential information. This makes personal credit risk identification based on the Stacking model still have the problem of overfitting.
[0066] To solve this problem, based on any of the above embodiments, in step 130, the personal credit risk identification is performed based on the multiple first classification results, including: combining the first credit feature and a plurality of the first classification results to obtain a second credit feature; Personal credit risk is identified based on the second credit feature.
[0067] Specifically, although the multiple first classification results obtained based on multiple first risk classification models capture part of the information in the first credit feature, there is a situation where the noise in the first credit feature is introduced in the process of determining the first classification result, and the potential personal credit-related information in the first credit feature is ignored. Therefore, after obtaining multiple first classification results, the first credit feature and the multiple first classification results can be combined, and the second credit feature obtained by the combination can be used for personal credit risk identification. For example, the second credit feature can be used as the input of the secondary model in the Stacking model to achieve personal credit risk identification.
[0068] It can be understood that the second credit feature obtained here not only continues the information on personal credit risks reflected by multiple first classification results, but also retains the complete information of the first credit feature which is the original input for personal credit analysis and identification, thereby avoiding the problems caused by introducing noise and ignoring potential information in the process of determining the first classification result, and effectively avoiding overfitting.
[0069] Based on any of the above embodiments, in step 130, the identifying of personal credit risk based on the second credit feature includes: inputting the second credit feature into a plurality of second risk classification models respectively, to obtain second classification results respectively output by the plurality of second risk classification models; Based on the plurality of the second classification results, an identification result of the personal credit risk is determined.
[0070] Specifically, in order to further improve the reliability and accuracy of personal credit risk identification, after obtaining the second credit feature, multiple second risk classification models can be used to perform risk identification based on the second credit feature. Here, the output of each second risk classification model is recorded as a second classification result. It can be understood that the number of second classification results is consistent with the number of second risk classification models, and each second risk classification model will output a second classification result based on the input second credit feature.
[0071] Compared with the solution of using only a single model as a secondary model in the Stacking model, in an embodiment of the present invention, multiple second risk classification models are regarded as secondary models. The multiple second risk classification models here can be models constructed based on different types of algorithms, for example, they can include second risk classification models constructed based on decision trees, K nearest neighbors, Gaussian Bayes, logistic regression, Bagging, LightGBM, random forests and XGBoost.
[0072] After obtaining the second classification results respectively output by each second risk classification model, the identification result of the personal credit risk can be determined based on all the second classification results.
[0073] In the method provided in the embodiment of the present invention, multiple second risk classification models are applied to further perform risk identification, which can further improve the accuracy and reliability of personal credit risk identification.
[0074] Based on any of the above embodiments, in step 130, determining the identification result of the personal credit risk based on the plurality of the second classification results includes: Inputting the plurality of the second classification results into a regression model to obtain an identification result of the personal credit risk output by the regression model; The regression model is obtained by joint training with the multiple first risk classification models and the multiple second risk classification models.
[0075] Specifically, the regression model is a statistical analysis model used to learn the relationship between input and output, such as a logistic regression model. After obtaining multiple second classification results, the multiple second classification results can be used as inputs to the regression model, and the regression model determines and outputs the final personal credit risk identification result based on the multiple second classification results.
[0076] In order to realize the coordinated application of multiple first risk classification models, multiple second risk classification models and regression models in the personal credit risk identification scenario, before personal credit risk identification is performed, joint training can be performed on the multiple first risk classification models, multiple second risk classification models and regression models.
[0077] Furthermore, multiple first risk classification models can be first trained separately. After obtaining multiple first risk classification models, the multiple first risk classification models can be applied to the training of each second risk classification model, which is specifically reflected in splicing the outputs of the multiple first risk classification models for sample data and the sample data as the training input of each second risk classification model, thereby respectively training to obtain multiple second risk classification models. After obtaining multiple first risk classification models and multiple second risk classification models, the multiple first risk classification models and multiple second risk classification models can be applied to the training of the regression model, which is specifically reflected in splicing the outputs of the multiple first risk classification models for sample data and the sample data as the input of multiple second risk classification models, thereby obtaining the outputs of multiple second risk classification models, and integrating the outputs of the multiple second risk classification models as the training input of the regression model, thereby training to obtain the regression model.
[0078] In the method provided in the embodiment of the present invention, personal credit risk identification is achieved through a cascade structure of multiple first risk classification models, multiple second risk classification models and a regression model. Since the classification results of different models are combined, the nonlinear relationships and complex patterns in personal credit data and personal portrait data can be better captured, thereby significantly improving the accuracy and robustness of personal credit risk identification.
[0079] Based on any of the above embodiments, Figure 3 Schematic diagram of the structure of the Stacking model for personal credit risk identification provided by the present invention. Figure 3 As shown, compared to Figure 2 The traditional Stacking model shown in the figure has the following main differences in the Stacking model used for personal credit risk identification in the embodiment of the present invention: First, Figure 3The stacking model shown not only uses different types of first risk classification models in the first layer, but also uses different training data when training different first risk classification models. Here, the first risk classification model includes Figure 3 The three models of XGBoost, LightGBM and Random Forest are shown in the figure.
[0080] Among them, the formula of XGBoost is expressed as: In the formula, is the training sample, represents the first-order derivative of each training sample, represents the second-order derivative of each training sample. represents the predicted value of the training sample, Represents the number of leaf nodes in XGBoost, Represents the magnitude of the vector consisting of leaf node values.
[0081] The LightGBM algorithm achieves efficient machine learning based on histogram-based decision tree construction, gradient-based one-side sampling (GOSS) technology, and exclusive feature bundling (EFB) technology. In addition, in the LightGBM algorithm, the Leaf-wise leaf growth strategy has a depth limit to ensure the simplicity and efficiency of the model. In addition, the algorithm is not only directly compatible with category feature processing, but also supports efficient parallel computing, optimizes the cache hit rate, and further improves the data processing speed.
[0082] Second, Figure 3 In the stacking model shown, the output of the first risk classification model is concatenated with the input of the first risk classification model to form the input of the second risk classification model.
[0083] Here, the first classification results output by the first risk classification models XGBoost, LightGBM, and Random Forest for the first credit feature train1 are and , you can combine train1 with and Splicing to form a second credit feature .
[0084] Third, Figure 3The Stacking model shown uses multiple second risk classification models in the second layer, and the model parameters can be adjusted through parameter optimization strategies such as genetic algorithms, thereby avoiding the inaccuracy and time consumption of manual parameter adjustment, making the model training process more efficient and automated, and further improving the performance of the Stacking model.
[0085] For example, the second risk classification model may include Figure 3 The 8 classification models listed side by side are decision tree, K nearest neighbor, Gaussian Bayes, logistic regression, Bagging, LightGBM, random forest and XGBoost.
[0086] Each second risk classification model can output a second classification result, such as Figure 3 Shown to That is, the second classification results of different second risk classification models. These second classification results can be input into the regression model LR to obtain the final output of the personal credit risk identification result OUTPUT.
[0087] against Figure 3 The Stacking model for personal credit risk identification shown in the figure can divide the training samples into 5 subsets, namely train1 to train5, and perform cross-validation based on these 5 subsets to achieve model training. Specifically, taking the first risk classification model XGBoost as an example, four subsets can be selected as training samples in turn, and the remaining subset can be used for validation. Repeat this process 5 times to obtain 5 groups of first classification results on the training set. to , and a set of first classification results on the test set .
[0088] Next, the five groups of first classification results of different first risk models on the training set can be vertically spliced to obtain the second credit feature, which is specifically embodied as follows: to Subsequently, the second credit feature can be applied to the training of multiple second risk classification models, and the output of each second risk classification model is used as the input of the regression model LR.
[0089] In the method provided in the embodiment of the present invention, by improving the Stacking model, a combination of multiple classification models is realized, thereby improving the generalization ability and accuracy of personal credit risk identification. In addition, by searching for optimal parameters through genetic algorithms, the accuracy and efficiency of the model in personal credit risk identification can be further improved.
[0090] Based on any of the above embodiments, after obtaining personal credit data in step 110, the following steps are further included: Obtain a vector representation of the personal credit data.
[0091] Specifically, for discrete values in personal credit data, One-hot encoding can be used for processing.
[0092] Here, One-hot encoding can effectively reduce the weight of a single feature in the model by converting each discrete value into a set of binary features, reduce the impact of abnormal data on the model, and expand the data features to a certain extent. One-hot encoding not only enhances the robustness of the model, but also improves the ability to process discrete features, laying the foundation for subsequent data analysis and machine learning modeling.
[0093] Assume that there is a characteristic variable X in personal credit data, and X has n possible values, specifically , the one-hot encoded vector is represented as V, with a length of n. For each value , the encoded vector The i-th dimension of is 1, and the other dimensions are 0.
[0094] Specifically, the mathematical formula of One-hot encoding can be expressed as: V = , where if =1,X= ; if = 0, X≠ .
[0095] In addition, for continuous values in personal credit data, model performance can be improved through normalization and standardization. Here, the dimensions and magnitudes of different risk factors in personal credit data may vary greatly. Through normalization or standardization, these factors can be compared on the same scale, thereby more accurately assessing the overall risk.
[0096] By normalizing or standardizing, a column of feature data can be changed to a fixed interval. Usually, the data after normalization or standardization is a decimal between [0, 1] or (-1, 1). By mapping the data to the range of 0 to 1, data processing can be achieved more conveniently and quickly.
[0097] Specifically, the normalization operation can be expressed as the formula: in, is the value to be normalized, and The maximum and minimum values of the numerical range.
[0098] The standardization operation can change the average value of the individual credit characteristics to 0 (subtract the average value of the value from each individual credit data). )), the standard deviation becomes 1, which can be expressed as the formula: in, is the value to be standardized, and The mean and standard deviation of the values.
[0099] After normalizing and standardizing the continuous values in personal credit data, such values will be symmetrically distributed with 0 as the center. This distribution characteristic is consistent with the form of activation functions such as sigmoid, Tanh, Softmax, etc. These activation functions are distributed around 0, making the interaction between data and functions more coordinated, thereby optimizing the learning efficiency and prediction accuracy of the model.
[0100] For example, Figure 4 Schematic diagram of vector representation of personal credit data provided by the present invention. Figure 4 As shown, for the collected personal credit data, for example , preprocessing can be performed, and specific preprocessing operations include missing value processing, outlier processing, data type conversion, and feature selection. On this basis, for each value obtained by feature selection, the discrete value can be encoded by One-hot to obtain the corresponding vector representation, and the continuous value can be normalized and standardized to obtain the corresponding vector representation.
[0101] Based on any of the above embodiments, Figure 5 This is the second flow chart of the personal credit risk identification method provided by the present invention. Figure 5 As shown, the method includes: First, obtain personal credit data.
[0102] Subsequently, the personal credit data and Prompt are input into the large language model, and the large language model mines the personal characteristics of the personal credit data, thereby outputting personal portrait data. The Prompt here is the mining prompt template in the above embodiment.
[0103] The personal credit data is input into the data representation module, so as to perform One-hot encoding on the discrete values in the personal credit data and normalize and standardize the continuous values in the personal credit data, thereby obtaining a vector representation of the personal credit data, namely, the credit data representation.
[0104] In addition, the personal portrait data is input into the vectorization module, so as to perform vectorization processing on the personal portrait data, thereby obtaining a vector representation of the personal portrait data, that is, a portrait data representation. Here, the vectorization processing on the personal portrait data can be implemented by, for example, the faiss or milvus library. The vector dimension obtained by the conversion can be 64 dimensions, 128 dimensions, or 256 dimensions, etc. The vector dimension can be determined according to specific application requirements and data characteristics.
[0105] Subsequently, the credit data representation and the portrait data representation can be spliced together, and the spliced data representation can be used for personal credit risk identification.
[0106] In the method provided in the embodiment of the present invention, personal portrait data is extracted through a large language model, and then the personal credit data is supplemented and enhanced based on the personal portrait data, thereby avoiding the overfitting problem of personal credit risk identification and improving the accuracy and robustness of personal credit risk identification.
[0107] The personal credit risk identification device provided by the present invention is described below. The personal credit risk identification device described below and the personal credit risk identification method described above can be referenced to each other.
[0108] Figure 6 is a schematic diagram of the structure of the personal credit risk identification device provided by the present invention, such as Figure 6 As shown, the device comprises: An acquisition unit 610 is used to acquire personal credit data; A portrait unit 620 is used to mine the personal characteristics of the personal credit data based on a large language model to obtain personal portrait data; The identification unit 630 is used to identify personal credit risk based on the personal credit data and the personal portrait data.
[0109] In the device provided by the embodiment of the present invention, personal credit data is mined based on a large language model to obtain personal portrait data, thereby achieving feature enhancement for the personal credit data through the personal portrait data, and combining the personal credit data and the personal portrait data to perform personal credit risk identification, which can effectively overcome the overfitting problem when only personal credit data is used for risk identification, improve the performance of personal credit risk identification, and ensure the reliability and accuracy of personal credit risk identification.
[0110] Based on any of the above embodiments, the portrait unit is specifically used for: Generate prompt text based on the personal credit data and a mining prompt template, wherein the mining prompt template is used to instruct a large language model to mine character features and associations between character features in the personal credit data; The prompt text is input into the large language model to obtain the personal portrait data output by the large language model.
[0111] Based on any of the above embodiments, the identification unit is specifically used for: Determining a first credit feature based on the personal credit data and the personal portrait data; Inputting the first credit feature into a plurality of first risk classification models respectively to obtain first classification results outputted by the plurality of first risk classification models respectively, wherein the plurality of first risk classification models are trained based on different sample data; Based on the multiple first classification results, personal credit risk identification is performed.
[0112] Based on any of the above embodiments, the identification unit is specifically used for: combining the first credit feature and a plurality of the first classification results to obtain a second credit feature; Personal credit risk is identified based on the second credit feature.
[0113] Based on any of the above embodiments, the identification unit is specifically used for: inputting the second credit feature into a plurality of second risk classification models respectively, to obtain second classification results respectively output by the plurality of second risk classification models; Based on the plurality of the second classification results, an identification result of the personal credit risk is determined.
[0114] Based on any of the above embodiments, the identification unit is specifically used for: Inputting the plurality of the second classification results into a regression model to obtain an identification result of the personal credit risk output by the regression model; The regression model is obtained by joint training with the multiple first risk classification models and the multiple second risk classification models.
[0115] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other via the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the personal credit risk identification method, which includes: Obtain personal credit data; Based on a large language model, the personal credit data is mined for character features to obtain personal portrait data; Based on the personal credit data and the personal portrait data, personal credit risk identification is performed.
[0116] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the relevant technology or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0117] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the personal credit risk identification method provided by the above methods, the method includes: Obtain personal credit data; Based on a large language model, the personal credit data is mined for character features to obtain personal portrait data; Based on the personal credit data and the personal portrait data, personal credit risk identification is performed.
[0118] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the personal credit risk identification method provided by the above methods, the method comprising: Obtain personal credit data; Based on a large language model, the personal credit data is mined for character features to obtain personal portrait data; Based on the personal credit data and the personal portrait data, personal credit risk identification is performed.
[0119] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0120] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiment.
[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. 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 make equivalent replacements for some of the technical features therein. However, 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 embodiments of the present invention.
Claims
1. A method for identifying personal credit risk, characterized in that: include: Obtain personal credit data; Based on a large language model, the personal credit data is mined for character features to obtain personal portrait data; Based on the personal credit data and the personal portrait data, personal credit risk identification is performed.
2. The personal credit risk identification method according to claim 1, characterized in that: Based on the large language model, the personal credit data is mined for character features to obtain personal portrait data, including: Generate prompt text based on the personal credit data and a mining prompt template, wherein the mining prompt template is used to instruct a large language model to mine character features and associations between character features in the personal credit data; The prompt text is input into the large language model to obtain the personal portrait data output by the large language model.
3. The personal credit risk identification method according to claim 1 or 2, characterized in that: The personal credit risk identification based on the personal credit data and the personal portrait data includes: Determining a first credit feature based on the personal credit data and the personal portrait data; Inputting the first credit feature into a plurality of first risk classification models respectively to obtain first classification results outputted by the plurality of first risk classification models respectively, wherein the plurality of first risk classification models are trained based on different sample data; Based on the multiple first classification results, personal credit risk identification is performed.
4. The personal credit risk identification method according to claim 3, characterized in that: The identifying of personal credit risk based on the plurality of the first classification results includes: combining the first credit feature and a plurality of the first classification results to obtain a second credit feature; Personal credit risk is identified based on the second credit feature.
5. The personal credit risk identification method according to claim 4, characterized in that: The identifying of personal credit risk based on the second credit feature includes: inputting the second credit feature into a plurality of second risk classification models respectively, to obtain second classification results respectively output by the plurality of second risk classification models; Based on the plurality of the second classification results, an identification result of the personal credit risk is determined.
6. The personal credit risk identification method according to claim 5, characterized in that: The determining of the identification result of the personal credit risk based on the plurality of the second classification results includes: Inputting the plurality of the second classification results into a regression model to obtain an identification result of the personal credit risk output by the regression model; The regression model is obtained by joint training with the multiple first risk classification models and the multiple second risk classification models.
7. A personal credit risk identification device, characterized in that: include: An acquisition unit, used for acquiring personal credit data; A portrait unit, used to mine the personal characteristics of the personal credit data based on a large language model to obtain personal portrait data; An identification unit is used to identify personal credit risk based on the personal credit data and the personal portrait data.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the personal credit risk identification method as described in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the personal credit risk identification method as claimed in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the personal credit risk identification method as claimed in any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Intelligent expense reimbursement auditing system and method for financial sharing center
CN120355503A