Enterprise credit evaluation and analysis method

By using an improved stacked autoencoder neural network model and a priori rule layer, combined with attention mechanism and domain knowledge, a corporate credit profile is generated, which solves the problems of insufficient evaluation accuracy and interpretability in traditional methods and achieves more accurate and reliable corporate credit assessment.

CN120807126APending Publication Date: 2025-10-17BEIJING YONGFENG AGRICULTURAL PORT SUPPLY CHAIN MANAGEMENT DEVELOPMENT CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510797853.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Traditional corporate credit assessment methods are unable to fully explore the deep features and complex correlations in massive data, and lack the integration of domain knowledge, resulting in insufficient assessment accuracy and interpretability, and limited robustness.

Method used

An improved stacked autoencoder neural network model is introduced, combined with the attention layer and the prior rule layer. The feature weights are learned through the Scaled Dot-Product Attention mechanism, and domain knowledge is used to constrain features to generate corporate credit profiles.

Benefits of technology

It improves the accuracy and credibility of corporate credit assessment, enhances the interpretability of feature representation and the robustness of the model, and improves the adaptability and reliability of assessment results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807126A_ABST
    Figure CN120807126A_ABST
Patent Text Reader

Abstract

The invention discloses an enterprise credit evaluation analysis method, and relates to the field of data processing, and the method comprises the steps: obtaining the credit data of a plurality of to-be-evaluated enterprises; performing feature extraction on the credit investigation data through an improved stack type self-encoding neural network model to obtain feature data; the improved stack type self-encoding neural network model comprises an encoder, a decoder, an attention layer and a prior rule layer; the attention layer adopts a Scaled Dot-Product Attention mechanism to learn a weight feature matrix Ha, and the priori rule layer sets feature constraints according to a priori rule; clustering the feature data to obtain a cluster to which the enterprise belongs; according to the feature value distribution of the enterprises in the clustering clusters, performing feature scoring by using a prior rule to obtain clustering labels of the clustering clusters; according to the clustering label and the weight feature matrix Ha, generating an enterprise credit investigation portrait, and according to the enterprise credit investigation portrait, carrying out credit investigation evaluation analysis; aiming at the low enterprise credit evaluation precision in the prior art, the reliability of the evaluation result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of data processing, and in particular to an enterprise credit evaluation analysis method. BACKGROUND

[0002] With the rapid development of market economy and the continuous improvement of credit system, enterprise credit evaluation plays an increasingly important role in financial risk management, business decision-making and other fields. Enterprise credit evaluation comprehensively analyzes the credit status, operating capacity, financial status and other multi-dimensional information of enterprises, quantitatively evaluates and predicts the credit risk of enterprises, and provides important reference for the credit decision-making of financial institutions and the selection of investors. Accurate, comprehensive and reliable enterprise credit evaluation results help to improve the allocation efficiency of financial resources, prevent credit risks and maintain the stable operation of the financial market.

[0003] However, with the increasing complexity of enterprise operating environment and the rapid growth of data volume, traditional enterprise credit evaluation methods face many challenges. On the one hand, traditional methods mainly rely on manually constructed features and scoring models, which are difficult to fully exploit deep features and complex correlations in massive data, resulting in insufficient evaluation accuracy and generalization ability. On the other hand, traditional methods lack effective integration of domain knowledge and business rules, and the interpretability and reliability of the evaluation results need to be improved. At the same time, traditional methods have high requirements for data quality and integrity, and their robustness and adaptability are limited in the face of data missing, noise and other problems in practical applications. Therefore, there is an urgent need for a new enterprise credit evaluation method that can automatically learn deep features, integrate prior knowledge, and improve evaluation accuracy and reliability.

[0004] In recent years, the rapid development of artificial intelligence technology has provided new ideas for solving the above problems. Deep learning models have made significant breakthroughs in image recognition, natural language processing and other fields due to their powerful feature extraction and representation learning capabilities, providing a powerful tool for the intelligentization and precision of enterprise credit evaluation. Among them, the stack auto-encoding neural network model can adaptively learn the internal patterns and high-order features of data through layer-by-layer feature transformation and information reconstruction, and performs well in data dimensionality reduction, anomaly detection and other tasks. However, the stack auto-encoding neural network model still has the following limitations in solving enterprise credit problems: the stack auto-encoding neural network model is mainly based on data-driven end-to-end learning, and the learned feature representation may deviate from the actual business scenario and domain rules, resulting in insufficient interpretability and reliability of the evaluation results. The stack auto-encoding neural network model learns high-order features through multiple nonlinear transformations, but the weight distribution and importance of these features are difficult to intuitively understand and explain, affecting the reliability and application value of the evaluation results. SUMMARY

[0005] In view of the low precision of enterprise credit evaluation in the prior art, the application provides an enterprise credit evaluation analysis method, which improves the reliability of the evaluation result by improved stack auto-encoding neural network model for feature extraction, introduction of attention layer for learning feature weight, and combination of prior rules for feature constraint.

[0006] The purpose of the application is achieved by the following technical solutions.

[0007] The application provides an enterprise credit evaluation analysis method, which comprises the following steps: S1, obtaining credit data of a plurality of enterprises to be evaluated; S2, performing feature extraction on the credit data by an improved stack auto-encoding neural network model to obtain feature data; the improved stack auto-encoding neural network model comprises an encoder, a decoder, an attention layer, and a prior rule layer; the attention layer learns a weight feature matrix H a by using a Scaled Dot-Product Attention mechanism, and the prior rule layer sets feature constraints according to prior rules; S3, clustering the feature data to obtain a cluster to which the enterprise belongs; S4, performing feature scoring on the enterprises in the cluster according to the distribution of feature values to obtain a cluster label of the cluster; S5, generating an enterprise credit portrait according to the cluster label and the weight feature matrix H a , and performing credit evaluation analysis according to the enterprise credit portrait; the enterprise credit portrait comprises a label of the cluster to which the enterprise belongs, a risk level, and a feature weight.

[0008] Further, the attention layer learns a weight feature matrix H a by using a Scaled Dot-Product Attention mechanism, which comprises: mapping the features H extracted by the encoder into a Query matrix Q, a Key matrix K, and a Value matrix V, respectively; calculating the correlation between Query and Key by using an improved scaled dot product, introducing a prior mask matrix M to obtain an attention matrix A; concatenating Query and Key, and calculating a gating signal G by using a sigmoid function; multiplying the gating signal G and the Value matrix V element by element to obtain a filtered Value matrix V'; multiplying the attention matrix A and the filtered Value matrix V' to obtain the weight feature matrix H a .

[0009] Further, the correlation between Query and Key is calculated by using an improved scaled dot product, and a prior mask matrix M is introduced to obtain an attention matrix A, which comprises: calculating a scaled dot product matrix S according to the Query matrix Q and the Key matrix K: wherein, d kis the dimension of the Key matrix, as a scaling factor, used to control the numerical range of the dot product result; according to the scaled dot product matrix S and a preset prior mask matrix M, a masked dot product matrix S' is obtained: S' = S + M, in the prior mask matrix M, when Query and Key are both important features, the corresponding position takes a value of 0; when Query or Key is a non-important feature, the corresponding position takes a value of a very large negative number, such as -inf; the introduction of the mask matrix M can suppress the similarity of irrelevant feature pairs and highlight the matching of local key features; according to the masked dot product matrix S', an attention matrix A is calculated: The softmax function maps each element in S' to a real number in the range of (0, 1) and makes the sum of each row equal to 1, obtaining a normalized attention weight distribution.

