Robustness tuning method and device for form recognition model

Through the robust tuning method for bank form identification scenarios, the robustness of the model is evaluated and optimized, the problem of inconsistent noise and data distribution is solved, and the reliability and performance improvement of the model in actual scenarios is achieved.

CN114580745BActive Publication Date: 2025-01-03INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210211656.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-04
Publication Date
2025-01-03
Estimated Expiration
2042-03-04

AI Technical Summary

Technical Problem

In bank form recognition scenarios, it is difficult for the prior art to effectively evaluate and tune the robustness of machine learning models, especially in the face of specific noise such as overexposure, large angle rotation and handwritten scribe correction, and due to data sensitivity This leads to the inconsistent data distribution during model training with the actual environment.

Method used

Provide a robust tuning method and device for form recognition models. By acquiring models and testing items, extracting sample data, generating test data, conducting tests and analyzing robustness, and tuning based on test results and evaluation weights. Training to ensure the reliability of the model in actual scenarios. The method includes prediction accuracy of standard samples, overexposure, smearing and large angle tilting samples, as well as evaluation and tuning of black box attack defense performance.

Benefits of technology

It realizes more accurate and robust evaluation and tuning of the form recognition model in actual scenarios, ensuring that the model has reliability before going online, and tuning through production data without contacting production data, making up for the data The problem of inconsistent distribution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114580745B_ABST
    Figure CN114580745B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for tuning the robustness of a form recognition model, which relates to the field of machine learning and can be applied to the financial field and other fields. The method comprises: obtaining a form recognition model and one or more detection items to be analyzed, extracting sample data from a predetermined database according to the form recognition model, and calling a pre-stored test script and a training script according to the detection items; generating test data according to the sample data and the detection items, testing the form recognition model through the test data and the test script to obtain test results corresponding to each detection item, and obtaining a robustness analysis result according to the test result and a preset evaluation weight of each detection item; comparing the robustness analysis result with a preset test threshold, and tuning and training the form recognition model by calling business data according to the comparison result and the training script to obtain a tuned form recognition model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine learning and can be applied to the financial field and other fields, and in particular to a method and device for robustness tuning of a form recognition model. Background Art

[0002] As machine learning technology has become an important productivity in various fields, the performance requirements for machine learning models are also increasing. In addition to requiring the model to be able to recognize common and easily recognizable data, people also hope that the model can also recognize some "dirty data" containing noise or data with different distributions from the training scenario. Therefore, many experts have proposed a series of methods on how to evaluate and improve the robustness of the model, including evaluating the predictive performance of the model on different data sets, using data enhancement, optimizing the loss function during training and other methods to improve the robustness of the model, mainly including rotating and cropping the original image, or taking more training data, so that the model can learn more characteristics of distributed data.

[0003] Due to the different actual usage scenarios, the above general methods are often difficult to conduct professional evaluation of models in a specific scenario. In the form recognition scenario in banks, the data recognized by the model is not likely to contain noises such as salt and pepper noise and Perlin noise that are common in other scenarios, but it often encounters dirty data such as overexposure, large-angle rotation, and handwriting alterations. In addition, due to personal privacy reasons, it is not possible to directly use the data actually collected in the business for training, so there will be large differences in the distribution of data sets. However, this type of business scenario is also a scenario that requires faster model iteration and update. Whenever a bank launches a new product or a new branch is added, a new model may be needed. Therefore, a reliable system is needed to assist model developers in reasonably evaluating the performance of the models they develop and making targeted adjustments, accelerating the pace of the model from development to launch while ensuring the reliability of the model. Summary of the invention

[0004] The purpose of this application is to provide a robustness tuning method and device for the model in form recognition, which can provide a robustness evaluation result that is more in line with the actual scenario and tune the model according to the actual scenario.

