Method, device and equipment for updating financial contract identification model and storage medium

By training and updating the financial contract recognition model, the problem of low accuracy in existing technologies has been solved, and efficient recognition of diverse contracts has been achieved.

CN116610956BActive Publication Date: 2026-05-01PING AN BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PING AN BANK CO LTD
Filing Date
2023-06-05
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing financial contract recognition models have low accuracy and cannot effectively identify diverse contract contents, resulting in low recognition efficiency.

Method used

An initial model for detecting financial scenarios is trained by receiving labeled financial scenario contract samples. This model is then combined with a financial business identification model to form a financial contract identification model. The model is then tested and retrained in branch offices, and the head office model is updated based on the test results.

Benefits of technology

The accuracy of the financial contract recognition model has been improved, enabling accurate identification of multiple versions of new financial contracts and enhancing recognition efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116610956B_ABST
    Figure CN116610956B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a financial contract recognition model updating method and device, equipment and a storage medium. The method comprises receiving a contract sample of a financial scene that has been labeled, training an initial model for contract financial scene detection through the contract sample, obtaining a contract financial scene detection model, combining the contract financial scene detection model and a contract financial business recognition model to obtain a financial contract recognition model, sending the model to a head office and at least one branch office, receiving a financial scene detection result of an actual contract generated in the branch office, retraining the financial contract recognition model in the branch office if the number of classification errors in the detection result is greater than a first preset number threshold, updating the financial contract recognition model of the head office if the number of branch offices that are retrained exceeds a second preset number threshold, and synchronizing the update result to the at least one branch office. The method realizes accurate recognition of multiple versions of new financial contracts.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, apparatus, equipment and storage media for updating financial contract recognition models Technical Field

[0001] This invention belongs to the field of information technology, and in particular relates to a method, apparatus, device and storage medium for updating a financial contract recognition model. Background Technology

[0002] In financial settings (such as insurance, securities, and banking), contracts serve as valid proof of identity. Manually extracting contract content is time-consuming, labor-intensive, and inefficient, failing to meet the demands of today's fast-paced world. Existing contract content recognition models include those based on detection and recognition, as well as those based on detection and data mining. However, the diverse formats of contracts mean that training models on only a short period of contract data results in low accuracy and inherent errors in contract content recognition. Summary of the Invention

[0003] The embodiments of the present invention propose a training method, apparatus, device and storage medium for a contract recognition model, which solves the problem of low accuracy in existing financial contract recognition.

[0004] This invention provides a method for updating a financial contract recognition model, the method comprising:

[0005] Receive contract samples labeled with financial scenarios, train an initial model for detecting financial scenarios using the contract samples, and obtain a model for detecting financial scenarios.

[0006] The contract finance scenario detection model and the contract finance business identification model are combined to obtain the financial contract identification model;

[0007] The financial contract identification model is sent to the head office and at least one branch of the financial institution.

[0008] Receive the financial contract recognition model in the branch office as a result of the detection of the financial scenario in which the contract was actually generated;

[0009] If the number of classification errors in the detection results exceeds a first preset threshold, the financial contract recognition model in the branch office will be retrained.

[0010] If the number of branches retraining the financial contract recognition model exceeds a second preset threshold, the financial contract recognition model of the head office is updated based on the training results of the financial contract recognition model of the branches, the detection results, and the financial contract recognition model of the head office, and the update results are synchronized to the at least one branch.

[0011] The present invention also provides an update device for a financial contract recognition model, the device comprising:

[0012] The training module is used to receive contract samples labeled with financial scenarios, train an initial model for detecting financial scenarios using the contract samples, and obtain a model for detecting financial scenarios.

[0013] The combination module is used to combine the contract finance scenario detection model and the contract finance business recognition model to obtain the financial contract recognition model.

[0014] The sending module is used to send the financial contract recognition model to the head office and at least one branch of the financial institution;

[0015] The receiving module is used to receive the financial contract recognition model in the branch office as a result of the detection of the financial scenario in which the contract was actually generated.

[0016] A retraining module is used to retrain the financial contract recognition model in the branch office if the number of classification errors in the detection results is greater than a first preset threshold.

[0017] An update module is configured to, if the number of branches retraining the financial contract recognition model exceeds a second preset threshold, update the financial contract recognition model of the head office based on the training results of the financial contract recognition model of the branches, the detection results, and the financial contract recognition model of the head office, and synchronize the update results with the at least one branch.

[0018] This invention also provides an updating device for a financial contract recognition model, including a memory and a processor. The memory stores a computer program, which, when executed by the processor, causes the processor to perform the following steps:

[0019] Receive contract samples labeled with financial scenarios, train an initial model for detecting financial scenarios using the contract samples, and obtain a model for detecting financial scenarios.

[0020] The contract finance scenario detection model and the contract finance business identification model are combined to obtain the financial contract identification model;

[0021] The financial contract identification model is sent to the head office and at least one branch of the financial institution.

[0022] Receive the financial contract recognition model in the branch office as a result of the detection of the financial scenario in which the contract was actually generated;

[0023] If the number of classification errors in the detection results exceeds a first preset threshold, the financial contract recognition model in the branch office will be retrained.

