Risk identification method and device for credit contract, and computer program product

By preprocessing credit contracts and using the BERT model for text recognition, a risk report is generated, which solves the problem of low accuracy in identifying credit contract risks and achieves rapid and accurate legal risk assessment and legality protection.

CN120996930APending Publication Date: 2025-11-21INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511219304.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-28
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing technologies suffer from low accuracy in risk identification of credit contracts, high maintenance costs for rule engines, and a lack of deep understanding of legal terminology and scenarios in general machine learning models, resulting in insufficient identification accuracy.

Method used

The preprocessing steps include credit terminology conversion, format conversion, segmentation, and character filtering. Combined with the BERT model, text recognition is performed to generate risk reports. The model is optimized through training samples and data augmentation strategies, and is updated regularly to improve accuracy.

Benefits of technology

It enables rapid and accurate identification of credit contract terms and intelligent assessment of legal risks, reduces human error, improves review efficiency, ensures legality and rigor, and enhances the accuracy of risk identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120996930A_ABST
    Figure CN120996930A_ABST
Patent Text Reader

Abstract

The invention discloses a credit contract risk identification method, a credit contract risk identification device and a computer program product. The method relates to the field of artificial intelligence, and comprises the steps: obtaining a to-be-recognized credit contract, and carrying out the preprocessing of the credit contract, and obtaining a target contract text; the target contract text is input into a target model to obtain a text recognition result, the text recognition result comprises at least one of a contract clause classification result, a risk recognition result and a legal clause recommendation result, the target model is obtained by training M groups of training samples, each group of training samples comprises a historical contract text and a historical text recognition result, m is a positive integer; a risk report is generated based on the text recognition result, and the risk report comprises to-be-adjusted contract terms with risks and recommended legal terms needing to be met by the to-be-adjusted contract terms. According to the invention, the problem of low risk identification accuracy of the credit contract in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of artificial intelligence, in particular, to a risk identification method and device for a credit contract and a computer program product. BACKGROUND

[0002] For the review of a credit contract, in the related art, a pre-defined regular expression is used to match the keyword combination in the contract text to trigger risk marking. Based on a series of pre-set risk keywords and their combinations, the legal risk points that may exist in the contract are identified by exact matching. Or a pre-trained machine learning model is used for sequence labeling or classification of the contract text to identify legal entities.

[0003] However, in the contract text, the expression of key legal concepts may vary with the context, such as the clause "part of the responsibility can be exempted in special circumstances". The legality of the word "special circumstances" needs to be evaluated in combination with the specific context, but the rule engine can only identify the literal "exempt" and "responsibility" keywords, which is easy to cause false positives. To ensure coverage of all synonym expressions, the rule engine needs to add a large number of rule variants (for example, the word "responsibility" needs to be expanded to "responsibility|obligation|burden", etc.), and the expansion of such a rule library significantly increases the maintenance cost, especially when the number of rules exceeds 5000, the complexity of maintenance and update increases exponentially.

[0004] Although the general machine learning model has been pre-trained on a large amount of corpus, when dealing with professional fields such as legal contract text, it lacks a deep understanding of legal terminology and scenarios because it has not been exposed to a large amount of legal-related text, resulting in insufficient accuracy in identifying professional terms and concepts in contracts. Even if the model can identify the "interest rate clause" and other key parts in the contract, it cannot further determine whether these clauses meet the requirements of laws and regulations due to its lack of understanding of specific legal clauses and regulations. This makes the model only stay on the surface when identifying clauses, and cannot further judge their legal compliance, thereby reducing the comprehensiveness and accuracy of the review.

[0005] At present, there is no effective solution to the problem of low accuracy of risk identification of credit contracts in the related art. SUMMARY

[0006] The main purpose of the present application is to provide a risk identification method, device and computer program product for a credit contract to solve the problem of low accuracy of risk identification of credit contracts in the related art.

[0007] To achieve the above object, according to one aspect of the present application, a risk identification method of a credit contract is provided. The method comprises: obtaining a credit contract to be identified, preprocessing the credit contract to obtain a target contract text, wherein the preprocessing comprises at least one of the following: credit term conversion, format conversion, segmentation processing and character filtering; inputting the target contract text into a target model to obtain a text recognition result, wherein the text recognition result comprises at least one of the following: a contract clause classification result, a risk identification result and a legal clause recommendation result, the target model is trained by M groups of training samples, each group of training samples comprises a historical contract text and a historical text recognition result, wherein M is a positive integer; generating a risk report based on the text recognition result, wherein the risk report contains a risk-existed contract clause to be adjusted and a recommended legal clause to be met by the contract clause to be adjusted.

[0008] Optionally, the target model is trained in the following manner: obtaining M historical credit contracts and a plurality of legal clauses associated with the credit business, determining a pre-labeled historical text recognition result of each historical credit contract, wherein the historical text recognition result comprises at least one of the following: a historical risk identification result and a historical legal clause recommendation result and a historical contract clause classification result; preprocessing the M historical credit contracts respectively to obtain M historical contract texts, determining each historical contract text and the historical text recognition result corresponding to the historical contract text as a group of training samples, and obtaining M groups of training samples; training a pre-trained language model based on the M groups of training samples to obtain the target model.

[0009] Optionally, after obtaining the M groups of training samples, the method further comprises: generating enhanced training samples from the M groups of training samples through a preset data enhancement strategy, wherein the preset data enhancement strategy comprises at least one of the following: legal term synonym replacement, legal clause structure reorganization and adversarial sample generation; combining the enhanced training samples and the M groups of training samples to obtain updated P groups of training samples, wherein P is a positive integer, and P is greater than M; training the pre-trained language model based on the updated P groups of training samples to obtain an updated target model.

[0010] Optionally, after obtaining the text recognition result, the method further comprises: in the case that the text recognition result has an error, determining an actual text recognition result without error of the target contract text, determining the target contract text and the actual text recognition result as a first newly added training sample; collecting newly added legal clauses every preset period, constructing a second newly added training sample containing the newly added legal clauses based on the newly added legal clauses; adding the first newly added training sample and the second newly added training sample to the M groups of training samples every preset period to obtain updated Q groups of training samples, wherein Q is a positive integer, and Q is greater than M; training the pre-trained language model based on the updated Q groups of training samples to obtain an updated target model.

[0011] Optionally, after generating the risk report based on the text recognition result, the method further comprises: updating the credit contract based on the risk report to obtain a target contract; comparing the target contract and the credit contract to obtain difference content existing between the target contract and the credit contract; and in a case where the difference content belongs to preset key content, sending prompt information, wherein the prompt information is used to indicate that the key content of the credit contract has a modification record.