[0005] To achieve the above-mentioned purpose, the robustness tuning method for the form recognition model provided in the present application specifically includes: obtaining a form recognition model and one or more detection items to be analyzed, extracting sample data from a predetermined database according to the form recognition model, and calling pre-stored test scripts and training scripts according to the detection items; generating test data according to the sample data and the detection items, testing the form recognition model through the test data and the test script to obtain test results corresponding to each detection item, and obtaining a robustness analysis result according to the test result and the preset evaluation weights of each detection item; comparing the robustness analysis result with a preset test threshold, and tuning and training the form recognition model by calling business data according to the comparison result and the training script to obtain a tuned form recognition model.

[0006] In the above-mentioned robustness tuning method for the form recognition model, optionally, the detection items include: prediction accuracy of standard samples, prediction accuracy of overexposed samples, prediction accuracy of altered samples, prediction accuracy of large-angle tilted samples and defense performance against black box attacks.

[0007] In the above-mentioned robustness tuning method for the form recognition model, optionally, when the detection item is the defense performance of a black box attack, the number of successful attack queries is obtained by a particle swarm algorithm, and the test result of the detection item is obtained according to the number of queries.

[0008] In the above-mentioned robustness tuning method for the form recognition model, optionally, generating test data according to the sample data and the detection item includes: calling corresponding data conversion rules according to the detection item to convert the sample data into item data, and generating test data according to the project data.

[0009] In the above-mentioned robustness tuning method for the form recognition model, optionally, calling the corresponding data conversion rule according to the detection item to convert the sample data into project data includes: when the detection item is the prediction accuracy of the overexposed sample, randomly selecting a point from each image data in the sample data as the center of a circle, and performing exposure processing with a random radius to obtain the corresponding project data; when the detection item is the prediction accuracy of the large-angle tilted sample, rotating each image data in the sample data at a preset angle or performing affine transformation to obtain the corresponding project data; when the detection item is the prediction accuracy of the altered sample, superimposing preset alteration marks on each image data in the sample data to obtain the corresponding project data.

[0010] In the above-mentioned robustness tuning method for the form recognition model, optionally, obtaining a robustness analysis result based on the test results and the preset evaluation weights of each detection item includes: obtaining a test score for each detection item based on the test results and the preset evaluation weights for each detection item; and obtaining the robustness analysis result of the form recognition model by weighted calculation based on the test scores.

[0011] In the above-mentioned robustness tuning method for the form recognition model, optionally, the robustness analysis result is compared with a preset test threshold, and the form recognition model is tuned and trained by calling business data according to the comparison result and the training script, including: converting the sample data into a training set according to the comparison result and the evaluation weights corresponding to each detection item; training the form recognition model with the training set, and when the robustness analysis result of the trained form recognition model meets the preset test threshold, calling business data according to the comparison result and the training script.

[0012] In the above-mentioned robustness tuning method for the form recognition model, optionally, tuning and training the form recognition model based on the comparison result and the training script calling the business data includes: calling the form image and input data of the corresponding category in the business data according to the training script; generating training samples and sample labels according to the association relationship between the form image and the input data; and tuning and training the form recognition model through the training samples and the sample labels.

[0013] The present application also provides a robustness tuning device for a form recognition model, the device comprising an extraction module, an analysis module and a tuning module; the extraction module is used to obtain the form recognition model and one or more detection items to be analyzed, extract sample data from a predetermined database according to the form recognition model, and call pre-stored test scripts and training scripts according to the detection items; the analysis module is used to generate test data according to the sample data and the detection items, test the form recognition model through the test data and the test script to obtain test results corresponding to each detection item, and obtain a robustness analysis result according to the test result and the preset evaluation weights of each detection item; the tuning module is used to compare the robustness analysis result with a preset test threshold, call the business data according to the comparison result and the training script to tune and train the form recognition model, and obtain a tuned form recognition model.

[0014] The present application also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.

[0015] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the above method.

[0016] The beneficial technical effects of the present application are: there are no requirements for the type and specific details of the model, only the prediction script and the training script need to provide an interface with a unified name; a special robustness evaluation and tuning scheme is proposed for the model used in the form recognition scenario, so that the model has a more reliable quantitative standard before going online, and the evaluation items are more in line with the difficult samples that appear in actual business scenarios; at the same time, in order to solve the problem that the data distribution is inconsistent with the actual environment during model training due to data sensitivity, a production tuning method is proposed, which can use production data to tune the model without developers having access to production data, which makes up for the defect of inconsistent data distribution to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present application, constitute a part of the present application, and do not constitute a limitation of the present application. In the drawings:

[0018] Figure 1 A flowchart of a robustness tuning method for a form recognition model provided in an embodiment of the present application;

[0019] Figure 2 A schematic diagram of the application process of a robustness tuning method for a form recognition model provided in an embodiment of the present application;

[0020] Figure 3 A schematic diagram of a process for obtaining robustness analysis results provided in an embodiment of the present application;

[0021] Figure 4 A schematic diagram of the tuning training process of the development and testing end provided in one embodiment of the present application;

[0022] Figure 5 A schematic diagram of a robustness test tuning process provided in an embodiment of the present application;

[0023] Figure 6 A schematic diagram of a training process for tuning in a production environment provided in an embodiment of the present application;

[0024] Figure 7 A schematic diagram of an application tuning process in a production environment provided by an embodiment of the present application;

[0025] Figure 8 A schematic diagram of the structure of a robustness tuning device for a form recognition model provided in an embodiment of the present application;

[0026] Fig. 9 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0027] The following will describe the implementation methods of the present application in detail in conjunction with the accompanying drawings and embodiments, so that the implementation process of how the present application applies technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly. It should be noted that as long as there is no conflict, the various embodiments in the present application and the various features in the embodiments can be combined with each other, and the technical solutions formed are all within the protection scope of the present application.

[0028] In addition, the steps shown in the flowcharts 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 flowcharts, in some cases, the steps shown or described can be performed in an order different from that shown here.

[0029] Please refer to Figure 1 As shown, the robustness tuning method for the form recognition model provided in this application specifically includes:

[0030] S101: obtaining a form recognition model and one or more test items to be analyzed, extracting sample data from a predetermined database according to the form recognition model, and calling a pre-stored test script and training script according to the test items;

[0031] S102 generates test data according to the sample data and the test items, tests the form recognition model through the test data and the test script to obtain test results corresponding to each test item, and obtains robustness analysis results according to the test results and the preset evaluation weights of each test item;

[0032] S103 compares the robustness analysis result with a preset test threshold, and performs tuning training on the form recognition model based on the comparison result and the training script calling the business data to obtain a tuned form recognition model.

[0033] Among them, the detection items include: the prediction accuracy of standard samples, the prediction accuracy of overexposed samples, the prediction accuracy of altered samples, the prediction accuracy of large-angle tilted samples and the defense performance of black box attacks. Therefore, through the above embodiments, this application proposes several special robustness test schemes for machine learning models in form recognition scenarios, and designs a scoring system based on the scheme to quantitatively evaluate the robustness of the model. After the evaluation is completed, the model can be tuned according to the score; in order to solve the problem of inconsistent distribution of training data and actual data due to data sensitivity, after the test environment is tuned, the system will put it into the production environment for trial operation and tuning. During this period, it will be completely isolated from the development environment and return to the final model after the tuning is completed.

[0034] For details, please refer to Figure 2 As shown in the figure, in actual work, after the model development is completed, the model modeler sets the detection items, such as whether it is necessary to detect the robustness of altered samples, the robustness of human attacks, etc., and specifies the qualification standards. After the setting is completed, the model is evaluated according to the specified items and a preliminary score is given; after that, according to the set items, specific data is selected from the tuning data set to perform targeted tuning on the model, and the tuned score is given; in order to avoid unsatisfactory tuning effects in a few cases, the model with a higher score can be selected from the models before and after tuning to determine whether the model performance is higher than the set required level. If it meets the requirements, the model will be imported into the actual production scene for production tuning. At this time, the model is not directly connected to production for use, but a training and tuning environment is deployed for the model in the production environment. The training data uses the form images obtained in production and the manually entered information as the true labels to tune the model, so that the model can learn the data distribution in production without exposing user privacy; after production tuning, the prediction performance score of the model before and after tuning for production data will also be given, and the tuned model will be imported back to the development environment for developers to carry out subsequent production and other work.