[0024] If the number of branches retraining the financial contract recognition model exceeds a second preset threshold, the financial contract recognition model of the head office is updated based on the training results of the financial contract recognition model of the branches, the detection results, and the financial contract recognition model of the head office, and the update results are synchronized to the at least one branch.

[0025] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the following steps:

[0026] Receive contract samples labeled with financial scenarios, train an initial model for detecting financial scenarios using the contract samples, and obtain a model for detecting financial scenarios.

[0027] The contract finance scenario detection model and the contract finance business identification model are combined to obtain the financial contract identification model;

[0028] The financial contract identification model is sent to the head office and at least one branch of the financial institution.

[0029] Receive the financial contract recognition model in the branch office as a result of the detection of the financial scenario in which the contract was actually generated;

[0030] If the number of classification errors in the detection results exceeds a first preset threshold, the financial contract recognition model in the branch office will be retrained.

[0031] If the number of branches retraining the financial contract recognition model exceeds a second preset threshold, the financial contract recognition model of the head office is updated based on the training results of the financial contract recognition model of the branches, the detection results, and the financial contract recognition model of the head office, and the update results are synchronized to the at least one branch.

[0032] The embodiments of the present invention have the following beneficial effects:

[0033] By training separate financial scenario recognition models and financial business recognition models for financial contracts, the system achieves the identification of financial scenarios and financial businesses within financial contracts. By updating the models of the head office and corresponding branches within financial institutions, the head office model is updated, improving the accuracy of model recognition and enabling accurate identification of multiple versions of new financial contracts. Attached Figure Description

[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0035] in:

[0036] Figure 1 is a schematic diagram of a network architecture provided in an embodiment of the present invention;

[0037] Figure 2 is a schematic diagram of a scenario for training a financial contract recognition model according to an embodiment of the present invention;

[0038] Figure 3 is a flowchart illustrating a method for updating a financial contract recognition model according to an embodiment of the present invention;

[0039] Figure 4 is a schematic diagram of the process of retraining the initial model for detecting contract finance scenarios in a branch office according to an embodiment of the present invention;

[0040] Figure 5 is a schematic diagram of the process for updating the initial model of the head office's contract finance scenario detection according to an embodiment of the present invention;

[0041] Figure 6 is a schematic diagram of the structure of an updating device for a financial contract recognition model provided in an embodiment of the present invention;

[0042] Figure 7 is a schematic diagram of the structure of an updating device for a financial contract recognition model provided in an embodiment of the present invention;

[0043] Figure 8 is a schematic diagram of the structure of a computer-readable storage medium provided in an embodiment of the present invention. Detailed Implementation

[0044] 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.

[0045] To facilitate understanding, the relevant terms used in this application will be introduced below.

[0046] (1) Financial scenarios refer to the process of extending financial services into non-financial services, providing customers with agile responses to form a new full-chain financial ecosystem. In the embodiments of this application, financial scenarios include banking, securities, and insurance industries.

[0047] (2) Financial institutions refer to institutions engaged in financial business that are supervised and managed by the financial management department of the State Council. Industries covered include banking, securities, and insurance.

[0048] (3) The head office of a financial institution refers to the general governing body established by the financial institution.

[0049] (4) A branch of a financial institution refers to a branch established under the general management authority to engage in financial business and a sub-branch established under the branch to engage in financial business.

[0050] (5) A private cloud is a cloud computing model in which IT services are configured through a private IT infrastructure for the exclusive use of a single organization. Private clouds are typically managed through internal resources. The terms private cloud and virtual private cloud (VPC) are often used interchangeably.

[0051] (6) Financial business, including banking business, securities business and insurance business. Among them, banking business can be divided into four categories: asset business, liability business, intermediary business and off-balance sheet business; securities business can be divided into: securities brokerage business, securities investment consulting business, financial advisory business, securities underwriting and sponsorship, proprietary securities trading business, securities asset management business and margin trading business; insurance business is mainly divided into: insurance business development, underwriting business, insurance claims, asset management, etc.

[0052] (7) Labeling refers to the process of manually marking, classifying, and annotating raw data (such as images, text, speech, autonomous driving data, etc.) to make it easier for machine learning algorithms to understand and process. The purpose is to use the labeled data to train machine learning algorithms to achieve automated data processing and analysis. Common labeling tasks include image classification, object detection, speech recognition, and natural language processing.

[0053] (8) Horizontal federated learning, also known as sample-partitioned federated learning or example-partitioned federated learning, can be applied to scenarios where the datasets of the various participants in federated learning have the same feature space but different sample spaces, similar to horizontally partitioning data in a tabular view. In fact, the term "horizontal" comes from the term horizontal partition. "Horizontal partitioning" is widely used in traditional scenarios where database records are displayed in tabular form, such as records in a table being horizontally divided into different groups according to rows, and each row containing complete data features.

[0054] Please refer to Figure 1, which is a schematic diagram of a network architecture provided in an embodiment of the present invention. As shown in Figure 1, the network architecture may include a server 200 and a terminal device cluster. The terminal device cluster may include one or more terminal devices; in this embodiment, the number of terminal devices is not limited. As shown in Figure 1, the multiple terminal devices may specifically include terminal device 1, terminal device 2, terminal device 3, ..., terminal device n. As shown in Figure 1, terminal device 1, terminal device 2, terminal device 3, ..., terminal device n are all connected to the server 200 through the network 300, so that each terminal device can interact with the server 200 through the network 300.