[0010] Compared with directly constraining or screening the attention matrix A, the introduction of the prior mask matrix M is more gentle and gradual. Through superposition with the scaled dot product matrix S, the original attention distribution is preserved while unreasonable or abnormal attention weights are smoothly suppressed and reasonable or important attention weights are moderately enhanced, thereby achieving a balance between data-driven and knowledge-driven and improving the robustness and generalization ability of the attention mechanism. At the same time, the introduction of the prior mask matrix M also has good universality and can be easily applied to different attention mechanism variants, improving the expansibility and practicality of the method.

[0011] Further, the prior rule layer sets feature constraints according to prior rules, including: according to domain knowledge, obtaining a feature value range and a constraint relationship between features as prior rules; converting the prior rules into a rule matrix R, in the rule matrix R, the position that meets the prior rules takes a value of 1, the position that violates the prior rules takes a value of -1, and the position that is not specified with the prior rules takes a value of 0; performing Hadamard product on the rule matrix R and the feature H to obtain a rule-constrained feature H r : wherein, represents Hadamard product, that is, the multiplication of corresponding elements of matrices; during training of the improved stack auto-encoding neural network model, a prior rule loss function L rule is set: rule = ||min(0, H r )||2, wherein ||*||2 represents the matrix F norm; min(0, H r ) represents that the negative value elements in H r are truncated to 0; by minimizing the prior rule loss function L rule , the negative value quantity that violates the rules in the rule-constrained feature H r is reduced, and the feature representation tends to meet the domain knowledge constraints.

[0012] Features refer to the various indicators and variables used in corporate credit assessments, such as a company's financial indicators, credit history, and industry attributes. Features characterize various aspects of a company's characteristics and risk profile and serve as the foundation for corporate representation learning and risk assessment. Domain knowledge refers to the expertise, experience, and patterns accumulated in the field of corporate credit reporting. This includes an understanding of corporate risk characteristics, the relationships between features, and the summary of risk assessment rules. Domain knowledge is derived from expert experience, industry practices, and regulatory requirements, and reflects prior knowledge of corporate credit issues. Inter-feature constraints refer to the mutual constraints and influences between different features based on domain knowledge. For example, certain financial indicators may have a certain proportional relationship, and certain industry attributes may be correlated with risk levels. Inter-feature constraints reflect the inherent connections and logical laws between features.

[0013] Conventional enterprise representation learning methods primarily learn feature representations from the data itself, lacking the use of domain knowledge. The prior rule layer incorporates domain knowledge to capture feature value ranges and constraints between features. This incorporates prior knowledge into the representation learning process, making the learned feature representations more consistent with business logic and practical rules.

[0014] The prior rule layer transforms domain knowledge into a rule matrix R, which explicitly specifies which feature values ​​or combinations are reasonable and which violate constraints. The rule matrix R is Hadamard-multiplied with the feature matrix H to produce the rule-constrained features H_r, directly reflecting the guidance and constraints of the prior rules in the feature representation.

[0015] Furthermore, by minimizing the prior rule loss function L rule , so that the rule constraint feature H r The number of negative values ​​that violate the rules is reduced, including: according to the rule constraint feature H r Calculate the weighted negative matrix H r,weighted,neg :

[0016] Among them, W rule is the prior rule weight matrix, which has the same shape as the rule matrix R and represents the importance of different rules to the loss function; ⊙ represents the Hadamard product, that is, the multiplication of the corresponding elements of the matrix; according to the weighted negative matrix H r,weighted,neg Calculate the weighted prior rule loss L rule,weighted ; The weighted prior rule loss L rule,weighted Added to the total loss function L of the improved stacked autoencoder neural network model total ; When training the improved stacked autoencoder neural network model, the total loss function L is minimized by optimization algorithms such as gradient descent total , so that the reconstruction loss L recon , weighted prior rule loss Lrule,weighted , regularization loss L reg and consistency loss L consis are minimized simultaneously, thus suppressing the weighted negative values of the rule-constrained features H r that violate the rules in the prior rule layer, and making the feature representation tend to conform to the domain knowledge constraints while improving the consistency among different rules.

[0017] On the one hand, in the prior rule layer, different prior rules may have different effects on the constraints of the feature representation. Some rules may reflect key constraints in the domain knowledge, and violating these rules can seriously affect the reasonableness of the feature representation; while other rules may be secondary or supplementary constraints, and the impact of violating these rules is relatively small. By introducing a prior rule weight matrix W rule , the importance of different rules can be distinguished and quantified. The elements in W rule represent the importance of the corresponding rule to the loss function, the greater the weight, the more important the rule, and the greater the negative value of violating the rule to the loss function. By multiplying the weighted negative value matrix H r,weighted,neg , the weighted negative value of violating different rules is obtained by multiplying the prior rule weight matrix W rule and the negative part of the rule-constrained feature H r . The greater the weighted negative value, the more important the violated rule, and the greater the impact on the loss function.

[0018] On the other hand, in the actual domain knowledge, there may be some conflicts or inconsistencies between different prior rules. Some rules may impose contradictory constraints on the feature representation, making it difficult to satisfy all rules simultaneously. By introducing a prior rule weight matrix W rule , the consistency between different rules can be balanced to some extent. By adjusting the weight values in W rule , the relative contribution of different rules to the loss function can be controlled, thus balancing the satisfaction of each rule in the feature representation learning process. When there are conflicts between different rules, the weight of the key rule can be made larger and the weight of the secondary rule can be made smaller by adjusting the corresponding weight values, so that the key rule is prioritized while the secondary rule is considered as much as possible, a balance point is found between the rules, and the overall consistency of the feature representation is improved.

[0019] By calculating the weighted negative value matrix to calculate the weighted prior rule loss, introducing the prior rule weight matrix can distinguish the importance of rules, balance the consistency between rules, strengthen the constraint effect of prior rules, and improve the interpretability of the feature representation in the feature representation learning process. This helps the model to learn a feature representation that is more consistent with the domain knowledge and business logic, and improves the accuracy and credibility of enterprise credit evaluation.

[0020] Further, according to the weighted negative value matrix Hr,weighted,neg Computing the weighted prior rule loss L rule,weighted rule,weighted = H r,weighted,neg2 where ||*|| denotes the F-norm of a matrix, i.e., the sum of the squares of the absolute values of the elements, again taken square root;

[0021] Further, the total loss function L total is expressed as follows:

[0022] L total = L recon + γ1 x L rule,weighted + γ2 x L reg + γ3 x L consis where L recon denotes the reconstruction loss, L reg denotes the regularization loss, and L consis denotes the consistency loss, which is used to measure the consistency between different rule-constrained features, and the calculation formula is: L consis = H r - H avg2 , H avg is the average value of the rule-constrained feature H r in the rule dimension;

[0023] H avg = mean(H r , axis = 1), mean(*) denotes the average value of the matrix along the specified dimension axis; γ1, γ2, γ3 are weight coefficients of the weighted prior rule loss, the regularization loss, and the consistency loss, respectively.