[0035] In one embodiment of the present application, when the detection item is the defense performance of a black box attack, the number of successful attack queries is obtained by a particle swarm algorithm PSO, and the test result of the detection item is obtained according to the number of queries. Further, generating test data according to the sample data and the detection item may include: calling the corresponding data conversion rule according to the detection item to convert the sample data into project data, and generating test data according to the project data. Specifically, calling the corresponding data conversion rule according to the detection item to convert the sample data into project data may include: when the detection item is the prediction accuracy of an overexposed sample, randomly selecting a point from each image data in the sample data as the center of a circle, and performing exposure processing with a random radius to obtain corresponding project data; when the detection item is the prediction accuracy of a large-angle tilted sample, rotating each image data in the sample data at a preset angle or performing an affine transformation to obtain corresponding project data; when the detection item is the prediction accuracy of an altered sample, superimposing preset alteration marks on each image data in the sample data to obtain corresponding project data. In actual work, in the data set used for testing and tuning, in addition to all the common samples collected from the data warehouse, in order to make up for the problem of insufficient difficult samples, the difficult sample data set will contain two parts: difficult samples directly obtained from the data warehouse and artificially generated difficult samples, and the ratio of the two can be 3:7. For large-angle tilt samples, ordinary samples can be rotated and affine transformed. The method for generating overexposed samples is: randomly select a point in the image, randomly select an exposure radius R, and change the alpha channel value of the area from the center to the edge to 255×r / R, where r is the distance to the center of the circle. The method for generating altered samples is: randomly select one from the pre-set alteration traces (the alpha channel value is 0 except for the altered place), and superimpose it on the characters of the original image.

[0036] Please refer to Figure 3 As shown, in the above embodiment, obtaining the robustness analysis result according to the test result and the preset evaluation weight of each detection item includes:

[0037] S301 obtains the test score of each test item according to the test result and the preset evaluation weight of each test item;

[0038] S302 obtains a robustness analysis result of the form recognition model through weighted calculation according to the test score.

[0039] Afterwards, you can refer to Figure 4 As shown, comparing the robustness analysis result with a preset test threshold, and performing tuning training on the form recognition model by calling business data according to the comparison result and the training script may include:

[0040] S401 converts the sample data into a training set according to the comparison result and the evaluation weight corresponding to each detection item;

[0041] S402 trains the form recognition model using the training set, and when the robustness analysis result of the trained form recognition model meets a preset test threshold, calls business data according to the comparison result and the training script.

[0042] For details, please refer to Figure 5 As shown in the figure, in actual work, the robustness test and tuning of the form recognition model can be divided into five parts: the prediction accuracy for ordinary samples, the prediction accuracy for overexposed samples, the prediction accuracy for altered samples, the prediction accuracy for large-angle tilted samples, and the defense performance against intentional black box attacks. In addition to the prediction accuracy of ordinary samples, the remaining four parts can choose whether to evaluate, and set the evaluation weights and passing scores (the default is 85): Assume that the evaluation weights of the five parts are a1, a2, a3, a4, and a5, respectively, and the weight of the non-evaluation items is 0. The evaluation scores of the five items are p1, p2, p3, p4, and p5, respectively, and the final score is the weighted sum of all items:

[0043]

[0044] The scores of the first four items are equal to the prediction accuracy of the test sample x 100. The last item, the intentional black box attack test, uses the PSO black box formula in the implementation of the present invention:

[0045]

[0046] Where n is the number of queries from the start of the attack to the success of the attack. This scoring method ensures that the score of this item is the same as the other items, and the interval is between [0,100]. After the evaluation, use the training script when entering the model for tuning. During tuning, the proportion of different types of data in the tuning data set will be allocated for training according to the proportion of each type of weight a1, a2, a3, a4, and a5 set previously. Using such a training set for tuning can make the performance of the model more in line with actual needs. After tuning, the performance of the tuned model will be evaluated again, and the one with the higher final score between the initial model and the tuned model will be selected to see if it meets the pre-set qualified score. If qualified, it will enter the next production tuning stage.

