Credit subject credit risk evaluation method and related device

By preprocessing, feature coding, adaptive weight adjustment and high-order interactive processing of credit subject credit data, using the multi-group attention mechanism and probability pooling, the problem of insufficient accuracy and interpretability in traditional credit evaluation methods is solved, and a more accurate credit risk assessment is achieved.

CN120298094APending Publication Date: 2025-07-11CHINA TELECOM YIJIN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510236727.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

Traditional credit evaluation methods rely on human experience and are difficult to cope with complex and changeable behaviors of credit subjects, and static indicators are difficult to capture dynamic credit risk characteristics, resulting in low accuracy and interpretability of credit risk evaluation results.

Method used

By obtaining credit subject credit data, preprocessing, feature encoding, adaptive weight adjustment and advanced interactive processing, using the multi-head grouping attention mechanism and probability pooling, the ability to capture feature representation and interaction relationships is improved, and classification prediction is finally carried out to obtain more accurate credit risk evaluation results.

Benefits of technology

It improves the accuracy of credit risk assessment, enhances the model's ability to learn the importance of credit characteristics and capture complex interactive relationships, and improves the accuracy and interpretability of credit risk assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120298094A_ABST
    Figure CN120298094A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the field of data processing and artificial intelligence, and provides a credit subject credit risk evaluation method and a related device, and the method comprises the steps: obtaining the credit data of a credit subject; preprocessing the credit subject credit data to obtain preprocessed credit data; performing feature coding processing on the preprocessed credit data to obtain credit feature vector representation; performing adaptive weight adjustment processing on the credit feature vector representation to obtain an optimized credit feature representation; performing high-order interaction processing on the optimized credit feature representation to obtain an attention credit feature vector; and performing classification prediction on the attention credit feature vector to obtain a credit risk evaluation result, thereby improving the accuracy of a credit risk evaluation process for a credit subject.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical fields of data processing and artificial intelligence, and particularly relates to a method and related device for evaluating the credit risk of a credit entity. Background Art

[0002] With the rapid development of big data and artificial intelligence technologies, the importance of credit evaluation of credit entities in the fintech field has become increasingly prominent. Traditional credit evaluation methods usually rely on rules formulated by experts. Although they have certain operability, there are several significant limitations: on the one hand, the formulated rules rely too much on human experience and are difficult to cope with the complex and changing behaviors of credit entities; on the other hand, the rules are set based on static indicators and are difficult to capture the dynamic changes of credit risk characteristics. In addition, when dealing with large-scale, high-dimensional, and multi-category credit data, traditional methods have insufficient feature extraction and representation capabilities, often resulting in low accuracy and interpretability of evaluation results. Therefore, how to improve the accuracy of the credit risk evaluation results for credit entities has become an urgent problem to be solved at present. Summary of the Invention

[0003] Embodiments of the present application provide a method and related device for evaluating the credit risk of a credit entity, which can obtain more accurate credit risk evaluation results based on the credit data of the credit entity, and improve the accuracy of the credit risk evaluation process for the credit entity.

[0004] In a first aspect of the embodiments of the present application, a method for evaluating the credit risk of a credit entity is provided. The method includes:

[0005] Obtain the credit data of the credit entity;

[0006] Preprocess the credit data of the credit entity to obtain preprocessed credit data;

[0007] Perform feature encoding processing on the preprocessed credit data to obtain a credit feature vector representation;

[0008] Perform adaptive weight adjustment processing on the credit feature vector representation to obtain an optimized credit feature representation;

[0009] Perform high-order interaction processing on the optimized credit feature representation to obtain an attention credit feature vector;

[0010] Perform classification prediction on the attention credit feature vector to obtain a credit risk evaluation result.

[0011] In this example, by obtaining the credit data of the credit subject and preprocessing the credit data of the credit subject, preprocessed credit data is obtained, so as to further perform feature encoding processing on the preprocessed credit data to obtain a credit feature vector representation. Thus, an adaptive weight adjustment process can be performed on the credit feature vector representation to obtain an optimized credit feature representation, and a high-order interaction process can be performed on the optimized credit feature representation to obtain an attention credit feature vector. Furthermore, a classification prediction can be performed on the attention credit feature vector to obtain a more accurate credit risk evaluation result, improving the accuracy of the credit risk evaluation process for the credit subject.

[0012] The second aspect of the embodiments of the present application provides a credit subject credit risk evaluation device, and the device includes:

[0013] An acquisition unit, configured to acquire the credit data of the credit subject;

[0014] A first processing unit, configured to preprocess the credit data of the credit subject to obtain preprocessed credit data;

[0015] A second processing unit, configured to perform feature encoding processing on the preprocessed credit data to obtain a credit feature vector representation;

[0016] A third processing unit, configured to perform an adaptive weight adjustment process on the credit feature vector representation to obtain an optimized credit feature representation;

[0017] A fourth processing unit, configured to perform a high-order interaction process on the optimized credit feature representation to obtain an attention credit feature vector;