[0012] Optionally, the preprocessing of the credit contract to obtain the target contract text comprises: extracting N key words from the credit contract, and determining whether the key words are contained in a preset credit term dictionary, wherein N is a positive integer, the credit term dictionary contains a plurality of credit terms and synonyms of each credit term; in a case where the key words are contained in the credit term dictionary, replacing the key words in the credit contract with credit terms corresponding to the key words in the credit term dictionary; and determining H contract terms in the credit contract, and segmenting the credit contract based on each contract term to obtain the target contract text, wherein H is a positive integer.

[0013] Optionally, after obtaining the text recognition result, the method further comprises: determining whether there is a target false positive result in the text recognition result, wherein the target false positive result is a false positive result caused by unconverted legal terms; in a case where there is the target false positive result in the text recognition result, extracting the unconverted target legal terms from the target false positive result; determining an associated credit term associated with the target legal term, and adding the target legal term and the associated credit term to the credit term dictionary.

[0014] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a credit contract risk identification device is provided. The device comprises: a preprocessing unit configured to obtain a credit contract to be identified, and preprocess the credit contract to obtain a target contract text, wherein the preprocessing comprises at least one of the following: credit term conversion, format conversion, segmentation processing and character filtering; an identification unit configured to input the target contract text into a target model to obtain a text recognition result, wherein the text recognition result comprises at least one of the following: a contract term classification result, a risk identification result and a legal term recommendation result, the target model is trained by M groups of training samples, each group of training samples comprises a historical contract text and a historical text recognition result, wherein M is a positive integer; and a generation unit configured to generate a risk report based on the text recognition result, wherein the risk report contains a contract term to be adjusted which has a risk and a recommended legal term to be met by the contract term to be adjusted.

[0015] In the embodiment of the present application, a credit contract to be identified is acquired, the credit contract is preprocessed to obtain a target contract text, wherein the preprocessing includes at least one of the following: credit term conversion, format conversion, segmentation processing and character filtering; the target contract text is input into a target model to obtain a text recognition result, wherein the text recognition result includes at least one of the following: a contract clause classification result, a risk identification result and a legal clause recommendation result, the target model is trained by M groups of training samples, each group of training samples includes a historical contract text and a historical text recognition result, wherein M is a positive integer; a risk report is generated based on the text recognition result, wherein the risk report contains a risk-existed contract clause to be adjusted and a recommended legal clause that needs to be met by the contract clause to be adjusted, through the introduction of the target model and the preprocessing step, the rapid and accurate identification of the contract clause and the intelligent evaluation of the legal risk are realized, a powerful contract review auxiliary tool is provided for the financial institutions, the purpose of reducing human errors, improving the review efficiency and ensuring the legality and rigor of the credit contract is achieved, thereby realizing the technical effect of improving the risk identification accuracy of the credit contract, and further solving the technical problem of low risk identification accuracy of the credit contract. BRIEF DESCRIPTION OF DRAWINGS

[0016] The accompanying drawings, which form a part of this application, are intended to provide further understanding of the application and are incorporated herein in their entirety, which serve to explain the application and are not intended to limit the application. In the drawings:

[0017] Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a credit contract risk identification method is shown;

[0018] Figure 2 A flowchart of a credit contract risk identification method according to an embodiment of the present application is shown;

[0019] Figure 3 A schematic diagram of a credit contract risk identification device according to an embodiment of the present application is shown;

[0020] Figure 4 A structural block diagram of an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.

[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and in the above drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to such a process, method, product or device.

[0023] It should be noted that the information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, analyzed data, etc.) involved in the present application are information and data authorized by the user or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards, necessary security measures are taken, do not violate public order and good customs, and provide corresponding operation portal for user to choose authorization or refusal. For example, the system and related users or institutions are provided with an interface to provide the user with a corresponding operation portal for the user to choose to agree or refuse the automatic decision result; if the user chooses to refuse, the expert decision process is entered.

[0024] Embodiment 1

[0025] According to the embodiments of the present application, a method for risk identification of a credit contract is also provided. It should be noted that the steps shown in the flowchart of the drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown herein.