[0055] As shown in Figure 1, server 200 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Terminal devices can be smart terminals such as smartphones, tablets, laptops, desktop computers, and smart TVs. The following description uses the communication between terminal device 1, terminal device 2, and server 200 as an example to illustrate the specific implementation of this application.

[0056] Optionally, terminal device 1 and terminal device 2 may include a model application, and server 200 may be a backend device for the model application. Server 200 may train the model (which may be any model) and then send the trained model to terminal device 1 and terminal device 2 for contract recognition in financial scenarios. This process is described below.

[0057] Please refer to Figure 2, which is a schematic diagram of a scenario for training a financial contract recognition model according to an embodiment of the present invention. As shown in Figure 2, server 200 receives contract samples labeled with financial scenarios, inputs the received labeled contract samples into the initial model for financial scenario detection for training, obtains the financial scenario detection model, and combines the financial scenario detection model with the financial business recognition model to obtain the financial contract recognition model. The financial contract recognition model is sent to terminal device 1 and terminal device 2, and terminal device 1 and terminal device 2 receive the model trained by server 200 through model application. In this embodiment, server 200 can be a private cloud in the head office of a financial institution, or it can be a private cloud of multiple branches of the head office.

[0058] The financial contract recognition model in multiple terminal devices 2 detects the actual financial scenarios of contracts generated by each branch and obtains the detection results for each branch. The erroneous parts in the detection results are manually labeled. When the number of erroneous parts reaches a certain number, the financial contract recognition model in that branch is retrained. The server 200 detects the number of branches that have retrained the financial contract recognition model. When the number of branches that have retrained the financial contract recognition model reaches a certain value, the server 200 updates the financial contract recognition model in the head office based on the training results of the retrained financial contract recognition model in the branch, the detection results of the financial contract recognition model in each branch on the actual contracts generated, and the financial contract recognition model in the head office. The updated results are then synchronized to the corresponding branch in the head office, completing the update of the financial contract recognition model.

[0059] Server 200 will extract the received contract samples labeled with financial scenarios line by line, and then train the contract financial business recognition model for each extracted line. When the contract financial business recognition model converges, the contract financial business recognition model is obtained.

[0060] The method provided in this invention can accurately identify financial contracts. By training the financial scenario identification model and the financial business identification model of the financial contract respectively, the accurate identification of multiple versions of new financial contracts can be achieved.

[0061] Figure 3 shows a flowchart illustrating a method for updating a financial contract recognition model according to an embodiment of the present invention. This method can be applied to all terminal devices as well as to server 200; this embodiment uses server 200 as an example. The method for updating the financial contract recognition model specifically includes the following steps:

[0062] Step S101: Receive contract samples labeled with financial scenarios, train an initial model for detecting financial scenarios using the contract samples, and obtain a model for detecting financial scenarios.

[0063] Specifically, in this embodiment, contract samples from different financial scenarios are collected, and the collected contract samples are manually labeled according to the actual financial scenarios of the contracts. The labeled contract samples are divided into training set, validation set and test set in a 3:1:1 ratio to train the initial model for contract financial scenario detection and obtain the contract financial scenario detection model.

[0064] The initial model for detecting contract finance scenarios can be built based on actual needs, and no specific limitations are imposed in this embodiment of the invention.

[0065] Preferably, in this embodiment, the initial model for detecting contract finance scenarios is constructed based on a YOLOv5s network structure, including a backbone network, a bottleneck layer, and an output layer. The backbone network is constructed using convolutional layers, batch normalization (BN) layers, activation layers, attention layers, and short connection layers; the proportions of these layers can be adjusted according to actual needs during construction. The bottleneck layer consists of bottom-up upsampling and top-downsampling sequences. The output layer comprises the coordinates (4d) of each downsampled pixel, the confidence score (1d), and the category (4d).

[0066] Preferably, in this embodiment, the initial model for detecting contract finance scenarios sets the batch size to 64, the learning rate to 0.001, the image resolution to 1024, and the loss function to consist of cross-entropy loss function CELoss and iouLoss. The optimal parameter values ​​of the network structure are searched using the gradient descent algorithm.

[0067] Specifically, in this embodiment, contract samples from financial scenarios including banking, securities, and insurance are obtained. The contract samples are then manually labeled with the corresponding financial scenarios such as banking, securities, and insurance. Finally, they are input into an initial model for detecting financial scenarios based on the YOLOv5s network structure for training, resulting in a model for detecting financial scenarios based on contracts.

[0068] Step S102: Combine the contract finance scenario detection model and the contract finance business identification model to obtain the financial contract identification model;

[0069] Specifically, in this implementation, the contract finance business identification model and the contract finance scenario detection model are combined to obtain the financial contract identification model.

[0070] The contractual financial business identification model identifies specific business activities in each financial scenario, such as asset business, liability business, intermediary business, and off-balance-sheet business in banking; and securities brokerage business, securities investment consulting business, financial advisory business, securities underwriting and sponsorship, proprietary trading, securities asset management business, and margin trading in the securities industry.

[0071] The financial contract recognition model is used to identify contractual financial scenarios and financial transactions.

[0072] Step S103: Send the financial contract recognition model to the head office and at least one branch of the financial institution;

