A credit risk intelligent evaluation method and system based on a multi-layer neural network

CN122736759APending Publication Date: 2026-09-11GUANGDONG OCEAN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610925861.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-25
Publication Date
2026-09-11

AI Technical Summary

Technical Problem

[0004]本发明提供了一种基于多层神经网络的信贷风险智能评估方法及系统,以解决现有技术中无法准确高效地对信贷风险等级进行度量问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122736759A_ABST
    Figure CN122736759A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for intelligent credit risk assessment based on a multi-layer neural network, belonging to the field of credit assessment. This application acquires corporate tax, cash flow, and litigation data from various images, calculates the coefficient of variation of sales and purchases, the Gibbs entropy of cash flow, and the sum of the logarithms of the number of transaction partners and the number of litigations, and combines these to generate an initial embedding vector. This initial embedding vector is then input into a multi-layer neural network, where its prototype measurement layer calculates the reciprocal of the Euclidean distance to the risk prototype and normalizes it to output a default probability score. Finally, the risk level is determined based on the membership relationship between the score and a threshold interval. This application effectively solves the problem that existing technologies cannot accurately and efficiently measure credit risk levels.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of credit assessment, and in particular to a method and system for intelligent credit risk assessment based on multi-layer neural networks. Background Technology

[0002] Credit risk assessment is a core component of the loan approval process for financial institutions, and its accuracy directly impacts the quality of financial assets and the level of risk control. Traditional credit risk assessment methods primarily rely on financial statements, credit reports, and manual due diligence submitted by companies. This process is highly subjective, inefficient, and struggles to uncover true operational risks concealed by companies through embellished financial statements. With the development of fintech, some institutions have begun to explore cross-validation using multi-source data such as tax and bank statements. For example, analyzing the matching degree between output and input VAT in value-added tax returns can help determine the normality of a company's operations, or fluctuations in bank transaction amounts can assess the stability of the cash flow. However, these methods are mostly based on simple statistical indicators or pre-set rules, failing to fully uncover the deep-seated risk characteristics inherent in multi-source heterogeneous data and struggling to adapt to complex and ever-changing credit scenarios.

[0003] While some solutions for credit risk assessment using machine learning models have emerged in the current technology landscape, these solutions still have significant shortcomings. First, most solutions rely on a single data source (such as tax data or bank statements), ignoring the correlation between different data sources, leading to biased assessment results. Second, existing solutions are relatively superficial in feature extraction, for example, only calculating basic statistics such as the mean and variance of transaction amounts, failing to effectively capture complex patterns in corporate transaction behavior (such as non-periodic fluctuations and abnormal transaction patterns). Furthermore, their handling of multi-dimensional risk factors, such as litigation information, is also relatively simplistic, failing to achieve the organic integration of multi-dimensional risks. In addition, traditional machine learning models (such as logistic regression and decision trees) have limited capabilities in handling high-dimensional nonlinear relationships, while existing deep learning methods lack specific designs for credit assessment scenarios, making it difficult to learn highly discriminative feature representations. This results in insensitivity to early risk signals and high false positive and false negative rates. These shortcomings prevent current technologies from accurately and efficiently measuring credit risk levels. Summary of the Invention

[0004] This invention provides a method and system for intelligent credit risk assessment based on multi-layer neural networks, in order to solve the problem that existing technologies cannot accurately and efficiently measure credit risk levels.

[0005] Firstly, this application provides a credit risk intelligent assessment method based on a multi-layer neural network, including:

[0006] Obtain images of tax returns, bank statements, and legal records of the companies applying for loans; Optical character recognition is performed on images of tax return forms, bank statements, and legal litigation records to extract the VAT output tax, VAT input tax, bank transaction amount, transaction counterparty account, and number of legal litigations for each enterprise within a continuous time window. The coefficient of variation of the ratio of monthly output VAT to input VAT for each enterprise is calculated to obtain the first value; the Gibbs distribution entropy of all bank transaction amounts for each enterprise is calculated to obtain the second value; the natural logarithm of the total number of accounts of different transaction objects and the natural logarithm of the total number of judicial litigations are calculated to obtain the third value; the first, second and third values ​​are combined to generate an initial embedding vector. The initial embedding vector is input into a preset multi-layer neural network so that the prototype metric layer of the multi-layer neural network calculates the Euclidean distance between the initial embedding vector and the preset risk prototype vector, and outputs the default probability score after normalizing the reciprocal of the Euclidean distance. The multilayer neural network is trained by minimizing the joint loss of the triplet loss function and the cross-entropy loss function based on the historical initial embedding vectors and corresponding default labels of historical loan samples of each enterprise. Based on the relationship between the default probability score and multiple preset risk threshold ranges, the risk level label corresponding to each loan applicant company is determined.

[0007] This application, by acquiring images of tax returns, bank statements, and legal litigation records and performing optical character recognition, can automatically extract key structured information such as VAT input and output tax, bank transaction details, and litigation frequency from multi-source heterogeneous unstructured data, providing a comprehensive and objective data foundation for credit risk assessment. Furthermore, it calculates the coefficient of variation of the monthly input-output tax ratio to quantify the stability of tax burden fluctuations, calculates the Gibbs distribution entropy of transaction amounts to characterize the degree of disorder in fund flows, and combines the sum of the logarithms of the number of accounts of the transaction counterparties and the number of litigations to comprehensively reflect the enterprise's related-party risks and legal risks. These three statistical measures are combined to generate an initial embedding vector, thereby transforming the raw data into data with business-solvable parameters. The model employs a low-dimensional risk feature model. Based on this, the embedded vector is input into a multi-layer neural network jointly trained with triplet loss and cross-entropy loss. A prototype metric layer is used to calculate the Euclidean distance between the embedded vector and a preset risk prototype vector, outputting a normalized default probability score. Since triplet loss forces similar default samples to cluster in the feature space while distancing different types of samples, and cross-entropy loss ensures classification accuracy, the model learns more discriminative feature representations, significantly improving the sensitivity to early default risk identification. Finally, the default probability score is mapped to specific risk level labels through multiple preset risk threshold intervals, achieving end-to-end automated intelligent credit risk assessment. Compared with existing technologies, this application not only overcomes the limitations of single data sources and shallow statistical indicators but also effectively improves the ability to distinguish between samples with ambiguous boundaries (such as enterprises on the verge of default) through the original feature construction of a combination of Gibbs entropy, coefficient of variation, and logarithm, and the model design trained with a prototype metric layer and joint loss. This reduces false positive and false negative rates, resulting in higher assessment accuracy and robustness. This application effectively solves the problem that existing technologies cannot accurately and efficiently measure credit risk levels.

[0008] Furthermore, the images of tax returns, bank statements, and legal proceedings records of the various companies applying for loans specifically include: Through the pre-defined application programming interface, it connects to the tax collection and management system, the pre-defined commercial bank system, and the judicial document disclosure website, respectively. Based on the unified social credit code of each enterprise, a tax data query request is initiated to the tax administration system to receive scanned images of value-added tax returns covering the past three complete fiscal years. Based on the corporate bank account information of each enterprise, a transaction query request is initiated to the preset commercial bank system, and scanned images of bank transaction statements detailing each transaction are received. Based on the full names of each enterprise, a request for retrieving litigation information is initiated to the judicial document disclosure website, and document images including case names, case numbers, and judgment results are extracted from the retrieved document pages.

[0009] This application connects to the tax administration system, commercial banking system, and judicial document disclosure website through pre-defined application programming interfaces (APIs). Based on the enterprise's unified social credit code, corporate bank account information, and full name, it automatically initiates query requests for tax data, bank statements, and litigation information. This enables real-time and accurate reception of scanned images of VAT tax returns covering the past three complete fiscal years, scanned images of bank statements detailing each transaction, and document images containing case names, case numbers, and judgments. Because the above interfaces adopt standardized data interaction protocols and use the enterprise's unique identifier as the query key, they completely avoid the subjective errors and efficiency bottlenecks caused by manual collection, entry, and verification of paper materials. Furthermore, they ensure the alignment of multi-source data in the time dimension (within the same fiscal year window) and the relevance at the enterprise level, thus providing high-quality, conflict-free raw image input for subsequent optical character recognition and feature extraction. Compared to the traditional method of relying on enterprises to report on their own or offline due diligence, this application realizes the fully automated collection of basic credit risk data, which significantly reduces the cost of data acquisition, eliminates the assessment bias caused by incomplete or delayed information, and ensures the reliability and timeliness of risk identification from the data source.

[0010] Furthermore, the calculation of the coefficient of variation of the ratio of monthly VAT output tax to VAT input tax for each enterprise yields the first value, specifically as follows: Obtain the VAT output tax and VAT input tax for each enterprise for each month within a consecutive N-month time window; Calculate the ratio of VAT output tax to VAT input tax for each month in the N consecutive months to obtain N initial ratios; Calculate the arithmetic mean and standard deviation of N initial ratios, and divide the standard deviation by the arithmetic mean to obtain a first value; Wherein, N is a positive integer.