[0024] ​Furthermore, S4, based on the characteristic value distribution of enterprises in the cluster, uses prior rules to perform characteristic scoring, including: S41, for each cluster, calculating the statistical distribution parameters of the enterprises in the cluster on each characteristic dimension, the statistical distribution parameters include mean, standard deviation and median, to form the cluster characteristic distribution feature D; S42, based on domain knowledge, setting the prior rule scoring function f(x); S43, substituting each eigenvalue x in the cluster characteristic distribution feature D into the prior rule scoring function f(x), obtaining the corresponding scoring value, and forming the cluster characteristic scoring matrix S: S = f(D), where f(*) represents applying the scoring function f(x) to each element in the matrix D. ; Perform weighted averaging on the score values ​​of each row (i.e., each cluster) in the cluster feature score matrix S to obtain the comprehensive score vector P of the cluster; P = S × W, where W is the score weight vector, indicating the importance of different features to the comprehensive score. The sum of the elements of W is 1. W can be set based on domain knowledge or learned in a data-driven manner; Based on the comprehensive score vector P of the cluster, according to the preset score threshold, generate a corresponding label L for each cluster, and the label L includes low risk, medium risk, and high risk; the label generation function is: L = g(P), where g(*) is the threshold mapping function, which maps the comprehensive score vector P to the label vector L.

[0025] Furthermore, in S42, based on domain knowledge, a priori rule scoring function f(x) is set:

[0026] Where x represents the eigenvalue, i.e., the element in the cluster feature distribution matrix D; k represents the slope of the scoring function, which controls the rate of change of the scoring value; when k is positive, the scoring function is monotonically increasing; when k is negative, the scoring function is monotonically decreasing; the larger the absolute value of k, the steeper the change in the scoring value; b represents the midpoint of the scoring function, which controls the central position of the scoring value; when the eigenvalue x = b, the scoring value f(x) = 0.5 r ; s(x) represents the adaptive scaling function, which dynamically adjusts the scaling factor of the scoring function according to the distance between the eigenvalue x and the midpoint b; α represents the distance coefficient of the scaling function, which controls the rate of change of the scaling factor with distance; the larger α is, the more obvious the change of the scaling factor with distance; β represents the basic scale of the scaling function, which controls the basic size of the scaling factor; the larger β is, the larger the overall scale of the scoring function; r represents the shape factor of the scoring function, which controls the shape of the scoring function; when r>1, the scoring function presents a steeper S shape; 0 <r<1时,评分函数呈现更加平缓的S形;当r=1时,评分函数退化为标准的Sigmoid函数;k、b、α、β、r可以根据领域知识和数据分布进行设置,也可以通过优化算法进行学习。

[0027] Adaptive scaling function s(x): s(x) = α × |xb| + β. With the introduction of the adaptive scaling function s(x), the scaling factor of the scoring function can be adaptively adjusted based on the distance between the eigenvalue and the midpoint. When the eigenvalue x is closer to the midpoint b, the scaling factor s(x) decreases, causing the scoring function to change steeply near the midpoint and become more sensitive to eigenvalues ​​near the midpoint. When the eigenvalue x is further away from the midpoint b, the scaling factor s(x) increases, causing the scoring function to change more gradually in areas away from the midpoint and become less sensitive to eigenvalues ​​far from the midpoint. This adaptive scaling mechanism enables the scoring function to automatically adjust the rate of change of the score value based on the distribution of the eigenvalue, improving its adaptability to eigenvalues ​​in different regions. Furthermore, by adjusting the distance coefficient α and the base scale β, the strength and overall scale of the adaptive scaling can be flexibly controlled, further enhancing the expressiveness and applicability of the scoring function.

[0028] Further, S5, according to the cluster labels and weight feature matrix H a , generate a corporate credit profile, and perform credit assessment and analysis based on the corporate credit profile; the corporate credit profile includes the label, risk level and feature weight of the cluster to which the enterprise belongs, including: according to the cluster label obtained in step S4, extract the label of the cluster to which each enterprise belongs, and generate an enterprise label vector; according to the preset risk level mapping rule, map the enterprise label to the risk level, and generate an enterprise risk level vector; according to the weight feature matrix learned by the attention layer, extract the feature weight corresponding to each enterprise, and generate an enterprise feature weight matrix; splice the enterprise label vector, risk level vector and feature weight matrix to generate an enterprise credit profile matrix.

[0029] Further, S5, according to the cluster labels and weight feature matrix H a , generate a corporate credit profile, and perform credit assessment and analysis based on the corporate credit profile; the corporate credit profile includes the label, risk level and feature weight of the cluster to which the enterprise belongs, including: according to the cluster label vector L obtained in step S4, extract the label of each cluster to which the enterprise belongs to form the enterprise label vector E label According to the label of the cluster to which the enterprise belongs, the preset risk level mapping table is used to map the label to the risk level to form the enterprise risk level vector E risk ; The risk level mapping table is: {"low risk": 1, "medium risk": 2, "high risk": 3}; According to the weight feature matrix H a , extract the feature weight vector corresponding to each enterprise and form the enterprise feature weight matrix E weight , matrix E weight The number of rows is the number of enterprises, and the number of columns is the number of features; the enterprise label vector E label , Enterprise risk level vector E riskand enterprise feature weight matrix E weight Splicing, forming enterprise credit portrait matrix E portrait portrait label risk weight According to the enterprise credit portrait matrix E portrait , the enterprise is evaluated and analyzed from the following three dimensions: the number and proportion of enterprises with different labels are counted, and the risk distribution of the overall enterprise is analyzed; high-risk clustering clusters are identified, and the enterprises in the cluster are monitored and warned; the number and proportion of enterprises with different risk levels are counted, and the risk level of the overall enterprise is analyzed; high-risk enterprises are identified, and they are subjected to intensive examination and control; the influence degree of different features on enterprise risk is analyzed, and key risk features are identified; targeted risk prevention and control strategies are developed for key risk features; the feature weight difference of enterprises in the same clustering cluster is analyzed, and the abnormal enterprises in the cluster are identified.

[0030] Advantages, compared with the prior art, the advantages of the present application are:

[0031] By introducing an attention layer in the stack auto-encoding neural network model, the Scaled Dot-ProductAttention mechanism is used to adaptively learn the feature weights, highlighting the importance of key features and improving the discrimination and relevance of feature representation. The attention mechanism dynamically adjusts the weight distribution of the features by calculating the correlation between different features, so that the features more relevant to the task target obtain higher weights, while irrelevant features are suppressed, thereby realizing automatic filtering and optimization of features and improving the accuracy and efficiency of enterprise credit evaluation.

[0032] The element values in the prior mask matrix M can be pre-set according to domain knowledge. For the relevance of Query and Key that does not conform to business rules or domain common sense, a larger negative value can be set to suppress it, thereby reducing the impact of invalid or abnormal association; for the relevance of Query and Key that conforms to business rules or domain common sense, a larger positive value can be set to enhance it, thereby highlighting the role of effective association. Through the introduction of the prior mask matrix M, artificial experience and expert knowledge can be integrated on the basis of data-driven, making the calculation of the attention matrix A more intelligent and professional, and improving the accuracy and reliability of the evaluation results. By adding the prior mask matrix M to the scaled dot product matrix S, the mask dot product matrix S' is obtained, which can flexibly introduce prior knowledge without changing the original attention mechanism structure, adjust and optimize the attention weight, and improve the adaptability and compatibility of the method.

[0033] ​​​​By constraining features through the establishment of a priori rule layer, domain knowledge is fully utilized to limit the range of feature values ​​and the relationships between features, making the feature representation more consistent with actual business scenarios and improving the interpretability and credibility of the evaluation results. The priori rule layer converts domain knowledge into a rule matrix. By performing a Hadamard product with the features, it penalizes features that violate the rules and guides the feature learning process toward optimization consistent with the priori knowledge, thereby reducing overfitting and abnormal features and enhancing the generalization and robustness of the evaluation model.