[0026] The method embodiment provided by the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for risk identification of a credit contract is shown. As Figure 1As shown, the computer terminal 10 (or mobile device) can include one or more processors 102 (processors 102 can include, but are not limited to, processing devices such as MCUs (Microcontroller Units) or FPGAs (Field-Programmable Gate Arrays), etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it can also include a display, an input / output interface (I / O interface), a USB (Universal Serial Bus) port (which can be included as one of the ports in the BUS (Business) ports), a network interface, a power supply and / or a camera. Those skilled in the art can understand that Figure 1 The structure shown is only schematic, and does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 can also include more or fewer components than those shown in Figure 1 or have a different configuration than that shown in Figure 1 .

[0027] It should be noted that the above-mentioned one or more processors 102 and / or other data processing circuits can be referred to herein as "data processing circuits" in general. The data processing circuits can be embodied in whole or in part as software, hardware, firmware or any other combination. In addition, the data processing circuits can be a single independent processing module, or any one of the other elements combined into the computer terminal 10 (or mobile device) in whole or in part. As referred to in the embodiments of the present application, the data processing circuit is a processor control (for example, selection of a variable resistance terminal path connected to an interface).

[0028] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the risk identification method of the credit contract in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implements the above-mentioned risk identification method of the credit contract. The memory 104 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 can further include a memory remotely disposed with respect to the processor 102, which can be connected to the computer terminal 10 through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network and combinations thereof.

[0029] The transmission device 106 is configured to receive or send data via a network. The network can include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network interface controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module configured to communicate with the Internet wirelessly.

[0030] The display can be a liquid crystal display, for example, a touch screen, which can enable a user to interact with the user interface of the computer terminal 10 (or mobile device).

[0031] In the above operating environment, the present application provides a risk identification method for a credit contract. Figure 2 The flowchart of the risk identification method for a credit contract provided by an embodiment of the present application is shown in FIG. 1, which includes the following steps. Figure 2 The flowchart of the risk identification method for a credit contract provided by an embodiment of the present application is shown in FIG. 1, which includes the following steps.

[0032] In step S201, a credit contract to be identified is obtained, and the credit contract is preprocessed to obtain a target contract text. The preprocessing includes at least one of the following: credit term conversion, format conversion, segmentation processing, and character filtering.

[0033] In step S201, legal review of the credit contract needs to review the core items related to legal risks in the contract terms, including: liability exemption clauses, interest rate compliance, guarantee effectiveness, and definition of breach of contract liability. Since there are the following problems in the related art when identifying the risks of the credit contract, the credit contract needs to be preprocessed to overcome these problems: legal concept polysemy analysis: "mortgage" in the credit contract can refer to: chattel mortgage / real estate mortgage / highest amount mortgage, with significant differences in legal effectiveness; negative semantic penetration recognition: clause: "the lender is not responsible for losses caused by the borrower" → double negative structure needs to be identified; long-distance reference resolution: the annex defines "the lender = the borrower", and the text of article 20 "the lender's obligations" needs to be associated with the annex definition; general model lacks a financial regulation knowledge base, such as: not learning the "Personal Loan Management Measures" article 26 "prohibition of bundled sales" provision; case experience is not injected into the model, such as: Supreme Court case No. X: "the final interpretation right belongs to the bank" in the format clause is invalid; risk is not quantifiable, the existing solution only outputs "there is a risk", which cannot inform the risk level (such as: minor flaws or invalid contract) and only points out the problem clauses without providing a replacement representation solution in accordance with article 496 of the Civil Code; traditional solutions process 100 contracts in parallel, and the error rate rises by 58% due to context cache overflow.

[0034] The preprocessing aims to convert the contract text into a format that the model can effectively process, while reducing interfering information, ensuring the clarity and accuracy of the text content. Since credit contracts may contain non-standard or localized credit terms that may vary between different jurisdictions or banking institutions, the purpose of credit term conversion is to standardize these terms to ensure accurate recognition and understanding by the model. For example, "annual interest" is converted to "annual interest rate", and "borrower" is converted to "borrower". By establishing a comprehensive credit term dictionary, this conversion process can be achieved. Credit contracts may exist in various formats, such as PDF, Word documents or scanned images. The purpose of format conversion is to convert these contracts into a unified text format, which can be a UTF-8 encoded plain text format for model processing. For example, OCR (Optical Character Recognition) technology is used to convert the text in scanned images into editable text.

[0035] Credit contracts are complex and contain multiple clauses and paragraphs. The purpose of segmentation processing is to divide the text into multiple meaningful parts according to the internal structure of the contract, such as breaking down the contract into clause-level fragments based on keywords such as "Article X". This helps the model to analyze the legal meaning and risks of each clause more finely in subsequent processing. The contract text may contain some interfering characters or symbols, and these unnecessary characters may affect the recognition and understanding of the model. The purpose of character filtering is to remove these illegal characters while retaining key legal symbols such as "§" (indicating clauses), "§§" (indicating sub-clauses), and "§§§" (indicating sub-sub-clauses), etc., to enhance the purity of the text and the effectiveness of the model processing.

[0036] Step S202, input the target contract text into the target model to obtain a text recognition result, wherein the text recognition result includes at least one of the following: contract clause classification result, risk identification result and legal clause recommendation result, the target model is trained by M groups of training samples, each group of training samples includes historical contract text and historical text recognition result, wherein M is a positive integer.

[0037] ​In step S202, the target model can be BERT (Bidirectional Encoder Representations from Transformers, a pre-trained language model) that supports bidirectional context semantic understanding. In the model training stage, the target model will try to predict the corresponding text recognition result for each historical contract text, compare it with the historical text recognition result, and adjust the model parameters through back propagation to improve the accuracy of prediction. The process of the target model outputting the text recognition result is, for example: mermaid graph TD A[contract text input]-->B(preprocessing module) B-->C[BERT feature extraction] C-->D{multi-task processing branch} D-->E[clause classification] D-->F[risk point detection] D-->G[law clause recommendation] E-->H[result aggregation] F-->HG-->HH-->I[visualization report output].

[0038] Among them, the BERT feature extraction layer: [CLS] This contract is signed by the following two parties on {date} [SEP] Party A: XXX Bank [SEP] Party B: Zhang San [SEP]…; Position code expansion: support long contract clause input of 512+token. Clause classification task (output layer 1): 38 types of credit contract clauses (mortgage, guarantee, interest rate, default liability, etc.), using [CLS] vector for multi-label classification. Risk point detection task (output layer 2): BIO annotation system to identify risk points: [

[0040] {"text":"single-sided modification of interest rate","start":120,"end":126,"type":"interest rate risk"},

[0041] {"text":"unlimited guarantee liability","start":345,"end":350,"type":"guarantee risk"} ]

[0043] Law clause recommendation (output layer 3): similarity-based legal text matching, associated with Civil Code, Commercial Bank Law, etc. For long contract texts, a hierarchical processing strategy can be adopted: mermaid graph TB A[complete contract]-->B(segmented processing) B-->C{BERT processing} C-->D[paragraph-level results] D-->E[result aggregation based on legal logic]. Due to the 512token limit of BERT, which results in the loss of key information in long contracts, measures such as priority processing of key clauses (identification of high-risk clauses through a rule engine) and long text encoder alternatives can be adopted.

[0044] Step S203: Generate a risk report based on the text recognition results. The risk report includes the contract terms to be adjusted that are at risk and the recommended legal terms that the contract terms to be adjusted need to meet.

[0045] In step S203, the complete process of identifying credit contracts and generating risk reports can be as follows: User -> Frontend: Upload PDF contract; Frontend -> Backend: Send file; Backend -> OCR service: Extract text; OCR service -> Backend: Return structured text; Backend -> BERT model: Multi-task inference BERT model; Backend: Return JSON results; Backend -> Report generation: Assemble review results; Report generation -> Frontend: Visualize report; Frontend -> User: Display risk points and legal advice.

[0046] The risk identification method for credit contracts provided in this application involves acquiring the credit contract to be identified, preprocessing the credit contract to obtain the target contract text, wherein the preprocessing includes at least one of the following: credit terminology conversion, format conversion, segmentation processing, and character filtering; inputting the target contract text into a target model to obtain text recognition results, wherein the text recognition results include at least one of the following: contract clause classification results, risk identification results, and legal clause recommendation results. The target model is trained from M sets of training samples, each set of training samples including historical contract text and historical text recognition results, where M is a positive integer; and generating a risk report based on the text recognition results, wherein the risk report includes contract clauses with risks to be adjusted and recommended legal clauses that the contract clauses to be adjusted need to meet. Through the introduction of the target model and the preprocessing steps, the method achieves rapid and accurate identification of contract clauses and intelligent assessment of legal risks, providing financial institutions with a powerful contract review tool, reducing human error, improving review efficiency, and ensuring the legality and rigor of credit contracts, thereby achieving the technical effect of improving the accuracy of risk identification of credit contracts and solving the technical problem of low accuracy of risk identification of credit contracts.

[0047] In order to improve the accuracy of risk identification of the credit contract, the target model is trained to identify the text of the credit contract. Optionally, in the risk identification method of the credit contract provided in the embodiments of the present application, the target model is obtained by the following method: M historical credit contracts and a plurality of legal clauses associated with the credit business are obtained, and a pre-labeled historical text identification result of each historical credit contract is determined, wherein the historical text identification result includes at least one of the following: a historical risk identification result and a historical legal clause recommendation result and a historical contract clause classification result; M historical credit contracts are preprocessed respectively to obtain M historical contract texts, each historical contract text and the historical text identification result corresponding to the historical contract text are determined as a set of training samples, and M sets of training samples are obtained; the pre-training language model is trained through the M sets of training samples, and the target model is obtained.

[0048] In some embodiments, the data source of the training sample can include: the historical credit contract after the desensitization processing, 5,200 risk points labeled by legal experts, 3,500 relevant clauses of the Civil Code and other regulations; in addition, personalized risk rule customization can also be performed, for example:

[0049] # Bank-defined risk rules

[0050] custom_rules={

[0051] "High-risk area mortgage": "Mortgage located in a region with a financial risk level > 3",

[0052] "Special related transactions": "Transaction object in the related party list"

[0053] }

[0054] The loss function design when training the target model can be: clause classification: weighted cross-entropy loss (to alleviate class imbalance); risk detection: CRF (Conditional Random Field) layer enhances label constraints; legal matching: Triplet Loss (a kind of loss function) improves discrimination. The target model is trained using the model distillation method to improve the training efficiency, and the ONNX (Open Neural Network Exchange, an open format for representing deep learning models) conversion: improves the central processing unit inference speed by 3-5 times, and the legal inference process is encoded into a unified framework through a multi-task mechanism. Technical representation: legal clause similarity calculation and risk detection are jointly optimized; the attention weight size directly reflects the strength of the legal logical association.

[0055] Next, the M historical credit contracts need to be preprocessed and converted into a format that the model can handle. After preprocessing, each historical contract text is combined with its corresponding historical text recognition results (including risk labeling, compliance assessment, clause classification, etc.) to form a set of training samples. M sets of training samples are obtained. The M sets of training samples are input into the model, and each set of samples contains a preprocessed historical contract text and its corresponding historical text recognition results. The model is designed to perform multi-task such as contract clause classification, legal risk detection, legal clause matching, etc. to enhance its comprehensive analysis capability. The difference between the model's prediction and the actual labeling result is quantified by loss functions such as cross-entropy loss, mean square error, etc. and the model parameters are optimized using the backpropagation algorithm.

[0056] Starting from the pre-trained model, load its initial parameters. Input the historical contract text into the model to predict its contract clause classification, risk detection and legal clause matching results. Compare the predicted results with the historical text recognition results and calculate the loss function value. Adjust the model parameters according to the gradient of the loss function to minimize the loss function. Repeat the forward propagation and backpropagation steps until the model performance reaches the preset threshold or the number of iterations meets the requirements. Evaluate the model performance on an independent validation set and further adjust the model parameters or hyperparameters based on the evaluation results.

[0057] This embodiment can more accurately analyze the semantics of contract clauses through bidirectional context understanding, especially in handling ambiguity and negative semantics. The model is trained on legal clauses and historical contract data, enabling it to learn and apply professional knowledge in the financial and legal fields. The one-time output of contract clause classification, risk identification and legal clause recommendation results improves the review efficiency. It can significantly improve the efficiency and accuracy of credit contract intelligent review, providing strong technical support for banks and other financial institutions.

[0058] After obtaining the training samples, the robustness of the model is improved through data augmentation strategies. Optionally, in the credit contract risk identification method provided in the embodiments of the present application, after obtaining the M sets of training samples, the method further includes: generating augmented training samples from the M sets of training samples through a pre-set data augmentation strategy, wherein the pre-set data augmentation strategy includes at least one of the following: legal term synonym replacement, legal clause structure reorganization, and adversarial sample generation; combining the augmented training samples and the M sets of training samples to obtain updated P sets of training samples, wherein P is a positive integer and P is greater than M; training the pre-trained language model based on the updated P sets of training samples to obtain an updated target model.

[0059] In some embodiments, legal term synonym replacement is replacing professional terms in the contract text with their synonyms or equivalent expressions while maintaining the legal meaning unchanged. For example, "interest" can be replaced with "interest payment" to simulate different writing styles and varying legal language environments, enhancing the model's ability to recognize the variability of terms. Legal clause structure reorganization is adjusting the expression structure or order of a clause while maintaining its legal effectiveness to create new samples with different structures from the original text. This helps the model learn the flexibility and diversity of clause expression and improves its adaptability and understanding of new clause structures. Adversarial sample generation is generating samples designed to challenge the model's robustness by inserting negation words or changing the semantics of key words. For example, adding words such as "not" and "no" to the contract changes the meaning of the clause to test the model's accuracy and stability when faced with counterintuitive or complex semantic expressions.

[0060] After completing data augmentation, the augmented training samples are combined with the original M sets of training samples to form the updated P sets of training samples. Next, the pre-trained language model is iteratively trained using these P sets of training samples to obtain the updated target model. Based on the pre-trained model, P sets of training samples are used for deeper training. By adjusting the parameters of the model, it can more accurately understand the legal semantics and clause structure of credit contracts, reducing misjudgment and omission. During training, the model's hyperparameters, such as learning rate, batch size, and optimizer type, are adjusted to optimize the training process and improve performance. The model's performance is evaluated on an independent validation set to check its performance on unseen data, ensuring that the model can not only identify known risk points but also handle new and unknown challenges. The training and validation process is repeated until the model's performance indicators meet the preset standards or the training loss no longer significantly decreases, at which point the model is considered to have converged and can be used for actual credit contract intelligent review tasks.

[0061] This embodiment uses legal term synonym replacement, legal clause structure reorganization, and adversarial sample generation strategies to not only increase the diversity of training samples but also simulate various situations that may be encountered during actual review, enabling the updated target model to more robustly handle new samples and complex semantics. Using data augmentation strategies and iteratively training the target model can significantly improve the model's generalization ability and robustness, making it more reliable and accurate when dealing with complex and variable credit contract texts.

[0062] To ensure the accuracy of the target model, the target model is updated periodically. Optionally, in the credit contract risk identification method provided in the embodiments of the present application, after obtaining the text recognition result, if the text recognition result contains errors, the actual text recognition result without errors of the target contract text is determined, and the target contract text and the actual text recognition result are determined as the first newly added training sample. Every pre-set period, new legal provisions are collected, and the second newly added training sample containing the new legal provisions is constructed. Every pre-set period, the first newly added training sample and the second newly added training sample are added to the M training samples to obtain the updated Q training samples, wherein Q is a positive integer and Q is greater than M. The pre-trained language model is trained based on the updated Q training samples to obtain the updated target model.

[0063] In some embodiments, in order to ensure the accuracy of the target model, a dynamic update three-cycle is adopted: mermaidgraph TB A [lawyer feedback]-->B (sample library update) C [new regulations]-->D (knowledge base update) E [business data]-->F (model parameter update), and the model performance is continuously improved through automatic iteration of the version every month. For the incorrect text recognition result output by the target model, the actual text recognition result is obtained through lawyer labeling, the contract text and the corresponding actual text recognition result are combined to form the first newly added training sample. With the change of the legal environment, new legal provisions and regulations will continue to appear. In order to keep the model up to date with the latest legal knowledge, every pre-set period (such as every month, every quarter), new legal provisions are collected from official channels or authoritative legal databases to ensure that the model can learn the latest legal knowledge and rules. Based on the newly added legal provisions, training samples are constructed, including but not limited to expert labeling or rule engine processing to generate compliance annotations or risk point annotations related to the newly added provisions to form the second newly added training sample.

[0064] By periodically adding the first newly added training sample and the second newly added training sample to the original M training samples, Q training samples are obtained, and the pre-trained language model is retrained based on the updated Q training samples to obtain an updated target model.

[0065] The embodiments periodically update the target model to ensure that the model can learn and adapt to new legal provisions in a timely manner, thereby providing more accurate legal auxiliary review services in actual review and providing strong technical support for contract management of banks and financial institutions.

[0066] For the target contract updated based on the risk report, automatically compare with the original contract to prompt the modification of key content. Optionally, in the risk identification method of the credit contract provided in the embodiments of the present application, after generating the risk report based on the text recognition result, the method further includes: updating the credit contract based on the risk report to obtain a target contract; comparing the target contract and the credit contract to obtain difference content existing between the target contract and the credit contract; and in a case where the difference content belongs to preset key content, issuing a prompt information, wherein the prompt information is used to indicate that there is a modification record of the key content of the credit contract.

[0067] In some embodiments, after completing the legal review and intelligent analysis of the credit contract, according to the suggestions of the risk report, the original contract may need to be modified or supplemented to ensure that its terms comply with the latest legal requirements and compliance standards. Extract key modification suggestions from the risk report, including but not limited to compliance terms that need to be added, risk terms that need to be deleted or adjusted, and specific expressions that need to be clarified or refined. Based on the suggestions of the risk report, revise the credit contract, and after the revision is completed, generate a new contract version, i.e., a target contract. The target contract contains all necessary legal terms and expressions to comply with the latest compliance requirements.

[0068] Next, compare the target contract with the original credit contract to identify the difference content between the two. Preprocess the text of the two contracts, including standardizing the format, removing irrelevant symbols, and decomposing the terms, to facilitate accurate text comparison. Use text comparison algorithms to identify the differences between the target contract and the credit contract. These algorithms can indicate which terms are modified, added or deleted, and the specific modification content. After identifying the contract differences, further judgment is needed to determine whether these differences touch the preset key content. Key content can refer to terms or expressions that have a significant impact on the legal validity of the contract, the rights and interests of both parties, and risk control. Once the difference content touches the key content, the system will immediately issue a prompt information to remind the contract administrator or legal consultant to pay attention to these key modifications. The prompt information contains the specific content of the modification, the comparison of the terms before and after the modification, and potential legal risk points.

[0069] The embodiments of the present application can significantly improve the efficiency of contract management and reduce the omissions and errors of manual review by automatically comparing contract versions and monitoring key content, ensuring that each modification can be promptly and fully focused on.

[0070] In order to improve the efficiency of the target model in processing the credit contract, the credit contract is preprocessed. Optionally, in the credit contract risk identification method provided in the embodiments of the present application, the target contract text obtained by preprocessing the credit contract includes: extracting N keywords from the credit contract, determining whether the keywords are included in the preset credit term dictionary, wherein N is a positive integer, and the credit term dictionary includes a plurality of credit terms and synonyms of each credit term; in the case that the credit term dictionary includes the keywords, the keywords in the credit contract are replaced with the credit terms corresponding to the keywords in the credit term dictionary; H contract clauses in the credit contract are determined, the credit contract is segmented based on each contract clause, and the target contract text is obtained, wherein H is a positive integer.

[0071] In some embodiments, first, N keywords are extracted from the credit contract. The keywords refer to important legal concepts, professional terms or key numerical information in the contract, such as "mortgage", "debtor", "annual interest rate" and the like. Next, it is determined whether these keywords are included in the preset credit term dictionary. The credit term dictionary is a collection of a plurality of credit terms and their synonyms, aiming to unify the term expression in the contract and reduce the understanding error caused by the difference in writing style or the change of the term. For the keywords appearing in the credit term dictionary, they are replaced with the corresponding standardized credit terms in the dictionary, which can enhance the consistency and readability of the contract text, and avoid the understanding difficulty caused by the polysemy of the term.

[0072] Then, H contract clauses in the credit contract are determined, and the clause identification is completed by identifying the legal text features such as "Article X". It is ensured that each clause is independent and complete. Based on each identified contract clause, the credit contract is segmented to generate the target contract text. The target contract text is the preprocessed contract version, and each clause becomes an independent text segment, which is convenient for subsequent legal review and intelligent analysis.

[0073] The embodiments replace the keywords to ensure the consistency and accuracy of the terms in the contract text, and reduce the review errors caused by the change of the term. The segmentation processing makes each clause independent, which is convenient for subsequent clause classification, risk point detection and legal clause recommendation, and improves the efficiency of the review process. The whole process can be automated, which greatly reduces the need for manual intervention and improves the scalability of the contract review.

[0074] For the text recognition result misreported due to legal terminology, update the credit terminology dictionary in time. Optionally, in the credit contract risk identification method provided in the embodiments of the present application, after obtaining the text recognition result, the method further includes: judging whether there is a target misreporting result in the text recognition result, wherein the target misreporting result is a misreporting result caused by non-translation of legal terminology; in the case that there is a target misreporting result in the text recognition result, extracting the non-translation target legal terminology from the target misreporting result; determining an associated credit terminology associated with the target legal terminology, and adding the target legal terminology and the associated credit terminology to the credit terminology dictionary.

[0075] In some embodiments, due to the complexity and diversity of legal terminology, misreports may occur during text recognition. By comparing the text recognition result with the original credit contract, misreports caused by non-standardization or incorrect translation of legal terminology can be identified. These misreports can be spelling errors of terms, synonyms not recognized as the same concept, or misinterpretation of the context meaning of terms. Of particular concern are misreporting results caused by non-translation of legal terminology, which can involve incorrect identification or understanding of key legal concepts in contract clauses, thereby affecting subsequent review processes. All misreported legal terms are located in the text recognition result to ensure that subsequent correction work can cover all relevant misreporting cases. Using natural language processing techniques and rules, these non-translation target legal terms are accurately extracted from the text, providing a basis for subsequent term association and dictionary updating.

[0076] In order to correct misreports and continuously improve system performance, it is necessary to determine the credit terminology related to the non-translation legal terminology and add these terms and their synonyms to the credit terminology dictionary. Through manual review or expert system, the correct meaning or corresponding standardized terminology of the non-translation legal terminology in the credit contract is determined, and the association between the terms is established. Add the non-translation target legal terminology and its associated credit terminology to the credit terminology dictionary, and update the synonym list in the dictionary to ensure that the dictionary can cover a wider range of term variations and writing styles, and improve the text processing ability and accuracy of the system. When updating the dictionary, considering that legal terminology synonyms or near-synonyms are widely used, these synonyms need to be added to the dictionary to enhance the recognition ability and flexibility of the system.

[0077] For example: unable to recognize complex legal concepts such as "cross default", inject legal knowledge graph:

[0078] knowledge_graph={

[0079] "cross default":["associated party default", "debt acceleration", "triggering of guarantee liability"],

[0080] "highest amount of mortgage": "determined period of creditor's right", "maximum amount of creditor's right"

[0081] }

[0082] The embodiment reduces false positives and improves the accuracy and efficiency of review by continuously learning and adapting to new writing habits and changes in terminology. It improves the quality of credit contract review, reduces the burden of manual review, and makes the review process more automated and intelligent.

[0083] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown.

[0084] Embodiment 2

[0085] The embodiment of the present application also provides a credit contract risk identification device. It should be noted that the credit contract risk identification device of the embodiment of the present application can be used to execute the credit contract risk identification method provided by the embodiment of the present application. The credit contract risk identification device provided by the embodiment of the present application is introduced as follows.

[0086] According to the embodiment of the present application, a device for implementing the above-mentioned credit contract risk identification method is also provided, Figure 3 is a schematic diagram of the credit contract risk identification device provided by the embodiment of the present application, as Figure 3 shown, the device comprises:

[0087] The preprocessing unit 301 is configured to obtain a credit contract to be identified, preprocess the credit contract, and obtain a target contract text, wherein the preprocessing comprises at least one of the following: credit term conversion, format conversion, segmentation processing and character filtering;

[0088] The identification unit 302 is configured to input the target contract text into a target model to obtain a text recognition result, wherein the text recognition result comprises at least one of the following: contract clause classification result, risk identification result and legal clause recommendation result, the target model is trained by M groups of training samples, each group of training samples comprises historical contract text and historical text recognition result, wherein M is a positive integer;

[0089] The generation unit 303 is configured to generate a risk report based on the text recognition result, wherein the risk report contains a risk-existed contract clause to be adjusted and a recommended legal clause to be met by the contract clause to be adjusted.

[0090] The credit contract risk identification device provided by the embodiment of the present application comprises a preprocessing unit 301, which is configured to obtain a credit contract to be identified, preprocess the credit contract, and obtain a target contract text. The preprocessing comprises at least one of the following: credit term conversion, format conversion, segmentation processing, and character filtering. An identification unit 302 is configured to input the target contract text into a target model to obtain a text recognition result. The text recognition result comprises at least one of the following: a contract clause classification result, a risk identification result, and a legal clause recommendation result. The target model is obtained by training M sets of training samples. Each set of training samples comprises a historical contract text and a historical text recognition result. M is a positive integer. A generation unit 303 is configured to generate a risk report based on the text recognition result. The risk report comprises a contract clause to be adjusted and a recommended legal clause to be met. The introduction of the target model and the preprocessing step realize the rapid and accurate identification of the contract clause and the intelligent evaluation of the legal risk, provide a powerful contract review auxiliary tool for the financial institutions, reduce the human error, improve the review efficiency, ensure the legality and rigor of the credit contract, and achieve the technical effect of improving the risk identification accuracy of the credit contract, thereby solving the technical problem of low risk identification accuracy of the credit contract.

[0091] Optionally, in the credit contract risk identification device provided by the embodiment of the present application, the device further comprises an acquisition unit configured to acquire M historical credit contracts and a plurality of legal clauses associated with the credit business, and determine a pre-labeled historical text recognition result of each historical credit contract. The historical text recognition result comprises at least one of the following: a historical risk identification result, a historical legal clause recommendation result, and a historical contract clause classification result. A first determination unit is configured to preprocess the M historical credit contracts respectively to obtain M historical contract texts, and determine each historical contract text and the historical text recognition result corresponding to the historical contract text as a set of training samples, thereby obtaining M sets of training samples. A first training unit is configured to train a pre-trained language model based on the M sets of training samples to obtain the target model.

[0092] Optionally, in the credit contract risk identification device provided by the embodiment of the present application, the device further comprises an enhancement unit configured to generate enhanced training samples from the M sets of training samples by using a preset data enhancement strategy. The preset data enhancement strategy comprises at least one of the following: legal term synonym replacement, legal clause structure reorganization, and adversarial sample generation. A combination unit is configured to combine the enhanced training samples and the M sets of training samples to obtain updated P sets of training samples. P is a positive integer, and P is greater than M. A second training unit is configured to train the pre-trained language model based on the updated P sets of training samples to obtain an updated target model.

[0093] Optionally, in the credit contract risk identification apparatus provided by the embodiment of the present application, the apparatus further comprises: a second determination unit, configured to determine, in a case where the text recognition result contains errors, an actual text recognition result without errors of the target contract text, and determine the target contract text and the actual text recognition result as first new training samples; a collection unit, configured to collect new legal provisions every preset period, and construct second new training samples containing the new legal provisions based on the new legal provisions; an adding unit, configured to add the first new training samples and the second new training samples to the M groups of training samples every preset period, to obtain updated Q groups of training samples, where Q is a positive integer and Q is greater than M; and a third training unit, configured to train the pre-trained language model based on the updated Q groups of training samples, to obtain an updated target model.

[0094] Optionally, in the credit contract risk identification apparatus provided by the embodiment of the present application, the apparatus further comprises: an updating unit, configured to update the credit contract based on the risk report, to obtain a target contract; a comparison unit, configured to compare the target contract and the credit contract, to obtain difference content existing between the target contract and the credit contract; and a prompt unit, configured to issue a prompt information in a case where the difference content belongs to preset key content, where the prompt information is used to indicate that the key content of the credit contract has a modification record.

[0095] Optionally, in the credit contract risk identification apparatus provided by the embodiment of the present application, the preprocessing unit 301 comprises: an extraction module, configured to extract N key words from the credit contract, and determine whether the key words are contained in a preset credit term dictionary, where N is a positive integer, and the credit term dictionary contains a plurality of credit terms and synonyms of each credit term; a replacement module, configured to replace the key words in the credit contract with credit terms corresponding to the key words in the credit term dictionary in a case where the key words are contained in the credit term dictionary; and a determination module, configured to determine H contract terms in the credit contract, and segment the credit contract based on each contract term, to obtain a target contract text, where H is a positive integer.

[0096] Optionally, in the credit contract risk identification apparatus provided by the embodiment of the present application, the apparatus further comprises: a judgment unit, configured to determine whether there is a target false positive result in the text recognition result, where the target false positive result is a false positive result caused by unconverted legal terms; an extraction unit, configured to extract unconverted target legal terms from the target false positive result in a case where the target false positive result exists in the text recognition result; and a third determination unit, configured to determine associated credit terms associated with the target legal terms, and add the target legal terms and the associated credit terms to the credit term dictionary.

[0097] It should be noted that the preprocessing unit 301, the identification unit 302 and the generation unit 303 correspond to steps S201 to S203 in Embodiment 1, and the three units have the same instances and application scenarios as the corresponding steps, but are not limited to the content disclosed in the above embodiment. It should be noted that the above modules or units can be hardware components or software components stored in the memory (for example, the memory 104) and processed by one or more processors (for example, the processors 102a, 102b, …, 102n), and the above modules or units can also be run in the computer terminal 10 provided in Embodiment 1 as part of the device.

[0098] Embodiment 3

[0099] Embodiments of the present application can provide an electronic device, Figure 4 is a structural block diagram of an electronic device according to an embodiment of the present application. As Figure 4 shown, the electronic device can include one or more (only one is shown in the figure) processors 402, a memory 404, a storage controller, and a peripheral interface, wherein the peripheral interface is connected with a radio frequency module, an audio module and a display. Figure 4

[0100] The memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application. The processor executes various functions and data processing by running the software programs and modules stored in the memory, that is, implements the above method. The memory can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory can further include a memory remotely arranged with respect to the processor, and the remote memory can be connected to the terminal through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0101] The processor can call the information and application programs stored in the memory through the transmission device to perform the following steps: obtaining a credit contract to be identified, preprocessing the credit contract to obtain a target contract text, wherein the preprocessing includes at least one of the following: credit term conversion, format conversion, segmentation processing and character filtering; inputting the target contract text into a target model to obtain a text recognition result, wherein the text recognition result includes at least one of the following: contract clause classification result, risk identification result and legal clause recommendation result, the target model is trained by M groups of training samples, each group of training samples includes historical contract text and historical text recognition result, wherein M is a positive integer; generating a risk report based on the text recognition result, wherein the risk report contains a risk existing contract clause to be adjusted and a recommended legal clause to be met by the contract clause to be adjusted.​