[0018] A fifth processing unit, configured to perform a classification prediction on the attention credit feature vector to obtain a credit evaluation result.

[0019] The third aspect of the embodiments of the present application provides a terminal, including a processor, an input device, an output device, and a memory. The processor, the input device, the output device, and the memory are interconnected. Among them, the memory is used to store a computer program, and the computer program includes program instructions. The processor is configured to call the program instructions to execute the step instructions as in the first aspect of the embodiments of the present application.

[0020] The fourth aspect of the embodiments of the present application provides a computer-readable storage medium. Among them, the above computer-readable storage medium stores a computer program for electronic data exchange. Among them, the above computer program enables a computer to execute some or all of the steps described in the first aspect of the embodiments of the present application.

[0021] A fifth aspect of the embodiments of the present application provides a computer program product. The computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0023] Figure 1 FIG. [X] is a schematic flowchart of a method for evaluating the credit risk of a credit entity provided by an embodiment of the present application;

[0024] Figure 2 FIG. [X] is a schematic structural diagram of a terminal provided by an embodiment of the present application;

[0025] Figure 3 FIG. [X] is a schematic structural diagram of a device for evaluating the credit risk of a credit entity provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0026] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some, rather than all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts fall within the scope of protection of the present application.

[0027] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products, or devices.

[0028] References to "embodiments" in this application mean that the specific features, structures, or characteristics described in connection with the embodiments can be included in at least one embodiment of this application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.

[0029] To better understand a credit subject credit risk evaluation method provided by an embodiment of this application, the scenarios in which the credit subject credit risk evaluation method is applied will be briefly introduced below. In recent years, credit evaluation methods based on deep learning have gradually attracted attention. These methods automatically learn features in credit data through neural networks and improve the performance of the model to a certain extent. However, there are still deficiencies in the application of existing deep learning methods in credit evaluation. First, these methods usually fail to fully utilize the diversity and discriminative features in the original credit data, resulting in information loss and feature degradation during the feature learning and representation process. Second, most traditional deep learning models rely on simple linear layers or basic neural network structures and lack in-depth exploration of the complex interaction relationships between features, which limits the accurate characterization of credit risks by the model. The embodiment of this application aims to solve the problem of low accuracy in credit risk assessment and provides a credit subject credit risk evaluation method that can obtain more accurate credit risk evaluation results based on credit subject credit data, improving the accuracy of the credit risk evaluation process for credit subjects.

[0030] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of a credit subject credit risk evaluation method provided by an embodiment of this application. The method includes:

[0031] S10: Obtain credit subject credit data.

[0032] Among them, the credit subject credit data can be used to indicate credit-related data of the credit subject. The credit subject credit data can include but is not limited to: basic information, financial information, credit history information, credit evaluation grades, etc., and this application does not make any restrictions on this. The credit subject can include but is not limited to individuals, enterprises, or institutions. The basic information can include but is not limited to name (enterprise name), age (enterprise establishment time), gender (enterprise type, such as state-owned, private, foreign-funded, etc.); the financial information can include but is not limited to income level, asset-liability situation, cash flow, tax records, etc.; the credit history information can include but is not limited to loan records, credit card usage, overdue repayment records, etc.; this application does not make any restrictions on this. Optionally, the credit evaluation grade can be used as a label for use in the model training process in subsequent steps.

[0033] S20: Preprocess the credit data of the credit subject to obtain preprocessed credit data.

[0034] The preprocessed credit data can be understood as the credit data obtained after preprocessing the credit data of the credit subject. It should be noted that the credit data of the credit subject may include categorical credit data of the credit subject, such as credit rating categories, industry categories, and enterprise natures, as well as numerical credit data of the credit subject, such as income amounts, credit history durations, and overdue times. When preprocessing, the categorical credit data of the credit subject and the numerical credit data of the credit subject can be preprocessed more in line with their respective data situations, and this application does not limit this.

[0035] Specifically, the process of preprocessing the credit data of the credit subject to obtain preprocessed credit data may include the following situations:

[0036] Situation 1: For categorical data in the credit data of the credit subject, if there is a missing categorical feature, a new category can be added to represent the missing value;

[0037] Situation 2: For numerical data in the credit data of the credit subject, if there is a missing numerical feature, it can be filled with 0; the numerical data can be further normalized to make the numerical range more unified.

[0038] Optionally, the process of normalizing numerical data to scale numerical features to the range [0, 1] can be seen in the following formula:

[0039]

[0040] where t′ represents the numerical data after normalization; t represents the numerical data; min(t) represents the minimum value in the numerical data; max(t) represents the maximum value in the numerical data.

[0041] By normalizing numerical data, the influence caused by different dimensions between features can be eliminated, which helps to accelerate model convergence and improve model generalization ability in the subsequent model construction process. This application does not limit this.

[0042] S30: Perform feature encoding processing on the preprocessed credit data to obtain a credit feature vector representation.