[0073] Specifically, the financial contract recognition model and its parameters are packaged into an image built using Docker. Preferably, in this embodiment, the image containing the financial contract recognition model and its parameters is placed in the head office's private cloud for management, and then distributed to the terminal devices of the head office and branches for initial operation.

[0074] For example, the financial contract recognition model can be sent to the head office, branches, and sub-branches of a bank, and then run on the terminal devices of the head office, branches, and sub-branches.

[0075] Step S104: Receive the financial contract recognition model in the branch office as a result of detecting the financial scenario in which the contract was actually generated;

[0076] Specifically, in this implementation, the terminal devices in each branch office use a financial contract recognition model to detect financial scenarios in actual contracts and statistically analyze the detection results.

[0077] It should be noted that the detection results here include both correct and incorrect detection results for actual contract financial scenarios. When obtaining the detection results, the results of the actual contract financial scenarios received by the manually annotated branch offices can be used as a reference.

[0078] For example, branches and sub-branches use financial contract recognition models to detect the financial scenarios and specific financial transactions of actual contracts and obtain detection results.

[0079] Step S105: If the number of classification errors in the detection results is greater than the first preset threshold, the financial contract recognition model in the branch is retrained.

[0080] Specifically, in this embodiment, the detection results of the financial contract recognition model in the branch office for the actual generated financial contract scenario are used as a basis. Based on the detection results, that is, whether the financial contract recognition model in the branch office correctly or incorrectly detects the actual generated contract, it is determined whether the financial contract recognition model for that branch office needs to be retrained.

[0081] For example, terminal devices in a bank branch use a financial contract recognition model to identify actual contracts and obtain the financial scenarios and transactions involved. If the financial contract recognition model in a branch detects more than 1,000 financial scenarios with errors, the model in that branch will be retrained.

[0082] Step S105: If the number of branches retraining the financial contract recognition model exceeds a second preset threshold; based on the training results of the financial contract recognition model of the branches, the detection results, and the financial contract recognition model of the head office, update the financial contract recognition model of the head office, and synchronize the update results with the at least one branch.

[0083] Specifically, in this embodiment, the process first detects requests for retraining from branch offices. When a request meets a preset requirement, it checks whether the current financial contract recognition model in all branches has been updated, and obtains the current financial contract recognition model in all branches. It then obtains the detection results of the financial contract recognition models in all branches for all actually generated contracts up to the current point. Based on the current financial contract recognition models in all branches, the detection results of the current financial contract recognition models in all branches for all actually generated contracts, and the financial contract recognition model in the head office, the financial contract recognition model in the head office is updated. After updating the financial contract recognition model in the head office, the updated results are synchronized to the corresponding branch offices.

[0084] It should be noted that, in this embodiment, obtaining the detection results of the financial contract recognition model for all actually generated contracts in all branches up to the present includes: if the financial contract recognition model in a branch has not been updated, obtaining the detection results of that financial contract recognition model for all received financial scenarios of actually generated contracts; if the financial contract recognition model in a branch has been updated, obtaining the sum of the detection results of the financial contract recognition model in the branch before the update and the detection results of the financial contract recognition model in the branch after the update.

[0085] Preferably, in this implementation, step S105 can be updated based on horizontal federated learning.

[0086] For example, in this embodiment, if the number of bank branches requesting an update to the financial contract recognition model reaches half of the total number of branches in the head office, then based on the training results of the financial contract recognition models in the branches, the financial contract recognition models in the branches update the financial contract recognition models in the head office according to the detection results of the actual contracts generated and the financial contract recognition models in the head office, and synchronize the update results to the corresponding branches in the head office.

[0087] The method provided in this invention identifies the financial scenarios and financial transactions of financial contracts by training a financial scenario recognition model and a financial transaction recognition model for financial contracts respectively. By updating the model of the head office corresponding to the branch offices within a financial institution, the model of the head office is updated, improving the accuracy of model recognition and enabling accurate identification of multiple versions of new financial contracts.

[0088] In some embodiments, as shown in FIG4, a flowchart illustrating the retraining process of a financial contract recognition model in a branch office according to an embodiment of the present invention is provided. Step S105 includes:

[0089] Step S1051: Monitor the detection results and obtain the number of classification errors in the actual contract financial scenarios in the detection results;

[0090] Step S1052: Determine whether the number of classification errors exceeds a first preset threshold.

[0091] Step S1053: If the number of classification errors exceeds the first preset threshold, the financial contract recognition model of the branch corresponding to the detection result is retrained.

[0092] Step S1054: If the number of classification errors is less than the first preset threshold, the financial contract recognition model in the corresponding branch remains unchanged, and the number of classification errors in the actual contract financial scenario in the detection results is continued to be obtained.

[0093] Specifically, in this implementation, the prediction performance of the financial contract recognition model in the branch office for new contract financial scenarios is detected. When the number of detection errors of the financial contract recognition model in the branch office for the actual generated contract financial scenarios exceeds the first preset threshold, the financial contract recognition model in the branch office is retrained. If the number of detection errors of the financial contract recognition model in the branch office for the actual generated contract financial scenarios does not exceed the first preset threshold, the detection results of the financial contract recognition model in the branch office for the actual generated contract financial scenarios are continued to be detected.