[0034] By introducing a weighted prior rule loss during model training and performing joint optimization with the total loss function, the guiding role of prior rules in feature learning is further strengthened. This allows the model to improve the quality of feature representation while also taking into account the degree of rule satisfaction, achieving a balance between feature learning and rule constraints, and improving the accuracy and compliance of evaluation results. The weighted prior rule loss sets different penalty weights for features that violate the rules, making the model place greater emphasis on the satisfaction of key rules. At the same time, the introduction of consistency loss promotes coordination between different rules, improving the integrity and coherence of evaluation results. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] This specification will be further described in the form of exemplary embodiments, which will be described in detail with reference to the accompanying drawings. These embodiments are not limiting, and in these embodiments, the same numbers represent the same structures, wherein:

[0036] Figure 1 is an exemplary flow chart of a corporate credit assessment and analysis method according to some embodiments of this specification;

[0037] Figure 2 is an exemplary flow chart of generating a weight feature matrix Ha according to some embodiments of this specification;

[0038] Figure 3 is an exemplary flowchart of generating tags according to some embodiments of this specification. DETAILED DESCRIPTION

[0039] The methods and systems provided in the embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0040] like Figure 1 As shown in the figure, the credit data of multiple companies to be evaluated are obtained; the features of the credit data are extracted through the improved stacked autoencoder neural network model to obtain feature data; the improved stacked autoencoder neural network model includes an encoder, a decoder, an attention layer and a priori rule layer; the attention layer adopts the Scaled Dot-Product Attention mechanism to learn the weight feature matrix H a, the prior rule layer sets feature constraints according to the prior rule; the feature data is clustered to obtain a clustering cluster to which the enterprise belongs; the feature score is obtained by using the prior rule according to the feature value distribution of the enterprise in the clustering cluster; and the clustering label of the clustering cluster is obtained a , an enterprise credit investigation portrait is generated, and credit investigation evaluation and analysis are performed according to the enterprise credit investigation portrait; the enterprise credit investigation portrait includes the label, risk level and feature weight of the clustering cluster to which the enterprise belongs.

[0041] Specifically, S1, credit investigation data of a plurality of enterprises to be evaluated are obtained; the credit investigation data can be obtained from a plurality of channels and sources, including but not limited to: enterprise registration information, administrative penalty records and the like disclosed by government departments; financial information such as enterprise loan, repayment records provided by banks, credit institutions; internal data such as financial statements, operating data provided by enterprises themselves; external data such as enterprise credit scores, negative news provided by third-party credit investigation agencies, data service providers. Through the fusion of multi-source heterogeneous data, the credit status of the enterprise can be comprehensively and stereoscopically described.

[0042] For credit investigation data of different sources, data acquisition, cleaning, conversion and the like preprocessing operations are required to improve data quality and usability. After obtaining the enterprise credit investigation data, according to domain knowledge and business experience, some important statistical features are manually constructed, such as enterprise establishment time, registered capital, industry category and the like; by using natural language processing, time series analysis and the like technologies, semantic features such as keywords, sentiment tendency are extracted from unstructured data (such as enterprise introduction, news reports); by using statistical indexes (such as variance, correlation coefficient), model evaluation (such as feature importance ranking) and the like methods, a group of features with the largest contribution to enterprise credit risk discrimination is selected, the data dimension is reduced, and the generalization ability of the model is improved.

[0043] As shown in Figure 2 , S2, feature extraction is performed on the credit investigation data by using an improved stack auto-encoding neural network model to obtain feature data. First, the original credit investigation data is represented as a matrix X, and the shape is X ∈ R nsamples×nfeatures , wherein n samples is the number of enterprise samples, and n features is the number of original features; the encoder receives the original data matrix X, maps it to a low-dimensional latent space through a plurality of layers of nonlinear transformation, and obtains a latent feature matrix H, and the shape is H ∈ R nsamples×nhidden , wherein n hidden is the number of latent features, and is usually less than n features ; each layer of the encoder is composed of a fully connected layer (Dense), a nonlinear activation function (such as ReLU) and a random inactivation layer (Dropout), and high-order abstract features of the data are extracted through these nonlinear transformations.

[0044] In one aspect, the attention layer learns a weight feature matrix H_a using a Scaled Dot-Product Attention mechanism, and maps the feature matrix H extracted by the encoder to a Query matrix Q, a Key matrix K, and a Value matrix V through three different dense layers, respectively, all of which have a shape of V ∈ R nsamples×nhidden , where n samples is the number of samples, n hidden is the number of latent features; the mapping formula is: Q = H × W Q , K = H × W K , V = H × W V , where W Q , W K , and W V are mapping matrices of Query, Key, and Value, respectively, all of which have a shape of which are learned through backpropagation; according to the transpose K T of the Query matrix Q and the Key matrix K, a scaled dot-product matrix S is calculated, which has a shape of The calculation formula is: where * represents matrix multiplication, d k is the dimension of the Key matrix, i.e., d k = n hidden , which is used as a scaling factor to control the numerical range of the dot-product result; the scaling operation can make the gradient more stable and avoid the output of the softmax function tending to saturation due to the dot-product result being too large.

[0045] A preset prior mask matrix M is introduced, which has a shape of and is used to introduce domain knowledge to control the distribution of attention; in the prior mask matrix M, the positions allowed to be focused on are valued as 0, and the positions not allowed to be focused on are valued as-inf, which can make the attention weight of the corresponding position tend to 0 in the softmax function by setting-inf; according to the scaled dot-product matrix S and the prior mask matrix M, a masked dot-product matrix S' is obtained by element addition, which has a shape of According to the masked dot-product matrix S', an attention matrix A is calculated through a softmax function, which has a shape of The calculation formula is: The softmax function normalizes each row to obtain an attention weight distribution; the element a ij in the attention matrix A represents the attention weight of the i-th sample to the j-th sample, and the larger the value is, the more important it is.

[0046] The Query matrix Q and the Key matrix K are concatenated in the feature dimension to obtain a matrix QK concat with a shape of ; and the QK concatThe gating signal G is calculated by a fully connected layer and a sigmoid function, and has a shape of The calculation formula is: G = sigmoid(QK concat × W gate + b gate ), where W gate is a gating weight matrix with a shape of b gate is a bias term with a shape of The gating signal G is used to control the importance of each feature in the Value matrix V, and has a value range of [0, 1]; the gating signal G is multiplied element-wise with the Value matrix V to obtain the screened Value matrix V', which has a shape of The screening formula is: where represents the Hadamard product, that is, the element-wise multiplication of matrices; through the screening of the gating signal, important features are highlighted and secondary features are suppressed; the attention matrix A is multiplied with the screened Value matrix V' to obtain the weight feature matrix H a , which has a shape of The calculation formula is: H a = A × V', where * represents matrix multiplication; the weight feature matrix H a combines the attention weights between samples and the importance of features of the sample itself to obtain a more accurate and comprehensive feature representation.