[0011] This application obtains the VAT output tax and VAT input tax of each enterprise for each month within a continuous N-month time window, calculates the ratio of the two to obtain N initial ratios, and then calculates the arithmetic mean and standard deviation of these N initial ratios. Finally, the standard deviation is divided by the arithmetic mean to obtain the first value (i.e., the coefficient of variation). This coefficient of variation can quantify the degree of fluctuation in the matching relationship between an enterprise's input tax and output tax: if the monthly input-output ratio of an enterprise remains stable, the standard deviation of the N initial ratios is small, and the coefficient of variation is correspondingly small, indicating that the enterprise's tax burden fluctuates smoothly and its operating status is relatively stable; conversely, if the enterprise's input-output ratio fluctuates significantly (for example, artificially adjusted to inflate output tax or conceal input tax), the standard deviation increases, and the coefficient of variation increases accordingly, thus revealing potential risks such as chaotic invoice management, abnormal business models, or financial fraud. Therefore, this application transforms the originally discrete and difficult-to-compare input and output data into a single indicator with clear statistical significance. This not only eliminates the scaling effect caused by the difference in the absolute value of tax burden between different enterprises, but also provides core features that can stably reflect the consistency of enterprise operations for subsequent multi-indicator fusion and neural network evaluation, thereby improving the accuracy and robustness of the characterization of the enterprise's sustainable operating capacity in credit risk assessment.

[0012] Furthermore, the calculation of the Gibbs distribution entropy of all bank transaction amounts for each enterprise yields the second value, specifically as follows: Obtain all bank transaction amounts for each enterprise within a continuous time window to form a transaction amount sequence; The transaction amount sequence is binned to classify transaction amounts falling within the same preset amount range into the same state, and the frequency of each state is counted to construct a Gibbs probability distribution. Based on the Gibbs probability distribution, the product of the probability value of each state and the logarithmic probability base to the natural constant is calculated, and the sum of the products of all states is then inverted to obtain the second value.

[0013] This application obtains a transaction amount sequence from all bank statements of various enterprises within a continuous time window, and performs data binning on this sequence. Transaction amounts falling within the same preset amount range are grouped into the same state. The frequency of occurrence of each state is statistically analyzed to construct a Gibbs probability distribution. Then, the product of the probability value of each state and the logarithmic probability base of the natural constant is calculated. The sum of the products of all states is then inverted to obtain a second value (i.e., Gibbs distribution entropy). This Gibbs distribution entropy can quantify the randomness and disorder of enterprise bank statement transaction amounts from a statistical physics perspective: if the enterprise's transaction amounts are concentrated and the fluctuation pattern is predictable (e.g., stable business transactions are concentrated in a few amount ranges), the probability distribution shows a clear peak, and the entropy value is small, indicating orderly capital flow and healthy business behavior; conversely, if the enterprise's transaction amounts are scattered and have no obvious pattern (e.g., frequent abnormal amounts, small scattered transfers, and other suspicious characteristics), the probability distribution tends to be uniform, and the entropy value increases significantly, revealing that the enterprise may have risks such as money laundering, idle funds, or financial irregularities. Therefore, this application compresses massive amounts of transaction data into a single disorder index, which not only effectively avoids the shortcomings of traditional statistical measures such as mean and variance being sensitive to outliers and unable to characterize distribution patterns, but also provides key features for subsequent multi-indicator fusion and neural network evaluation that can sensitively capture abnormal fluctuations in corporate cash flow, significantly improving the ability to identify hidden financial fraud.

[0014] Furthermore, the third value is obtained by summing the natural logarithm of the total number of accounts of different trading partners and the natural logarithm of the total number of judicial litigations, specifically as follows: The total number of different transaction accounts appearing in all bank statements of each enterprise within a continuous time window is counted, and the natural logarithm of the total number is calculated to obtain the first logarithm result; The total number of legal disputes involving each enterprise within the continuous time window is counted, and the natural logarithm of the sum of the total number of legal disputes and a preset value is calculated to obtain the second logarithm result. The first logarithmic result is added to the second logarithmic result to obtain the third value.

[0015] This application calculates the first logarithm by statistically analyzing the total number of different transaction accounts appearing in all bank statements of various enterprises within a continuous time window and calculating the natural logarithm of this total number. Simultaneously, it calculates the second logarithm by statistically analyzing the total number of legal disputes within the same time window and calculating its natural logarithm. The first and second logarithm results are then added together to obtain the third value. Because the natural logarithm function can smoothly compress rapidly increasing numerical values, the indicators are comparable between enterprises of different sizes. Furthermore, the addition operation organically integrates information from two dimensions: "the degree of dispersion of transaction accounts" and "the degree of exposure to legal risks." If an enterprise has a large number of transaction accounts (corresponding to a large natural logarithm) and a high number of lawsuits (corresponding to a large natural logarithm), the third value will be significantly higher, reflecting that the enterprise may have a complex network of related-party transactions or a high risk of legal disputes, and that fund transactions may involve illegal entities, thus increasing the probability of credit default. Conversely, if an enterprise's transaction accounts are relatively concentrated and its litigation records are few, the third value will be smaller, indicating that the enterprise's operating environment is relatively simple and legal risks are controllable. Therefore, this application unifies the originally isolated and different-dimensional transaction dispersion indicators and judicial risk indicators into a single composite feature through logarithmic transformation and addition. This avoids the drawback of large numbers dominating small numbers in simple linear addition, while maintaining the sensitivity and distinguishability of the feature to the two types of risks. It provides a more comprehensive and discriminative input dimension for subsequent neural network models, thereby improving the comprehensiveness and accuracy of credit risk assessment.

[0016] Furthermore, the step of combining the first, second, and third values ​​to generate an initial embedding vector specifically involves: The first, second, and third values ​​are normalized to their minimum and maximum values ​​respectively. The first value after the minimum and maximum value normalization is determined as the tax burden fluctuation indicator, the second value after the minimum and maximum value normalization is determined as the capital diversification indicator, and the third value after the minimum and maximum value normalization is determined as the comprehensive risk indicator. The sum of the tax burden fluctuation index and the capital diversification index is calculated to obtain the business behavior consistency index; the sum of the capital diversification index and the comprehensive risk index is calculated to obtain the capital chain security index; the sum of the tax burden fluctuation index and the comprehensive risk index is calculated to obtain the business stability index. The tax burden fluctuation index, capital diversification index, comprehensive risk index, business behavior consistency index, capital chain security index, and business stability index are arranged in a preset order to construct a six-dimensional feature vector; The six-dimensional feature vector is superimposed with a preset bias vector to obtain an initial embedding vector.

[0017] This application normalizes the first, second, and third values ​​using minimum-maximum normalization, and then determines the normalized results as the tax burden volatility index, capital diversification index, and comprehensive risk index, respectively. This eliminates the dimensional impact caused by inherent differences in scale and industry among different enterprises, mapping all three basic indicators to the same comparable scale range. Based on this, the sum of the tax burden volatility index and the capital diversification index yields the business behavior consistency index; the sum of the capital diversification index and the comprehensive risk index yields the capital chain security index; and the sum of the tax burden volatility index and the comprehensive risk index yields the business stability index. By adding these two in pairs, the original three independent dimensions are cross-integrated to generate three composite indicators with business interpretability, amplifying the limitations of a single indicator. The captured collaborative risk signals (e.g., when large tax burden fluctuations and high capital dispersion occur simultaneously, the consistency index of business behavior will increase significantly, thereby strengthening the identification of business disorder) also avoid information redundancy caused by direct splicing. Then, the tax burden fluctuation index, capital dispersion index, comprehensive risk index, and the above three composite indices are arranged in a preset order to construct a six-dimensional feature vector. This expands the original low-dimensional feature space containing only three statistics into a six-dimensional space containing the original indicators and interaction indices, significantly enriching the information capacity of the features. Finally, this six-dimensional feature vector is superimposed with a preset bias vector to obtain an initial embedding vector. The bias vector can perform an overall translation of the feature space, making the embedding vector more suitable for the input distribution of the subsequent neural network, thereby reducing the difficulty of model training and accelerating convergence. In summary, this application, through a combination of normalization, feature cross construction, and bias superposition, transforms the original three risk-related values ​​into an initial embedding vector with higher information density, uniform scale, and learnability, providing a better input representation for multi-layer neural networks, thereby effectively improving the accuracy of default probability prediction and the training efficiency of the model.