[0094] It should be noted that the first preset quantity threshold can be selected according to actual needs. Preferably, in this embodiment, the first preset quantity threshold is more than 1,000 copies.

[0095] In some embodiments, as shown in FIG5, it is a schematic diagram of a process for updating a head office financial contract identification model according to an embodiment of the present invention. Step S106 includes:

[0096] Step S1061: Obtain the number of branches for which the initial model for detecting contract finance scenarios is retrained;

[0097] Step S1062: Determine whether the number of branch offices exceeds a second preset number threshold;

[0098] Step S1063: If the number of branches exceeds the second preset number threshold, update the initial model for detecting contract financial scenarios of the head office based on the training results of the initial model for detecting contract financial scenarios of the branches, the detection results, and the initial model for detecting contract financial scenarios of the head office.

[0099] Step S1064: If the number of branches is less than the second preset threshold, the financial contract recognition model of the head office remains unchanged, and the number of branches to be retrained continues to be obtained.

[0100] Specifically, in this embodiment, the number of branches retraining the financial contract recognition model is monitored in real time. Then, the number of branches is compared with a second preset threshold. If the number of branches exceeds the second preset threshold, it is detected whether the current financial contract recognition model in all branches is updated, and the current financial contract recognition model in all branches is obtained. The detection results of the financial contract recognition model in all branches up to the current point of time for all actually generated contracts are obtained. The financial contract recognition model in the head office is updated based on the current financial contract recognition model in all branches, the detection results of the current financial contract recognition model in all branches for all actually generated contracts, and the financial contract recognition model in the head office.

[0101] It should be noted that the second preset quantity threshold can be set according to actual conditions. Preferably, in this embodiment, the second preset quantity threshold is set to half of all branches corresponding to the main organization.

[0102] In some embodiments, step S1063 includes:

[0103] Obtain the first gradient of the contract finance scenario detection model in the current financial contract recognition model of all the aforementioned branches;

[0104] The detection success rate is obtained from the detection results. The detection success rate is the ratio of the number of contracts that the financial contract recognition model of the branch office accurately detects in actual contract financial scenarios to the total number of detected contracts.

[0105] The gradient of the contract financial scenario detection model in the financial contract recognition model at the head office is updated as follows: the initial gradient of the contract financial scenario detection model in the financial contract recognition model at the head office is subtracted from the product of the first gradient in all branches and the reciprocal of the detection success rate. Specifically, in this embodiment, it is monitored whether the current financial contract recognition model in each branch is updated. If it is not updated, the first gradient of the contract financial scenario detection model in the financial contract recognition model is directly obtained. If it is updated, the first gradient of the contract financial scenario detection model in the updated financial contract recognition model is obtained. The obtained first gradients of each branch structure are denoted as d1, d2, ..., d... n Where n is the total number of branches. Then, the total number of contracts actually generated and the number of contracts correctly detected in the financial scenario are obtained from the number of correctly detected contracts and the total number of contracts. The detection success rate of the branch is obtained from the number of correctly detected contracts and the total number of contracts. Assuming the initial gradient of the financial contract recognition model in the head office is parameter_master, the updated gradient of the financial contract recognition model in the head office is new_paramter_master:

[0106]

[0107] In some embodiments, obtaining the first gradient of the contract finance scenario detection model in the current financial contract identification model across all branches includes:

[0108] Determine whether the financial contract recognition model in all the branches has been retrained, and obtain the training result; obtain the first gradient of the contract financial scenario detection model in the current financial contract recognition model in all the branches based on the training result. Preferably, obtaining the first gradient of the contract financial scenario detection model in the current financial contract recognition model in all the branches based on the training result includes:

[0109] If the financial contract recognition model in the branch office has not been retrained, then the first gradient of the contract financial scenario detection model in the current financial contract recognition model is obtained;

[0110] If the financial contract recognition model in the branch office has been retrained, then the first gradient of the contract financial scenario detection model in the retrained financial contract recognition model is obtained.

[0111] Specifically, in this implementation, it is first determined whether the financial contract recognition model in the branch has been updated. If not, the first gradient is the original gradient of the contract financial scenario detection model in the financial contract recognition model. If it has been updated, the first gradient is the gradient corresponding to the updated contract financial scenario detection model in the financial contract recognition model.

[0112] In some embodiments, the method further includes: extracting each line of the labeled financial scenario contract sample line by line, training a contract financial business recognition model using each line of the sample, and obtaining the contract financial business recognition model.

[0113] Preferably, each line of the labeled financial scenario contract sample is extracted line by line, and a contract financial business recognition model is trained using each line of content to obtain the contract financial business recognition model, including:

[0114] Extract all text from each line of content and assemble them into sentences;

[0115] The information type of the statement is marked, and the information type includes the contracting party A, the contracting party B, the contract amount, and the specific matters of the contract.

[0116] The statement and the information type are input into the contract content recognition model for training to obtain a contract financial business recognition model.

[0117] In some embodiments, extracting all text from each line of content includes:

[0118] The text is extracted from each line of content based on text features, including character strokes and character structure.

[0119] The text with the highest probability among the extracted text is used as the final extraction result to obtain all the text in each line.