[0047] On the other hand, the prior rule layer sets feature constraints according to prior rules, introduces domain knowledge into feature representation learning, and acquires feature value ranges and constraint relationships between features as prior rules according to domain knowledge and expert experience; the feature value range rule is used to constrain the value of a single feature, for example, "the value of feature A should be between [0, 1]"; the constraint relationship between features is used to constrain the relationship between multiple features, for example, "the value of feature A should be less than the value of feature B"; the prior rules are converted into a rule matrix R, which has the same shape as the feature matrix H, that is, For each prior rule, the corresponding position in the rule matrix R is assigned a value: if the feature value or the relationship between features meets the rule, the corresponding position takes a value of 1; if the feature value or the relationship between features violates the rule, the corresponding position takes a value of -1; if no rule is specified, the corresponding position takes a value of 0; in the rule matrix R, the positions with a value of 1 indicate compliance with the prior rule, the positions with a value of -1 indicate violation of the prior rule, and the positions with a value of 0 indicate no specified rule.

[0048] The rule matrix R is Hadamard multiplied with the feature matrix H to obtain the rule-constrained feature H r , which has a shape of The calculation formula is: where denotes the Hadamard product, i.e., element-wise multiplication of matrices; H is the regularity-constrained feature r , the features that meet the prior rules remain original values, the features that violate the prior rules are flipped to negative values, and the features that have no specified rules are 0; during model training, a prior rule loss function L rule is set r to measure the degree of violation of rules in H rule ; the calculation formula is: L r =||min(0, H r )||2, where min(0, H r ) represents negative value elements in H rule , and ||*|| represents the Frobenius norm of a matrix, i.e., the square root of the sum of squares of elements; by minimizing L r , the amount of negative values that violate rules in H rule can be reduced, and the feature representation tends to meet the domain knowledge constraints.

[0049] In order to further emphasize the constraint effect of important rules, a prior rule weight matrix W rule is introduced, which has the same shape as the rule matrix R; the elements in W r represent the importance of the corresponding rule, and the value range is [0, 1], the larger the value, the more important the rule; according to the regularity-constrained feature H rule and the prior rule weight matrix W r,weighted,neg , the weighted negative value matrix H r,weighted,neg is calculated: According to the weighted negative value matrix H rule,weighted , the weighted prior rule loss L rule,weighted is calculated: L r,weighted,neg2 =H consis , where ||*|| represents the Frobenius norm of a matrix; by weighting, more constraint force can be given to important rules in feature representation learning.

[0050] In order to improve the consistency of feature representation under different rule constraints, a consistency loss L r is introduced; the average value of the rule-constrained feature H avg in the rule dimension H avg is calculated: H r =mean(H consis , axis=1), where mean(*) represents the mean value, and axis=1 represents the mean value in the rule dimension; the consistency loss L consis is calculated: L r =H avg2 -H consisThe feature representations under different rule constraints can be made as close as possible, improving the consistency and robustness of the features.

[0051] The rule-constrained feature H r is input into the decoder, which reconstructs it into the original data through multi-layer nonlinear transformation to obtain the reconstructed data matrix X recon . recon The shape of the reconstructed data matrix X samples is where n features is the number of samples, and n r is the number of original features; each layer of the decoder is composed of a fully connected layer (Dense) and a nonlinear activation function (such as Sigmoid): the fully connected layer is used for linear transformation, mapping the output of the previous layer to the next layer through a weight matrix and a bias vector; the nonlinear activation function is used to introduce nonlinearity and enhance the expression ability of the model; the Sigmoid function maps the input to the interval (0, 1), which is suitable for the reconstruction of binary or probabilistic features; through multi-layer nonlinear transformation, the decoder gradually restores the rule-constrained feature H recon to the original data space, realizing the decoding and reconstruction of the feature.

[0052] During model training, a reconstruction loss function L recon is set to measure the difference between the reconstructed data and the original data; common reconstruction loss functions include Mean Squared Error (MSE) and Cross-Entropy, etc.; MSE is suitable for continuous features, and the calculation formula is: where X is the original data matrix, and X recon is the reconstructed data matrix; Cross-Entropy is suitable for binary or probabilistic features, and the calculation formula is:

[0053] By minimizing the reconstruction loss function L total , the reconstructed data is made as close as possible to the original data, ensuring that the extracted features have good representation ability.

[0054] An end-to-end model containing an encoder, an attention layer, a prior rule layer, and a decoder is constructed to realize the complete mapping from the original data to the reconstructed data; a total loss function L recon is set, including the reconstruction loss L rule,weighted , the weighted prior rule loss L reg , the regularization loss L consis , and the consistency loss L total :

[0055] L recon = L rule,weighted + γ1×L reg+ γ3 x L consis ; wherein γ1, γ2, γ3 are weight coefficients of the weighted prior rule loss, the regularization loss and the consistency loss, respectively; the reconstruction loss L recon for ensuring the reconstruction ability of the feature rule,weighted for introducing the domain knowledge constraint, the regularization loss L reg for controlling the model complexity, the consistency loss L consis for improving the consistency of the feature representation, L reg = ||W||1.

[0056] In each training batch, first, forward propagation is performed to pass the input data through the encoder, the attention layer, the prior rule layer and the decoder to obtain the reconstructed data and the rule-constrained feature; according to the reconstructed data and the original data, the reconstruction loss L recon is calculated to measure the quality of the feature reconstruction; according to the rule-constrained feature and the prior rule, the weighted prior rule loss L rule,weighted is calculated to measure the degree of compliance of the feature representation to the domain knowledge; according to the L2 norm of the model parameters, the regularization loss L reg is calculated to control the model complexity and prevent overfitting; according to the consistency of the rule-constrained feature in different rule dimensions, the consistency loss L consis is calculated to improve the consistency of the feature representation; the above four loss terms are weighted and summed according to the preset weight coefficients α, β, γ to obtain the total loss function L total .

[0057] According to the total loss function L total , the gradient of each parameter is calculated, and the gradient direction and size of each parameter are calculated; for the reconstruction loss L recon , the gradients of the encoder, the attention layer and the decoder parameters are calculated through the chain rule to adjust these parameters to minimize the reconstruction error; for the weighted prior rule loss L rule,weighted , the gradients of the encoder, the attention layer and the prior rule layer parameters are calculated through the chain rule to adjust these parameters to make the feature representation more consistent with the domain knowledge constraint; for the regularization loss L reg , the derivative of the L2 norm of the model parameters is directly calculated to obtain the gradient of the regularization term to the parameters to control the size of the parameters; for the consistency loss L consis , the gradients of the encoder, the attention layer and the prior rule layer parameters are calculated through the chain rule to adjust these parameters to improve the consistency of the feature in different rule dimensions; the gradients of the above four loss terms are weighted and summed according to the preset weight coefficients α, β, γ to obtain the total loss function L total to the gradient of each parameter.

[0058] According to the calculated gradient, the model parameters are updated using optimization algorithms such as gradient descent, adjusting the parameter values along the negative gradient direction to minimize the total loss function L total ; Common optimization algorithms include stochastic gradient descent (SGD), adaptive moment estimation (Adam), etc., which consider different factors such as learning rate, momentum, adaptive learning rate, etc. when updating parameters; taking SGD as an example, the parameter update formula is: where W is the parameter to be updated, η is the learning rate, is the gradient of the total loss function L with respect to the parameter W; through multiple rounds of iterative training, the process of forward propagation, back propagation and parameter update is repeatedly executed, so that the total loss function L total is gradually reduced until it converges to a lower value.