[0043] The credit feature vector representation can be understood as the feature vector representation obtained after performing feature encoding processing on the preprocessed credit data. It can be understood that feature encoding processing more suitable for the respective data situations can be performed on the categorical preprocessed credit data and the numerical preprocessed credit data, and this application places no restrictions on this.

[0044] It should be understood that performing feature encoding processing on the preprocessed credit data to obtain the credit feature vector representation refers to the process of how to perform feature encoding processing to obtain the credit feature vector representation. Among them, in step S30, that is, performing feature encoding processing on the preprocessed credit data to obtain the credit feature vector representation, may include the following steps:

[0045] S31: Obtain categorical preprocessed credit data and numerical preprocessed credit data from the preprocessed credit data;

[0046] S32: Perform one-hot encoding on the categorical preprocessed credit data to obtain a categorical one-hot vector;

[0047] S33: Perform a multiplication operation on the categorical one-hot vector and a categorical embedding matrix to obtain a categorical feature vector representation;

[0048] S34: Perform a multiplication operation on the numerical preprocessed credit data and a numerical embedding vector to obtain a numerical feature vector representation;

[0049] S35: Determine the credit feature vector representation according to the categorical feature vector representation and the numerical feature vector representation.

[0050] Among them, the categorical preprocessed credit data can be understood as the categorical preprocessed credit data in the preprocessed credit data; the numerical preprocessed credit data can be understood as the numerical preprocessed data in the preprocessed credit data. The categorical one-hot vector can be used to indicate the vector representation obtained after performing one-hot encoding on the categorical preprocessed credit data.

[0051] The categorical feature vector representation can be used to indicate the vector representation obtained after performing a multiplication operation on the categorical one-hot vector and the corresponding categorical embedding matrix. The numerical feature vector representation can be used to indicate the vector representation obtained after performing a multiplication operation on the numerical preprocessed credit data and the numerical embedding vector.

[0052] Optionally, for the process of performing a multiplication operation on the categorical one-hot vector and a categorical embedding matrix to obtain a categorical feature vector representation, and performing a multiplication operation on the numerical preprocessed credit data and a numerical embedding vector to obtain a numerical feature vector representation, the following formula can be referred to:

[0053]

[0054] Among them, e k represents a categorical feature vector representation or a numerical feature vector representation; In the case of k represents the category feature vector representation; x k Indicates the pre-processed credit data that needs to be feature encoded. is the data set corresponding to the category preprocessed credit data, m represents the number of category preprocessed credit data; In the case of k represents the numerical feature vector representation; is the data set corresponding to the numerical preprocessing credit data, n represents the number of numerical preprocessing credit data; onehot() represents the operation of one-hot encoding; onehot(x k ) is the category one-hot vector; represents the embedding matrix of the category one-hot vector, k k represents the number of categories of preprocessed credit data, and d represents the dimension of the feature vector; represents the embedding vector of numerical preprocessed credit data; k represents the index of preprocessed credit data that needs feature encoding processing.

[0055] Optionally, the process of determining the credit feature vector representation according to the category feature vector representation and the numerical feature vector representation may refer to the following formula:

[0056] e={e k |k∈{1,2,…,m+n}}

[0057] Where e represents the credit feature vector representation; e k Represents category feature vector representation or numerical feature vector representation; k∈{1,2,…,m+n} represents the index of preprocessed credit data that needs to be feature encoded; m represents the number of category preprocessed credit data; n represents the number of numerical preprocessed credit data.

[0058] By encoding the categorical preprocessed data and the numerical preprocessed data separately, the data format can be unified, and it is beneficial to further interact and combine features in the subsequent process to explore the high-order relationships between the data.

[0059] S40: Adaptively adjust the weight of the credit feature vector representation to obtain an optimized credit feature representation.

[0060] Among them, the optimized credit feature representation can be understood as the feature representation obtained after performing adaptive weight adjustment processing on the credit feature vector representation. Specifically, the adaptive weight adjustment of each credit feature vector representation can be performed through a Pooling-Transform-Reweighting (PTR) layer to obtain the optimized feature representation, and this application places no restrictions on this.

[0061] It should be understood that performing adaptive weight adjustment processing on the credit feature vector representation to obtain the optimized credit feature representation refers to the process of how to perform adaptive weight adjustment processing through the PTR layer to obtain the optimized credit feature representation. Among them, in step S40, that is, performing adaptive weight adjustment processing on the credit feature vector representation to obtain the optimized credit feature representation, may include the following steps:

[0062] S41: Stack the credit feature vector representations to obtain a credit feature vector matrix;

[0063] S42: Compress the credit feature vector matrix to obtain a global credit feature description vector;

[0064] S43: Perform non-linear transformation processing on the global credit feature description vector to obtain importance weights;

[0065] S44: Perform element-wise multiplication operation on the importance weights and the credit feature vector representations to obtain the optimized credit feature representation.