[0018] Furthermore, the initial embedding vector is input into a preset multi-layer neural network, so that the prototype metric layer of the multi-layer neural network calculates the Euclidean distance between the initial embedding vector and the preset risk prototype vector, and outputs the default probability score after normalization of the reciprocal of the Euclidean distance. Specifically: The initial embedding vector is input into the feature transformation layer of the multilayer neural network, so that the feature transformation layer performs a non-linear mapping on the initial embedding vector and outputs a deep feature vector. The deep feature vector is input to the prototype metric layer; so that the prototype metric layer calculates the first Euclidean distance between the deep feature vector and the prototype vector of the defaulting enterprise, calculates the second Euclidean distance between the deep feature vector and the prototype vector of the non-defaulting enterprise, and calculates the third Euclidean distance between the deep feature vector and the prototype vector of the edge sample. The preset risk prototype vector includes the defaulting enterprise prototype vector, the non-defaulting enterprise prototype vector, and the marginal sample prototype vector stored in the prototype measurement layer; the marginal sample prototype vector is determined by clustering data samples that are pre-marked as disputed samples in the preset historical loan database; the disputed samples are pre-marked samples that are at the fuzzy boundary between default and non-default. Calculate the first reciprocal of the first Euclidean distance, the second reciprocal of the second Euclidean distance, and the third reciprocal of the third Euclidean distance, respectively. When the third reciprocal is greater than the first reciprocal and greater than the second reciprocal, the default probability score is set to a preset fuzzy boundary score; Otherwise, the first reciprocal, the second reciprocal, and the third reciprocal are normalized to output the default probability score.

[0019] This application first extracts deep feature vectors by inputting the initial embedding vector into the feature transformation layer of a multi-layer neural network, using nonlinear mapping to make the original features more discriminative in a higher-dimensional abstract space. Then, this deep feature vector is input into the prototype measurement layer, where three Euclidean distances are calculated between it and the prototype vectors of defaulting, non-defaulting, and marginal samples, respectively, and their reciprocals are further calculated. Since a smaller distance indicates a greater similarity between the sample and its corresponding prototype, and a larger reciprocal, the relationship between the three reciprocals directly reflects the degree of affinity between the sample and the three types of prototypes in the feature space: when the third reciprocal (the reciprocal of the distance to the marginal sample prototype) is greater than both the first and second reciprocals, it indicates that the sample is closest to the marginal sample prototype in the feature space, i.e., it is in the fuzzy boundary region between default and non-default. In this case, this application sets the default probability score to a preset fuzzy boundary score, indicating that the enterprise needs manual intervention for review, thus effectively avoiding forced misjudgment of boundary samples caused by simple binary classification; when the third reciprocal is less than or equal to the first or second reciprocal, a clear default probability score is output based on the normalization of the three reciprocals. By introducing edge sample prototype vectors and their corresponding judgment logic, this application solves the technical deficiency of traditional prototype networks, which can only handle two types of clear samples and are difficult to deal with a large number of enterprises with ambiguous boundaries in credit scenarios (such as enterprises with unstable operating status, enterprises that are about to default but have not yet defaulted). At the same time, by using the inverse distance and normalization operations, the similarity between samples and different prototypes is directly mapped to probability values, making the output results both interpretable and accurate, and greatly reducing the risk of missed detections and false alarms caused by misjudgment of edge samples.

[0020] Furthermore, the multilayer neural network is trained based on the historical initial embedding vectors and corresponding default labels of historical loan samples of each enterprise, by minimizing the joint loss of the triplet loss function and the cross-entropy loss function, specifically as follows: Extract samples of enterprises with settled loans from a pre-set historical loan database, and mark each enterprise sample as either a default label or a normal label based on whether the enterprise has a default record. For enterprise samples labeled with default tags, extract the corresponding historical initial embedding vector as anchor samples, randomly select positive samples from enterprise samples with the same default tag, and randomly select negative samples from enterprise samples with normal tags. Calculate the first distance between the anchor sample and the positive sample, calculate the second distance between the anchor sample and the negative sample, and construct a triplet loss function based on the first distance and the second distance; the triplet loss function is used to constrain the first distance to be less than the second distance. The historical initial embedding vector is input into an initial multilayer neural network to obtain the predicted default probability output by the initial multilayer neural network. A cross-entropy loss function is constructed based on the predicted default probability and the default label. The triplet loss function and the cross-entropy loss function are added together with preset weight coefficients to obtain a joint loss function. The network parameters of the initial multilayer neural network are iteratively updated through the backpropagation algorithm until the joint loss function converges, thus obtaining the multilayer neural network.

[0021] This application extracts samples of enterprises with settled loans from a pre-defined historical loan database and labels them as either defaulted or normal based on whether a default record has occurred, providing a supervisory signal with real default results for model training. Based on this, for enterprise samples labeled as defaulted, the corresponding historical initial embedding vector is extracted as anchor samples. Simultaneously, positive samples are randomly selected from samples with the same default label, and negative samples are randomly selected from samples with normal labels. The first distance between the anchor and the positive sample, and the second distance between the anchor and the negative sample are calculated respectively. A triplet loss function is constructed to constrain the first distance to be less than the second distance, thereby forcing defaulted samples to be closer to each other in the feature space while moving further away from normal samples, significantly improving the inter-class discriminative power and intra-class compactness of the feature space. Simultaneously, the historical initial embedding vector is input into an initial multi-layer neural network to obtain the predicted default probability, and a cross-entropy loss function is constructed with the real default labels, enabling the model to directly optimize classification accuracy. Finally, the triplet loss and cross-entropy loss are added according to preset weight coefficients to form a joint loss, and the network parameters are iteratively updated through a backpropagation algorithm until convergence. Because triplet loss compensates for the shortcomings of cross-entropy loss, which only focuses on the classification boundary and ignores the structure of the feature space, and cross-entropy loss compensates for the shortcomings of triplet loss, which may ignore the optimization of the overall classification surface, the synergistic effect of the two enables the trained multilayer neural network to learn deep feature representations with strong discriminative power and output well-calibrated default probability scores. This enables accurate separation of normal enterprises from defaulting enterprises in credit risk assessment, especially for samples near the boundary in the feature space, which has stronger robustness and effectively reduces the risk of misjudgment caused by feature confusion.

[0022] Furthermore, the step of determining the risk level label corresponding to each loan applicant company based on the affiliation between the default probability score and multiple preset risk threshold intervals specifically involves: If the default probability score is equal to the preset fuzzy boundary score, then the risk level label is set as a pending review identifier; If the default probability score is not equal to the preset fuzzy boundary score, obtain the minimum deviation distance between the default probability score and the respective boundary values ​​of the preset low-risk threshold interval, the preset medium-risk threshold interval, and the preset high-risk threshold interval; wherein, the minimum deviation distance is the minimum absolute difference between the default probability score and all boundary values ​​of the corresponding interval. The risk threshold interval to which the boundary value corresponding to the minimum deviation distance belongs is determined as the candidate risk interval; When the minimum deviation distance is less than the preset fuzzy judgment threshold, the risk level label is set as a sign to be reviewed; When the minimum deviation distance is greater than or equal to the fuzzy judgment threshold, the risk level label corresponding to the candidate risk interval is determined as the risk level label corresponding to each loan application enterprise.

[0023] This application quantifies the spatial distance relationship between the score and each risk level by obtaining the minimum deviation distance between the default probability score and the boundary values ​​of preset low, medium, and high risk threshold intervals (i.e., the minimum absolute difference between the score and all boundary values ​​of each interval), and determining the interval to which the boundary value corresponding to the minimum deviation distance belongs as the candidate risk interval. When the score falls exactly on the common boundary of two adjacent intervals, the interval with the lowest risk level is determined as the candidate risk interval. This rule avoids ambiguity in boundary assignment and ensures a unique mapping of the score. Based on this, the minimum deviation distance is compared with a preset fuzzy judgment threshold: if the minimum deviation distance is less than the threshold, it indicates that the default probability score is in the critical fuzzy zone between two risk intervals (e.g., adjacent to the boundary between low and medium risk). In this case, a direct hard division may lead to misjudgment. This application sets the risk level label as a pending review mark and submits it to manual intervention for final judgment; if the minimum deviation distance is greater than or equal to the threshold, the score is far from the boundary, and the risk level label corresponding to the candidate risk interval can be directly output. By introducing a membership determination mechanism that combines "minimum deviation distance" and "fuzzy judgment threshold", this application not only solves the technical problem that traditional hard threshold division methods are prone to misjudgment at the boundary, but also retains the manual review channel in high-risk and sensitive decision-making scenarios through the pending review mark, thereby achieving a reasonable balance between automated assessment efficiency and decision security, and effectively reducing the probability of credit risk mismatch caused by scoring critical fluctuations.