[0059] In the process of minimizing the total loss function L total , by setting appropriate weight coefficients α, β, γ, the importance of reconstruction loss, weighted prior rule loss, regularization loss and consistency loss is balanced; by adjusting the value of α, the proportion of weighted prior rule loss in the total loss is controlled, so that the feature representation tends to comply with the domain knowledge constraints; by adjusting the value of β, the proportion of regularization loss in the total loss is controlled, to prevent the model from being too complex and improve the generalization ability; by adjusting the value of γ, the proportion of consistency loss in the total loss is controlled, to promote the consistency of feature representation in different rule dimensions; through the balance of weight coefficients, the optimal compromise between feature reconstruction, rule constraints, model complexity and consistency is found, and high-quality feature representation is obtained.

[0060] Minimizing the reconstruction loss L recon , so that the feature representation can better reconstruct the original data, ensuring the information retention and representation ability of the feature; minimizing the weighted prior rule loss L rule,weighted , so that the feature representation complies with the domain knowledge constraints, suppresses the weighted negative value quantity that violates the rules, and improves the explainability and compliance of the feature; minimizing the regularization loss L reg , to control the model complexity and prevent overfitting, improve the generalization ability and robustness of the model; minimizing the consistency loss L consis , to improve the consistency of feature representation in different rule dimensions, so that the feature remains stable and reliable under different constraints; through the cooperative optimization of multiple loss terms, high-quality feature representation is obtained, which takes into account reconstruction ability, rule constraints, model complexity and consistency, providing reliable input for subsequent enterprise credit evaluation.

[0061] Using the trained improved stack auto-encoding neural network model, the new original credit data is extracted for feature extraction; the original credit data is input into the encoder and attention layer to obtain the weight feature matrix H a , and then the final feature data matrix Hfinal ; Feature data matrix H final The shape is The extracted feature data matrix H final As input for subsequent assessments, such as credit risk prediction and anomaly detection, it enables comprehensive assessment and decision support of corporate credit.

[0062] like Figure 3 As shown, S3 clusters the feature data to obtain the cluster to which the enterprise belongs; the feature data matrix H extracted by the improved stacked autoencoder neural network is final As the input of the clustering algorithm; standardize the feature data, such as Z-score standardization or Min-Max standardization, to make the value ranges of different features similar, so as to avoid the impact of dimensional differences on the clustering results; select a suitable clustering algorithm based on the distribution characteristics of the feature data and the clustering target. Commonly used clustering algorithms include K-means, Gaussian mixture model (GMM), hierarchical clustering, density clustering, etc.; Taking K-means as an example, its goal is to divide the data into K clusters so that the similarity of samples within the cluster is maximized and the similarity of samples between clusters is minimized; the advantages of the K-means algorithm are simplicity and efficiency, easy implementation and understanding, and applicable to large-scale data sets; the disadvantages are that the number of clusters K needs to be specified in advance, it is sensitive to the initial center point, and may converge to a local optimal solution.

[0063] Determine the optimal number of clusters K so that the clustering results can better reflect the internal structure and characteristics of the data; Commonly used methods for determining the number of clusters include the elbow method, silhouette coefficient, gap statistics, Statistic), etc.; taking the elbow method as an example, calculate the clustering loss under different K values ​​(such as the sum of the squares of the distances from the samples within the cluster to the center point), draw a curve of the relationship between the K value and the clustering loss, and select the K value at the "elbow" of the curve as the optimal number of clusters; initialize K cluster centers based on the determined number of clusters K. K samples can be randomly selected as the initial center points, or the initial center points can be selected using optimization methods such as K-means++; iteratively perform the following steps until the cluster center points no longer change or the maximum number of iterations is reached: calculate the distance from each sample to the K center points, and assign the sample to the cluster with the nearest center point; update the cluster center point based on the samples within each cluster, such as calculating the mean of the samples within the cluster as the new center point; obtain the final K clusters, each cluster contains a part of enterprise samples, the feature similarity of the samples within the cluster is high, and the feature similarity of the samples between clusters is low.

[0064] For each enterprise sample, based on its characteristic data, its distance to the K cluster centers is calculated, and it is assigned to the cluster with the nearest distance; the cluster number to which each enterprise belongs is obtained, such as enterprise A belongs to cluster 1, enterprise B belongs to cluster 3, etc.; the cluster number to which the enterprise belongs is used as one of its characteristic attributes for subsequent analysis and decision-making; the quality and effectiveness of the clustering results are evaluated, and commonly used evaluation indicators include silhouette coefficient, Calinski-Harabasz index, Davies-Bouldin index, etc.; the silhouette coefficient measures the ratio of the similarity of the sample to its cluster to the dissimilarity of the sample to other clusters, and its value range is [-1, 1]. The larger the value, the better the clustering effect; the Calinski-Harabasz index measures the ratio of the inter-cluster dispersion to the intra-cluster compactness. The larger the value, the better the clustering effect; the Davies-Bouldin index measures the ratio of the inter-cluster distance to the intra-cluster distance. The smaller the value, the better the clustering effect; the optimal clustering result is selected based on the evaluation indicators, or the clustering parameters are further adjusted to optimize the clustering effect. The enterprise sample is divided into several clusters. Enterprises within each cluster have similar characteristics, while enterprises across clusters have significantly different characteristics. The clustering results can reveal potential groupings and characteristics of enterprises, providing reference and support for subsequent risk assessments, credit granting, and other decisions.

[0065] S4, based on the characteristic value distribution of enterprises in the cluster, use the prior rules to perform characteristic scoring and obtain the cluster label of the cluster, including: S41, calculate the characteristic distribution of the cluster. For each cluster, calculate the statistical distribution parameters of the enterprises in the cluster on each characteristic dimension, including mean, standard deviation and median; the mean represents the average level of enterprises in the cluster on this characteristic, the standard deviation represents the degree of dispersion of enterprises in the cluster on this characteristic, and the median represents the central level of enterprises in the cluster on this characteristic; the statistical distribution parameters of each characteristic dimension are combined into the cluster characteristic distribution matrix D, which has the shape of where n clusters is the number of clusters, n features is the number of feature dimensions, and each feature dimension corresponds to three statistical parameters.

[0066] S42, set the prior rule scoring function. According to the domain knowledge, set the prior rule scoring function f(x) to map the feature value to the scoring value. The scoring function f(x) adopts the modified Sigmoid function form, that is, The Sigmoid function is a commonly used S-shaped function with the characteristics of a value range between (0, 1), monotonically increasing, saturated at both ends, and symmetric in the middle. It is suitable for mapping continuous values ​​into bounded scores. By modifying the Sigmoid function and introducing the slope k, midpoint b, adaptive scaling function s(x), and shape factor r, the flexibility and adaptability of the scoring function are increased.

[0067] The slope parameter k controls the rate of change of the scoring function at the midpoint b, i.e. the derivative value of f(x) at x=b; when k is positive, the scoring function is monotonically increasing, i.e. the larger the feature value, the higher the score; when k is negative, the scoring function is monotonically decreasing, i.e. the larger the feature value, the lower the score; the larger the absolute value |k|, the steeper the change of the scoring function at the midpoint b, and the more sensitive to the change of the feature value; the smaller |k|, the flatter the change of the scoring function at the midpoint b, and the less sensitive to the change of the feature value; by adjusting the value of k, the monotonicity and steepness of the scoring function can be controlled according to the direction and sensitivity of the feature to the risk.

[0068] The midpoint parameter b controls the symmetric center position of the scoring function, i.e. when the feature value x=b, the score f(x)=0.5 r ; the value of b should be set according to the distribution of the feature value and the domain knowledge, usually the center position or critical point of the feature value distribution is selected as the value of b; when the feature value x<b, the scoring function f(x)<0.5 r ; when the feature value x>b, the scoring function f(x)>0.5 r ; by adjusting the value of b, the center position of the scoring function can be controlled to match the feature value distribution.

