Training method, device, equipment and storage medium for cheating text recognition model
By performing incremental learning and fine-tuning in the historical version of the cheat text recognition model, and using new corpus and historical corpus to generate a second training corpus, the problem of difficult to identify rapidly changing cheat texts and model performance in the existing technology is solved, and efficient and accurate cheat text recognition and model timeliness are improved.
Patent Information
- Application Number
- CN202111564589.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-20
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2041-12-20
AI Technical Summary
It is difficult for the prior art to effectively identify and block rapidly changing online cheat text content, and when the model faces the problem of new knowledge interfering with old knowledge, leading to rapid performance decline when the model faces non-stationary data distribution.
By determining the target version model in the historical version of the cheat text recognition model, fine-tuning is performed based on the incremental learning method, the second training corpus is generated using the added corpus and historical corpus, incremental training is performed, and the model is updated to deal with the rapidly changing cheating content.
It reduces the time and training cost of model development, improves the timeliness of the model, can promptly deal with rapidly changing online cheating content, avoids the residual online cheating, and improves the model's recognition accuracy of cheating text.
Smart Images

Figure HDA0003421422660000011 
Figure HDA0003421422660000012 
Figure HDA0003421422660000021
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, specifically to the field of artificial intelligence such as natural language processing technology and deep learning, and in particular to a training method, device, equipment and storage medium for a cheating text recognition model. Background Art
[0002] With the development of the Internet, there are more and more communication platforms such as online forums, personal homepages, and chat software. Users can publish texts to express their opinions or communicate with other users. These massive text contents inevitably contain a large number of cheating texts such as promotional, sensitive, and violent texts. Cheating text content not only affects user experience and disrupts the network environment, but may also bring social harm. Cheating texts need to be identified and blocked from massive text content. Machine learning models represented by deep learning have become the main way to identify cheating texts. Summary of the invention
[0003] The present application provides a training method, apparatus, device and storage medium for a cheating text recognition model.
[0004] According to a first aspect of the present application, a method for training a cheating text recognition model is provided, comprising:
[0005] Get new corpus;
[0006] Obtain the first training corpus from the newly added corpus;
[0007] Generate a second training corpus based on the historical corpus and the first training corpus;
[0008] Determine a target version model from historical versions of the cheating text recognition model;
[0009] According to the second training corpus, incremental training is performed on the target version model based on incremental learning, and the model obtained after the incremental training is used as the latest version of the cheating text recognition model.
[0010] According to a second aspect of the present application, a training device for a cheating text recognition model is provided, comprising:
[0011] The first acquisition module is used to acquire new corpus.
[0012] The second acquisition module is used to acquire the first training corpus from the newly added corpus.
[0013] The generating module is used to generate the second training corpus according to the historical corpus and the first training corpus.
[0014] The determination module is used to determine the target version model from the historical versions of the cheating text recognition model.
[0015] The training module is used to perform incremental training on the target version model based on incremental learning according to the second training corpus, and use the model obtained after the incremental training as the latest version of the cheating text recognition model.
[0016] According to a third aspect of the present application, an electronic device is provided, including:
[0017] at least one processor; and
[0018] a memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the training method of the cheating text recognition model described in the first aspect.
[0020] According to a fourth aspect of the present application, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the cheating text recognition model training method described in the first aspect.
[0021] According to a fifth aspect of the present application, a computer program product is provided, including a computer program, which, when executed by a processor, implements the method for training a cheating text recognition model according to the first aspect.
[0022] According to the technical solution of the present application, the target version model is determined in the historical version of the cheating text recognition model, and fine-tuning is performed on the target version model based on the incremental learning method, that is, the changes caused by the newly added cheating data are updated, and there is no need to completely retrain the model, which reduces the model development time and the model training cost, and enables the model to respond to the rapidly changing online cheating content in a timely manner, improves the timeliness of the model, and thus effectively reduces the online cheating residue. In addition, based on the first training corpus and the historical corpus in the newly added corpus, the target version model is incrementally trained based on incremental learning, so that the model can recognize the newly added cheating corpus without losing the ability to recognize the historical cheating corpus, effectively alleviating the problem of rapid decline in model performance caused by new knowledge interfering with old knowledge when the model continuously obtains knowledge from non-stationary data distribution, and further improving the accuracy of the cheating text recognition model.
[0023] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.
[0025] Figure 1 It is a flowchart of a method for training a cheating text recognition model proposed in Embodiment 1 of the present application;
[0026] Figure 2 It is a flowchart of a method for training a cheating text recognition model proposed in Embodiment 2 of the present application;
[0027] Figure 3 It is a flowchart of a method for training a cheating text recognition model proposed in Embodiment 3 of the present application;
[0028] Figure 4 It is a flowchart of a method for training a cheating text recognition model proposed in Embodiment 4 of the present application;
[0029] Figure 5 This is a structural block diagram of a training device for a cheating text recognition model provided in Embodiment 5 of the present application;
[0030] Figure 6 It is a structural block diagram of a training device for a cheating text recognition model provided according to Embodiment 6 of the present application;
[0031] Figure 7 It is a structural block diagram of a training device for a cheating text recognition model provided according to Embodiment 7 of the present application;
[0032] Figure 8 It is a block diagram of an electronic device for implementing the training method of the cheating text recognition model in the embodiment of the present application. DETAILED DESCRIPTION
[0033] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0034] It should be noted that the terms "first", "second", "third", and "fourth" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first", "second", "third", and "fourth" may explicitly or implicitly include at least one of the features.
[0035] It should also be noted that the acquisition, storage and application of user personal information involved in the technical solution of this application are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0036] At present, cheating texts on the Internet are mostly identified based on user behavior, user attributes, text content and other dimensions. Among them, identification based on text content dimensions is the most basic and one of the most effective technologies. In related technologies, the main way to identify cheating texts is machine learning models represented by deep learning. The traditional method is to collect a large amount of cheating texts and non-cheating texts online, train the model based on the collected text content, and then apply it to the task of identifying cheating texts online. However, the content of online cheating texts is diverse and changes rapidly. When online cheating texts change, the existing models cannot meet business needs, and it is necessary to collect cheating texts and non-cheating texts again, and repeat the steps of model training and application.
[0037] To this end, the present application provides a training method, device, equipment and storage medium for a cheating text recognition model. Specifically, the training method, device, equipment and storage medium for a cheating text recognition model according to an embodiment of the present application are described below with reference to the accompanying drawings.
[0038] Figure 1 It is a flowchart of a method for training a cheating text recognition model according to the first embodiment of the present application. It should be noted that the method for training a cheating text recognition model in the embodiment of the present application can be applied to the training device for the cheating text recognition model in the embodiment of the present application, and the training device for the cheating text recognition model can be configured on an electronic device.
[0039] like Figure 1 As shown, the training method of the cheating text recognition model may include the following steps:
[0040] Step 101, obtaining newly added corpus.
[0041] It should be noted that in the embodiments of the present application, the newly added corpus may include audit corpus and other corpus. Among them, the audit corpus may be a corpus that is randomly selected from a portion of online newly added corpus and manually annotated. Other corpus may be newly added cheating corpus identified based on dimensions such as user behavior and user attributes.
[0042] Step 102: Obtain a first training corpus from the newly added corpus.
[0043] As an example, a portion of the newly added corpus may be randomly selected as the first training corpus. For example, a portion of the newly added corpus may be randomly selected as the first training corpus according to a certain ratio.
[0044] Step 103: Generate a second training corpus based on the historical corpus and the first training corpus.
[0045] It should be noted that, in the embodiments of the present application, the historical corpus can be understood as the newly added corpus used when the historical version of the cheating text recognition model is incrementally trained.
[0046] It should also be noted that, in the embodiments of the present application, a corpus resampling method can be adopted to collect a part of the newly added corpus used in the incremental training of each historical version of the cheating text recognition model as the historical corpus. The collected historical corpus is used together with the first training corpus as the second training corpus. As an example, assume that l is the incremental training time of the historical version of the cheating text recognition model, and t is the current incremental training time of the cheating text recognition model, where t>l. In the incremental training of the current cheating text recognition model with an incremental training time of t, a part of the historical corpus can be collected from the newly added corpus used in the historical incremental training (such as the historical corpus mentioned above) by resampling as the second training corpus. Among them, the formula used in the resampling method is expressed by the following formula (1):
[0047] p(t,l)=e -λ(t-l) (1)
[0048] Among them, p(t,l) is the probability that each corpus sample at l incremental training time is added to the training set at t incremental training time; the hyperparameter λ is determined manually by trial and error. In other words, for this incremental training, the above formula (1) can be used to resample a part of the historical corpus together with the first training corpus as the second training corpus.
[0049] Step 104: determine a target version model from historical versions of the cheating text recognition model.
[0050] It should be noted that in the embodiments of the present application, the historical version may include the initial version model and the current version model obtained by each incremental training of the model before the current incremental training of the model. The initial version model can be understood as a version model that has not been trained with training corpus after the model is built.
[0051] As an example, if the current training of the cheating text recognition model is the first training, there is no non-initial version of the cheating text recognition model in the historical version, so the parameters of the initial version model can be randomly initialized, and the initial version model with randomly initialized parameters is determined as the target version model. If the current training of the cheating text recognition model is not the first training, such as the third training, there are two non-initial version models in the historical version. Optionally, the version model with an incremental training time adjacent to the current time of this incremental training can be determined as the target version model from the historical version of the cheating text recognition model.
[0052] Step 105: perform incremental training on the target version model based on incremental learning according to the second training corpus, and use the model obtained after the incremental training as the latest version of the cheating text recognition model.
[0053] In some embodiments of the present application, the cheating text recognition model may be an ALBERT (A Lite BERT, lightweight BERT (Bidirectional Encoder Representations from Transformers, pre-trained language representation model)) model, or other classifier models, such as a BERT model, a TextCNN (a convolutional neural network for text classification) model, etc., which is not limited in the present application.
[0054] It should be noted that, in an embodiment of the present application, the second training corpus includes a first training corpus extracted from a historical corpus and a newly added corpus. The second training corpus is input into the target version model for incremental training to fine-tune the parameters of the target version model, and the model obtained after incremental training is used as the latest version of the cheating text recognition model. The latest version model is applied to the online text recognition task, and the online text data is input into the latest version of the cheating text recognition model, and the model outputs the probability that the text data is a cheating text. Subsequently, the output probability can be pushed to the business end, and the business end will perform corresponding disposal according to its own requirements, such as shielding text data whose probability of cheating text is higher than the first preset value.
[0055] According to the training method of the cheating text recognition model of the embodiment of the present application, the target version model is determined in the historical version of the cheating text recognition model, and fine-tuning is performed on the basis of the target version model based on the incremental learning method, that is, the changes caused by the newly added cheating data are updated, and there is no need to completely retrain the model, which reduces the model development time and the model training cost, and enables the model to respond to the rapidly changing online cheating content in a timely manner, improves the timeliness of the model, and thus can effectively reduce the online cheating residue. In addition, based on the first training corpus and the historical corpus in the newly added corpus, the target version model is incrementally trained based on incremental learning, so that the model can recognize the newly added cheating corpus without losing the ability to recognize the historical cheating corpus, effectively alleviating the problem of rapid decline in model performance caused by new knowledge interfering with old knowledge when the model continuously obtains knowledge from non-stationary data distribution, and further improving the accuracy of the cheating text recognition model.
[0056] It should be noted that in order to further improve the accuracy of the cheating text recognition model, after incremental training of the target version model based on the second training corpus and obtaining the latest version of the cheating text recognition model, the latest version of the cheating text recognition model obtained after each incremental training can be tested and screened to only retain the cheating text model version with good model performance. As an example, Figure 2 FIG. 1 is a flow chart of a method for training a cheating text recognition model according to the second embodiment of the present application. Figure 2 As shown, the training method of the cheating text recognition model may include the following steps:
[0057] Step 201, obtaining newly added corpus.
[0058] Step 202: Acquire a first training corpus and a test corpus from the newly added corpus.
[0059] It should be noted that the newly added corpus includes newly added corpus obtained through different channels, such as manually annotated audit corpus and newly added cheating corpus identified based on user behavior, user attributes and other dimensions. In some embodiments of the present application, the newly added corpus can be randomly divided into a first training corpus and a test corpus in a 1:1 ratio. Among them, the first training corpus is used for training the cheating text recognition model, and the test corpus is used to verify the latest version of the cheating text recognition model obtained after incremental training.
[0060] Step 203: Generate a second training corpus based on the historical corpus and the first training corpus.
[0061] Step 204: determine a target version model from historical versions of the cheating text recognition model.
[0062] Step 205: perform incremental training on the target version model based on incremental learning according to the second training corpus, and use the model obtained after the incremental training as the latest version of the cheating text recognition model.
[0063] Step 206: Verify the latest version of the cheating text recognition model based on the test corpus.
[0064] In some embodiments of the present application, the test corpus is input into the latest version of the cheating text recognition model to obtain a model output result, which may be the probability that the test corpus is a cheating text. The model output result is used to verify the performance of the latest version of the cheating text recognition model.
[0065] Optionally, a second preset threshold may be set to determine the test corpus with a probability higher than the second preset threshold as cheating text, and the test corpus with a probability lower than the second preset threshold as non-cheating text. After the latest version of the cheating text recognition model recognizes a large amount of test corpus as cheating text, the latest version of the cheating text recognition model is verified to have passed.
[0066] Step 207: In response to the latest version of the cheating text recognition model passing the verification, retain the latest version of the cheating text recognition model.
[0067] In some embodiments of the present application, if the latest version of the cheating text recognition model fails verification, the latest version of the cheating text recognition model may not be saved, and the latest version of the cheating text recognition model is not used as a historical version in the next round of model training.
[0068] In the embodiment of the present application, step 201 and step 203 to step 205 can be implemented respectively by any method in the embodiments of the present application, and the present application does not make any specific limitation on this and will not elaborate on it.
[0069] According to the training method of the cheating text recognition model of the embodiment of the present application, by obtaining training corpus and test corpus from the newly added corpus, and using the training corpus and a part of the historical corpus as the latest training set for incremental training, the training set is used to fine-tune a certain version model in the historical version, and the changes caused by the newly added cheating data are updated, and there is no need to completely retrain the new model, which reduces the model development time, reduces the training cost, and enables the model to respond to the rapidly changing online cheating content in a timely manner, thereby improving the timeliness of the model; in addition, since there are both newly added corpus and historical corpus in the training set, when the model is fine-tuned, the model can learn the recognition ability of the newly added cheating corpus, and at the same time will not lose the recognition ability of the historical cheating corpus, which can effectively alleviate the problem of rapid decline in model performance caused by the interference of new knowledge with old knowledge when the model continuously obtains knowledge from non-stationary data distribution. In addition, the cheating text recognition model of the latest version is tested and screened using the test corpus, and only the cheating text model with good model performance is retained, which can further improve the accuracy of the cheating text recognition model.
[0070] It should be noted that in order to further reduce the training cost of the model and improve the timeliness of the model, when incrementally training the model, the target version model will be determined from the historical version of the cheating text recognition model for training. As an example, Figure 3 1 is a flow chart of a method for training a cheating text recognition model according to the third embodiment of the present application. Figure 3 As shown, the training method of the cheating text recognition model may include the following steps:
[0071] Step 301, obtaining newly added corpus.
[0072] Step 302: Obtain a first training corpus and a test corpus from the newly added corpus.
[0073] Step 303: Generate a second training corpus based on the historical corpus and the first training corpus.
[0074] Step 304, determine whether there is a non-initial version that has passed the test and is retained in the historical version of the cheating text recognition model. If there is a non-initial version that has passed the test and is retained in the historical version, execute step 305; if there is no non-initial version that has passed the test and is retained in the historical version, execute step 307.
[0075] Step 305, determining the current time of this incremental training.
[0076] Step 306 , find the first non-initial version whose incremental training time is close to the current time from the non-initial versions, and determine the first non-initial version as the target version model.
[0077] Step 307: Initialize the parameters of the initial version model, and determine the initial version model after parameter initialization as the target version model.
[0078] Optionally, when there is no non-initial version that has passed the test and is retained in the historical versions, the parameters of the initial version model may be randomly initialized, and the initial version model with the parameters randomly initialized may be determined as the target version model.
[0079] Step 308: perform incremental training on the target version model based on incremental learning according to the second training corpus, and use the model obtained after the incremental training as the latest version of the cheating text recognition model.
[0080] Step 309: Verify the latest version of the cheating text recognition model based on the test corpus.
[0081] Step 310: In response to the latest version of the cheating text recognition model passing the verification, retain the latest version of the cheating text recognition model.
[0082] In the embodiment of the present application, steps 301 to 303 and steps 308 to 310 can be implemented respectively in any of the embodiments of the present application, and the present application does not make any specific limitation on this and will not elaborate on it.
[0083] According to the training method of the cheating text recognition model of the embodiment of the present application, the target version model is determined in the historical version of the cheating text recognition model. If there is a non-initial version that has passed the test and is retained in the historical version, the first non-initial version whose incremental training time is adjacent to the current time is determined as the target version model. If there is no non-initial version that has passed the test and is retained in the historical version, the parameters of the initial version model are initialized, and the initial version model initialized with parameters is determined as the target version model. There is no need to retrain a new model based on the newly added corpus and the historical corpus, which reduces the model development time, reduces the training cost, and enables the model to respond to the rapidly changing online cheating content in a timely manner, improves the timeliness of the model, and effectively reduces the online cheating residue. In addition, based on the first training corpus and the historical corpus in the newly added corpus, the target version model is incrementally trained based on incremental learning, so that the model can recognize the newly added cheating corpus without losing the ability to recognize the historical cheating corpus, effectively alleviating the problem of rapid decline in model performance caused by new knowledge interfering with old knowledge when the model continues to obtain knowledge from non-stationary data distribution. After incremental training is performed on the target version model based on incremental learning according to the second training corpus to obtain the latest version of the cheating text recognition model, the test corpus is used to test and screen the latest version of the cheating text recognition model obtained after each incremental training, and only the cheating text model with good model performance is retained to further improve the accuracy of the cheating text recognition model.
[0084] It should be noted that in order to update the online cheating corpus in a timely manner, in addition to incremental training of the model, a portion of the online new corpus can also be extracted, manually annotated, and added to the new corpus for the next round of model training. As an example, Figure 4 1 is a flow chart of a method for training a cheating text recognition model according to the fourth embodiment of the present application. Figure 4 As shown, based on the above embodiment, the training method of the cheating text recognition model may further include the following steps:
[0085] Step 401: obtain online newly added corpus and annotate the online newly added corpus.
[0086] In some embodiments of the present application, a portion of the newly added online corpus may be randomly selected, and the randomly selected newly added online corpus may be manually annotated.
[0087] Step 402: Add the annotated online new corpus to the new corpus for the next round of model training.
[0088] In some embodiments of the present application, the annotated online newly added corpus can be added as review corpus to the newly added corpus for the next round of model training.
[0089] According to the training method of the cheating text recognition model in the embodiment of the present application, in addition to incremental training of the model, new online corpus is obtained, manually annotated and added to the new corpus for the next round of model training, so as to iteratively update the cheating text recognition model and further improve the accuracy of the cheating text recognition model.
[0090] Figure 5 : is a structural block diagram of a training device for a cheating text recognition model provided in Example 5 of the present application. Figure 5 As shown, the training device for the cheating text recognition model may include a first acquisition module 501 , a second acquisition module 502 , a generation module 503 , a determination module 504 and a training module 505 .
[0091] Specifically, the first acquisition module 501 is used to acquire new corpus.
[0092] The second acquisition module 502 is used to acquire the first training corpus from the newly added corpus.
[0093] The generating module 503 is used to generate a second training corpus according to the historical corpus and the first training corpus.
[0094] The determination module 504 is used to determine the target version model from the historical versions of the cheating text recognition model.
[0095] The training module 505 is used to perform incremental training on the target version model based on incremental learning according to the second training corpus, and use the model obtained after the incremental training as the latest version of the cheating text recognition model.
[0096] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0097] According to the training device of the cheating text recognition model of the embodiment of the present application, the target version model is determined in the historical version of the cheating text recognition model, and fine-tuning is performed on the basis of the target version model based on the incremental learning method, that is, the changes caused by the newly added cheating data are updated, and there is no need to completely retrain the model, which reduces the model development time and the model training cost, and enables the model to respond to the rapidly changing online cheating content in a timely manner, improves the timeliness of the model, and thus can effectively reduce the online cheating residue. In addition, based on the first training corpus and the historical corpus in the newly added corpus, the target version model is incrementally trained based on incremental learning, so that the model can recognize the newly added cheating corpus without losing the ability to recognize the historical cheating corpus, effectively alleviating the problem of rapid decline in model performance caused by new knowledge interfering with old knowledge when the model continuously obtains knowledge from non-stationary data distribution, and further improving the accuracy of the cheating text recognition model.
[0098] Figure 6 1 is a structural block diagram of a training device for a cheating text recognition model provided in accordance with Embodiment 6 of the present application. Figure 6 As shown, based on the above embodiment, the training device for the cheating text recognition model may further include: a third acquisition module 606 , a verification module 607 and a retention module 608 .
[0099] Specifically, the third acquisition module 606 is used to acquire the test corpus from the newly added corpus.
[0100] The verification module 607 is used to verify the latest version of the cheating text recognition model based on the test corpus.
[0101] The retaining module 608 is used to retain the latest version of the cheating text recognition model in response to the latest version of the cheating text recognition model passing the verification.
[0102] In some embodiments of the present application, the determination module 604 is also used to determine whether there is a non-initial version in the historical version that has passed the test verification and is retained; in response to the existence of a non-initial version in the historical version that has passed the test verification and is retained, determine the current time of this incremental training; from the non-initial versions, find the first non-initial version whose incremental training time is close to the current time, and determine the first non-initial version as the target version model.
[0103] In some embodiments of the present application, the determination module 604 is also used to initialize the parameters of the initial version model in response to the absence of a non-initial version that has passed the test verification and is retained in the historical version, and determine the initial version model with initialized parameters as the target version model.
[0104] in, Figure 6 601-605 and Figure 5 501-505 have the same function and structure.
[0105] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0106] According to the training device of the cheating text recognition model of the embodiment of the present application, by obtaining training corpus and test corpus from the newly added corpus, and using the training corpus and a part of the historical corpus as the latest training set for incremental training, the training set is used to fine-tune a certain version model in the historical version, and the changes caused by the newly added cheating data are updated, and there is no need to completely retrain the new model, which reduces the model development time, reduces the training cost, and enables the model to respond to the rapidly changing online cheating content in a timely manner, improving the timeliness of the model; in addition, since there are both newly added corpus and historical corpus in the training set, when the model is fine-tuned, the model can learn the recognition ability of the newly added cheating corpus, and will not lose the recognition ability of the historical cheating corpus, which can effectively alleviate the problem of rapid decline in model performance caused by the interference of new knowledge with old knowledge when the model continuously obtains knowledge from non-stationary data distribution. In addition, the cheating text recognition model of the latest version is tested and screened using the test corpus, and only the cheating text model with good model performance is retained, which can further improve the accuracy of the cheating text recognition model.
[0107] Figure 7 1 is a structural block diagram of a training device for a cheating text recognition model provided according to Embodiment 7 of the present application. Figure 7 As shown, based on the above embodiment, the training device for the cheating text recognition model may further include: a fourth acquisition module 709 and a new module 710.
[0108] Specifically, the fourth acquisition module 709 is used to acquire online newly added corpus and annotate the online newly added corpus.
[0109] The new adding module 710 is used to add the annotated online new corpus to the new corpus for the next round of model training.
[0110] in, Figure 7 701-708 and Figure 6601-608 have the same function and structure.
[0111] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0112] According to the training device of the cheating text recognition model of the embodiment of the present application, in addition to incremental training of the model, the fourth acquisition module also obtains online new corpus, and after manual annotation, adds it to the new corpus of the next round of model training through the new module, thereby iteratively updating the cheating text recognition model and further improving the accuracy of the cheating text recognition model.
[0113] According to an embodiment of the present application, the present application also provides an electronic device, a readable storage medium and a computer program product.
[0114] like Figure 8 As shown, Figure 8 It is a block diagram of an electronic device for implementing the training method of the cheating text recognition model of the embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only used as examples, and are not intended to limit the implementation of the present application described herein and / or required.
[0115] like Figure 8 As shown, the electronic device includes: one or more processors 801, memory 802, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are interconnected using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 801 is taken as an example.
[0116] The memory 802 is a non-transitory computer-readable storage medium provided in the present application. The memory stores instructions executable by at least one processor to enable the at least one processor to perform the training method for the cheating text recognition model provided in the present application. The non-transitory computer-readable storage medium of the present application stores computer instructions, which are used to enable a computer to perform the training method for the cheating text recognition model provided in the present application.
[0117] The memory 802 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as the program instructions / modules corresponding to the training method of the cheating text recognition model in the embodiment of the present application (for example, the attached Figure 7 The processor 801 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 802, that is, the training method of the cheating text recognition model in the above method embodiment is implemented.
[0118] The memory 802 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of an electronic device for training a cheating text recognition model, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 802 may optionally include a memory remotely arranged relative to the processor 801, and these remote memories may be connected to the electronic device for training a cheating text recognition model via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0119] The electronic device for implementing the training method of the cheating text recognition model may also include: an input device 803 and an output device 804. The processor 801, the memory 802, the input device 803 and the output device 804 may be connected via a bus or other means. Figure 8 The example of connecting through bus is taken in the following.
[0120] The input device 803 can receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device of the training method of the cheating text recognition model, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick and other input devices. The output device 804 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display and a plasma display. In some embodiments, the display device may be a touch screen.
[0121] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application-specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs, that is, the present application also proposes a computer program, which, when executed by a processor, implements the training method of the cheating text recognition model described in the above embodiment, and the one or more computer programs can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a dedicated or general-purpose programmable processor, which can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0122] These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or means (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0123] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0124] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.
[0125] A computer system may include a client and a server. The client and the server are generally far away from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain. It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solution disclosed in this application can be achieved, and this document is not limited here.
[0126] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A method for training a cheating text recognition model, comprising: Acquire newly added corpus, the newly added corpus includes review corpus and other corpus, the review corpus is a part of the newly added online corpus randomly selected and manually annotated, and the other corpus is the newly added cheating corpus identified according to the user behavior and user attribute dimensions; Acquire a first training corpus from the newly added corpus; By adopting the method of corpus resampling, a part of the newly added corpus used in the incremental training of each historical version of the cheating text recognition model is collected as the historical corpus, wherein the probability of each newly added corpus being used as the historical corpus is negatively correlated with the time difference from the incremental training time of each historical version of the cheating text recognition model to the current incremental training time of the cheating text recognition model; Generate a second training corpus based on the historical corpus and the first training corpus; Determine a target version model from historical versions of the cheating text recognition model; According to the second training corpus, incremental training is performed on the target version model based on incremental learning, and the model obtained after the incremental training is used as the latest version of the cheating text recognition model.
2. The method according to claim 1, further comprising: Acquire test corpus from the newly added corpus; Verifying the latest version of the cheating text recognition model according to the test corpus; In response to the latest version of the cheating text recognition model passing the verification, the latest version of the cheating text recognition model is retained.
3. The method according to claim 1, wherein: The step of determining a target version model from the historical versions of the cheating text recognition model includes: Determine whether there is a non-initial version in the historical version that has passed the test verification and is retained; In response to the existence of a non-initial version that has passed the test verification and is retained in the historical versions, determining the current time of this incremental training; From the non-initial versions, find a first non-initial version whose incremental training time is close to the current time, and determine the first non-initial version as the target version model.
4. The method according to claim 3, wherein: The step of determining a target version model from the historical versions of the cheating text recognition model further includes: In response to the fact that there is no non-initial version in the historical versions that has passed the test verification and is retained, the parameters of the initial version model are initialized, and the initial version model after parameter initialization is determined as the target version model.
5. A training device for a cheating text recognition model, comprising: The first acquisition module is used to acquire newly added corpus, wherein the newly added corpus includes review corpus and other corpus, wherein the review corpus is a part of the newly added online corpus randomly selected and manually annotated, and the other corpus is the newly added cheating corpus identified according to the user behavior and user attribute dimensions; A second acquisition module, used to acquire first training corpus from the newly added corpus; A generating module is used to collect a part of the newly added corpus used in the incremental training of each historical version of the cheating text recognition model as the historical corpus by adopting a corpus resampling method, wherein the probability of each newly added corpus being used as the historical corpus is negatively correlated with the time difference between the incremental training time of each historical version of the cheating text recognition model and the current incremental training time of the cheating text recognition model; and generate a second training corpus according to the historical corpus and the first training corpus; A determination module, used to determine a target version model from the historical versions of the cheating text recognition model; The training module is used to perform incremental training on the target version model based on incremental learning according to the second training corpus, and use the model obtained after the incremental training as the latest version of the cheating text recognition model.
6. The apparatus according to claim 5, further comprising: A third acquisition module is used to acquire test corpus from the newly added corpus; A verification module, used to verify the latest version of the cheating text recognition model according to the test corpus; The retaining module is configured to retain the latest version of the cheating text recognition model in response to the cheating text recognition model of the latest version passing the verification.
7. The device according to claim 5, wherein: The determination module is specifically used for: Determine whether there is a non-initial version in the historical version that has passed the test verification and is retained; In response to the existence of a non-initial version that has passed the test verification and is retained in the historical versions, determining the current time of this incremental training; From the non-initial versions, find a first non-initial version whose incremental training time is close to the current time, and determine the first non-initial version as the target version model.
8. The device according to claim 7, wherein: The determination module is specifically used for: In response to the fact that there is no non-initial version in the historical versions that has passed the test verification and is retained, the parameters of the initial version model are initialized, and the initial version model after parameter initialization is determined as the target version model.
9. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 4.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 4.
11. A computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Identification method and device for training thyroid tumor ultrasonic image on line
CN108364293A
Automatic iterative operation and maintenance method and system for AI model, equipment and storage medium
CN111461283A