[0047] Please refer to Figure 6 As shown, in one embodiment of the present application, tuning and training the form recognition model by calling business data according to the comparison result and the training script includes:

[0048] S601 calls the form image and input data of the corresponding category in the business data according to the training script;

[0049] S602 generates training samples and sample labels according to the association relationship between the form image and the input data;

[0050] S603 performs fine-tuning training on the form recognition model using the training samples and the sample labels.

[0051] For details, please refer to Figure 7 As shown in the figure, when the process is transferred to the actual production environment, the environment is isolated from the aforementioned development environment. Except for model transmission, no data will flow in or out between the two. After the model is imported into the development environment, it is also tuned using the uploaded training script. At this time, the training uses the data used in the actual business: whenever there is actual business processing, the uploaded form image and the data entered by the business personnel will form a set of training samples and labels to tune the model. In this process, the prediction results of the model are only used for parameter adjustment during training and will not intervene in the actual business. After a period of production tuning, the tuned model and the initial model will continue to run for a period of time to test the performance of the two models on the production data distribution. After the test, the test results and the model are returned to the development environment to obtain the final form recognition model.

[0052] Please refer to Figure 8 As shown, the present application also provides a robustness tuning device for a form recognition model, the device comprising an extraction module, an analysis module and a tuning module; the extraction module is used to obtain a form recognition model and one or more detection items to be analyzed, extract sample data from a predetermined database according to the form recognition model, and call pre-stored test scripts and training scripts according to the detection items; the analysis module is used to generate test data according to the sample data and the detection items, test the form recognition model through the test data and the test script to obtain the test results corresponding to each detection item, and obtain the robustness analysis result according to the test result and the preset evaluation weights of each detection item; the tuning module is used to compare the robustness analysis result with the preset test threshold, and call the business data according to the comparison result and the training script to tune the form recognition model to obtain the tuned form recognition model. The implementation methods of each module have been described one by one in the aforementioned embodiments, and will not be described in detail here.

[0053] The beneficial technical effects of the present application are: there are no requirements for the type and specific details of the model, only the prediction script and the training script need to provide an interface with a unified name; a special robustness evaluation and tuning scheme is proposed for the model used in the form recognition scenario, so that the model has a more reliable quantitative standard before going online, and the evaluation items are more in line with the difficult samples that appear in actual business scenarios; at the same time, in order to solve the problem that the data distribution is inconsistent with the actual environment during model training due to data sensitivity, a production tuning method is proposed, which can use production data to tune the model without developers having access to production data, which makes up for the defect of inconsistent data distribution to a certain extent.

[0054] The present application also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.

[0055] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the above method.

[0056] like Fig. 9 As shown, the electronic device 600 may further include: a communication module 110, an input unit 120, an audio processing unit 130, a display 160, and a power supply 170. It is worth noting that the electronic device 600 does not necessarily have to include Fig. 9 In addition, the electronic device 600 may also include Fig. 9 For components not shown, reference may be made to the prior art.

[0057] like Fig. 9 As shown, the central processor 100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor devices and / or logic devices. The central processor 100 receives inputs and controls the operations of various components of the electronic device 600.

[0058] The memory 140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 100 may execute the program stored in the memory 140 to implement information storage or processing.

[0059] The input unit 120 provides input to the CPU 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used to display display objects such as images and text. The display may be, for example, an LCD display, but is not limited thereto.

[0060] The memory 140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 140 may also be some other type of device. The memory 140 includes a buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application / function storage unit 142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 600 through the central processor 100.

[0061] The memory 140 may also include a data storage unit 143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 144 of the memory 140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).

[0062] The communication module 110 is a transmitter / receiver 110 that transmits and receives signals via an antenna 111. The communication module (transmitter / receiver) 110 is coupled to the central processor 100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.