[0024] Secondly, this application provides a credit risk intelligent assessment system based on a multi-layer neural network. The multi-layer neural network-based credit risk intelligent assessment system includes: The acquisition module is used to acquire images of tax returns, bank statements, and legal litigation records from various companies applying for loans. The recognition module is used to perform optical character recognition on images of tax return forms, bank statements, and legal litigation records, and to extract the VAT output tax, VAT input tax, bank transaction amount, transaction counterparty account, and number of legal litigations for each enterprise within a continuous time window. The calculation module is used to calculate the coefficient of variation of the ratio of monthly VAT output tax to VAT input tax for each enterprise, to obtain the first value; calculate the Gibbs distribution entropy of the total bank transaction amount for each enterprise, to obtain the second value; calculate the sum of the natural logarithm of the total number of accounts of different transaction objects and the natural logarithm of the total number of judicial litigations, to obtain the third value; and combine the first value, the second value and the third value to generate an initial embedding vector. The prediction module is used to input the initial embedding vector into a preset multi-layer neural network, so that the prototype metric layer of the multi-layer neural network calculates the Euclidean distance between the initial embedding vector and the preset risk prototype vector, and outputs the default probability score after normalizing the reciprocal of the Euclidean distance. The multilayer neural network is trained by minimizing the joint loss of the triplet loss function and the cross-entropy loss function based on the historical initial embedding vectors and corresponding default labels of historical loan samples of each enterprise. The assessment module is used to determine the risk level label corresponding to each loan applicant company based on the affiliation between the default probability score and multiple preset risk threshold intervals.

[0025] This application automatically collects images of tax returns, bank statements, and legal litigation records through an acquisition module. The recognition module uses optical character recognition to extract key information such as VAT input and output, transaction amounts, transaction counterparty accounts, and the number of lawsuits. The calculation module then converts this information into the coefficient of variation of tax burden fluctuations, the Gibbs distribution entropy of cash flow, and the sum of the logarithms of transaction dispersion and the number of lawsuits. These three statistics are combined into an initial embedding vector, achieving end-to-end automated conversion from unstructured images to structured risk features, avoiding errors and inefficiencies associated with manual data entry. The prediction module utilizes a multi-layer neural network jointly trained with triplet loss and cross-entropy loss. The system extracts deep features through a feature transformation layer, and then calculates the inverse Euclidean distance between the model and the prototype vectors of defaulted, non-defaulted, and marginal samples using a prototype metric layer, normalizing the results to output a default probability score. By introducing the prototype vector of marginal samples, the model can effectively identify fuzzy samples on the default boundary and output a verification label, thus overcoming the shortcomings of traditional binary classification models in discriminating against boundary samples. Finally, the evaluation module dynamically determines the risk level label based on the minimum deviation distance between the default probability score and each risk threshold interval, as well as a preset fuzzy judgment threshold. When the score approaches the interval boundary, manual verification is automatically triggered, achieving an organic combination of automated assessment and risk mitigation. The entire system forms a closed loop from data collection, feature extraction, model prediction to risk level determination. The collaborative work of each module significantly improves the comprehensiveness, accuracy, and security of credit risk assessment, reducing the risk of credit losses caused by data silos, coarse features, and misjudgments of boundary samples. Attached Figure Description

[0026] Figure 1 : A schematic flowchart of an embodiment of the intelligent credit risk assessment method based on multi-layer neural networks provided in this application; Figure 2 : A schematic diagram of an embodiment of the intelligent credit risk assessment system based on a multi-layer neural network provided in this application. Detailed Implementation

[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0028] Example 1 Please refer to Figure 1 In order to solve the problem that existing technologies cannot accurately and efficiently measure credit risk levels, this invention provides a credit risk intelligent assessment method based on multi-layer neural networks, including steps S01-S05.

[0029] S01: Obtain images of tax returns, bank statements, and legal records of the companies applying for loans; As a preferred embodiment of this example, the acquisition of tax return images, bank statement images, and legal litigation record images of each enterprise applying for loans specifically involves: In the specific implementation process, obtaining images of tax returns, bank statements, and legal litigation records from various companies applying for loans can be achieved through the following methods.

[0030] This embodiment pre-configures three independent application programming interfaces (APIs) to establish secure connections with the tax administration system, a pre-set commercial bank system, and the judicial document disclosure website, respectively. For each enterprise applying for a loan, a tax data query request is initiated to the tax administration system based on its unified social credit code. After verifying the enterprise's identity and query permissions, the tax administration system returns scanned images of the enterprise's value-added tax (VAT) tax returns for the past three complete fiscal years. These scanned images are typically in PDF or JPEG format and contain original images of key fields such as the return number, the applicable tax period, total output tax, and total input tax.

[0031] Simultaneously, based on the corporate bank account information provided by the company (including the bank name, account number, and account name), a transaction history query request is initiated to the pre-set commercial bank system. The commercial bank system responds to the request, returning scanned images of bank statements detailing each transaction for the company's corresponding account within a continuous time window (e.g., the past 24 months). Each statement image includes information such as the transaction date, transaction amount, counterparty account number, and transaction summary.

[0032] Furthermore, this embodiment initiates a litigation information retrieval request to the Judicial Documents Disclosure Website based on the company's full name. The Judicial Documents Disclosure Website returns all judicial document pages related to the company name. This embodiment extracts images of documents containing case names, case numbers, and judgment results from these pages. To improve the comprehensiveness of the retrieval, a multi-dimensional search can also be performed using the company's unified social credit code or the name of its legal representative to ensure coverage of all litigation records.

[0033] To ensure the continuity and integrity of data acquisition, a scheduled task can be set to automatically acquire incremental data through the aforementioned interface at regular intervals (such as daily or weekly) and supplement missing or abnormal images. All acquired image data is categorized and stored according to fields such as enterprise identifier, data source, and acquisition timestamp, forming a structured multi-source image dataset to prepare for subsequent optical character recognition.

[0034] In the above implementation, different data sources are connected through a preset application programming interface. The enterprise's unified social credit code, corporate bank account information, and full name text are used as unique identifiers to achieve automated and standardized acquisition of three types of images: tax, bank statements, and judicial litigation. No manual intervention is required, which ensures the accuracy and timeliness of the data and lays a reliable data foundation for subsequent risk feature extraction.

[0035] S02: Perform optical character recognition on images of tax return forms, bank statements, and legal litigation records to extract the VAT output tax, VAT input tax, bank transaction amount, transaction counterparty account, and number of legal litigations for each enterprise within a continuous time window; As a preferred embodiment of this example, the step of performing optical character recognition on the tax return image, bank statement image, and legal litigation record image to extract the VAT output tax, VAT input tax, bank transaction amount, transaction counterparty account, and number of legal litigation cases for each enterprise within a continuous time window specifically involves: First, the scanned images of the collected VAT tax returns are input into the optical character recognition (OCR) engine. This engine is pre-trained and can recognize Chinese characters, numbers, and table structures. For each VAT tax return image, the OCR engine first performs image preprocessing, including grayscale conversion, binarization, tilt correction, and noise reduction, to improve the accuracy of character recognition. Then, based on layout analysis technology, it identifies the table areas in the image and locates the row and column positions of "Total Output Tax" and "Total Input Tax." For each month or quarter's return, this embodiment extracts the corresponding output tax and input tax values ​​and associates these values ​​with the tax period to which the return belongs (e.g., January 2024). For a continuous time window (e.g., the past 24 months), this embodiment repeats the above operations month by month, ultimately obtaining the VAT output tax sequence and input tax sequence for each enterprise within each month of the time window.

[0036] For scanned bank statement images, an OCR engine is also used for preprocessing and text recognition. Since the format of bank statements varies from bank to bank, a template library of bank statements for different banks is pre-built, containing location information for fields such as transaction date, transaction amount, counterparty account number, and transaction summary. During recognition, the corresponding template is automatically matched based on the bank logo in the image. Then, image sub-regions for each field are cropped according to the coordinate areas defined in the template, and character recognition is performed on these sub-regions. For transaction amounts, the OCR engine recognizes numbers and decimal points, removes possible currency symbols and thousands separators, and converts them to numeric types. For counterparty account numbers, consecutive numbers of ten to twenty digits are recognized, and spaces and special symbols are removed. All recognized transaction records are sorted by transaction date to form a sequence of bank statement transaction amounts and corresponding counterparty account lists for the enterprise within a continuous time window.

[0037] For images of judicial litigation records, textual content such as case name, case number, and judgment result are identified using OCR from document pages captured from the judicial document disclosure website. The case name typically includes the full name of the company and the case type (e.g., "loan contract dispute"), which helps determine whether the company is a party involved in the litigation. The judgment result section contains keywords such as "judgment," "ruling," and "mediation," which help determine whether the case has had an adverse impact on the company. For each company, the total number of litigation records within a continuous time window is counted to obtain the number of judicial litigation cases.