[0102] The processor can further call information and application programs stored in the memory through the transmission device to perform the following steps: obtaining M historical credit contracts and a plurality of legal clauses associated with the credit business, determining a pre-labeled historical text recognition result of each historical credit contract, wherein the historical text recognition result comprises at least one of the following: a historical risk identification result and a historical legal clause recommendation result and a historical contract clause classification result; preprocessing the M historical credit contracts respectively to obtain M historical contract texts, determining each historical contract text and the historical text recognition result corresponding to the historical contract text as a training sample to obtain M training samples; training the pre-trained language model through the M training samples to obtain a target model.

[0103] The processor can further call information and application programs stored in the memory through the transmission device to perform the following steps: generating enhanced training samples from the M training samples through a preset data enhancement strategy, wherein the preset data enhancement strategy comprises at least one of the following: legal term synonym replacement, legal clause structure reorganization, and adversarial sample generation; combining the enhanced training samples and the M training samples to obtain updated P training samples, wherein P is a positive integer and P is greater than M; training the pre-trained language model based on the updated P training samples to obtain an updated target model.

[0104] The processor can further call information and application programs stored in the memory through the transmission device to perform the following steps: in the case that the text recognition result has an error, determining an actual text recognition result in which the target contract text has no error, and determining the target contract text and the actual text recognition result as a first new training sample; collecting new legal clauses every preset period, constructing a second new training sample containing the new legal clauses based on the new legal clauses; adding the first new training sample and the second new training sample to the M training samples every preset period to obtain updated Q training samples, wherein Q is a positive integer and Q is greater than M; training the pre-trained language model based on the updated Q training samples to obtain an updated target model.