[0063] Based on different communication technologies, multiple communication modules 110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module. The communication module (transmitter / receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide an audio output via the speaker 131 and receive an audio input from the microphone 132, thereby realizing a common telecommunication function. The audio processor 130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 130 is also coupled to the central processor 100, so that the sound can be recorded on the local machine through the microphone 132, and the sound stored on the local machine can be played through the speaker 131.

[0064] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0065] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0066] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0067] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0068] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A robustness tuning method for a form recognition model, characterized in that: The method comprises: Obtaining a form recognition model and one or more test items to be analyzed, extracting sample data from a predetermined database according to the form recognition model, and retrieving pre-stored test scripts and training scripts according to the test items; Generate test data according to the sample data and the detection items, test the form recognition model through the test data and the test script to obtain test results corresponding to each detection item, and obtain robustness analysis results according to the test results and the preset evaluation weights of each detection item; Compare the robustness analysis result with a preset test threshold, and perform tuning training on the form recognition model by calling business data according to the comparison result and the training script to obtain a tuned form recognition model; Generating test data according to the sample data and the detection item includes: calling a corresponding data conversion rule according to the detection item to convert the sample data into item data, and generating test data according to the item data.

2. The robustness tuning method for the form recognition model according to claim 1 is characterized in that: The detection items include: the prediction accuracy of standard samples, the prediction accuracy of overexposed samples, the prediction accuracy of altered samples, the prediction accuracy of large-angle tilted samples and the defense performance against black box attacks.

3. The robustness tuning method for the form recognition model according to claim 2 is characterized in that: When the detection item is the defense performance of a black box attack, the number of queries for successful attacks is obtained by using a particle swarm algorithm, and the test result of the detection item is obtained according to the number of queries.

4. The robustness tuning method for the form recognition model according to claim 1, characterized in that: Calling the corresponding data conversion rule according to the detection project to convert the sample data into project data includes: When the detection item is the prediction accuracy of overexposed samples, a point is randomly selected from each image data in the sample data as the center of a circle, and exposure processing is performed with a random radius to obtain corresponding item data; When the detection item is the prediction accuracy of samples tilted at a large angle, each image data in the sample data is rotated or affine transformed at a preset angle to obtain corresponding item data; When the detection item is the predicted accuracy of the altered sample, the preset alteration traces are superimposed on each image data in the sample data to obtain the corresponding item data.

5. The robustness tuning method for the form recognition model according to claim 1, characterized in that: Obtaining robustness analysis results based on the test results and the preset evaluation weights of each test item includes: Obtaining a test score for each test item based on the test results and a preset evaluation weight for each test item; The robustness analysis result of the form recognition model is obtained through weighted calculation according to the test scores.

6. The robustness tuning method for the form recognition model according to claim 1, characterized in that: Comparing the robustness analysis result with a preset test threshold, and performing tuning training on the form recognition model by calling business data according to the comparison result and the training script comprises: According to the comparison results and the evaluation weights corresponding to each detection item, the sample data is converted into a training set; The form recognition model is trained using the training set, and when a robustness analysis result of the trained form recognition model meets a preset test threshold, business data is called based on a comparison result and the training script.

7. The robustness tuning method for a form recognition model according to claim 1, characterized in that: Tuning and training the form recognition model based on the comparison result and the business data called by the training script includes: Calling form images and input data of corresponding categories in business data according to the training script; Generate training samples and sample labels according to the association relationship between the form image and the input data; The form recognition model is fine-tuned and trained using the training samples and the sample labels.

8. A robustness tuning device for a form recognition model, characterized in that: The device comprises an extraction module, an analysis module and an optimization module; The extraction module is used to obtain a form recognition model and one or more test items to be analyzed, extract sample data from a predetermined database according to the form recognition model, and retrieve pre-stored test scripts and training scripts according to the test items; The analysis module is used to generate test data according to the sample data and the detection items, test the form recognition model through the test data and the test script to obtain the test results corresponding to each detection item, and obtain the robustness analysis results according to the test results and the preset evaluation weights of each detection item; Generating test data according to the sample data and the detection item includes: calling a corresponding data conversion rule according to the detection item to convert the sample data into item data, and generating test data according to the item data; The tuning module is used to compare the robustness analysis result with a preset test threshold, and perform tuning training on the form recognition model based on the comparison result and the training script calling business data to obtain a tuned form recognition model.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for causing a computer to execute the method according to any one of claims 1 to 7.