[0038] To ensure the accuracy of the extracted data, a verification mechanism is implemented: for VAT input and output tax, it checks whether the output tax is greater than or equal to the input tax (under normal circumstances) and whether the values ​​are within a reasonable range; for bank transaction amounts, it checks for negative values ​​or abnormally large amounts; for the number of lawsuits, it checks whether the case name actually contains the company name. Fields with low confidence in the identification results (e.g., character recognition rate below 90%) are marked as suspicious and trigger manual review or re-collection of images for secondary identification. All verified structured data (monthly input and output tax, transaction amounts and counterparty accounts, number of lawsuits) are stored in a relational database according to company identifiers and timestamps for subsequent calculation of the first, second, and third values.

[0039] Through the above OCR and extraction process, this embodiment transforms unstructured image data into structured numerical data, providing accurate and efficient input for subsequent statistical calculations such as the coefficient of variation, Gibbs distribution entropy, and logarithmic summation, while ensuring the traceability and reliability of the data extraction process.

[0040] S03: Calculate the coefficient of variation of the ratio of monthly output VAT to input VAT for each enterprise to obtain the first value; calculate the Gibbs distribution entropy of all bank transaction amounts for each enterprise to obtain the second value; calculate the sum of the natural logarithm of the total number of accounts of different transaction objects and the natural logarithm of the total number of judicial litigations to obtain the third value; combine the first value, the second value and the third value to generate the initial embedding vector. In a preferred embodiment of this invention, the calculation of the coefficient of variation of the ratio of monthly VAT output tax to VAT input tax for each enterprise yields a first value; the calculation of the Gibbs distribution entropy of all bank transaction amounts for each enterprise yields a second value; the calculation of the sum of the natural logarithm of the total number of accounts of different transaction counterparties and the natural logarithm of the total number of judicial litigation cases yields a third value; and the combination of the first, second, and third values ​​generates an initial embedding vector, specifically as follows: (a) Calculate the first value (coefficient of variation): First, the VAT output tax and VAT input tax for each enterprise are retrieved from the database for each month within a consecutive N-month time window. Here, N is a positive integer, typically 12, 18, or 24, for example, using the past 24 months as the time window. For each enterprise, this embodiment calculates the ratio of output tax to input tax for each month, i.e., ratio = monthly output tax / monthly input tax. If the input tax for a given month is zero, that month is marked as invalid, removed from the N initial ratios, and the N is subtracted before recalculation. After monthly calculations, N initial ratios are obtained, denoted as r1, r2, ..., rN.

[0041] Next, this embodiment calculates the arithmetic mean and standard deviation of these N initial ratios. The arithmetic mean μ = (r1 + r2 + ... + rN) / N. The standard deviation σ = sqrt(((r1-μ)^2 + (r2-μ)^2 + ... + (rN-μ)^2) / N). Finally, the standard deviation is divided by the arithmetic mean, i.e., the first value = σ / μ. This first value is the coefficient of variation, reflecting the relative fluctuation of the company's input-output ratio within a continuous time window. The larger the coefficient of variation, the more unstable the matching of input and output, and the higher the operational risk; the smaller the coefficient of variation, the smoother the fluctuation of the company's tax burden, and the more stable the operation.

[0042] (ii) Calculate the second value (Gibbs distribution entropy): This embodiment reads all bank transaction amounts of each enterprise within a continuous time window from the database, forming a transaction amount sequence, denoted as A = [a1, a2, ..., aM], where M is the total number of transactions within the time window. To calculate the Gibbs distribution entropy, the transaction amount sequence is first binned. Specifically, this embodiment presets multiple amount ranges (bins) based on the enterprise's industry and transaction size, such as: 0-1000 yuan, 1000-5000 yuan, 5000-10000 yuan, 10,000-50,000 yuan, 50,000-100,000 yuan, 100,000-500,000 yuan, and over 500,000 yuan. Each transaction amount is assigned to the corresponding amount range based on its value. The frequency of each state (amount range) is counted. Suppose there are K states, and the frequency of the i-th state is fi, then its frequency pi = fi / M, and the sum of all pi is 1. The frequency distribution of all states constitutes the Gibbs probability distribution P = {p1, p2, ..., pK}.

[0043] Based on this Gibbs probability distribution, this embodiment calculates the second value, namely the Gibbs distribution entropy. The formula for calculating the entropy is: H = -Σ (pi) The entropy is calculated as ln(pi), where Σ represents the summation over all states, and ln is the logarithm to the base e. Specifically, for each state i, pi is multiplied by ln(pi), then the products of all states are summed, and the negative value is taken to obtain the second value. The larger the entropy value, the more dispersed and disordered the distribution of bank transaction amounts, the lower the predictability of corporate cash flow, and the higher the potential risk to the capital chain; the smaller the entropy value, the more concentrated the transaction amounts are in a few intervals, the stronger the regularity of cash flow, and the more normal the operation.

[0044] (iii) Calculate the third value (logarithmic summation): The bank transaction records of each enterprise within a continuous time window are read from the database, and the total number of different counterparty accounts is counted. Specifically, the counterparty accounts (or counterparty account numbers) appearing in all bank transactions are extracted, duplicates are removed, and the number of unique accounts is counted, denoted as U. Then, the natural logarithm of this number is calculated, i.e., the first logarithm result = ln(U). At the same time, the total number of judicial litigation records of the enterprise within the same continuous time window is read from the database, denoted as L. The natural logarithm of the sum of the total number of records and a preset value (the preset value is set to 1) is calculated, i.e., the second logarithm result = ln(L+1) (when L=0, ln(1)=0). Finally, the first logarithm result and the second logarithm result are added together to obtain the third value = ln(U) + ln(L+1). This third value comprehensively reflects the degree of dispersion of the enterprise's counterparties and the degree of exposure to legal risks. The larger the value, the more complex the related-party transactions of the enterprise, the higher the litigation risk, and the greater the possibility of default.

[0045] (iv) Combine the first, second, and third values ​​to generate the initial embedding vector: This embodiment first performs minimum-maximum normalization on the first, second, and third values. Specifically, it collects the set of first values ​​for all enterprises, finds the minimum value min1 and the maximum value max1, and for each enterprise's first value x1, the normalized value is (x1 - min1) / (max1 - min1). Similarly, it normalizes the second and third values ​​so that each value maps to the interval [0,1]. The normalized first value is determined as the tax burden fluctuation indicator, the normalized second value is determined as the capital diversification indicator, and the normalized third value is determined as the comprehensive risk indicator.

[0046] To enhance the characterization ability of the features, this embodiment further constructs three composite indicators through feature cross-construction: The sum of the tax burden volatility indicator and the capital dispersion indicator yields the business behavior consistency indicator; a higher indicator indicates that the enterprise's tax burden volatility and capital dispersion are both high, resulting in poor business consistency. The sum of the capital dispersion indicator and the comprehensive risk indicator yields the capital chain security indicator; a higher indicator indicates a high degree of capital disorder and litigation risk, suggesting potential risks to the capital chain. The sum of the tax burden volatility indicator and the comprehensive risk indicator yields the business stability indicator; a higher indicator reflects unstable tax burden and high legal risk, indicating overall business instability.

[0047] Next, the six indicators (tax burden fluctuation indicator, capital diversification indicator, comprehensive risk indicator, business behavior consistency indicator, capital chain security indicator, and business stability indicator) are arranged in a preset order to form a six-dimensional feature vector. The preset order can be the one listed above or adjusted based on experience. To make this feature vector more suitable for input into the subsequent multi-layer neural network, this embodiment also superimposes the six-dimensional feature vector with a preset bias vector. The bias vector has the same dimension as the six-dimensional feature vector, and its initial value can be set to a zero vector or optimized as a learnable parameter during model training. The superposition operation is the addition of corresponding dimensions, and the result is the initial embedding vector. This initial embedding vector integrates the original risk statistics and the composite indicators obtained through feature cross-validation, preserving basic information while incorporating the interaction effects between indicators, providing a rich and scale-uniform input representation for subsequent neural network prediction.

[0048] Through the above steps, the original tax, bank statements, and judicial data are transformed into a low-dimensional, learnable initial embedding vector, realizing end-to-end automated construction of structured risk features from multi-source heterogeneous data.