[0105] The processor can further call information and application programs stored in the memory through the transmission device to perform the following steps: updating the credit contract based on the risk report to obtain a target contract; comparing the target contract and the credit contract to obtain difference content existing between the target contract and the credit contract; in the case that the difference content belongs to a preset key content, issuing a prompt information, wherein the prompt information is used to indicate that the key content of the credit contract has a modification record.

[0106] The processor can further call information and application programs stored in the memory through the transmission device to perform the following steps: extracting N keywords from the credit contract, judging whether the keywords are contained in a preset credit term dictionary, wherein N is a positive integer, the credit term dictionary contains a plurality of credit terms and synonyms of each credit term; in the case that the keywords are contained in the credit term dictionary, replacing the keywords in the credit contract with the credit terms corresponding to the keywords in the credit term dictionary; determining H contract terms in the credit contract, segmenting the credit contract based on each contract term to obtain a target contract text, wherein H is a positive integer.

[0107] The processor can further call information and application programs stored in the memory through the transmission device to perform the following steps: judging whether there is a target false positive result in the text recognition result, wherein the target false positive result is a false positive result caused by unconverted legal terms; in the case that there is a target false positive result in the text recognition result, extracting the unconverted target legal terms from the target false positive result; determining an associated credit term associated with the target legal term, and adding the target legal term and the associated credit term to the credit term dictionary.