[0120] Specifically, in this embodiment, the contract content recognition model is trained by extracting each line of content from the contract sample to identify the specific financial business of the contract. For example, the contract sample marked in step S101 and divided into training set, validation set and test set in a 3:1:1 ratio is truncated line by line to generate the corresponding training set, validation set and test set. The contract financial business recognition model is then trained to obtain the contract financial business recognition model, which is used to identify the specific business of the actual contract received.

[0121] In this embodiment, the contract financial business recognition model is a CNN+LSTM neural network constructed from convolutional layers, batch normalization layers, activation layers, input gates, forget gates, and output gates to extract text. The learning rate is set to 1e-5, and the image resolution is 32x640. Based on a model pre-trained on ImageNet, the text recognition model is trained using CTC loss as the loss function and gradient descent as the iterative algorithm. CTC loss is calculated using a dynamic programming algorithm to maximize the likelihood probability of the predicted value composed of multiple joint probabilities and the true labels. In some embodiments, the method further includes:

[0122] Extract target information from the information type.

[0123] Specifically, in this embodiment, the target information can be the contracting party A, the contracting party B, the contract amount, and the specific details of the contract, etc. In actual applications, the target information can be set according to actual needs.

[0124] In some embodiments, as shown in FIG6, a schematic diagram of an updating device for a financial contract recognition model provided in an embodiment of the present invention is provided, the device comprising:

[0125] The training module 601 is used to receive contract samples labeled with financial scenarios, train an initial model for detecting financial scenarios using the contract samples, and obtain a model for detecting financial scenarios.

[0126] The combination module 602 is used to combine the contract finance scenario detection model and the contract finance business identification model to obtain the financial contract identification model.

[0127] The sending module 603 is used to send the financial contract recognition model to the head office and at least one branch of the financial institution.

[0128] The receiving module 604 is used to receive the financial contract recognition model in the branch office as a result of the detection of the financial scenario in which the contract was actually generated.

[0129] The retraining module 605 is used to retrain the financial contract recognition model in the branch if the number of classification errors in the detection results is greater than a first preset threshold.

[0130] The update module 606 is configured to, if the number of branches retraining the financial contract recognition model exceeds a second preset threshold, update the financial contract recognition model of the head office based on the training results of the financial contract recognition model of the branches, the detection results, and the financial contract recognition model of the head office, and synchronize the update results with the at least one branch.

[0131] In some embodiments, the retraining module includes:

[0132] The monitoring module is used to monitor the detection results and obtain the number of classification errors in the actual contract financial scenarios in the detection results;

[0133] The determination module is used to determine whether the number of classification errors exceeds a first preset threshold.

[0134] The sub-training module is used to retrain the financial contract recognition model in the corresponding branch if the number of classification errors exceeds the first preset threshold.

[0135] The first maintenance module is configured to, if the number of classification errors is less than the first preset threshold, keep the financial contract recognition model in the corresponding branch unchanged and continue to obtain the number of classification errors for the actual contract financial scenario in the detection results.

[0136] In some embodiments, the update module includes:

[0137] The acquisition module is used to acquire the number of branches for which the financial contract recognition model has been retrained;

[0138] The judgment module is used to determine whether the number of branch offices exceeds a second preset number threshold.

[0139] The sub-update module is used to update the financial contract recognition model of the head office based on the training results of the financial contract recognition model of the branch office, the detection results and the financial contract recognition model of the head office if the number of branch offices exceeds the second preset number threshold, and synchronize the update results to at least one branch office.

[0140] The second maintenance module is used to ensure that if the number of branches is less than the second preset number threshold, the financial contract recognition model of the head office remains unchanged, and the number of branches to be retrained continues to be obtained.

[0141] In some embodiments, the sub-update module is further configured to:

[0142] Obtain the first gradient of the contract finance scenario detection model in the current financial contract recognition model of all the aforementioned branches;

[0143] The detection success rate is obtained from the detection results. The detection success rate is the ratio of the number of contracts that the financial contract recognition model of the branch office accurately detects in actual contract financial scenarios to the total number of detected contracts.

[0144] The gradient of the contract financial scenario detection model in the financial contract recognition model of the head office is updated as follows: the initial gradient of the contract financial scenario detection model in the financial contract recognition model of the head office is subtracted from the product of the first gradient in all branches and the reciprocal of the detection success rate.

[0145] In some embodiments, the sub-update module is further configured to:

[0146] Determine whether the financial contract recognition model in all the aforementioned branches has been retrained, and obtain the training results;

[0147] Based on the training results, obtain the first gradient of the contract finance scenario detection model in the current financial contract recognition model of all the branches.

[0148] In some embodiments, the sub-update module is further configured to:

[0149] If the financial contract recognition model in the branch office has not been retrained, then the first gradient of the contract financial scenario detection model in the current financial contract recognition model is obtained;

[0150] If the financial contract recognition model in the branch office has been retrained, then the first gradient of the contract financial scenario detection model in the retrained financial contract recognition model is obtained.

[0151] In some embodiments, the apparatus further includes:

[0152] The contract financial business identification model acquisition module is used to extract each line of the contract sample of the labeled financial scenario, train the contract financial business identification model through each line of the contract financial business identification model, and obtain the contract financial business identification model.

[0153] In some embodiments, the contract financial business identification model acquisition module is also used for:

[0154] Extract all text from each line of content and assemble them into sentences;

[0155] The information type of the statement is marked, and the information type includes the contracting party A, the contracting party B, the contract amount, and the specific matters of the contract.

[0156] The statement and the information type are input into the contract content recognition model for training to obtain a contract financial business recognition model.

[0157] In some embodiments, the contract financial business identification model acquisition module is also used for:

[0158] The text is extracted from each line of content based on text features, including character strokes and character structure.

[0159] The text with the highest probability among the extracted text is used as the final extraction result to obtain all the text in each line.

[0160] In some embodiments, the contract financial business identification model acquisition module is also used for:

[0161] Extract target information from the information type.

[0162] For further details regarding the implementation of the above technical solution by each module in the updating device for the financial contract recognition model, please refer to the description in the above-mentioned updating method for the financial contract recognition model, which will not be repeated here.

[0163] In some embodiments, as shown in FIG7, which is a schematic diagram of a financial contract recognition model update device provided in an embodiment of the present invention, the device includes a memory 701 and a processor 702. The memory 701 stores a computer program, and when the computer program is executed by the processor 702, the processor 701 performs the following steps:

[0164] Receive contract samples labeled with financial scenarios, train an initial model for detecting financial scenarios using the contract samples, and obtain a model for detecting financial scenarios.

[0165] The contract finance scenario detection model and the contract finance business identification model are combined to obtain the financial contract identification model;

[0166] The financial contract identification model is sent to the head office and at least one branch of the financial institution.

[0167] Receive the financial contract recognition model in the branch office as a result of the detection of the financial scenario in which the contract was actually generated;

[0168] If the number of classification errors in the detection results exceeds a first preset threshold, the financial contract recognition model in the branch office will be retrained.

[0169] If the number of branches retraining the financial contract recognition model exceeds a second preset threshold, the financial contract recognition model of the head office is updated based on the training results of the financial contract recognition model of the branches, the detection results, and the financial contract recognition model of the head office, and the update results are synchronized to the at least one branch.

[0170] For further details regarding the implementation of the above technical solution by the processor 701 in the device for updating the financial contract recognition model, please refer to the description in the above-mentioned method for updating the financial contract recognition model, which will not be repeated here.

[0171] The processor 701 can also be called a CPU (Central Processing Unit). The processor 701 may be an integrated circuit chip with signal processing capabilities. The processor 701 can also be a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor, or the processor 701 can be any conventional processor.

[0172] In some embodiments, as shown in FIG8, a schematic diagram of a computer-readable storage medium provided in an embodiment of the present invention is provided. The storage medium stores a readable computer program 801. The computer program 801 may be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, a server machine, or a network device, etc.) or a processor to perform the following steps:

[0173] Receive contract samples labeled with financial scenarios, train an initial model for detecting financial scenarios using the contract samples, and obtain a model for detecting financial scenarios.

[0174] The contract finance scenario detection model and the contract finance business identification model are combined to obtain the financial contract identification model;

[0175] The financial contract identification model is sent to the head office and at least one branch of the financial institution.

[0176] Receive the financial contract recognition model in the branch office as a result of the detection of the financial scenario in which the contract was actually generated;

[0177] If the number of classification errors in the detection results exceeds a first preset threshold, the financial contract recognition model in the branch office will be retrained.

[0178] If the number of branches retraining the financial contract recognition model exceeds a second preset threshold, the financial contract recognition model of the head office is updated based on the training results of the financial contract recognition model of the branches, the detection results, and the financial contract recognition model of the head office, and the update results are synchronized to the at least one branch.

[0179] The aforementioned storage media include: USB flash drives, portable hard drives, magnetic disks or optical disks, ROM (Read-Only Memory), RAM (Random Access Memory), and other media that can store program code, or terminal devices such as computers, servers, mobile phones, and tablets.

[0180] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0181] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0182] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for updating a financial contract recognition model, characterized in that, The method includes: receiving contract samples labeled with financial scenarios; training an initial model for detecting financial scenarios using the contract samples to obtain a financial scenario detection model; combining the financial scenario detection model and a financial business identification model to obtain a financial contract identification model; sending the financial contract identification model to the head office and at least one branch of a financial institution; receiving the financial scenario detection results of the financial contract identification model in the branch for actual contracts; if the number of misclassifications in the detection results exceeds a first preset threshold, retraining the financial contract identification model in the branch; if the number of branches retraining the financial contract identification model exceeds a second preset threshold, updating the financial scenario detection model of the head office based on the training results of the financial contract identification model in the branch, the detection results, and the financial contract identification model of the head office. The contract recognition model is updated, and the update results are synchronized to at least one branch. Based on the training results of the financial contract recognition model of the branch, the detection results, and the financial contract recognition model of the head office, the financial contract recognition model of the head office is updated, including: obtaining the first gradient of the contract financial scenario detection model in the current financial contract recognition model of all branches; obtaining the detection success rate in the detection results, where the detection success rate is the ratio of the number of contracts accurately detected by the financial contract recognition model of the branch to the total number of detected contracts; updating the gradient of the contract financial scenario detection model in the financial contract recognition model of the head office to: the initial gradient of the contract financial scenario detection model in the financial contract recognition model of the head office minus the product of the first gradient in all branches and the reciprocal of the detection success rate.