[0049] S04: Input the initial embedding vector into a preset multi-layer neural network so that the prototype metric layer of the multi-layer neural network calculates the Euclidean distance between the initial embedding vector and the preset risk prototype vector, and outputs the default probability score after normalizing the reciprocal of the Euclidean distance. The multilayer neural network is trained by minimizing the joint loss of the triplet loss function and the cross-entropy loss function based on the historical initial embedding vectors and corresponding default labels of historical loan samples of each enterprise. In a preferred embodiment of this invention, the initial embedding vector is input into a preset multi-layer neural network, so that the prototype metric layer of the multi-layer neural network calculates the Euclidean distance between the initial embedding vector and the preset risk prototype vector, and the reciprocal of the Euclidean distance is normalized and then output as a default probability score. Specifically: The multi-layer neural network consists of an input layer, a feature transformation layer, and a prototype metric layer connected in series. The input layer receives the initial embedding vector generated in the preceding steps. The feature transformation layer is composed of multiple fully connected hidden layers stacked on top of each other. Each fully connected layer is followed by a non-linear activation function (e.g., a linear rectified function) and an optional batch normalization layer, used to perform a non-linear transformation on the initial embedding vector to extract higher-level deep feature vectors. The prototype metric layer is the core of the network, pre-storing three risk prototype vectors: a defaulting enterprise prototype vector, a non-defaulting enterprise prototype vector, and a marginal sample prototype vector. The dimensions of these three prototype vectors are the same as the dimensions of the deep feature vectors output by the feature transformation layer. The initial value of the marginal sample prototype vector is determined as follows: Before training begins, a preliminary classifier (e.g., logistic regression) is trained based on the default labels of historical loan samples and historical initial embedding vectors. Samples whose predicted probabilities fall within a preset boundary region (e.g., 0.4-0.6) are labeled as disputed samples. The historical initial embedding vectors of these disputed samples are clustered using the K-means clustering algorithm, and the resulting cluster centers are used as the initial values ​​of the marginal sample prototype vectors. The initial values ​​for the prototype vectors of defaulting and non-defaulting companies can be randomly set. All three prototype vectors are fine-tuned and optimized through backpropagation during subsequent joint training.

[0050] When an initial embedding vector of a company to be evaluated is input, it is first fed into a feature transformation layer. This layer transforms the initial embedding vector into a deep feature vector through a multi-layer fully connected network and a non-linear mapping of activation functions. This deep feature vector can more effectively represent the company's overall risk pattern in the feature space.

[0051] Subsequently, the deep feature vector is input into the prototype metric layer. In this embodiment, the Euclidean distance between the deep feature vector and the prototype vectors of defaulting companies, non-defaulting companies, and marginal samples is calculated. The Euclidean distance is calculated as follows: subtract the values ​​of corresponding dimensions of the two vectors to obtain the difference, square each difference, sum the results, and then take the square root of the sum. The smaller the distance, the more similar the deep feature vector is to its corresponding prototype vector.

[0052] To convert distance to similarity (closer distances indicate greater similarity), the reciprocals of the three Euclidean distances are calculated. To avoid the extreme case of a zero denominator, a very small positive number is added to each distance in the actual calculation. Thus, when the distance is small, the reciprocal is large; when the distance is large, the reciprocal is small. The three reciprocals represent the original similarity of samples belonging to defaulting companies, non-defaulting companies, and marginal samples, respectively.

[0053] The output method is determined by the relative magnitude of these three reciprocals: If the reciprocal of the prototype vector of the marginal sample is greater than the reciprocal of the prototype vectors of both defaulting and non-defaulting companies, it indicates that the deep feature vector is closest to the marginal sample prototype in the feature space, meaning the company is in the fuzzy boundary region between default and non-default. In this case, the default probability score is set to a preset fuzzy boundary score (e.g., -1 or a specific value). This fuzzy boundary score is used to indicate that the loan applicant company needs manual review, avoiding the risk of misjudgment from automated decision-making.

[0054] Otherwise, it indicates that the sample does not belong to the fuzzy boundary, and a clear probability score can be output. In this case, the three reciprocals are treated as a three-dimensional array and normalized. Normalization can be achieved using summation normalization, where each reciprocal is divided by the sum of the three reciprocals, resulting in a sum of one normalized value. After normalization, the three values ​​represent the probability that the sample belongs to the default, non-default, and marginal classes, respectively. The normalized value corresponding to the defaulting enterprise prototype vector is the default probability score required in this embodiment. This score typically ranges from zero to one; the closer the value is to one, the higher the default risk.

[0055] Furthermore, the multilayer neural network is trained based on the historical initial embedding vectors and corresponding default labels of historical loan samples of each enterprise, by minimizing the joint loss of the triplet loss function and the cross-entropy loss function, specifically as follows: Extract samples of enterprises whose loans have been settled from a pre-defined historical loan database. For each sample, label it as either a defaulter or a normal entity based on whether it has an actual default record. Simultaneously, calculate the initial historical embedding vector for each sample using the same method described above.

[0056] Specifically, before training begins, a pre-defined list of disputed samples is selected from historical loan samples. These disputed samples refer to those in the historical default labeling that fall within the ambiguous boundary between default and non-default (e.g., samples whose initial historical embedding vectors are close to both default and non-default prototypes). The deep feature vectors of these disputed samples are then clustered using a clustering algorithm (e.g., K-means clustering), and the resulting cluster centers are used as the initial values ​​for the prototype vectors of the edge samples. These initial values ​​are then fine-tuned through backpropagation during subsequent joint training.

[0057] During training, a joint optimization approach using the triplet loss function and the cross-entropy loss function is employed. Specifically: For the triplet loss, one sample is selected from those labeled as defaulters as the anchor sample. Then, another different sample from the same defaulter class is randomly selected as the positive sample (belonging to the same class as the anchor). Finally, one sample from the normal-labeled samples is randomly selected as the negative sample (belonging to a different class than the anchor). Next, the Euclidean distance (first distance) between the deep feature vectors of the anchor sample and the positive sample, and the Euclidean distance (second distance) between the deep feature vectors of the anchor sample and the negative sample are calculated. The design goal of the triplet loss function is to force the first distance to be less than the second distance, and the difference between the two to be at least greater than a certain preset margin parameter. For example, the margin parameter can be 0.2. If the first distance plus the margin parameter is still less than the second distance, the loss is zero; otherwise, the loss is the first distance plus the margin parameter minus the second distance. By minimizing this loss, defaulters are brought closer to each other in the feature space while moving away from normal samples, thus forming clear inter-class boundaries.

[0058] Simultaneously, this embodiment also inputs the initial embedding vector of each historical sample into the current multi-layer neural network to obtain the network's predicted default probability score (at this point, the network has not yet converged, and the output is an intermediate value). This predicted score and the sample's true default label are then input into the cross-entropy loss function. The cross-entropy loss function measures the difference between the predicted probability distribution and the true label distribution: if the true label is default, the further the predicted score deviates from one, the greater the loss; if the true label is normal, the further the predicted score deviates from zero, the greater the loss. By minimizing the cross-entropy loss, the default probability score output by the network is forced to be as close as possible to the true label.

[0059] Finally, the triplet loss function and the cross-entropy loss function are added together with preset weights to obtain the joint loss function. For example, the weight of the triplet loss function is set to 0.4, and the weight of the cross-entropy loss function is set to 0.6, with a sum of 1. In practical applications, fine-tuning can be performed based on the performance on the validation set, but the weights must be positive. Using the backpropagation algorithm, the gradient of the joint loss with respect to all network parameters is calculated. These parameters include: the weights and biases of the feature transformation layer, the three prototype vectors in the prototype metric layer, and the bias vector superimposed on the input layer. These parameters are iteratively updated along the gradient descent direction. The above process is repeated until the value of the joint loss function converges below a preset threshold or no longer decreases significantly after multiple iterations. Training is complete, resulting in a trained multilayer neural network.

[0060] Through the above training, the network can not only accurately classify defaulted and normal samples, but also form well-structured clusters in the feature space. At the same time, it can effectively identify samples with ambiguous boundaries through edge sample prototype vectors, thereby outputting more reliable default probability scores or review indicators in actual credit risk assessment.

[0061] S05: Based on the relationship between the default probability score and multiple preset risk threshold intervals, determine the risk level label corresponding to each loan applicant company.

[0062] In a preferred embodiment of this invention, the step of determining the risk level label corresponding to each loan applicant company based on the affiliation between the default probability score and multiple preset risk threshold intervals specifically involves: This embodiment pre-defines three risk threshold intervals: a low-risk interval, a medium-risk interval, and a high-risk interval. Let the low-risk interval be [0, A], the medium-risk interval be (A, B], and the high-risk interval be (B, 1], where A and B are preset boundary thresholds, for example, A = 0.3 and B = 0.6. Within these intervals, the low-risk interval is left-closed and right-closed, while the medium-risk and high-risk intervals are left-open and right-closed, ensuring that each score has a unique assignment: when score s ≤ A, it belongs to low risk; when A ≤ 1, it belongs to high risk.

[0063] For the default probability score s output by the aforementioned multi-layer neural network (s ranges from [0, 1], or is a preset review flag, such as -1), this embodiment first determines whether s is a review flag. If s equals the flag value, the risk level label is also set to a review flag, and the determination process ends. If s is a numerical score, the following steps are performed.