[0108] By adopting the embodiment of the present application, a credit contract to be recognized is obtained, the credit contract is preprocessed to obtain a target contract text, wherein the preprocessing includes at least one of the following: credit term conversion, format conversion, segmentation processing and character filtering; the target contract text is input into a target model to obtain a text recognition result, wherein the text recognition result includes at least one of the following: contract term classification result, risk identification result and legal term recommendation result, the target model is trained by M groups of training samples, each group of training samples includes historical contract text and historical text recognition result, wherein M is a positive integer; a risk report is generated based on the text recognition result, wherein the risk report contains a contract term to be adjusted and a recommended legal term scheme to be met by the contract term to be adjusted. Through the introduction of the target model and the preprocessing step, the rapid and accurate identification of the contract term and the intelligent evaluation of the legal risk are realized, a powerful contract review auxiliary tool is provided for the financial institutions, the purpose of reducing human errors, improving review efficiency, ensuring the legality and rigor of the credit contract is achieved, thereby realizing the technical effect of improving the risk identification accuracy of the credit contract, and further solving the technical problem of low risk identification accuracy of the credit contract.

[0109] Those skilled in the art can understand that Figure 4 The structure shown is only schematic, and the electronic device can also be a terminal device such as a smart phone, a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, etc. Figure 4It does not cause limitation to the structure of the electronic device. For example, the electronic device can further include more or less components (such as a network interface, a display device, etc.) or have a different configuration from that shown in the drawings. Figure 4 Figure 4