[0069] The adaptive scale function s(x) dynamically adjusts the scale factor of the scoring function according to the distance between the feature value x and the midpoint b, i.e. s(x)=α×|x-b|+β; the distance coefficient α controls the rate of change of the scale factor with the distance between the feature value and the midpoint, the larger α, the more obvious the change of the scale factor with the distance; the basic scale β controls the basic size of the scale factor, the larger β, the larger the overall scale of the scoring function; when the feature value x is close to the midpoint b, |x-b| is small, and the scale factor s(x) approaches the basic scale β, the change of the scoring function is relatively flat; when the feature value x is far from the midpoint b, |x-b| is large, and the scale factor s(x) increases significantly, the change of the scoring function is relatively steep; by introducing the adaptive scale function s(x), the scale of the scoring function can be dynamically adjusted according to the distance between the feature value and the midpoint, so that it has different sensitivity in different regions.

[0070] The shape factor r controls the shape of the scoring function, i.e. the steepness and saturation speed of the function curve; when r>1, the change of the scoring function near the midpoint b is more steep, the saturation at both ends is more rapid, and the S-shaped curve is more sharp; when 0<r<1, the change of the scoring function near the midpoint b is more flat, the saturation at both ends is more slow, and the S-shaped curve is more flat; when r=1, the scoring function degenerates into a standard Sigmoid function, the change near the midpoint b is moderate, and the saturation at both ends is moderate; by adjusting the value of r, the shape of the scoring function can be controlled to meet the requirements of the domain knowledge on the scoring sensitivity and saturation.

[0071] The parameters k, b, a, b, r of the scoring function can be manually set according to domain knowledge and experience, or can be optimized and learned through a data-driven manner; when manually setting the parameters, appropriate parameter values can be selected according to factors such as the influence mechanism of the feature on the risk, the feature value distribution characteristics, and the scoring sensitivity requirements; the data-driven parameter optimization can be performed by constructing a supervised learning model, taking the feature value as the input and taking the risk label or score as the output, and learning the optimal parameter combination through a gradient descent optimization algorithm; through parameter optimization and learning, the scoring function can better adapt to the actual data distribution and risk pattern, and improve the accuracy and rationality of the score.

[0072] S43, calculating a cluster feature score, substituting each feature value x in the cluster feature distribution matrix D into the prior rule scoring function f(x) to obtain a corresponding score value, and forming a cluster feature score matrix S; the shape of the cluster feature score matrix S is the same as that of the cluster feature distribution matrix D, that is, Each element represents the score of the corresponding feature value; a weighted average of the score values in each row (i.e., each cluster) of the cluster feature score matrix S is performed to obtain a comprehensive score vector P of the cluster; the shape of the comprehensive score vector P is n clusters Each element represents the comprehensive score of the corresponding cluster, and a higher comprehensive score indicates a lower overall risk of the enterprises in the cluster; when performing the weighted average, a score weight vector W is used, which represents the importance of different features to the comprehensive score, and the sum of the elements of W is 1; W can be set according to domain knowledge or can be learned through a data-driven manner.

[0073] S44, generating a corresponding label L for each cluster according to the comprehensive score vector P of the cluster and a preset score threshold; the label L includes three types of low risk, medium risk, and high risk, indicating the overall risk level of the enterprises in the cluster; a threshold mapping function g(*) is used to map the comprehensive score vector P to a label vector L, that is, L=g(P); the threshold mapping function g(*) maps the comprehensive score to the corresponding risk label according to the size relationship between the comprehensive score and the preset threshold; for example, two thresholds t1 and t2 can be set to divide the comprehensive score into three intervals: [0, t1), [t1, t2), and [t2, 1], which correspond to high risk, medium risk, and low risk, respectively; the thresholds t1 and t2 can be set according to domain knowledge and risk preference, or can be adaptively adjusted according to the data distribution, such as using quantile or clustering method to determine the thresholds; the shape of the obtained label vector L is n clusters Each element represents the risk label of the corresponding cluster, such as low risk, medium risk, and high risk.

[0074] The calculation complexity of the cluster feature score matrix S is O(n clusters ×n features), which is the product of the number of clusters and the number of feature dimensions; the computational complexity of the cluster comprehensive score vector P is O(n clusters ×n features ), that is, the matrix multiplication complexity of the cluster feature score matrix S and the score weight vector W; the generation complexity of the cluster label vector L is O(n clusters ), that is, threshold comparison and mapping are performed on each element in the cluster comprehensive score vector P; the total algorithm complexity is O(n clusters ×n features ), which is linearly related to the number of clusters and the number of feature dimensions, and has good computational efficiency.

[0075] S5, according to the clustering label and weight feature matrix H a , generate a corporate credit profile, perform credit assessment analysis based on the corporate credit profile, extract the label of each corporate cluster based on the cluster label vector L obtained in step S4, and form the corporate label vector E label ; The shape of the cluster label vector L is n clusters , each element represents the risk label of the corresponding cluster; enterprise label vector E label The shape is n enterprises , each element represents the risk label of the corresponding cluster to which the enterprise belongs; by mapping the corresponding relationship between the cluster label vector L and the cluster to which the enterprise belongs, the enterprise label vector E is obtained label .

[0076] According to the label of the cluster to which the enterprise belongs, the preset risk level mapping table is used to map the label to the risk level to form the enterprise risk level vector E risk The risk level mapping table is: {“low risk”: 1, “medium risk”: 2, “high risk”: 3}, which indicates the numerical level corresponding to different risk labels; the enterprise risk level vector E risk The shape is n enterprises , each element represents the risk level of the corresponding enterprise, with values ​​of 1, 2, and 3; by label Each element in is mapped to the corresponding risk level, and the enterprise risk level vector E is obtained. risk .

[0077] According to the weight feature matrix H a , extract the feature weight vector corresponding to each enterprise and form the enterprise feature weight matrix E weight ; Weight feature matrix H a The shape is Each row represents the feature weight vector of an enterprise; the enterprise feature weight matrix E weight The shape is Each row represents the feature weight vector of a company;

[0078] Enterprise Feature Weight Matrix E weight With Weight Feature Matrix H a The same, direct extraction can be extracted; enterprise label vector E label , enterprise risk level vector E risk and enterprise feature weight matrix E weight Concatenated by column, form enterprise credit image matrix E portrait ; enterprise credit image matrix E portrait Shape is Each row represents the credit image of an enterprise; the credit image contains the label, risk level and weight of each feature of the enterprise's cluster, which fully describes the risk characteristics of the enterprise.

[0079] According to enterprise credit image matrix E portrait , the credit evaluation and analysis of enterprises are carried out from three dimensions of enterprise label, risk level and feature weight; the number and proportion of enterprises of different labels are counted to analyze the risk distribution of the overall enterprise; high-risk clusters are identified, and the enterprises in the cluster are monitored and warned; the number and proportion of enterprises of different risk levels are counted to analyze the overall risk level of the enterprise; high-risk enterprises are identified and subjected to intensive examination and control; the influence of different features on enterprise risk is analyzed to identify key risk features; targeted risk prevention and control strategies are developed for key risk features; the feature weight difference of enterprises in the same cluster is analyzed to identify abnormal enterprises in the cluster, and the risk analysis granularity is further refined.