[0064] This embodiment calculates the minimum absolute difference between s and all boundary values ​​of each risk threshold interval. For low-risk intervals, |s-0| and |sA| are calculated, and the smaller of the two is taken as the minimum deviation distance dL for that interval; for medium-risk intervals, |sA| and |sB| are calculated, and the smaller of the two is taken as dM; for high-risk intervals, |sB| and |s-1| are calculated, and the smaller of the two is taken as dH. For example, when s = 0.28, dL = min(|0.28-0|, |0.28-0.3|) = 0.02, dM = min(|0.28-0.3|, |0.28-0.6|) = 0.02, and dH = min(|0.28-0.6|, |0.28-1|) = 0.32.

[0065] ​After obtaining three minimum deviation distances, this embodiment finds the minimum value among them, denoted as d_min = min(dL,dM, dH), and determines the boundary value b_min corresponding to the minimum value (if multiple boundary values reach the minimum value at the same time, any one can be selected, usually A or B). Then, the candidate risk interval R_cand is determined according to the risk threshold interval to which b_min belongs. Specifically: If b_min is a boundary of the low-risk interval (0 or A), then R_cand = the low-risk interval; If b_min is a boundary of the medium-risk interval (A or B), then R_cand = the medium-risk interval; If b_min is a boundary of the high-risk interval (B or 1), then R_cand = the high-risk interval.

[0066] Since this embodiment adopts the above interval definition (low risk [0, A], medium risk (A, B], high risk (B,1]), the boundary value A only belongs to the low-risk interval, and the boundary value B only belongs to the medium-risk interval, so there is no common boundary between two adjacent intervals. For the sake of rigor, if a common boundary occurs due to the adoption of different interval definitions in other implementations (for example, when s = A, it belongs to both low risk and medium risk), it is stipulated that the interval with a lower risk level (i.e., the low-risk interval) is determined as the candidate risk interval.

[0067] After determining the candidate risk interval, this embodiment further determines whether the score is in a fuzzy boundary area that requires manual review. For this purpose, a fuzzy determination threshold delta (for example, delta = 0.05) is preset. The aforementioned obtained minimum deviation distance d_min (that is, the distance from s to its nearest boundary value) is compared with delta: if d_min < delta, it indicates that the score is very close to the boundary of the interval, and it is automatically determined that there is a high risk of misjudgment in this embodiment. The risk level label is set as a pending review identifier, instead of directly outputting low, medium and high labels, but handing it over to manual for further review; if d_min ≥ delta, it indicates that the score is far enough from the boundary and the classification result has high credibility. This embodiment directly outputs the risk level label ("low risk", "medium risk" or "high risk") corresponding to the candidate risk interval as the final risk level label of the loan applying enterprise.

[0068] Through the above membership determination method based on the minimum deviation distance and the fuzzy determination threshold, this embodiment not only realizes the automatic mapping from the default probability score to the risk level label, but also can effectively identify fuzzy samples located near the boundary and trigger manual review, so as to achieve a good balance between automation efficiency and determination accuracy.

[0069] In summary, this application, by acquiring images of tax returns, bank statements, and legal litigation records and performing optical character recognition, can automatically extract key structured information such as VAT input and output, bank transaction details, and litigation frequency from multi-source heterogeneous unstructured data, providing a comprehensive and objective data foundation for credit risk assessment. Furthermore, it calculates the coefficient of variation of the monthly input-output ratio to quantify the stability of tax burden fluctuations, calculates the Gibbs distribution entropy of transaction amounts to characterize the degree of disorder in fund flows, and combines the sum of the logarithms of the number of accounts of the transaction counterparties and the number of litigations to comprehensively reflect the enterprise's related-party risks and legal risks. These three statistical measures are combined to generate an initial embedding vector, thereby transforming the raw data into data with business-related information. The system provides interpretable low-dimensional risk features. Based on this, the embedded vector is input into a multi-layer neural network jointly trained with triplet loss and cross-entropy loss. A prototype metric layer is used to calculate the Euclidean distance between the embedded vector and a preset risk prototype vector, outputting a normalized default probability score. Since triplet loss forces similar default samples to cluster in the feature space while dissimilar samples move away from each other, and cross-entropy loss ensures classification accuracy, the model learns more discriminative feature representations, significantly improving the sensitivity to early default risk identification. Finally, multiple preset risk threshold intervals are used to map the default probability score to specific risk level labels, achieving end-to-end automated intelligent credit risk assessment. Compared with existing technologies, this application not only overcomes the limitations of single data sources and shallow statistical indicators but also effectively improves the ability to distinguish between samples with ambiguous boundaries (such as enterprises on the verge of default) through the original feature construction of a combination of Gibbs entropy, coefficient of variation, and logarithm, and the model design trained with a prototype metric layer and joint loss. This reduces false positive and false negative rates, resulting in higher assessment accuracy and robustness. This application effectively solves the problem that existing technologies cannot accurately and efficiently measure credit risk levels.

[0070] Example 2 Please refer to Figure 2 This is a credit risk intelligent assessment system based on a multi-layer neural network, provided in the embodiments of this application.

[0071] In this embodiment, the credit risk intelligent assessment system based on multi-layer neural networks includes an acquisition module 10, an identification module 20, a calculation module 30, a prediction module 40, and an assessment module 50.

[0072] Module 10 is used to acquire images of tax returns, bank statements, and legal records of each company applying for a loan. The recognition module 20 is used to perform optical character recognition on images of tax return forms, bank statements, and legal litigation records, and to extract the VAT output tax, VAT input tax, bank transaction amount, transaction counterparty account, and number of legal litigations for each enterprise within a continuous time window. The calculation module 30 is used to calculate the coefficient of variation of the ratio of monthly VAT output tax to VAT input tax for each enterprise to obtain the first value; calculate the Gibbs distribution entropy of the total bank transaction amount of each enterprise to obtain the second value; calculate the sum of the natural logarithm of the total number of accounts of different transaction objects and the natural logarithm of the total number of judicial litigations to obtain the third value; and combine the first value, the second value and the third value to generate an initial embedding vector. The prediction module 40 is used to input the initial embedding vector into a preset multi-layer neural network, so that the prototype metric layer of the multi-layer neural network calculates the Euclidean distance between the initial embedding vector and the preset risk prototype vector, and outputs the default probability score after normalizing the reciprocal of the Euclidean distance. The multilayer neural network is trained by minimizing the joint loss of the triplet loss function and the cross-entropy loss function based on the historical initial embedding vectors and corresponding default labels of historical loan samples of each enterprise. The assessment module 50 is used to determine the risk level label corresponding to each loan applicant enterprise based on the affiliation between the default probability score and multiple preset risk threshold intervals.

[0073] For ease of description and brevity, the system embodiments of the present invention include all the implementation methods described in the above embodiments of the intelligent credit risk assessment method based on multi-layer neural networks, and will not be repeated here.

[0074] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A credit risk intelligent assessment method based on multi-layer neural networks, characterized in that, include: Obtain images of tax returns, bank statements, and legal records of the companies applying for loans; Optical character recognition is performed on images of tax return forms, bank statements, and legal litigation records to extract the VAT output tax, VAT input tax, bank transaction amount, transaction counterparty account, and number of legal litigations for each enterprise within a continuous time window. The coefficient of variation of the ratio of monthly output VAT to input VAT for each enterprise is calculated to obtain the first value; the Gibbs distribution entropy of all bank transaction amounts for each enterprise is calculated to obtain the second value; the natural logarithm of the total number of accounts of different transaction objects and the natural logarithm of the total number of judicial litigations are calculated to obtain the third value; the first, second and third values ​​are combined to generate an initial embedding vector. The initial embedding vector is input into a preset multi-layer neural network so that the prototype metric layer of the multi-layer neural network calculates the Euclidean distance between the initial embedding vector and the preset risk prototype vector, and outputs the default probability score after normalizing the reciprocal of the Euclidean distance. The multilayer neural network is trained by minimizing the joint loss of the triplet loss function and the cross-entropy loss function based on the historical initial embedding vectors and corresponding default labels of historical loan samples of each enterprise. Based on the relationship between the default probability score and multiple preset risk threshold ranges, the risk level label corresponding to each loan applicant company is determined.

2. The intelligent credit risk assessment method based on multi-layer neural networks according to claim 1, characterized in that, The images of tax returns, bank statements, and court records of the various companies that obtained the loan applications are specifically as follows: Through the pre-defined application programming interface, it connects to the tax collection and management system, the pre-defined commercial bank system, and the judicial document disclosure website, respectively. Based on the unified social credit code of each enterprise, a tax data query request is initiated to the tax administration system to receive scanned images of value-added tax returns covering the past three complete fiscal years. Based on the corporate bank account information of each enterprise, a transaction query request is initiated to the preset commercial bank system, and scanned images of bank transaction statements detailing each transaction are received. Based on the full names of each enterprise, a request for retrieving litigation information is initiated to the judicial document disclosure website, and document images including case names, case numbers, and judgment results are extracted from the retrieved document pages.