[0110] Those skilled in the art can understand that all or part of the steps of various methods in the above embodiments can be completed by instructing the terminal device related hardware through programs, and the programs can be stored in a computer readable storage medium, which can include a flash disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0111] Embodiment 4

[0112] The embodiments of the present application further provide a storage medium. Optionally, in the embodiments, the storage medium can be used to save the program codes executed by the risk identification method of the credit contract provided in the embodiment 1.

[0113] Optionally, in the embodiments, the storage medium can be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.

[0114] The present application further provides a computer program product, which, when executed on a data processing device, is adapted to execute the steps of the risk identification method of the credit contract.

[0115] The serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.

[0116] In the above embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0117] In the several embodiments provided by the present application, it should be understood that the disclosed technology can be implemented in other ways. Of course, the unit division in the above- described device embodiment is only a logical function division, and there can be another division manner during actual implementation; for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different parts can be indirect couplings or communication connections through some interfaces, accessors or modules, and can be electrical, or other forms.

[0118] ​​The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0119] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present alone, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0120] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various program code storage media.

[0121] The above is only the preferred embodiment of the present application, and it should be pointed out that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which should be considered as the protection scope of the present application.

Claims

1. A method of risk identification of a credit contract, characterized in that, include: Obtain the credit contract to be identified, preprocess the credit contract to obtain the target contract text, wherein the preprocessing includes at least one of the following: credit terminology conversion, format conversion, segmentation processing and character filtering; The target contract text is input into the target model to obtain the text recognition result, wherein the text recognition result includes at least one of the following: contract clause classification result, risk identification result, and legal clause recommendation result. The target model is trained by M sets of training samples, each set of training samples includes historical contract text and historical text recognition result, wherein M is a positive integer. A risk report is generated based on the text recognition results. The risk report includes contract terms that are at risk and the recommended legal terms that the contract terms to be adjusted should meet.