[0066] Among them, the credit feature vector matrix can be understood as the feature vector matrix obtained after stacking the credit feature vector representations. Specifically, all feature vectors in the credit feature vector representation e can be stacked into a feature vector matrix E = [e1,…,e m+n , where e1 is the first credit feature vector representation in the credit feature vector representation; e m+n is the (m + n)-th credit feature vector representation in the credit feature vector representation, m represents the number of category-preprocessed credit data; n represents the number of numerical-preprocessed credit data, and d represents the feature vector dimension.

[0067] The global credit feature description vector can be understood as the feature vector obtained after compressing the credit feature vector matrix. Specifically, through the pooling layer, the feature vector matrix E can be compressed into a global credit feature description vector Z = [z1,…,z m+n , where z1 is the first global credit feature description vector in the global credit feature description vector, z m+nis the (m + n)-th global credit feature description vector in the global credit feature description vector set, where m represents the number of categorical preprocessed credit data; n represents the number of numerical preprocessed credit data.

[0068] Optionally, the compression method to be processed above can be average pooling, and its formula can be: z i = AvgPool1d(e i ), where AvgPool1d() represents the operation of performing average pooling, that is, converting a vector into a scalar, and e i is the i-th credit feature vector representation, and i is the index of the credit feature vector representation.

[0069] The importance weight can be understood as the weight obtained after performing a non-linear transformation on the global credit feature description vector. Specifically, through a transformation layer, the global credit feature description vector can be non-linearly transformed through a two-layer fully connected network to generate the importance weight A = [a1,..., a m+n corresponding to each global credit feature description vector. where a1 is the importance weight corresponding to the first global credit feature description vector, such as being called the first importance weight; a m+n is the importance weight corresponding to the (m + n)-th global credit feature description vector, such as being called the (m + m)-th importance weight; m represents the number of categorical preprocessed credit data; n represents the number of numerical preprocessed credit data.

[0070] Optionally, the process of non-linearly transforming the global credit feature description vector through a two-layer fully connected network to generate the importance weight corresponding to each global credit feature description vector can be seen in the following formula:

[0071] A = Swish(W2 · Mish(W1 · Z))

[0072] where A represents the importance weight; Swish() represents calculation through the activation function Swish(x), and the formula is represents the weight matrix of the fully connected layer, such as being called the weight matrix of the second fully connected layer; r is the reduction ratio parameter; m + n represents the total number of global credit feature description vectors; Mish() represents calculation through the activation function Mish(x), and the formula is Mish(x) = x · tanh(log(1 + e x )); represents the weight matrix of the fully connected layer, such as being called the weight matrix of the first fully connected layer; Z is the global description vector.

[0073] Further, through a reweighting layer, the importance weights are multiplied element-wise with the original features (i.e., the credit feature vector representation) to obtain an optimized feature representation X = [a1·e1, …, a m+n ·e m+n , where a1 is the importance weight corresponding to the first global credit feature description vector, such as being called the first importance weight; e1 is the first credit feature vector representation in the credit feature vector representation; a m+n is the importance weight corresponding to the (m + n)-th global credit feature description vector, such as being called the (m + n)-th importance weight; e m+n is the (m + n)-th credit feature vector representation in the credit feature vector representation; m represents the number of category-preprocessed credit data; n represents the number of numerically preprocessed credit data.

[0074] By adaptively adjusting the weights for each credit feature vector representation, an optimized feature representation can be obtained. This step can enhance the model's ability to learn the importance of credit feature vector representations and capture complex feature interaction relationships, which is beneficial for laying a foundation for the learning of subsequent deeper neural networks.

[0075] S50: Perform high-order interaction processing on the optimized credit feature representation to obtain an attention credit feature vector.

[0076] The attention credit feature vector can be understood as the feature vector obtained after performing high-order interaction processing on the optimized credit feature representation. Specifically, through a multi-head grouped attention mechanism, high-order interaction can be performed on the optimized credit feature representation, and a probability-based pooling operation can be used to fuse multiple feature representations into a fixed-length feature vector, thereby obtaining a feature vector that retains the important information of the input features.

[0077] Optionally, the multi-head grouped attention mechanism can refer to grouping the multi-heads in multi-head attention. For example, the multi-heads are divided into G groups. If each group has H g heads, then there are a total of H = G × H g heads. For each group g ∈ {1, 2, …, G}, all the attention heads within the group can share the same key weight matrix and value weight matrix, but each head still has an independent query weight matrix. Then, by calculating the attention output of each head and concatenating the output results of each head as the final attention output representation, the attention credit feature vector is obtained.

[0078] It should be understood that performing high-order interaction processing on the optimized credit feature representation to obtain the attention credit feature vector refers to the process of how to perform high-order interaction processing to obtain the attention credit feature vector. Among them, in step S50, that is, performing high-order interaction processing on the optimized credit feature representation to obtain the attention credit feature vector, the following steps may be included:

[0079] S51: Based on the query projection matrix corresponding to each head, perform multi-head attention calculation on the optimized credit feature representation to obtain a credit query matrix;

[0080] S52: Perform grouping processing on the optimized credit feature representation to obtain multiple groups of credit feature representation sets;

[0081] S53: According to the shared key projection matrix, the shared value projection matrix, and the multiple groups of credit feature representation sets, determine a credit key matrix and a credit value matrix;

[0082] S54: Calculate the attention output according to the credit query matrix, the credit key matrix, and the credit value matrix to obtain a credit attention output set;

[0083] S55: Concatenate each credit attention output in the credit attention output set to obtain an attention credit feature vector.

[0084] Among them, the credit query matrix can be understood as the query matrix obtained after performing multi-head attention calculation on the optimized credit feature representation. Since each head has an independent query weight matrix, different query projection matrices can be used to calculate the query weight matrix of each head, so that each head can extract different feature information from the input matrix (i.e., the optimized credit feature representation).

[0085] Optionally, the process of performing multi-head attention calculation on the optimized credit feature representation based on the query projection matrix corresponding to each head to obtain a credit query matrix can be seen in the following formula:

[0086]

[0087] where Q h can represent the credit query matrix; represents the input matrix, that is, the optimized credit feature representation; represents the query projection matrix of the h-th head; h represents the index of the head; H represents the total number of heads.

[0088] The set of multiple groups of credit feature representations may include one or more sets of multiple groups of credit feature representations. The multiple groups of credit feature representations can be understood as the feature representations obtained after grouping the optimized credit feature representations. The credit key matrix can be understood as the key matrix determined according to the shared key projection matrix and the set of multiple groups of credit feature representations. The credit value matrix can be understood as the value matrix determined according to the shared value projection matrix and the set of multiple groups of credit feature representations.

[0089] Optionally, for the process of determining the credit key matrix and the credit value matrix according to the shared key projection matrix, the shared value projection matrix, and the set of multiple groups of credit feature representations, refer to the following formula:

[0090]

[0091] Where, K g can represent the credit key matrix; represents the input matrix, that is, the optimized credit feature representation; represents the key projection matrix shared within the g-th group; V g can represent the credit value matrix; represents the value projection matrix shared within the g-th group; g represents the group index; G represents the total number of groups.

[0092] The set of credit attention outputs may include one or more credit attention outputs, which can be used to indicate the attention output result obtained after performing attention output calculation according to the credit query matrix, the credit key matrix, and the credit value matrix.

[0093] Optionally, for the process of calculating the attention output according to the credit query matrix, the credit key matrix, and the credit value matrix to obtain the set of credit attention outputs, refer to the following formula:

[0094]

[0095] Where, can represent the attention output of the h-th head in the g-th group in the set of credit attention outputs; softmax() can represent the activation operation; Q h can represent the credit query matrix; can represent the transpose of the credit key matrix; d k represents the dimension of each key vector in the credit key matrix; V g can represent the credit value matrix; h represents the head index; g represents the group index; H g represents the number of attention heads in each group.

[0096] Further, the outputs of all attention heads can be concatenated together to obtain a concatenated attention credit feature vector. Optionally, the process of concatenating each credit attention output in the credit attention output set to obtain the attention credit feature vector can be seen in the following formula:

[0097]

[0098] wherein, can represent the attention credit feature vector; Concat() represents the concatenation operation; represents the attention output of the h-th head in the g-th group, that is represents the attention output of the 1st head in the 1st group; G represents the total number of groups; H g represents the number of attention heads in each group; represents the output projection matrix.

[0099] Performing high-order interaction on the feature representation through the multi-head grouped attention mechanism can reduce the computational complexity of matrix multiplication. Because only one matrix multiplication of keys and values needs to be calculated within the same group. Although the parameters and computational complexity are reduced, the grouped multi-head attention can still maintain the ability to model the global dependence relationship of the input sequence, because the query matrix is still independent, and the heads between different groups still have enough degrees of freedom to learn different features.

[0100] Optionally, probability-based pooling can be divided into a training mode and an inference mode. For the training mode, to introduce randomness to enhance the generalization ability of the model, the probability distribution of the input features can be calculated, and the feature values can be randomly selected for pooling according to this probability distribution. For the inference mode, the model can adopt the method of weighted average pooling to ensure the stability and consistency of the output during the inference process.

[0101] Optionally, the steps of the training mode can include: calculating the probability distribution sampling according to the probability distribution to obtain an index vector selecting the pooling value output according to the sampled index The specific calculation formula can be seen as follows:

[0102]

[0103] I j ~Multinomial(P :,j ,1)

[0104]

[0105] wherein, P i,jcan represent the i-th element in the j-th column of the probability distribution P, where j represents the column index and i represents the element index; exp() represents the operation through the exponential function; can represent the i-th element in the j-th column of the attention credit feature vector; m + n is the total number of features (such as the attention credit feature vector); k is the index of the feature; can represent the k-th element in the j-th column of the attention credit feature vector; Multinomial() represents polynomial sampling; I j represents the index sampled according to the probability P in the j-th column; :,j P :,j represents the column vector composed of all elements in the j-th column of the probability distribution P; Y j is the j-th position of the output after random pooling; represents selecting the element at the cross position of the I-th row and j-th column from the attention credit feature vector j

[0106] Optionally, the inference mode can adopt the method of weighted average pooling. First, calculate the weight and then perform a weighted sum on to obtain the pooling output The specific calculation formula can be seen as follows:

[0107]

[0108] where, W i,j represents the i-th element in the j-th column of the weight W, where j represents the column index and i represents the element index; exp() represents the operation through the exponential function; represents the i-th element in the j-th column of the attention credit feature vector; m + n is the total number of features (such as the attention credit feature vector); k is the index of the feature; Y j is the output at the j-th position after weighted sum pooling.

[0109] The feature vector of the credit data obtained by using probability-based pooling introduces randomness and increases the diversity in the training process, thereby further enhancing the robustness and generalization ability of the model.

[0110] S60: Classify and predict the attention credit feature vector to obtain a credit risk evaluation result.

[0111] ​Among them, the credit risk evaluation result can be understood as the result data obtained after classifying and predicting the attention credit feature vector, which can be used to conduct a more accurate credit risk evaluation of the credit subject. It can be understood that the initial model can be trained through the credit subject credit risk evaluation method provided by the embodiments of the present application to obtain a model capable of accurately conducting credit risk evaluation, such as a credit subject credit risk evaluation model. Thus, the credit risk evaluation of the credit subject can be carried out according to this credit subject credit risk evaluation model to obtain a more accurate credit risk evaluation result. The present application does not limit this.

[0112] Specifically, the attention credit feature vector can be classified and predicted through a linear layer. Optionally, taking the attention credit feature vector as the output of the aforementioned pooling as an example for illustration, it can be further processed through a linear layer and using the SoftMax function, and the cross-entropy is used as the loss function to optimize the network, so as to obtain the classification level of the credit subject credit data, and the classification level is used as the credit evaluation result of the credit subject for output, that is, the above-mentioned credit risk evaluation result.

[0113] It can be seen that in the above solution, by obtaining the credit subject credit data, preprocessing the credit subject credit data to obtain preprocessed credit data, further performing feature encoding processing on the preprocessed credit data to obtain a credit feature vector representation, thus the credit feature vector representation can be adaptively weighted and adjusted to obtain an optimized credit feature representation, and the optimized credit feature representation can be subjected to high-order interaction processing to obtain an attention credit feature vector. Furthermore, the attention credit feature vector can be classified and predicted to obtain a more accurate credit risk evaluation result, improving the accuracy of the credit risk evaluation process for the credit subject.

[0114] Consistent with the above embodiment, please refer to Figure 2 , Figure 2 which is a schematic structural diagram of a terminal provided by the embodiments of the present application. As Figure 2 shown, it includes a processor, an input device, an output device, and a memory. The processor, input device, output device, and memory are interconnected. Among them, the memory is used to store a computer program, and the computer program includes program instructions. The processor is configured to call the program instructions, and the above program includes instructions for performing the following steps;

[0115] Obtain credit subject credit data;

[0116] Preprocess the credit subject credit data to obtain preprocessed credit data;

[0117] Perform feature encoding processing on the preprocessed credit data to obtain a credit feature vector representation;

[0118] Perform adaptive weight adjustment processing on the credit feature vector representation to obtain an optimized credit feature representation;

[0119] Perform high-order interaction processing on the optimized credit feature representation to obtain an attention credit feature vector;

[0120] Perform classification prediction on the attention credit feature vector to obtain a credit risk evaluation result.

[0121] In this example, by obtaining the credit data of a credit subject and preprocessing the credit data of the credit subject to obtain preprocessed credit data, further perform feature encoding processing on the preprocessed credit data to obtain a credit feature vector representation, so that adaptive weight adjustment processing can be performed on the credit feature vector representation to obtain an optimized credit feature representation, and high-order interaction processing can be performed on the optimized credit feature representation to obtain an attention credit feature vector, and then classification prediction can be performed on the attention credit feature vector to obtain a more accurate credit risk evaluation result, improving the accuracy of the credit risk evaluation process for the credit subject.

[0122] The above mainly introduces the solution of the embodiment of the present application from the perspective of the execution process on the method side. It can be understood that in order for the terminal to implement the above functions, it includes the corresponding hardware structure and / or software module for executing each function. Those skilled in the art should easily realize that, combining the units and algorithm steps of each example described in the embodiments provided in this article, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the way of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0123] The embodiment of the present application can divide the functions of the terminal according to the above method examples. For example, each function unit can be divided corresponding to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of a software function unit. It should be noted that the division of units in the embodiment of the present application is illustrative, only a logical function division, and there may be other division methods in actual implementation.

[0124] Consistent with the above, please refer to Figure 3 , Figure 3 which is a schematic structural diagram of a credit subject credit risk evaluation device provided by the embodiment of the present application. AsFigure 3 As shown, the device includes:

[0125] An acquisition unit 101, configured to acquire credit data of a credit subject;

[0126] A first processing unit 102, configured to preprocess the credit data of the credit subject to obtain preprocessed credit data;

[0127] A second processing unit 103, configured to perform feature encoding processing on the preprocessed credit data to obtain a credit feature vector representation;

[0128] A third processing unit 104, configured to perform adaptive weight adjustment processing on the credit feature vector representation to obtain an optimized credit feature representation;

[0129] A fourth processing unit 105, configured to perform high-order interaction processing on the optimized credit feature representation to obtain an attention credit feature vector;

[0130] A fifth processing unit 106, configured to perform classification prediction on the attention credit feature vector to obtain a credit evaluation result.

[0131] In a possible implementation manner, the second processing unit 103, configured to perform feature encoding processing on the preprocessed credit data to obtain a credit feature vector representation, specifically:

[0132] Obtain categorical preprocessed credit data and numerical preprocessed credit data from the preprocessed credit data;

[0133] Perform one-hot encoding on the categorical preprocessed credit data to obtain a categorical one-hot vector;

[0134] Perform a multiplication operation on the categorical one-hot vector and a categorical embedding matrix to obtain a categorical feature vector representation;

[0135] Perform a multiplication operation on the numerical preprocessed credit data and a numerical embedding vector to obtain a numerical feature vector representation;

[0136] Determine the credit feature vector representation according to the categorical feature vector representation and the numerical feature vector representation.

[0137] In a possible implementation manner, the third processing unit 104, configured to perform adaptive weight adjustment processing on the credit feature vector representation to obtain an optimized credit feature representation, specifically:

[0138] Perform a stacking process on the credit feature vector representation to obtain a credit feature vector matrix;

[0139] Perform a compression process on the credit feature vector matrix to obtain a global credit feature description vector;

[0140] Perform a non-linear transformation on the global credit feature description vector to obtain importance weights;

[0141] Perform an element-wise multiplication operation on the importance weights and the credit feature vector representation to obtain an optimized credit feature representation.

[0142] In a possible implementation, the third processing unit 104 is configured to perform a non-linear transformation on the global credit feature description vector to obtain importance weights, specifically:

[0143] Implement the step of performing a non-linear transformation on the global credit feature description vector to obtain importance weights through the following formula:

[0144] A = Swish(W2 · Mish(W1 · Z))

[0145] where A represents the importance weights; Swish() is calculated through the activation function Swish(x), and the formula is represents the weight matrix of the fully connected layer, such as the weight matrix of the second fully connected layer; r is the reduction ratio parameter; m + n represents the total number of global credit feature description vectors; Mish() is calculated through the activation function Mish(x), and the formula is Mish(x) = x · tanh(log(1 + e x )); represents the weight matrix of the fully connected layer, such as the weight matrix of the first fully connected layer; Z is the global description vector.

[0146] In a possible implementation, the fourth processing unit 105 is configured to perform high-order interaction processing on the optimized credit feature representation to obtain an attention credit feature vector, specifically:

[0147] Perform multi-head attention calculation on the optimized credit feature representation based on the query projection matrix corresponding to each head to obtain a credit query matrix;

[0148] Perform grouping processing on the optimized credit feature representation to obtain multiple groups of credit feature representation sets;

[0149] Determine a credit key matrix and a credit value matrix according to the shared key projection matrix, the shared value projection matrix, and the multiple groups of credit feature representation sets;

[0150] Calculate an attention output according to the credit query matrix, the credit key matrix, and the credit value matrix to obtain a credit attention output set;

[0151] Concatenate each credit attention output in the credit attention output set to obtain an attention credit feature vector.

[0152] An embodiment of the present application also provides a computer storage medium. The computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute some or all of the steps of any one of the credit entity credit risk evaluation methods described in the foregoing method embodiments.

[0153] An embodiment of the present application also provides a computer program product. The computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program enables a computer to execute some or all of the steps of any one of the credit entity credit risk evaluation methods described in the foregoing method embodiments.

[0154] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.

[0155] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0156] In several embodiments provided by the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be in an electrical or other form.

[0157] 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 can be located in one place, or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0158] In addition, in each of the embodiments of the present application, each functional unit can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software program module.

[0159] If the above-mentioned integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application. The aforementioned memory includes various media that can store program codes, such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs.

[0160] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program. This program can be stored in a computer-readable memory, and the memory can include: flash drives, read-only memories, random access memories, magnetic disks, or optical discs, etc.

[0161] The above has introduced the embodiments of the present application in detail. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.

Claims

1. A credit risk evaluation method for a credit subject, characterized in that The method includes: Obtaining credit data of a credit subject; Preprocessing the credit data of the credit subject to obtain preprocessed credit data; Performing feature encoding processing on the preprocessed credit data to obtain a credit feature vector representation; Performing adaptive weight adjustment processing on the credit feature vector representation to obtain an optimized credit feature representation; Performing high-order interaction processing on the optimized credit feature representation to obtain an attention credit feature vector; Performing classification prediction on the attention credit feature vector to obtain a credit risk assessment result.

2. The credit subject credit risk evaluation method according to claim 1, characterized in that The performing feature encoding processing on the preprocessed credit data to obtain a credit feature vector representation includes: Obtaining categorical preprocessed credit data and numerical preprocessed credit data from the preprocessed credit data; Performing one-hot encoding on the categorical preprocessed credit data to obtain a categorical one-hot vector; Performing a multiplication operation on the categorical one-hot vector and a categorical embedding matrix to obtain a categorical feature vector representation; Performing a multiplication operation on the numerical preprocessed credit data and a numerical embedding vector to obtain a numerical feature vector representation; Determining a credit feature vector representation according to the categorical feature vector representation and the numerical feature vector representation.

3. The credit subject credit risk evaluation method according to claim 2, wherein, The performing adaptive weight adjustment processing on the credit feature vector representation to obtain an optimized credit feature representation includes: Performing a stacking process on the credit feature vector representation to obtain a credit feature vector matrix; Performing a compression process on the credit feature vector matrix to obtain a global credit feature description vector; Performing a non-linear transformation process on the global credit feature description vector to obtain importance weights; Performing an element-wise multiplication operation on the importance weights and the credit feature vector representation to obtain an optimized credit feature representation.

4. The credit subject credit risk evaluation method according to claim 3, wherein, The performing a non-linear transformation process on the global credit feature description vector to obtain importance weights includes: Implementing the step of performing a non-linear transformation process on the global credit feature description vector to obtain importance weights through the following formula: A = Swish(W2 · Mish(W1 · Z)) where, A represents the importance weight; Swish() is calculated by the activation function Swish(x), and the formula is represents the weight matrix of the fully connected layer, such as the weight matrix of the second fully connected layer; r is the reduction ratio parameter; m + n represents the total number of global credit feature description vectors; Mish() is calculated by the activation function Mish(x), and the formula is Mish(x) = x · tanh(log(1 + e x )); represents the weight matrix of the fully connected layer, such as the weight matrix of the first fully connected layer; Z is the global description vector.

5. The credit subject credit risk evaluation method according to any one of claims 1-4, characterized in that, The performing high-order interaction processing on the optimized credit feature representation to obtain an attention credit feature vector includes: Performing multi-head attention calculation on the optimized credit feature representation based on a query projection matrix corresponding to each head to obtain a credit query matrix; Performing a grouping process on the optimized credit feature representation to obtain multiple groups of credit feature representation sets; Determining a credit key matrix and a credit value matrix according to a shared key projection matrix, a shared value projection matrix, and the multiple groups of credit feature representation sets; Calculating an attention output according to the credit query matrix, the credit key matrix, and the credit value matrix to obtain a credit attention output set; Performing a concatenation process on each credit attention output in the credit attention output set to obtain an attention credit feature vector.

6. A credit subject credit risk evaluation device, characterized in that, The apparatus includes: An acquisition unit, configured to acquire credit data of a credit subject; A first processing unit, configured to preprocess the credit data of the credit subject to obtain preprocessed credit data; A second processing unit, configured to perform feature encoding processing on the preprocessed credit data to obtain a credit feature vector representation; A third processing unit for performing adaptive weight adjustment processing on the credit feature vector representation to obtain an optimized credit feature representation; A fourth processing unit for performing high-order interaction processing on the optimized credit feature representation to obtain an attention credit feature vector; A fifth processing unit for performing classification prediction on the attention credit feature vector to obtain a credit evaluation result.

7. The credit subject credit risk evaluation device according to claim 6, wherein The second processing unit is configured to perform feature encoding processing on the preprocessed credit data to obtain a credit feature vector representation, specifically: Obtain categorical preprocessed credit data and numerical preprocessed credit data from the preprocessed credit data; Perform one-hot encoding on the categorical preprocessed credit data to obtain a categorical one-hot vector; Perform a multiplication operation on the categorical one-hot vector and a categorical embedding matrix to obtain a categorical feature vector representation; Perform a multiplication operation on the numerical preprocessed credit data and a numerical embedding vector to obtain a numerical feature vector representation; Determine a credit feature vector representation based on the categorical feature vector representation and the numerical feature vector representation.

8. The credit subject credit risk evaluation method according to claim 7, wherein The third processing unit is configured to perform adaptive weight adjustment processing on the credit feature vector representation to obtain an optimized credit feature representation, specifically: Stack the credit feature vector representations to obtain a credit feature vector matrix; Compress the credit feature vector matrix to obtain a global credit feature description vector; Perform a non-linear transformation on the global credit feature description vector to obtain an importance weight; Perform an element-wise multiplication operation on the importance weight and the credit feature vector representation to obtain an optimized credit feature representation.

9. A terminal, characterized in that, Comprising a processor, an input device, an output device, and a memory, the processor, input device, output device, and memory are interconnected, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1-5.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to execute the method according to any one of claims 1-5.