Claims

1. A corporate credit assessment and analysis method, characterized in that: include: S1, obtain the credit data of multiple companies to be evaluated; S2, extracting features from credit data using an improved stacked autoencoder neural network model to obtain feature data; The improved stacked autoencoder neural network model includes an encoder, a decoder, an attention layer and a priori rule layer; the attention layer adopts the Scaled Dot-Product Attention mechanism to learn the weight feature matrix H a , the prior rule layer sets feature constraints according to the prior rules; S3, cluster the feature data to obtain the cluster to which the enterprise belongs; S4, based on the characteristic value distribution of enterprises in the cluster, use the prior rules to perform characteristic scoring and obtain the cluster label of the cluster; S5, according to the clustering label and weight feature matrix H a , generate a corporate credit profile, and perform credit assessment and analysis based on the corporate credit profile; the corporate credit profile includes the label, risk level and feature weight of the cluster to which the enterprise belongs.

2. The corporate credit assessment and analysis method according to claim 1, characterized in that: The attention layer uses the Scaled Dot-Product Attention mechanism to learn the weight feature matrix H a ,include: Map the features H extracted by the encoder into Query matrix Q, Key matrix K and Value matrix V respectively; The correlation between Query and Key is calculated through the improved scaled dot product, and the prior mask matrix M is introduced to obtain the attention matrix A; After concatenating the Query and Key, the gating signal G is calculated by the sigmoid function, and the gating signal G is multiplied element by element with the Value matrix V to obtain the filtered Value matrix V'; Multiply the attention matrix A with the filtered Value matrix V' to obtain the weight feature matrix H a .

3. The corporate credit assessment and analysis method according to claim 2, characterized in that: Introducing the prior mask matrix M, we get the attention matrix A, which includes: According to the Query matrix Q and the Key matrix K, calculate the scaled dot product matrix S: Among them, d k The dimension of the Key matrix, used as a scaling factor to control the numerical range of the dot product result; According to the scaled dot product matrix S and the preset prior mask matrix M, the mask dot product matrix S' is obtained: S'=S+M According to the mask dot product matrix S', calculate the attention matrix A:

4. The corporate credit assessment and analysis method according to claim 2, characterized in that: The prior rule layer sets feature constraints based on prior rules, including: Based on domain knowledge, the feature value range and the constraint relationship between features are obtained as prior rules; The prior rules are converted into a rule matrix R, in which the position that meets the prior rules is assigned a value of 1, the position that violates the prior rules is assigned a value of -1, and the position for which the prior rules are not specified is assigned a value of 0; Perform Hadamard product of rule matrix R and feature H to obtain rule constraint feature H r : in, Represents the Hadamard product, that is, the multiplication of corresponding elements of the matrix; When training the improved stacked autoencoder neural network model, set the prior rule loss function L rule : L rule =||min(0,H r )||2 Among them, ||*||2 represents the norm of matrix F; min(0,H r ) indicates H r Negative elements are truncated to 0; By minimizing the prior rule loss function L rule , so that the rule constraint feature H r The amount of negative values ​​that violate the rules is reduced, making the feature representation tend to conform to the domain knowledge constraints.

5. The corporate credit assessment and analysis method according to claim 4, characterized in that: By minimizing the prior rule loss function L rule , so that the rule constraint feature H r The number of negative values ​​that violate the rules in the game has been reduced, including: According to the rule constraint feature H r Calculate the weighted negative matrix H r,weighted,neg : Among them, W rule is the prior rule weight matrix, which has the same shape as the rule matrix R and represents the importance of different rules to the loss function; ⊙ represents the Hadamard product, that is, the multiplication of corresponding elements of the matrix; According to the weighted negative matrix H r,weighted,neg Calculate the weighted prior rule loss L rule,weighted ; The weighted prior rule loss L rule,weighted Added to the total loss function L of the improved stacked autoencoder neural network model total ; When training the improved stacked autoencoder neural network model, the total loss function L is minimized by the gradient descent algorithm. total , so that the reconstruction loss L recon , weighted prior rule loss L rule,weighted , regularization loss L reg and consistency loss L consis Minimize at the same time.

6. The corporate credit assessment and analysis method according to claim 5, characterized in that: According to the weighted negative matrix H r,weighted,neg Calculate the weighted prior rule loss L rule,weighted : L rule,weighted =||H r,weighted,neg ||2。 7. The corporate credit assessment and analysis method according to claim 5, characterized in that: Total loss function L total The expression is as follows: L total =L recon +γ1×L rule,weighted +γ2×L reg +γ3×L consis Among them, L recon represents the reconstruction loss, L reg represents the regularization loss, L consis Represents consistency loss, which is used to measure the consistency between different rule constraint features. The calculation formula is: L consis =||H r -H avg ||2 H avg is the rule constraint feature H r average value on the regularity dimension; H avg =mean(H r ,axis=1) Among them, mean(*) represents the average value of the matrix along the specified dimension axis; γ1, γ2, and γ3 are the weight coefficients of weighted prior rule loss, regularization loss, and consistency loss, respectively.

8. The corporate credit assessment and analysis method according to claim 7, characterized in that: S4, based on the characteristic value distribution of enterprises in the cluster, uses prior rules to perform characteristic scoring, including: S41, for each cluster, calculating the statistical distribution parameters of the enterprises in the cluster on various characteristic dimensions, wherein the statistical distribution parameters include mean, standard deviation and median, to form the cluster characteristic distribution characteristics D; S42, setting a priori rule scoring function f(x) based on domain knowledge; S43, each eigenvalue x in the cluster feature distribution feature D is substituted into the prior rule scoring function f(x) to obtain the corresponding scoring value, forming the cluster feature scoring matrix S: S=f(D) Where f(*) represents the application of the scoring function f(x) to each element in the matrix D; Perform weighted averaging on the score values ​​of each row in the cluster feature score matrix S to obtain the comprehensive score vector P of the cluster; P=S×W Where W is the scoring weight vector; According to the comprehensive score vector P of the cluster, according to the preset score threshold, a corresponding label L is generated for each cluster, and the label L includes low risk, medium risk and high risk; The label L generating function is: L=g(P) Among them, g(*) is the threshold mapping function, which maps the comprehensive score vector P to the label vector L.

9. The corporate credit assessment and analysis method according to claim 8, characterized in that: S42, based on domain knowledge, set the prior rule scoring function f(x): Where x represents the eigenvalue; k represents the slope of the scoring function; b represents the midpoint of the scoring function; s(x) represents the adaptive scaling function; α represents the distance coefficient of the scaling function; β represents the base scale of the scaling function; r represents the shape factor of the scoring function; Adaptive scaling function s(x): s(x)=α×|xb|+β.

10. The corporate credit assessment and analysis method according to claim 9, characterized in that: S5, according to the clustering label and weight feature matrix H a , generate corporate credit profiles, including: According to the cluster labels obtained in step S4, the labels of the clusters to which each enterprise belongs are extracted to generate an enterprise label vector; According to the preset risk level mapping rules, the enterprise label is mapped to the risk level to generate the enterprise risk level vector; According to the weight feature matrix learned by the attention layer, the feature weight corresponding to each enterprise is extracted to generate the enterprise feature weight matrix; The enterprise label vector, risk level vector and feature weight matrix are concatenated to generate the enterprise credit profile matrix.

Citation Information

Cited By

  • Enterprise credit evaluation method and system integrating main modal guidance and dynamic gating

    CN121146892A