3. The intelligent credit risk assessment method based on multi-layer neural networks according to claim 1, characterized in that, The coefficient of variation of the ratio of monthly VAT output tax to VAT input tax for each enterprise is calculated to obtain the first value, specifically: Obtain the VAT output tax and VAT input tax for each enterprise for each month within a consecutive N-month time window; Calculate the ratio of VAT output tax to VAT input tax for each month in the N consecutive months to obtain N initial ratios; Calculate the arithmetic mean and standard deviation of N initial ratios, and divide the standard deviation by the arithmetic mean to obtain a first value; Wherein, N is a positive integer.

4. The intelligent credit risk assessment method based on multi-layer neural networks according to claim 1, characterized in that, The second value is obtained by calculating the Gibbs distribution entropy of all bank transaction amounts for each enterprise. Obtain all bank transaction amounts for each enterprise within a continuous time window to form a transaction amount sequence; The transaction amount sequence is binned to classify transaction amounts falling within the same preset amount range into the same state, and the frequency of each state is counted to construct a Gibbs probability distribution. Based on the Gibbs probability distribution, the product of the probability value of each state and the logarithmic probability base to the natural constant is calculated, and the sum of the products of all states is then inverted to obtain the second value.

5. The intelligent credit risk assessment method based on a multi-layer neural network according to claim 1, characterized in that, The third value is obtained by summing the natural logarithm of the total number of accounts of different trading partners and the natural logarithm of the total number of judicial litigations. The total number of different transaction accounts appearing in all bank statements of each enterprise within a continuous time window is counted, and the natural logarithm of the total number is calculated to obtain the first logarithm result; The total number of legal disputes involving each enterprise within the continuous time window is counted, and the natural logarithm of the sum of the total number of legal disputes and a preset value is calculated to obtain the second logarithm result. The first logarithmic result is added to the second logarithmic result to obtain the third value.

6. The intelligent credit risk assessment method based on multi-layer neural networks according to claim 1, characterized in that, The step of combining the first, second, and third values ​​to generate the initial embedding vector is as follows: The first, second, and third values ​​are normalized to their minimum and maximum values ​​respectively. The first value after the minimum and maximum value normalization is determined as the tax burden fluctuation indicator, the second value after the minimum and maximum value normalization is determined as the capital diversification indicator, and the third value after the minimum and maximum value normalization is determined as the comprehensive risk indicator. The sum of the tax burden fluctuation index and the capital dispersion index is calculated to obtain the business behavior consistency index; The sum of the fund diversification index and the comprehensive risk index is calculated to obtain the fund chain security index; The sum of the tax burden fluctuation index and the comprehensive risk index is calculated to obtain the operational stability index; The tax burden fluctuation index, capital diversification index, comprehensive risk index, business behavior consistency index, capital chain security index, and business stability index are arranged in a preset order to construct a six-dimensional feature vector; The six-dimensional feature vector is superimposed with a preset bias vector to obtain an initial embedding vector.

7. The intelligent credit risk assessment method based on multi-layer neural networks according to claim 1, characterized in that, The initial embedding vector is input into a preset multi-layer neural network, so that the prototype metric layer of the multi-layer neural network calculates the Euclidean distance between the initial embedding vector and the preset risk prototype vector, and outputs the default probability score after normalization of the reciprocal of the Euclidean distance. Specifically: The initial embedding vector is input into the feature transformation layer of the multilayer neural network, so that the feature transformation layer performs a non-linear mapping on the initial embedding vector and outputs a deep feature vector. The deep feature vector is input to the prototype metric layer; so that the prototype metric layer calculates the first Euclidean distance between the deep feature vector and the prototype vector of the defaulting enterprise, calculates the second Euclidean distance between the deep feature vector and the prototype vector of the non-defaulting enterprise, and calculates the third Euclidean distance between the deep feature vector and the prototype vector of the edge sample. The preset risk prototype vector includes the defaulting enterprise prototype vector, the non-defaulting enterprise prototype vector, and the marginal sample prototype vector stored in the prototype measurement layer; the marginal sample prototype vector is determined by clustering data samples that are pre-marked as disputed samples in the preset historical loan database; the disputed samples are pre-marked samples that are at the fuzzy boundary between default and non-default. Calculate the first reciprocal of the first Euclidean distance, the second reciprocal of the second Euclidean distance, and the third reciprocal of the third Euclidean distance, respectively. When the third reciprocal is greater than the first reciprocal and greater than the second reciprocal, the default probability score is set to a preset fuzzy boundary score; Otherwise, the first reciprocal, the second reciprocal, and the third reciprocal are normalized to output the default probability score.

8. The intelligent credit risk assessment method based on multi-layer neural networks according to claim 1, characterized in that, The multilayer neural network is trained by minimizing the joint loss of the triplet loss function and the cross-entropy loss function based on the historical initial embedding vectors and corresponding default labels of historical loan samples of each enterprise. Specifically: Extract samples of enterprises with settled loans from a pre-set historical loan database, and mark each enterprise sample as either a default label or a normal label based on whether the enterprise has a default record. For enterprise samples labeled with default tags, extract the corresponding historical initial embedding vector as anchor samples, randomly select positive samples from enterprise samples with the same default tag, and randomly select negative samples from enterprise samples with normal tags. Calculate the first distance between the anchor sample and the positive sample, calculate the second distance between the anchor sample and the negative sample, and construct a triplet loss function based on the first distance and the second distance; the triplet loss function is used to constrain the first distance to be less than the second distance. The historical initial embedding vector is input into an initial multilayer neural network to obtain the predicted default probability output by the initial multilayer neural network. A cross-entropy loss function is constructed based on the predicted default probability and the default label. The triplet loss function and the cross-entropy loss function are added together with preset weight coefficients to obtain a joint loss function. The network parameters of the initial multilayer neural network are iteratively updated through the backpropagation algorithm until the joint loss function converges, thus obtaining the multilayer neural network.

9. The intelligent credit risk assessment method based on a multi-layer neural network according to claim 1, characterized in that, The risk level label for each loan applicant is determined based on the affiliation between the default probability score and multiple preset risk threshold intervals, specifically as follows: If the default probability score is equal to the preset fuzzy boundary score, then the risk level label is set as a pending review identifier; If the default probability score is not equal to the preset fuzzy boundary score, obtain the minimum deviation distance between the default probability score and the respective boundary values ​​of the preset low-risk threshold interval, the preset medium-risk threshold interval, and the preset high-risk threshold interval; wherein, the minimum deviation distance is the minimum absolute difference between the default probability score and all boundary values ​​of the corresponding interval. The risk threshold interval to which the boundary value corresponding to the minimum deviation distance belongs is determined as the candidate risk interval; When the minimum deviation distance is less than the preset fuzzy judgment threshold, the risk level label is set as a sign to be reviewed; When the minimum deviation distance is greater than or equal to the fuzzy judgment threshold, the risk level label corresponding to the candidate risk interval is determined as the risk level label corresponding to each loan application enterprise.

10. A credit risk intelligent assessment system based on a multi-layer neural network, characterized in that, include: The acquisition module is used to acquire images of tax returns, bank statements, and legal litigation records from various companies applying for loans. The recognition module is used to perform optical character recognition on images of tax return forms, bank statements, and legal litigation records, and to extract the VAT output tax, VAT input tax, bank transaction amount, transaction counterparty account, and number of legal litigations for each enterprise within a continuous time window. The calculation module is used to calculate the coefficient of variation of the ratio of monthly VAT output tax to VAT input tax for each enterprise, to obtain the first value; calculate the Gibbs distribution entropy of the total bank transaction amount for each enterprise, to obtain the second value; calculate the sum of the natural logarithm of the total number of accounts of different transaction objects and the natural logarithm of the total number of judicial litigations, to obtain the third value; and combine the first value, the second value and the third value to generate an initial embedding vector. The prediction module is used to input the initial embedding vector into a preset multi-layer neural network, so that the prototype metric layer of the multi-layer neural network calculates the Euclidean distance between the initial embedding vector and the preset risk prototype vector, and outputs the default probability score after normalizing the reciprocal of the Euclidean distance. The multilayer neural network is trained by minimizing the joint loss of the triplet loss function and the cross-entropy loss function based on the historical initial embedding vectors and corresponding default labels of historical loan samples of each enterprise. The assessment module is used to determine the risk level label corresponding to each loan applicant company based on the affiliation between the default probability score and multiple preset risk threshold intervals.