2. The method for updating the financial contract recognition model according to claim 1, characterized in that, If the number of classification errors in the detection results exceeds a first preset threshold, the financial contract recognition model in the branch office is retrained. This includes: monitoring the detection results and obtaining the number of classification errors for actual financial contract scenarios in the detection results; determining whether the number of classification errors exceeds the first preset threshold; if the number of classification errors exceeds the first preset threshold, retraining the financial contract recognition model in the corresponding branch office; if the number of classification errors is less than the first preset threshold, the financial contract recognition model in the corresponding branch office remains unchanged, and the number of classification errors for actual financial contract scenarios in the detection results continues to be obtained.

3. The method for updating the financial contract recognition model according to claim 1, characterized in that, If the number of branches retraining the financial contract recognition model exceeds a second preset threshold, the process involves: updating the financial contract recognition model of the head office based on the training results of the financial contract recognition model of the branches, the detection results, and the financial contract recognition model of the head office, and synchronizing the update results with the at least one branch; obtaining the number of branches retraining the financial contract recognition model; determining whether the number of branches exceeds the second preset threshold; if the number of branches exceeds the second preset threshold, updating the financial contract recognition model of the head office based on the training results of the financial contract recognition model of the branches, the detection results, and the financial contract recognition model of the head office, and synchronizing the update results with the at least one branch; if the number of branches is less than the second preset threshold, the financial contract recognition model of the head office remains unchanged, and the number of branches retraining continues to be obtained.

4. The method for updating the financial contract recognition model according to claim 1, characterized in that, The step of obtaining the first gradient of the contract financial scenario detection model in the current financial contract recognition model in all the branches includes: determining whether the financial contract recognition model in all the branches has been retrained and obtaining the training result; and obtaining the first gradient of the contract financial scenario detection model in the current financial contract recognition model in all the branches based on the training result.

5. The method for updating the financial contract recognition model according to claim 4, characterized in that, The step of obtaining the first gradient of the contract financial scenario detection model in the current financial contract recognition model among all the branches based on the training results includes: if the financial contract recognition model in the branch has not been retrained, then obtaining the first gradient of the contract financial scenario detection model in the current financial contract recognition model; if the financial contract recognition model in the branch has been retrained, then obtaining the first gradient of the contract financial scenario detection model in the trained financial contract recognition model.

6. The method for updating the financial contract recognition model according to claim 1, characterized in that, The method further includes: extracting each line of the labeled financial scenario contract sample, training a contract financial business recognition model using each line of the sample, and obtaining the contract financial business recognition model.

7. The method for updating the financial contract recognition model according to claim 6, characterized in that, The process of extracting each line of the labeled financial scenario contract sample and training a contract financial business recognition model using each line of content to obtain the contract financial business recognition model includes: extracting all text from each line of content to form sentences; labeling the information type of the sentences, including the contract party A, contract party B, contract amount, and specific contract terms; and inputting the sentences and information types into the contract content recognition model for training to obtain the contract financial business recognition model.

8. The method for updating the financial contract recognition model according to claim 7, characterized in that, The step of extracting all the text in each line of content includes: extracting the text in each line of content based on text features, including text strokes and text structure; and taking the text with the highest probability among the extracted text as the final extraction result to obtain all the text in each line of content.

9. The method for updating the financial contract recognition model according to claim 7, characterized in that, The step of extracting each line of the labeled financial scenario contract sample and training a contract financial business recognition model using each line of the sample to obtain the contract financial business recognition model also includes: extracting target information from the information type.

10. An update device for a financial contract recognition model, characterized in that, The device includes: a training module for receiving contract samples labeled with financial scenarios, training an initial model for detecting financial scenarios using the contract samples, and obtaining a financial scenario detection model; a combination module for combining the financial scenario detection model and a financial business identification model to obtain a financial contract identification model; a sending module for sending the financial contract identification model to the head office and at least one branch of a financial institution; a receiving module for receiving the financial scenario detection results of the financial contract identification model in the branch for actual contracts; a retraining module for retraining the financial contract identification model in the branch if the number of classification errors in the detection results exceeds a first preset threshold; and an updating module for updating the financial contract identification model based on the training results of the financial contract identification model in the branch, the detection results, and the head office's data if the number of branch offices retraining the financial contract identification model exceeds a second preset threshold. The financial contract recognition model is described above. The head office's financial contract recognition model is updated, and the update result is synchronized with at least one branch office. Based on the training results of the branch office's financial contract recognition model, the detection results, and the head office's financial contract recognition model, the head office's financial contract recognition model is updated, including: obtaining the first gradient of the contract financial scenario detection model in the current financial contract recognition model across all branches; obtaining the detection success rate in the detection results, where the detection success rate is the ratio of the number of contracts accurately detected by the branch office's financial contract recognition model for actual generated contract financial scenarios to the total number of detected contracts; updating the gradient of the contract financial scenario detection model in the head office's financial contract recognition model to: the initial gradient of the contract financial scenario detection model in the head office's financial contract recognition model minus the product of the first gradient in all branches and the reciprocal of the detection success rate.

11. An apparatus for updating a financial contract identification model, comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method as claimed in any one of claims 1 to 9.

12. A computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the steps of the method as claimed in any one of claims 1 to 9.