2. The method of claim 1, wherein, The target model is trained in the following manner: Obtain M historical credit contracts and multiple legal clauses related to credit business, and determine the pre-annotated historical text recognition result for each historical credit contract, wherein the historical text recognition result includes at least one of the following: historical risk identification result, historical legal clause recommendation result, and historical contract clause classification result; The M historical credit contracts are preprocessed to obtain M historical contract texts. Each historical contract text and the corresponding historical text recognition result are determined as a set of training samples to obtain M sets of training samples. The target model is obtained by training a pre-trained language model using the M sets of training samples.

3. The method of claim 2, wherein, After obtaining M sets of training samples, the method further includes: Enhanced training samples are generated from the M sets of training samples using a preset data augmentation strategy, wherein the preset data augmentation strategy includes at least one of the following: synonym substitution of legal terms, restructuring of legal clauses, and generation of adversarial samples; The enhanced training samples and the M sets of training samples are combined to obtain the updated P sets of training samples, where P is a positive integer and P is greater than M; The pre-trained language model is trained based on the updated P-group training samples to obtain the updated target model.

4. The method according to any one of claims 1 to 3, characterized in that, After obtaining the text recognition result, the method further includes: If the text recognition result contains an error, determine that the target contract text does not contain an error in the actual text recognition result, and determine the target contract text and the actual text recognition result as the first new training sample; New legal clauses are collected at preset intervals, and a second new training sample containing the new legal clauses is constructed based on the new legal clauses. Every preset period, the first newly added training sample and the second newly added training sample are added to the M groups of training samples to obtain an updated Q groups of training samples, where Q is a positive integer and Q is greater than M; The updated target model is obtained by training a pre-trained language model based on the updated Q-group training samples.

5. The method of claim 1, wherein, After generating a risk report based on the text recognition results, the method further includes: The credit contract is updated based on the risk report to obtain the target contract; The target contract and the credit contract are compared to obtain difference content that there is a difference between the target contract and the credit contract; In a case where the difference content belongs to a preset key content, a prompt information is sent, wherein the prompt information is used to indicate that the key content of the credit contract has a modification record.

6. The method of claim 1, wherein, The credit contract is preprocessed to obtain a target contract text, including: N keywords are extracted from the credit contract, and it is determined whether the keywords are included in a preset credit term dictionary, wherein N is a positive integer, and the credit term dictionary includes a plurality of credit terms and synonyms of each credit term; In a case where the keywords are included in the credit term dictionary, the keywords in the credit contract are replaced with corresponding credit terms in the credit term dictionary; H contract terms in the credit contract are determined, and the credit contract is segmented based on each contract term to obtain the target contract text, wherein H is a positive integer.

7. The method of claim 6, wherein, After obtaining the text recognition result, the method further includes: It is determined whether there is a target false positive result in the text recognition result, wherein the target false positive result is a false positive result caused by unconverted legal terms; In a case where the target false positive result exists in the text recognition result, unconverted target legal terms are extracted from the target false positive result; An associated credit term associated with the target legal term is determined, and the target legal term and the associated credit term are added to the credit term dictionary.

8. A device for risk identification of a credit contract, characterized in that, It includes: A preprocessing unit is configured to obtain a credit contract to be recognized, and preprocess the credit contract to obtain a target contract text, wherein the preprocessing includes at least one of the following: credit term conversion, format conversion, segmentation processing, and character filtering; An identification unit is configured to input the target contract text into a target model to obtain a text recognition result, wherein the text recognition result includes at least one of the following: contract term classification result, risk identification result, and legal term recommendation result, the target model is trained by M groups of training samples, each group of training samples includes historical contract text and historical text recognition result, wherein M is a positive integer; A generation unit is configured to generate a risk report based on the text recognition result, wherein the risk report includes a to-be-adjusted contract term that has a risk and a recommended legal term that needs to be met by the to-be-adjusted contract term.

9. An electronic device, comprising: It includes: A memory storing an executable program; A processor configured to run the program, wherein the program performs the credit contract risk identification method of any one of claims 1 to 7 when running.

10. A computer program product comprising computer instructions, characterized in that, The computer instructions are executed by the processor to implement the steps of the credit contract risk identification method of any one of claims 1 to 7. The computer instructions are executed by the processor to implement the steps of the credit contract risk identification method of any one of claims 1 to 7.