A model training method, data identification method, device and equipment

By using two models determined by the same benchmark model in supervised learning to predict and filter the training samples, the problem of label noise impact is solved, and the model training accuracy and performance is improved.

CN114417987BActive Publication Date: 2024-12-03ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210028772.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-11
Publication Date
2024-12-03
Estimated Expiration
2042-01-11

AI Technical Summary

Technical Problem

During the supervised learning process, the quality of the labeled sample is affected by human subjective factors, resulting in label noise, affecting the training performance and identification accuracy of the neural network.

Method used

By obtaining multiple training samples, input them into two models determined by the same benchmark model, the training samples are selected based on the prediction probability and label information, and the model is trained until the convergence conditions are met to reduce the impact of noise.

Benefits of technology

Improve model training accuracy and performance, reduce noise interference to model performance, and enhance recognition accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114417987B_ABST
    Figure CN114417987B_ABST
Patent Text Reader

Abstract

The embodiments of the present specification provide a model training method, a data recognition method, an apparatus and a device, including: obtaining multiple training samples, inputting the multiple training samples into a first model, and determining a first prediction probability that the character of each character position in the character sequence corresponding to the training sample is a preset character; and inputting the multiple training samples into a second model, and determining a second prediction probability that the character of each character position in the character sequence corresponding to the training sample is a preset character; based on the first prediction probability and the label information of the training samples, selecting a first number of training samples from multiple training samples; and based on the second prediction probability and the label information of the training samples, selecting a second number of training samples from multiple training samples; training the second model based on the first number of training samples, and training the first model based on the second number of training samples, until the trained first model and / or the trained second model meet the corresponding convergence conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to the field of computer technology, and in particular to a model training method, data recognition method, device and equipment. Background Art

[0002] In the process of supervised learning, a large number of accurately labeled samples are often required. However, in the actual application process, labeling samples often requires a lot of manpower, material resources and financial resources. The quality of the labeled samples will also be affected by human subjective factors to a certain extent, resulting in a certain proportion of label noise in the labeled samples actually obtained (for example, the correct label information of a verification code is 657I, and in the process of manually marking the verification code, it is very likely that the last English letter I of the above label information is mistakenly marked as the number 1, that is, the above verification code is marked as 6571, etc.). If in the process of training the neural network, the sample used to train the neural network carries label noise, which will cause the neural network to learn the information in the label noise, interfere with the performance of the trained neural network, and affect the accuracy of the trained neural network recognition. To this end, it is necessary to provide a technical solution that effectively improves the accuracy of model training and model performance. Summary of the invention

[0003] The purpose of the embodiments of this specification is to provide a model training method, data identification method, device and equipment, so as to provide a technical solution that can effectively improve the accuracy of model training and model performance.

[0004] In order to solve the above technical problems, the embodiments of this specification are implemented as follows:

[0005] In a first aspect, an embodiment of the present specification provides a model training method, comprising: obtaining a plurality of training samples, wherein the training samples include a character sequence consisting of a plurality of characters. Inputting the plurality of training samples into a first model, predicting the character of each character position in the character sequence corresponding to the training samples, and determining a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character. Inputting the plurality of training samples into a second model, predicting the character of each character position in the character sequence corresponding to the training samples, and determining a second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character, wherein the first model and the second model are determined by the same reference model. Based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the plurality of training samples. Based on the second prediction probability and the label information of the training samples, a second number of training samples are selected from the plurality of training samples. The second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples. If the trained first model and / or the trained second model do not meet the corresponding convergence conditions, the steps of obtaining multiple training samples and training the first model and the second model are re-executed until the trained first model and / or the trained second model meet the corresponding convergence conditions.

[0006] In a second aspect, an embodiment of the present specification provides a model training method, comprising: obtaining a plurality of training samples, wherein the training samples include a character sequence consisting of a plurality of characters. Inputting the plurality of training samples into a first model, predicting the character of each character position in the character sequence corresponding to the training samples, and determining a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character. Based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the plurality of training samples. The first model is trained based on the first number of training samples. If the first model after training does not meet the corresponding convergence condition, the steps of obtaining a plurality of training samples and training the first model are re-executed until the first model after training meets the corresponding convergence condition.

[0007] In a third aspect, an embodiment of the present specification provides a data recognition method, comprising: obtaining data to be recognized, wherein the data includes a character sequence consisting of multiple characters. Inputting the data to be recognized into a first model or a second model, and outputting a character sequence corresponding to the data, wherein the first model is a model pre-trained by training samples, and the second model is a model pre-trained by training samples. The training process of the first model and the second model comprises: obtaining multiple training samples, wherein the training samples include a character sequence consisting of multiple characters. Inputting the multiple training samples into the first model, predicting the characters of each character position in the character sequence corresponding to the training samples, and determining a first prediction probability that the characters of each character position in the character sequence corresponding to the training samples are preset characters. Inputting the multiple training samples into the second model, predicting the characters of each character position in the character sequence corresponding to the training samples, and determining a second prediction probability that the characters of each character position in the character sequence corresponding to the training samples are preset characters, wherein the first model and the second model are determined by the same reference model. Based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the multiple training samples. And based on the second prediction probability and the label information of the training samples, a second number of training samples are selected from the multiple training samples. The second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples. If the trained first model and / or the trained second model do not meet the corresponding convergence conditions, the steps of obtaining multiple training samples and training the first model and the second model are re-executed until the trained first model and / or the trained second model meet the corresponding convergence conditions. Alternatively, multiple training samples are obtained, wherein the training samples include a character sequence consisting of multiple characters. The multiple training samples are input into the first model or the second model, and the characters of each character position in the character sequence corresponding to the training samples are predicted, and the first prediction probability that the characters of each character position in the character sequence corresponding to the training samples are preset characters is determined. Based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the multiple training samples. The first model or the second model is trained based on the first number of training samples. If the first model or the second model after training does not meet the corresponding convergence condition, the steps of obtaining multiple training samples and training the first model or the second model are re-executed until the first model or the second model after training meets the corresponding convergence condition.

[0008] In a fourth aspect, an embodiment of the present specification provides a model training method, which is applied to a blockchain system, including: receiving model training rule information sent by a first device, generating a first smart contract based on the model training rule information, and deploying the first smart contract in the blockchain system. When the model training request sent by the first device is obtained, the following processing is performed based on the first smart contract: multiple training samples are obtained, wherein the training samples include a character sequence consisting of multiple characters. The multiple training samples are input into a first model pre-trained based on the first smart contract, and the characters of each character position in the character sequence corresponding to the training sample are predicted, and the first prediction probability that the characters of each character position in the character sequence corresponding to the training sample are preset characters is determined. And the multiple training samples are input into a second model pre-trained based on the first smart contract, and the characters of each character position in the character sequence corresponding to the training sample are predicted, and the second prediction probability that the characters of each character position in the character sequence corresponding to the training sample are preset characters is determined, and the first model and the second model are determined by the same benchmark model. Based on the first prediction probability and the label information of the training sample, a first number of training samples are selected from the multiple training samples. A second number of training samples are selected from the plurality of training samples based on the second prediction probability and the label information of the training samples. The second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples. If the trained first model and / or the trained second model do not meet the corresponding convergence conditions, the steps of obtaining multiple training samples and training the first model and the second model are re-executed until the trained first model and / or the trained second model meet the corresponding convergence conditions.

[0009] In a fifth aspect, an embodiment of the specification provides a model training method, which is applied to a blockchain system, including: receiving second model training rule information sent by a first device, generating a second smart contract based on the second model training rule information, and deploying the second smart contract in the blockchain system. When the model training request sent by the first device is obtained, the following processing is performed based on the second smart contract: obtaining multiple training samples, wherein the training samples include a character sequence consisting of multiple characters. The multiple training samples are input into a first model pre-trained based on the second smart contract, and the characters of each character position in the character sequence corresponding to the training samples are predicted, and the first prediction probability that the characters of each character position in the character sequence corresponding to the training samples are preset characters is determined. Based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the multiple training samples. The first model is trained based on the first number of training samples. If the first model after training does not meet the corresponding convergence condition, the steps of obtaining multiple training samples and training the first model are re-executed until the first model after training meets the corresponding convergence condition.

[0010] In a sixth aspect, an embodiment of the present specification provides a data identification method, which is applied to a blockchain system, including: receiving data identification rule information sent by a second device, generating a third smart contract based on the data identification rule information, and deploying the third smart contract in the blockchain system. When a data identification request sent by the second device is obtained, the following processing is performed based on the third smart contract: obtaining data to be identified, wherein the data includes a character sequence consisting of multiple characters. Inputting the data to be identified into a first model or a second model, and outputting a character sequence corresponding to the data, wherein the first model is a model pre-trained by a training sample, and the second model is a model pre-trained by a training sample. The training process of the first model and the second model includes: obtaining multiple training samples, wherein the training samples include a character sequence consisting of multiple characters. Inputting the multiple training samples into the first model, predicting the character of each character position in the character sequence corresponding to the training sample, and determining the first prediction probability that the character of each character position in the character sequence corresponding to the training sample is a preset character. The plurality of training samples are input into the second model, and the character of each character position in the character sequence corresponding to the training samples is predicted, and the second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character is determined, and the first model and the second model are determined by the same reference model. Based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the plurality of training samples. Based on the second prediction probability and the label information of the training samples, a second number of training samples are selected from the plurality of training samples. The second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples. If the trained first model and / or the trained second model do not meet the corresponding convergence conditions, the steps of obtaining a plurality of training samples and training the first model and the second model are re-executed until the trained first model and / or the trained second model meet the corresponding convergence conditions. Alternatively, a plurality of training samples are obtained, wherein the training samples include a character sequence consisting of a plurality of characters. The plurality of training samples are input into the first model or the second model, and the character of each character position in the character sequence corresponding to the training samples is predicted, and a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character is determined. A first number of training samples are selected from the plurality of training samples based on the first prediction probability and the label information of the training samples.The first model or the second model is trained based on the first number of training samples. If the first model or the second model after training does not meet the corresponding convergence condition, the steps of obtaining multiple training samples and training the first model or the second model are re-executed until the first model or the second model after training meets the corresponding convergence condition.

[0011] In a seventh aspect, an embodiment of the specification provides a model training device, comprising: a first acquisition module, acquiring multiple training samples, wherein the training samples include a character sequence consisting of multiple characters. A first processing module, inputting the multiple training samples into a first model, predicting the character of each character position in the character sequence corresponding to the training samples, and determining a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character. And inputting the multiple training samples into a second model, predicting the character of each character position in the character sequence corresponding to the training samples, and determining a second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character, wherein the first model and the second model are determined by the same reference model. A first selection module, based on the first prediction probability and the label information of the training samples, selects a first number of training samples from the multiple training samples. And based on the second prediction probability and the label information of the training samples, selects a second number of training samples from the multiple training samples. A first training module, training the second model based on the first number of training samples, and training the first model based on the second number of training samples. If the trained first model and / or the trained second model do not meet the corresponding convergence conditions, the steps of obtaining multiple training samples and training the first model and the second model are re-executed until the trained first model and / or the trained second model meet the corresponding convergence conditions.

[0012] In an eighth aspect, an embodiment of the present specification provides a model training device, comprising: a second acquisition module, which acquires a plurality of training samples, wherein the training samples include a character sequence consisting of a plurality of characters. A second processing module, which inputs the plurality of training samples into the first model, predicts the character of each character position in the character sequence corresponding to the training samples, and determines a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character. A second selection module, which selects a first number of training samples from the plurality of training samples based on the first prediction probability and the label information of the training samples. A second training module, which trains the first model based on the first number of training samples, and if the first model after training does not meet the corresponding convergence conditions, re-executes the steps of acquiring a plurality of training samples and training the first model until the first model after training meets the corresponding convergence conditions.

[0013] In a ninth aspect, an embodiment of the specification provides a data recognition device, comprising: a third acquisition module, which acquires data to be recognized, wherein the data includes a character sequence consisting of multiple characters. An output module, which inputs the data to be recognized into a first model or a second model, and outputs a character sequence corresponding to the data, wherein the first model is a model pre-trained by training samples, and the second model is a model pre-trained by training samples. The training process of the first model and the second model includes: acquiring multiple training samples, wherein the training samples include a character sequence consisting of multiple characters. Inputting the multiple training samples into the first model, predicting the characters of each character position in the character sequence corresponding to the training samples, and determining a first prediction probability that the characters of each character position in the character sequence corresponding to the training samples are preset characters. Inputting the multiple training samples into the second model, predicting the characters of each character position in the character sequence corresponding to the training samples, and determining a second prediction probability that the characters of each character position in the character sequence corresponding to the training samples are preset characters, wherein the first model and the second model are determined by the same reference model. Based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the multiple training samples. And based on the second prediction probability and the label information of the training samples, a second number of training samples are selected from the multiple training samples. The second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples. If the trained first model and / or the trained second model do not meet the corresponding convergence conditions, the steps of obtaining multiple training samples and training the first model and the second model are re-executed until the trained first model and / or the trained second model meet the corresponding convergence conditions. Alternatively, multiple training samples are obtained, wherein the training samples include a character sequence consisting of multiple characters. The multiple training samples are input into the first model or the second model, and the characters of each character position in the character sequence corresponding to the training samples are predicted, and the first prediction probability that the characters of each character position in the character sequence corresponding to the training samples are preset characters is determined. Based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the multiple training samples. The first model or the second model is trained based on the first number of training samples. If the first model or the second model after training does not meet the corresponding convergence condition, the steps of obtaining multiple training samples and training the first model or the second model are re-executed until the first model or the second model after training meets the corresponding convergence condition.

[0014] In the tenth aspect, an embodiment of the specification provides a model training device, which is a device in a blockchain system, including: a first receiving module, receiving model training rule information sent by a first device, generating a first smart contract based on the model training rule information, and deploying the first smart contract in the blockchain system. A third processing module, when obtaining a model training request sent by the first device, performs the following processing based on the first smart contract: obtaining multiple training samples, wherein the training samples include a character sequence consisting of multiple characters. Input the multiple training samples into a first model pre-trained based on the first smart contract, predict the characters of each character position in the character sequence corresponding to the training sample, and determine the first prediction probability that the characters of each character position in the character sequence corresponding to the training sample are preset characters. And input the multiple training samples into a second model pre-trained based on the first smart contract, predict the characters of each character position in the character sequence corresponding to the training sample, and determine the second prediction probability that the characters of each character position in the character sequence corresponding to the training sample are preset characters, and the first model and the second model are determined by the same benchmark model. Based on the first prediction probability and the label information of the training sample, a first number of training samples are selected from the multiple training samples. A second number of training samples are selected from the plurality of training samples based on the second prediction probability and the label information of the training samples. The second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples. If the trained first model and / or the trained second model do not meet the corresponding convergence conditions, the steps of obtaining multiple training samples and training the first model and the second model are re-executed until the trained first model and / or the trained second model meet the corresponding convergence conditions.

[0015] In the eleventh aspect, an embodiment of the specification provides a model training device, which is a device in a blockchain system, including: a second receiving module, receiving second model training rule information sent by a first device, generating a second smart contract based on the second model training rule information, and deploying the second smart contract in the blockchain system. A fourth processing module, when obtaining a model training request sent by the first device, performs the following processing based on the second smart contract: obtaining multiple training samples, wherein the training samples include a character sequence consisting of multiple characters. The multiple training samples are input into a first model pre-trained based on the second smart contract, and the characters of each character position in the character sequence corresponding to the training samples are predicted, and the first prediction probability that the characters of each character position in the character sequence corresponding to the training samples are preset characters is determined. Based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the multiple training samples. The first model is trained based on the first number of training samples. If the first model after training does not meet the corresponding convergence condition, the steps of obtaining multiple training samples and training the first model are re-executed until the first model after training meets the corresponding convergence condition.

[0016] In a twelfth aspect, an embodiment of the specification provides a data identification device, which is a device in a blockchain system, comprising: a third receiving module, receiving data identification rule information sent by a second device, generating a third smart contract based on the data identification rule information, and deploying the third smart contract in the blockchain system. A fifth processing module, when obtaining a data identification request sent by the second device, performs the following processing based on the third smart contract: obtaining data to be identified, wherein the data includes a character sequence consisting of multiple characters. Inputting the data to be identified into a first model or a second model, outputting a character sequence corresponding to the data, wherein the first model is a model pre-trained by a training sample, and the second model is a model pre-trained by a training sample. The training process of the first model and the second model includes: obtaining multiple training samples, wherein the training samples include a character sequence consisting of multiple characters. Inputting the multiple training samples into the first model, predicting the character of each character position in the character sequence corresponding to the training sample, and determining the first prediction probability that the character of each character position in the character sequence corresponding to the training sample is a preset character. The plurality of training samples are input into the second model, and the character of each character position in the character sequence corresponding to the training samples is predicted, and the second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character is determined, and the first model and the second model are determined by the same reference model. Based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the plurality of training samples. Based on the second prediction probability and the label information of the training samples, a second number of training samples are selected from the plurality of training samples. The second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples. If the trained first model and / or the trained second model do not meet the corresponding convergence conditions, the steps of obtaining a plurality of training samples and training the first model and the second model are re-executed until the trained first model and / or the trained second model meet the corresponding convergence conditions. Alternatively, a plurality of training samples are obtained, wherein the training samples include a character sequence consisting of a plurality of characters. The plurality of training samples are input into the first model or the second model, and the character of each character position in the character sequence corresponding to the training samples is predicted, and a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character is determined. A first number of training samples are selected from the plurality of training samples based on the first prediction probability and the label information of the training samples.The first model or the second model is trained based on the first number of training samples. If the first model or the second model after training does not meet the corresponding convergence condition, the steps of obtaining multiple training samples and training the first model or the second model are re-executed until the first model or the second model after training meets the corresponding convergence condition.

[0017] In a thirteenth aspect, an embodiment of the present specification provides a model training device, comprising: a processor. And a memory arranged to store computer executable instructions, wherein the executable instructions, when executed, cause the processor to: obtain multiple training samples, wherein the training samples include a character sequence consisting of multiple characters. Input the multiple training samples into a first model, predict the character of each character position in the character sequence corresponding to the training samples, and determine the first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character. And input the multiple training samples into a second model, predict the character of each character position in the character sequence corresponding to the training samples, and determine the second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character, wherein the first model and the second model are determined by the same reference model. Based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the multiple training samples. And based on the second prediction probability and the label information of the training samples, a second number of training samples are selected from the multiple training samples. The second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples. If the trained first model and / or the trained second model do not meet the corresponding convergence conditions, the steps of obtaining multiple training samples and training the first model and the second model are re-executed until the trained first model and / or the trained second model meet the corresponding convergence conditions.

[0018] In a fourteenth aspect, an embodiment of the present specification provides a model training device, comprising: a processor. And a memory arranged to store computer executable instructions, wherein the executable instructions, when executed, cause the processor to: obtain multiple training samples, wherein the training samples include a character sequence consisting of multiple characters. Input the multiple training samples into a first model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character. Based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the multiple training samples. The first model is trained based on the first number of training samples. If the first model after training does not meet the corresponding convergence condition, the steps of obtaining multiple training samples and training the first model are re-executed until the first model after training meets the corresponding convergence condition.

[0019] In a fifteenth aspect, an embodiment of the present specification provides a data recognition device, comprising: a processor. And a memory arranged to store computer executable instructions, wherein the executable instructions, when executed, cause the processor to: obtain data to be recognized, wherein the data includes a character sequence consisting of a plurality of characters. Input the data to be recognized into a first model or a second model, and output a character sequence corresponding to the data, wherein the first model is a model pre-trained by a training sample, and the second model is a model pre-trained by a training sample. The training process of the first model and the second model comprises: obtaining a plurality of training samples, wherein the training samples include a character sequence consisting of a plurality of characters. Input the plurality of training samples into the first model, predict the characters of each character position in the character sequence corresponding to the training samples, and determine the first prediction probability that the characters of each character position in the character sequence corresponding to the training samples are preset characters. Input the plurality of training samples into the second model, predict the characters of each character position in the character sequence corresponding to the training samples, and determine the second prediction probability that the characters of each character position in the character sequence corresponding to the training samples are preset characters, wherein the first model and the second model are determined by the same reference model. Based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the multiple training samples. Based on the second prediction probability and the label information of the training samples, a second number of training samples are selected from the multiple training samples. The second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples. If the trained first model and / or the trained second model do not meet the corresponding convergence conditions, the steps of obtaining multiple training samples and training the first model and the second model are re-executed until the trained first model and / or the trained second model meet the corresponding convergence conditions. Alternatively, multiple training samples are obtained, wherein the training samples include a character sequence consisting of multiple characters. The multiple training samples are input into the first model or the second model, and the characters of each character position in the character sequence corresponding to the training samples are predicted, and the first prediction probability that the characters of each character position in the character sequence corresponding to the training samples are preset characters is determined. Based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the multiple training samples. The first model or the second model is trained based on the first number of training samples. If the first model or the second model after training does not meet the corresponding convergence condition, the steps of obtaining multiple training samples and training the first model or the second model are re-executed until the first model or the second model after training meets the corresponding convergence condition.

[0020] In the sixteenth aspect, the embodiment of this specification provides a model training device, which is a device in a blockchain system, including: a processor. And a memory arranged to store computer executable instructions, the executable instructions when executed make the processor: receive model training rule information sent by the first device, generate a first smart contract based on the model training rule information, and deploy the first smart contract in the blockchain system. When the model training request sent by the first device is obtained, the following processing is performed based on the first smart contract: obtain multiple training samples, wherein the training samples include a character sequence composed of multiple characters. Input the multiple training samples into the first model pre-trained based on the first smart contract, predict the characters of each character position in the character sequence corresponding to the training samples, and determine the first prediction probability that the characters of each character position in the character sequence corresponding to the training samples are preset characters. And input the multiple training samples into the second model pre-trained based on the first smart contract, predict the characters of each character position in the character sequence corresponding to the training samples, and determine the second prediction probability that the characters of each character position in the character sequence corresponding to the training samples are preset characters, and the first model and the second model are determined by the same benchmark model. Based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the multiple training samples. Based on the second prediction probability and the label information of the training samples, a second number of training samples are selected from the multiple training samples. The second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples. If the trained first model and / or the trained second model do not meet the corresponding convergence conditions, the steps of obtaining multiple training samples and training the first model and the second model are re-executed until the trained first model and / or the trained second model meet the corresponding convergence conditions.

[0021] In the seventeenth aspect, an embodiment of the present specification provides a model training device, which is a device in a blockchain system, including: a processor. And a memory arranged to store computer executable instructions, which, when executed, causes the processor to: receive the second model training rule information sent by the first device, generate a second smart contract based on the second model training rule information, and deploy the second smart contract in the blockchain system. When the model training request sent by the first device is obtained, the following processing is performed based on the second smart contract: obtain multiple training samples, wherein the training samples include a character sequence composed of multiple characters. The multiple training samples are input into the first model pre-trained based on the second smart contract, and the characters of each character position in the character sequence corresponding to the training samples are predicted, and the first prediction probability that the characters of each character position in the character sequence corresponding to the training samples are preset characters is determined. Based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the multiple training samples. The first model is trained based on the first number of training samples. If the trained first model does not meet the corresponding convergence condition, the steps of obtaining multiple training samples and training the first model are re-executed until the trained first model meets the corresponding convergence condition.

[0022] In the eighteenth aspect, the embodiment of this specification provides a data identification device, which is a device in a blockchain system, including: a processor. And a memory arranged to store computer executable instructions, the executable instructions when executed make the processor: receive data identification rule information sent by the second device, generate a third smart contract based on the data identification rule information, and deploy the third smart contract in the blockchain system. When the data identification request sent by the second device is obtained, the following processing is performed based on the third smart contract: obtain data to be identified, wherein the data includes a character sequence consisting of multiple characters. Input the data to be identified into a first model or a second model, and output a character sequence corresponding to the data, wherein the first model is a model pre-trained by training samples, and the second model is a model pre-trained by training samples. The training process of the first model and the second model includes: obtaining multiple training samples, wherein the training samples include a character sequence consisting of multiple characters. Input the multiple training samples into the first model, predict the character of each character position in the character sequence corresponding to the training samples, and determine the first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character. The plurality of training samples are input into the second model, and the character of each character position in the character sequence corresponding to the training samples is predicted, and the second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character is determined, and the first model and the second model are determined by the same reference model. Based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the plurality of training samples. Based on the second prediction probability and the label information of the training samples, a second number of training samples are selected from the plurality of training samples. The second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples. If the trained first model and / or the trained second model do not meet the corresponding convergence conditions, the steps of obtaining a plurality of training samples and training the first model and the second model are re-executed until the trained first model and / or the trained second model meet the corresponding convergence conditions. Alternatively, a plurality of training samples are obtained, wherein the training samples include a character sequence consisting of a plurality of characters. The plurality of training samples are input into the first model or the second model, and the character of each character position in the character sequence corresponding to the training samples is predicted, and a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character is determined. A first number of training samples are selected from the plurality of training samples based on the first prediction probability and the label information of the training samples.The first model or the second model is trained based on the first number of training samples. If the first model or the second model after training does not meet the corresponding convergence condition, the steps of obtaining multiple training samples and training the first model or the second model are re-executed until the first model or the second model after training meets the corresponding convergence condition.

[0023] In a nineteenth aspect, an embodiment of the specification provides a storage medium, the storage medium is used to store computer executable instructions, and the executable instructions implement the following process when executed: obtain multiple training samples, wherein the training samples include a character sequence consisting of multiple characters. Input the multiple training samples into a first model, predict the character of each character position in the character sequence corresponding to the training samples, and determine the first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character. Input the multiple training samples into a second model, predict the character of each character position in the character sequence corresponding to the training samples, and determine the second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character, and the first model and the second model are determined by the same benchmark model. Based on the first prediction probability and the label information of the training samples, select a first number of training samples from the multiple training samples. And based on the second prediction probability and the label information of the training samples, select a second number of training samples from the multiple training samples. Train the second model based on the first number of training samples, and train the first model based on the second number of training samples. If the trained first model and / or the trained second model do not meet the corresponding convergence conditions, the steps of obtaining multiple training samples and training the first model and the second model are re-executed until the trained first model and / or the trained second model meet the corresponding convergence conditions.

[0024] In the twentieth aspect, an embodiment of the present specification provides a storage medium, the storage medium is used to store computer executable instructions, and the executable instructions implement the following process when executed: obtain multiple training samples, wherein the training samples include a character sequence composed of multiple characters. Input the multiple training samples into the first model, predict the character of each character position in the character sequence corresponding to the training samples, and determine the first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character. Based on the first prediction probability and the label information of the training samples, select a first number of training samples from the multiple training samples. Train the first model based on the first number of training samples. If the first model after training does not meet the corresponding convergence conditions, re-execute the steps of obtaining multiple training samples and training the first model until the first model after training meets the corresponding convergence conditions.

[0025] In a twenty-first aspect, an embodiment of the specification provides a storage medium, the storage medium is used to store computer executable instructions, and the executable instructions implement the following process when executed: obtain data to be recognized, wherein the data includes a character sequence consisting of multiple characters. Input the data to be recognized into a first model or a second model, and output a character sequence corresponding to the data, wherein the first model is a model pre-trained by a training sample, and the second model is a model pre-trained by a training sample. The training process of the first model and the second model includes: obtain multiple training samples, wherein the training samples include a character sequence consisting of multiple characters. Input the multiple training samples into the first model, predict the characters of each character position in the character sequence corresponding to the training samples, and determine the first prediction probability that the characters of each character position in the character sequence corresponding to the training samples are preset characters. And input the multiple training samples into the second model, predict the characters of each character position in the character sequence corresponding to the training samples, and determine the second prediction probability that the characters of each character position in the character sequence corresponding to the training samples are preset characters, and the first model and the second model are determined by the same reference model. Based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the multiple training samples. Based on the second prediction probability and the label information of the training samples, a second number of training samples are selected from the multiple training samples. The second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples. If the trained first model and / or the trained second model do not meet the corresponding convergence conditions, the steps of obtaining multiple training samples and training the first model and the second model are re-executed until the trained first model and / or the trained second model meet the corresponding convergence conditions. Alternatively, multiple training samples are obtained, wherein the training samples include a character sequence consisting of multiple characters. The multiple training samples are input into the first model or the second model, and the characters of each character position in the character sequence corresponding to the training samples are predicted, and the first prediction probability that the characters of each character position in the character sequence corresponding to the training samples are preset characters is determined. Based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the multiple training samples. The first model or the second model is trained based on the first number of training samples. If the first model or the second model after training does not meet the corresponding convergence condition, the steps of obtaining multiple training samples and training the first model or the second model are re-executed until the first model or the second model after training meets the corresponding convergence condition.

[0026] In the twenty-second aspect, the embodiment of this specification provides a storage medium, the storage medium is used to store computer executable instructions, and the executable instructions implement the following process when being executed: receiving model training rule information sent by the first device, generating a first smart contract based on the model training rule information, and deploying the first smart contract in the blockchain system. When the model training request sent by the first device is obtained, the following processing is performed based on the first smart contract: obtaining multiple training samples, wherein the training samples include a character sequence consisting of multiple characters. Input the multiple training samples into the first model pre-trained based on the first smart contract, predict the characters of each character position in the character sequence corresponding to the training sample, and determine the first prediction probability that the character of each character position in the character sequence corresponding to the training sample is a preset character. And input the multiple training samples into the second model pre-trained based on the first smart contract, predict the characters of each character position in the character sequence corresponding to the training sample, and determine the second prediction probability that the character of each character position in the character sequence corresponding to the training sample is a preset character, and the first model and the second model are determined by the same benchmark model. Based on the first prediction probability and the label information of the training sample, select a first number of training samples from the multiple training samples. A second number of training samples are selected from the plurality of training samples based on the second prediction probability and the label information of the training samples. The second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples. If the trained first model and / or the trained second model do not meet the corresponding convergence conditions, the steps of obtaining multiple training samples and training the first model and the second model are re-executed until the trained first model and / or the trained second model meet the corresponding convergence conditions.

[0027] In the twenty-third aspect, an embodiment of the present specification provides a storage medium, the storage medium is used to store computer executable instructions, and the executable instructions implement the following process when being executed: receiving the second model training rule information sent by the first device, generating a second smart contract based on the second model training rule information, and deploying the second smart contract in the blockchain system. When the model training request sent by the first device is obtained, the following processing is performed based on the second smart contract: obtaining multiple training samples, wherein the training samples include a character sequence consisting of multiple characters. The multiple training samples are input into the first model pre-trained based on the second smart contract, and the characters of each character position in the character sequence corresponding to the training samples are predicted, and the first prediction probability that the characters of each character position in the character sequence corresponding to the training samples are preset characters is determined. Based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the multiple training samples. The first model is trained based on the first number of training samples. If the first model after training does not meet the corresponding convergence condition, the steps of obtaining multiple training samples and training the first model are re-executed until the first model after training meets the corresponding convergence condition.

[0028] In the twenty-fourth aspect, an embodiment of the present specification provides a storage medium, the storage medium is used to store computer executable instructions, and the executable instructions implement the following process when being executed: receiving data identification rule information sent by the second device, generating a third smart contract based on the data identification rule information, and deploying the third smart contract in the blockchain system. When the data identification request sent by the second device is obtained, the following processing is performed based on the third smart contract: obtaining data to be identified, wherein the data includes a character sequence consisting of multiple characters. Inputting the data to be identified into a first model or a second model, outputting a character sequence corresponding to the data, wherein the first model is a model pre-trained by training samples, and the second model is a model pre-trained by training samples. The training process of the first model and the second model includes: obtaining multiple training samples, wherein the training samples include a character sequence consisting of multiple characters. Inputting the multiple training samples into the first model, predicting the character of each character position in the character sequence corresponding to the training samples, and determining the first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character. The plurality of training samples are input into the second model, and the character of each character position in the character sequence corresponding to the training samples is predicted, and the second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character is determined, and the first model and the second model are determined by the same reference model. Based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the plurality of training samples. Based on the second prediction probability and the label information of the training samples, a second number of training samples are selected from the plurality of training samples. The second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples. If the trained first model and / or the trained second model do not meet the corresponding convergence conditions, the steps of obtaining a plurality of training samples and training the first model and the second model are re-executed until the trained first model and / or the trained second model meet the corresponding convergence conditions. Alternatively, a plurality of training samples are obtained, wherein the training samples include a character sequence consisting of a plurality of characters. The plurality of training samples are input into the first model or the second model, and the character of each character position in the character sequence corresponding to the training samples is predicted, and a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character is determined. A first number of training samples are selected from the plurality of training samples based on the first prediction probability and the label information of the training samples.The first model or the second model is trained based on the first number of training samples. If the first model or the second model after training does not meet the corresponding convergence condition, the steps of obtaining multiple training samples and training the first model or the second model are re-executed until the first model or the second model after training meets the corresponding convergence condition. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0030] Figure 1A A first flow chart of the model training method provided in the embodiments of this specification;

[0031] Figure 1B A first schematic diagram of the model training process provided in the embodiments of this specification;

[0032] Figure 2A A second flow chart of the model training method provided in the embodiment of this specification;

[0033] Figure 2B A second schematic diagram of the model training process provided in the embodiments of this specification;

[0034] Figure 3A A third flow chart of the data identification method provided in the embodiment of this specification;

[0035] Figure 3B A third schematic diagram of the data identification process provided in the embodiment of this specification;

[0036] Figure 4A A fourth flow chart of the model training method provided in the embodiment of this specification;

[0037] Figure 4B A fourth schematic diagram of the model training process provided in the embodiments of this specification;

[0038] Figure 5A A fifth flow chart of the model training method provided in the embodiments of this specification;

[0039] Figure 5B A fifth schematic diagram of the model training process provided in the embodiments of this specification;

[0040] Fig. 6AA sixth flow chart of the data identification method provided in the embodiments of this specification;

[0041] Figure 6B A sixth schematic diagram of the data identification process provided in the embodiments of this specification;

[0042] Figure 7 A schematic diagram of the first module composition of the model training device provided in the embodiment of this specification;

[0043] Figure 8 A schematic diagram of the second module composition of the model training device provided in the embodiment of this specification;

[0044] Fig. 9 A schematic diagram of the first module composition of the data identification device provided in the embodiments of this specification;

[0045] Fig.10 A schematic diagram of the third module composition of the model training device provided in the embodiment of this specification;

[0046] Fig.11 A schematic diagram of the fourth module composition of the model training device provided in the embodiment of this specification;

[0047] Fig.12 A schematic diagram of the second module composition of the data identification device provided in the embodiment of this specification;

[0048] Fig.13 A schematic diagram of the structure of the model training device provided in the embodiments of this specification. DETAILED DESCRIPTION

[0049] The embodiments of this specification provide a model training method, data identification method, device and equipment.

[0050] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0051] like Figure 1A and 1B As shown, an embodiment of the present specification provides a model training method, and the executor of the method can be a server, wherein the server can be an independent server or a server cluster composed of multiple servers, and the server can train a first model to be trained based on multiple acquired training samples.

[0052] The method may specifically include the following steps:

[0053] In step S102, a plurality of training samples are obtained, wherein the training samples include a character sequence consisting of a plurality of characters.

[0054] As an example, the training sample may be an image sample, or an audio sample, etc. The training sample may include noise data that is not related to the character sequence, and the noise data may include one or more of Chinese characters, letters, numbers, symbols, graphics, and lines. The training sample may also include a character sequence composed of multiple characters, and the character sequence may be a verification code, or other character sequences used for identity verification, etc. The characters contained in the character sequence may include one or more of Chinese characters, letters, numbers, symbols, and graphics. The embodiments of this specification do not specifically limit the specific form of expression of the training sample, the specific content of the character sequence, and the specific form of expression of the characters constituting the character sequence.

[0055] In practice, in the supervised learning process, a large number of accurately labeled samples are often required. However, in actual application, labeling samples often requires a lot of manpower, material and financial resources. The quality of labeled samples will also be affected by human subjective factors to a certain extent, resulting in a certain proportion of label noise in the labeled samples actually obtained. If in the process of training the neural network, the samples used to train the neural network carry label noise, the neural network will learn the information in the label noise, which will interfere with the performance of the trained neural network and affect the recognition accuracy of the trained neural network. To this end, it is necessary to provide a technical solution that effectively improves the accuracy of model training and model performance.

[0056] In an optional implementation manner, the execution subject may obtain a plurality of training samples through a preset interface, or the execution subject may obtain a plurality of training samples and label information corresponding to the training samples through a preset interface.

[0057] Considering that, in the process of training the neural network, there may be some label noise in the training sample data used. For example, the correct label information of a verification code is 657I, and in the process of manually marking the verification code, it is very likely that the last English letter I of the above label information is mistakenly marked as the number 1, that is, the above verification code is marked as 6571. The verification code 6571 can be considered as label noise, or it can also be considered as a noise label. In this way, in the process of training the neural network, if the training sample contains a large amount of the above label noise, it will interfere with the performance of the trained neural network and also affect the recognition accuracy of the neural network. Therefore, after the above-mentioned execution subject obtains multiple training samples through the processing of the above-mentioned step S102, the above-mentioned training samples can be screened, and the training samples without label noise can be screened out from the above-mentioned multiple training samples. By using the above-mentioned screened training samples to train the model, the model training accuracy and model performance can be improved. The specific process can refer to the specific implementation process of the following steps S104-step S108.

[0058] In step S104, multiple training samples are input into the first model, and the character of each character position in the character sequence corresponding to the training samples is predicted, and the first prediction probability that the character of each character position in the character sequence corresponding to the training samples is the preset character is determined; and multiple training samples are input into the second model, and the character of each character position in the character sequence corresponding to the training samples is predicted, and the second prediction probability that the character of each character position in the character sequence corresponding to the training samples is the preset character is determined. The first model and the second model are determined by the same benchmark model.

[0059] As an example, the first model and the second model may be two models determined based on the Co-teaching mechanism, and the initial model parameters of the first model and the second model may be the same. Assuming that the above characters are numbers, the preset characters may be any number between 0 and 9. Assuming that the above characters are letters, the preset characters may be any letter from a to z, etc. The above reference model may be a model constructed based on one or more different preset neural network algorithms. The embodiments of this specification do not specifically limit the above preset characters and the specific contents of the above reference model.

[0060] In an optional implementation, taking the above training sample as a verification code containing a 4-digit sequence as an example, assuming that the character position can be determined in order from left to right, the character position of the verification code containing the 4-digit sequence can be determined in order from left to right as the first character position, the second character position, the third character position and the fourth character position. When the training sample is input into the first model, the character of each character position in the character sequence corresponding to the training sample is predicted, and the first prediction probability (including 10 first prediction probabilities in total) of the preset character corresponding to the first character position being any number from 0 to 9, the 10 first prediction probabilities of the preset character corresponding to the second character position being any number from 0 to 9, the 10 first prediction probabilities of the preset character corresponding to the third character position being any number from 0 to 9, and the 10 first prediction probabilities of the preset character corresponding to the fourth character position being any number from 0 to 9 can be obtained in sequence. Similarly, when the training sample is input into the second model, the character of each character position in the character sequence corresponding to the training sample is predicted, and the second prediction probability corresponding to each character position can be obtained in sequence.

[0061] In step S106, a first number of training samples are selected from multiple training samples based on the first prediction probability and the label information of the training samples; and a second number of training samples are selected from multiple training samples based on the second prediction probability and the label information of the training samples.

[0062] In an optional implementation, the real character corresponding to each character position in the character sequence corresponding to the training sample can be determined based on the label information of the training sample, and then the first prediction probability corresponding to the character position can be determined when the preset character is the real character, and then, from the multiple training samples, the training samples whose first prediction probabilities are all greater than the first preset threshold are selected, and the selected training samples are used as the first number of training samples. Similarly, the second number of training samples can be selected from the multiple training samples in the same processing manner.

[0063] In an optional implementation, taking a certain training sample in the above training samples as a verification code containing 4 digits as an example, the true label corresponding to the training sample is 6571, assuming that the above first preset threshold is 60%, the first prediction probability that the true character of the above first character position is 6 is 90%, the first prediction probability that the preset character of the above second character position is 5 is 80%, the first prediction probability that the preset character of the above third character position is 7 is 60%, and the first prediction probability that the preset character of the above fourth character position is 1 is 70%, then it can be determined that the training sample is not a noise sample, and the training sample can be selected for model training of the above second model. Similarly, if the first prediction probability of the preset character of a certain character position among the above 4 characters is less than 60%, then the training sample can be considered as a noise sample, and the training sample can be eliminated, and the above training sample will not participate in the model training of the first model.

[0064] In step S108, the second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples; if the trained first model and / or the trained second model do not meet the corresponding convergence conditions, the steps of obtaining multiple training samples and training the first model and the second model are re-executed until the trained first model and / or the trained second model meet the corresponding convergence conditions.

[0065] In an optional implementation, the execution subject may input the first number of training samples into the second model to obtain a first number of predicted labels corresponding to the training samples, and then determine the loss information corresponding to the second model based on the loss information between the predicted labels corresponding to the training samples and their respective corresponding true labels, and train the second model based on the loss information. If the loss information of the trained second model does not meet the corresponding convergence condition, the steps of obtaining multiple training samples and training the second model are re-executed until the trained second model meets the corresponding convergence condition. Similarly, the execution subject may input the second number of training samples into the first model to obtain a second number of predicted labels corresponding to the training samples, and then determine the loss information corresponding to the first model based on the loss information between the predicted labels corresponding to the training samples and their respective corresponding true labels, and train the first model based on the loss information. If the loss information of the trained first model does not meet the corresponding convergence condition, the steps of obtaining multiple training samples and training the first model are re-executed until the trained first model meets the corresponding convergence condition.

[0066] It can be seen from the technical solutions provided by the above embodiments of the present specification that the embodiments of the present specification respectively input the same multiple training samples into two identical models, namely the first model and the second model, determined by the same benchmark model, and select a first number of training samples from the above multiple training samples input through the above first model, and select a second number of training samples from the above multiple training samples input through the above second model, and then train the second model based on the first number of training samples, and train the first model based on the second number of training samples until the trained first model and / or the trained second model meet the corresponding convergence conditions. Since the above first number of training samples and the second number of training samples are samples that may not contain noise selected from the above multiple training samples, the method of training the above first model and the second model based on the above selected samples without noise effectively improves the model training accuracy and model performance. In addition, by using the first number of training samples selected by the first model to train the second model, and by using the second number of training samples selected by the second model to train the first model, the method of training models based on training samples selected by other models further improves the accuracy of model training and model performance, and can effectively avoid the presence of noise samples in the selected training samples when the model trains itself based on the training samples selected by itself, resulting in reduced model training accuracy and model performance.

[0067] Furthermore, there may be various processing methods for the above step S106. An optional processing method is provided below. For details, please refer to the specific processing process of the following steps A2 to A6.

[0068] In step A2, based on the label information of the training sample, the character of each character position in the character sequence corresponding to the training sample is determined to be the first character.

[0069] As an example, the first character can be the real character corresponding to the character position. Take the above training sample as a verification code containing 4 digital sequences, including the first character position, the second character position, the third character position and the fourth character position. Assuming that the label information corresponding to the training sample is 6571, then for the first character position, the first character can be the number 6; for the second character position, the corresponding first character can be the number 5; for the third character position, the corresponding first character can be the number 7; for the fourth character position, the corresponding first character can be the number 1.

[0070] In step A4, based on the character of each character position in the character sequence corresponding to the training sample being the first character and the first prediction probability, the confidence of the character sequence corresponding to the training sample is determined, and the confidence is used to characterize the accuracy of the label information of the training sample.

[0071] In an optional implementation, the execution subject may determine the first prediction probability corresponding to the first character based on the first character and the first prediction probability that the character is a preset character, and then, the first prediction probability that the character of each character position corresponding to the training sample is the first character may be summed up to obtain a first result corresponding to the training sample, and the first result may be determined as the confidence of the character sequence corresponding to the training sample. As an example, a training sample in the training sample is a verification code containing 4 digits, and the true label corresponding to the training sample is 6571. Assuming that the execution subject determines that the first character of the first character position is 6 based on the character of each character position in the character sequence corresponding to the training sample is the first character, the first prediction probability that the first character of the first character position is 6 is 90%, the first prediction probability that the first character of the second character position is 5 is 80%, the first prediction probability that the first character corresponding to the third character position is 7 is 60%, and the first prediction probability that the first character corresponding to the fourth character position is 1 is 70%, then the first prediction probability that the character of each character position corresponding to the training sample is the first character may be summed up to obtain the first result, i.e., 300%.

[0072] Alternatively, in another optional implementation, the above-mentioned execution entity can determine the first prediction probability corresponding to the above-mentioned first character based on the above-mentioned first character and the first prediction probability that the above-mentioned character position is a preset character, and then, based on the first prediction probability that the character of each character position corresponding to the training sample is the first character, determine the average probability value of the first prediction probability that each character position is the first character, and determine the average probability value as the confidence of the character sequence corresponding to the training sample.

[0073] In an optional implementation, after the execution entity determines the confidence of the character sequence corresponding to the training sample through the processing of step A4, it can select training samples with confidence greater than a preset confidence threshold from the multiple training samples based on the confidence, and determine the number of the selected training samples with confidence greater than the preset threshold as the first number.

[0074] In this way, since the above confidence is used to characterize the accuracy of the label information of the training sample, the greater the confidence, the higher the accuracy of the label information of the training sample, and the less likely the label of the training sample is a noise label, the use of such training samples with a large confidence for model training can effectively avoid the interference of noise data on model training, thereby effectively improving the accuracy of model training and the performance of the model. Further, the specific processing process of the above step A4 can be varied, and an optional processing method is provided below, and the specific processing process of the following steps A42-A44 can be referred to.

[0075] In step A42, for the target character position in the character sequence corresponding to the training sample, the character prediction probability of the target character position being the first character is obtained from the first prediction probability, and the target character position is any character position in the character sequence corresponding to the training sample.

[0076] In step A44, the product of the character prediction probabilities of multiple character positions in the character sequence corresponding to the training sample is used as the confidence of the character sequence corresponding to the training sample.

[0077] Based on the example in step A4 above, the product of the character prediction probabilities of multiple character positions corresponding to the training sample can be calculated as 90% x 80% x 60% x 70% = 30.24%, and 30.24% is used as the confidence of the character sequence corresponding to the training sample.

[0078] The embodiments of this specification do not specifically limit the specific implementation method of determining the confidence of the character sequence corresponding to the training sample.

[0079] Furthermore, there may be various processing methods for the above step A6. An optional processing method is provided below. For details, please refer to the specific processing process of the following step A62.

[0080] In step A62, training samples whose confidences are greater than a preset confidence threshold are determined from a plurality of training samples, and a first number of training samples are selected from the training samples whose confidences are greater than the preset confidence threshold.

[0081] It should be noted that the processing method for selecting the second number of training samples from multiple training samples in the embodiment of this specification is the same as the processing method for selecting the first number of training samples from multiple training samples in the above embodiment. To avoid repetition, it will not be repeated here.

[0082] It can be seen from the technical solutions provided by the above embodiments of the present specification that the embodiments of the present specification respectively input the same multiple training samples into two identical models, namely the first model and the second model, determined by the same benchmark model, and select a first number of training samples from the multiple training samples inputted above through the first model, and select a second number of training samples from the multiple training samples inputted above through the second model, and then train the second model based on the first number of training samples, and train the first model based on the second number of training samples until the trained first model and / or the trained second model meet the corresponding convergence conditions. Since the first number of training samples and the second number of training samples are both possible samples selected from the multiple training samples, There are no noise samples, so the method of training the first model and the second model based on the above-mentioned noise-free samples effectively improves the model training accuracy and model performance. In addition, by using the first number of training samples selected by the first model to train the second model, and by using the second number of training samples selected by the second model to train the first model, the method of training the model based on the training samples selected by other models further improves the model training accuracy and model performance, thereby effectively avoiding the problem that when the model trains itself based on the training samples selected by itself, there may be noise samples in the selected training samples, thereby reducing the model training accuracy and model performance.

[0083] Corresponding to the model training method provided in the above embodiment, based on the same technical concept, the embodiment of this specification further provides a model training method. Figure 2A A second flow chart of the model training method provided in the embodiment of this specification, Figure 2B A second schematic diagram of a model training process provided in an embodiment of this specification, wherein the execution subject of the model training method may be a server, wherein the server may be an independent server or a server cluster composed of multiple servers, and the server may obtain multiple training samples from a terminal device, and train the first model based on the multiple samples obtained above, and the method may specifically include the following steps:

[0084] In step S202, a plurality of training samples are obtained, wherein the training samples include a character sequence consisting of a plurality of characters.

[0085] The specific implementation process of the above step S202 can refer to the specific processing process of step S102 in the above embodiment.

[0086] In step S204, multiple training samples are input into the first model, and the character of each character position in the character sequence corresponding to the training samples is predicted to determine the first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character.

[0087] The specific implementation process of the above step S204 can refer to the specific processing process of step S104 in the above embodiment.

[0088] In step S206, a first number of training samples are selected from a plurality of training samples based on the first prediction probability and label information of the training samples.

[0089] The specific implementation process of the above step S206 can refer to the specific processing process of step S106 in the above embodiment.

[0090] In step S208, the first model is trained based on the first number of training samples. If the trained first model does not meet the corresponding convergence conditions, the steps of obtaining multiple training samples and training the first model are re-executed until the trained first model meets the corresponding convergence conditions.

[0091] In an optional implementation, after the execution entity determines the first number of training samples through the processing of the above step S206, the first number of training samples can be input into the above first model to obtain a first number of predicted labels corresponding to the above training samples. Then, based on the loss information between the predicted labels corresponding to the above training samples and their respective corresponding true labels, the loss information corresponding to the above first model can be determined, and the above first model can be trained based on the loss information. If the loss information of the trained first model does not meet the corresponding convergence conditions, the steps of obtaining multiple training samples and training the first model are re-executed until the trained first model meets the corresponding convergence conditions.

[0092] It can be seen from the technical solution provided by the above embodiments of the present specification that the embodiments of the present specification input multiple training samples into the first model, predict the character of each character position in the character sequence corresponding to the training samples, determine the first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character, and then, based on the first prediction probability and the label information of the training samples, select a first number of training samples from multiple training samples, and train the first model based on the above first number of training samples until the trained first model meets the corresponding convergence conditions. Since the above first number of training samples are samples that may not contain noise selected from the above multiple training samples, the method of training the above first model based on the above selected samples without noise effectively improves the model training accuracy and model performance.

[0093] Corresponding to the model training method provided in the above embodiment, based on the same technical concept, the embodiment of this specification further provides a model training method. Figure 3A This is a schematic diagram of a first flow chart of a data identification method provided in an embodiment of this specification. Figure 3B The first schematic diagram of the data recognition process provided in the embodiment of this specification, the execution subject of the data recognition method can be a server, wherein the server can be an independent server or a server cluster composed of multiple servers, and the server can perform recognition based on the acquired data to be recognized and output a character sequence corresponding to the above data to be recognized. The method can specifically include the following steps:

[0094] In step S302, data to be recognized is obtained, wherein the data includes a character sequence consisting of a plurality of characters.

[0095] As an example, the data to be identified may include at least one or more of images and texts.

[0096] In step S304, the data to be recognized is input into the first model or the second model, and a character sequence corresponding to the data is output, wherein the first model is a model pre-trained by training samples, and the second model is a model pre-trained by training samples; the training process of the first model and the second model includes: obtaining multiple training samples, wherein the training samples include a character sequence composed of multiple characters; inputting the multiple training samples into the first model, predicting the character of each character position in the character sequence corresponding to the training samples, and determining the first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character; and inputting the multiple training samples into the second model, predicting the character of each character position in the character sequence corresponding to the training samples, and determining the character corresponding to the training samples. The character of each character position in the character sequence is a second predicted probability of a preset character, and the first model and the second model are determined by the same reference model; based on the first predicted probability and the label information of the training samples, a first number of training samples are selected from multiple training samples; and based on the second predicted probability and the label information of the training samples, a second number of training samples are selected from multiple training samples; the second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples; if the trained first model and / or the trained second model do not meet the corresponding convergence conditions, the steps of obtaining multiple training samples and training the first model and the second model are re-executed until the trained first model and / or the trained second model meet the corresponding convergence conditions. Alternatively, a plurality of training samples are obtained, wherein the training samples include a character sequence consisting of a plurality of characters; the plurality of training samples are input into the first model or the second model, and the character of each character position in the character sequence corresponding to the training samples is predicted, and a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character is determined; based on the first prediction probability and label information of the training samples, a first number of training samples are selected from the plurality of training samples; the first model or the second model is trained based on the first number of training samples, and if the trained first model or the second model does not meet the corresponding convergence condition, the steps of obtaining a plurality of training samples and training the first model or the second model are re-executed until the trained first model or the second model meets the corresponding convergence condition.

[0097] Furthermore, before executing the processing of the above step S302, the above method may also include the following specific processing of steps D2 to D4.

[0098] In step D2, a plurality of verification samples are obtained, wherein the verification samples include a character sequence consisting of a plurality of characters.

[0099] In step D4, multiple verification samples are input into the first model to obtain first verification results corresponding to the above verification samples; multiple verification samples are input into the second model to obtain second verification results corresponding to the above verification samples.

[0100] In step D6, based on the first verification result and the second verification result, a first accuracy rate corresponding to the first model and a second accuracy rate corresponding to the second model are determined.

[0101] In step D8, based on the first accuracy rate and the second accuracy rate, a target model of the data input to be identified is determined, wherein the target model is a model corresponding to the accuracy rate with the larger value.

[0102] In an optional implementation, assuming that 100 verification samples are respectively input into the first model and the second model, a first verification result corresponding to the first model and a second verification result corresponding to the second model are obtained. Assuming that the first accuracy rate obtained based on the first verification result is 90%, and the second accuracy rate obtained based on the second verification result is 85%, the first model can be used as the target model.

[0103] Furthermore, there may be various processing methods for the above step S304. An optional processing method is provided below. For details, please refer to the specific processing process of the following step E2.

[0104] In step E2, the data to be recognized is input into the target model, and a character sequence corresponding to the data is output.

[0105] In this way, the accuracy of identifying the data to be identified can be effectively improved by inputting the data to be identified into the target model with higher accuracy and outputting a character sequence corresponding to the data to be identified.

[0106] It can be seen from the technical solutions provided by the above embodiments of the present specification that the embodiments of the present specification obtain data to be identified, and then input the above data to be identified into the first model or the second model, and output a character sequence corresponding to the above data. Since the above first model or the second model is obtained by inputting the same multiple training samples into two identical models, namely the first model and the second model, respectively, determined by the same benchmark model, and selecting a first number of training samples from the above multiple training samples input by the above first model, and selecting a second number of training samples from the above multiple training samples input by the above second model, then, the second model is trained based on the first number of training samples, and based on The first model is trained with the second number of training samples until the trained first model and / or the trained second model meet the corresponding convergence conditions. Since the first number of training samples and the second number of training samples used in the training process of the first model or the second model are samples that may not contain noise and are selected from the multiple training samples, the first model and the second model are trained based on the selected noise-free samples, which effectively improves the model training accuracy and model performance. In this way, the method of using the trained first model or the second model provided in the embodiments of this specification to identify the data to be identified effectively improves the accuracy of identifying the data to be identified.

[0107] Corresponding to the model training method provided in the above embodiment, based on the same technical concept, the embodiment of this specification further provides a model training method. Figure 4A A second flow chart of the model training method provided in the embodiment of this specification, Figure 4B The second schematic diagram of the model training process provided in the embodiment of this specification, the execution subject of the model training method can be a server, wherein the server can be an independent server or a server cluster composed of multiple servers, and the server can obtain multiple training samples from the terminal device based on the first smart contract pre-deployed in the blockchain system, and train the first model based on the multiple samples obtained above. The method can specifically include the following steps:

[0108] In step S402, model training rule information sent by the first device is received, a first smart contract is generated based on the model training rule information, and the first smart contract is deployed in the blockchain system.

[0109] In implementation, after receiving the model training rule information sent by the first device, the above-mentioned blockchain system can generate a first smart contract based on the above-mentioned model training rule information, and deploy the first smart contract in the above-mentioned blockchain system.

[0110] In step S404, when the model training request sent by the first device is obtained, the following processing is performed based on the first smart contract:

[0111] A plurality of training samples are obtained, wherein the training samples include a character sequence consisting of a plurality of characters.

[0112] The specific processing process of the above steps can refer to the specific processing process of step S104 in the embodiment of the above description.

[0113] Input multiple training samples into a first model pre-trained based on a first smart contract, predict the character of each character position in the character sequence corresponding to the training samples, and determine the first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character; and input multiple training samples into a second model pre-trained based on the first smart contract, predict the character of each character position in the character sequence corresponding to the training samples, and determine the second prediction probability that the character of each character position in the character sequence corresponding to the training samples is the preset character, and the first model and the second model are determined by the same benchmark model.

[0114] In an optional implementation, the plurality of training samples obtained above can be input into the first model pre-trained based on the first smart contract. For other specific processing procedures of the above steps, please refer to the specific processing procedures of step S104 in the above-mentioned embodiment of the specification.

[0115] Based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the multiple training samples; and based on the second prediction probability and the label information of the training samples, a second number of training samples are selected from the multiple training samples.

[0116] The specific processing process of the above steps can refer to the specific processing process of step S106 in the above-mentioned embodiment of the specification.

[0117] The second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples; if the trained first model and / or the trained second model do not meet the corresponding convergence conditions, the steps of obtaining multiple training samples and training the first model and the second model are re-executed until the trained first model and / or the trained second model meet the corresponding convergence conditions.

[0118] The specific processing process of the above steps can refer to the specific processing process of step S108 in the embodiment of the above description.

[0119] It can be seen from the technical solution provided by the above embodiments of this specification that the embodiments of this specification input the same multiple training samples into two identical models, namely the first model and the second model, determined by the same benchmark model, respectively, and select a first number of training samples from the above multiple training samples input through the above first model, and select a second number of training samples from the above multiple training samples input through the above second model, and then train the second model based on the first number of training samples, and train the first model based on the second number of training samples until the trained first model and / or the trained second model meet the corresponding convergence conditions. Since the above first number of training samples and the second number of training samples are both selected from the above multiple training samples, There may be samples without noise, so the method of training the first model and the second model based on the above-mentioned samples without noise selected can effectively improve the model training accuracy and model performance. In addition, by using the first number of training samples selected by the first model to train the second model, and by using the second number of training samples selected by the second model to train the first model, the method of training the model based on the training samples selected by other models can further improve the model training accuracy and model performance, and can effectively avoid the possibility that when the model trains itself based on the training samples selected by itself, there may be noise samples in the selected training samples, resulting in reduced model training accuracy and model performance.

[0120] Corresponding to the model training method provided in the above embodiment, based on the same technical concept, the embodiment of this specification further provides a model training method. Figure 5A A second flow chart of the model training method provided in the embodiment of this specification, Figure 5B The second schematic diagram of the model training process provided in the embodiment of this specification, the execution subject of the model training method can be a server, wherein the server can be an independent server or a server cluster composed of multiple servers, and the server can obtain multiple training samples from the terminal device based on the second smart contract pre-deployed in the blockchain system, and train the first model based on the multiple samples obtained above. The method can specifically include the following steps:

[0121] In step S502, the second model training rule information sent by the first device is received, a second smart contract is generated based on the second model training rule information, and the second smart contract is deployed in the blockchain system.

[0122] In implementation, after receiving the second model training rule information sent by the first device, the above-mentioned blockchain system can generate a second smart contract based on the above-mentioned second model training rule information, and deploy the second smart contract in the above-mentioned blockchain system.

[0123] In step S504, when the model training request sent by the first device is obtained, the following processing is performed based on the second smart contract:

[0124] A plurality of training samples are obtained, wherein the training samples include a character sequence consisting of a plurality of characters.

[0125] The specific processing process of the above steps can refer to the specific processing process of step S202 in the above-mentioned embodiment of the specification.

[0126] Multiple training samples are input into a first model pre-trained based on a second smart contract, and the character of each character position in the character sequence corresponding to the training samples is predicted to determine a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character.

[0127] In an optional implementation, the plurality of training samples obtained above can be input into the first model pre-trained based on the second smart contract. For other specific processing procedures of the above steps, please refer to the specific processing procedures of step S204 in the above-mentioned embodiment of the specification.

[0128] A first number of training samples are selected from a plurality of training samples based on the first prediction probability and label information of the training samples.

[0129] The specific processing process of the above steps can refer to the specific processing process of step S206 in the embodiment of the above description.

[0130] The first model is trained based on a first number of training samples. If the trained first model does not meet the corresponding convergence condition, the steps of obtaining multiple training samples and training the first model are re-executed until the trained first model meets the corresponding convergence condition.

[0131] The specific processing process of the above steps can refer to the specific processing process of step S208 in the embodiment of the above description.

[0132] It can be seen from the technical solution provided by the above embodiments of the present specification that the embodiments of the present specification input multiple training samples into a first model pre-trained based on a second smart contract, predict the character of each character position in the character sequence corresponding to the training sample, determine the first prediction probability that the character of each character position in the character sequence corresponding to the training sample is a preset character, and then, based on the first prediction probability and the label information of the training sample, select a first number of training samples from multiple training samples, and train the first model based on the above first number of training samples until the trained first model meets the corresponding convergence conditions. Since the above first number of training samples are samples that may not contain noise selected from the above multiple training samples, the method of training the above first model based on the above selected samples without noise effectively improves the model training accuracy and model performance.

[0133] Corresponding to the data identification method provided in the above embodiment, based on the same technical concept, the embodiment of this specification further provides a data identification method. Fig. 6A A second flow chart of the data identification method provided in the embodiment of this specification is shown in FIG. Figure 6B The second schematic diagram of the data identification process provided in the embodiment of this specification, the execution subject of the data identification method can be a server, wherein the server can be an independent server or a server cluster composed of multiple servers, and the server can obtain the data to be identified from the terminal device based on the third smart contract pre-deployed in the blockchain system, and identify the data to be identified, thereby outputting a character sequence corresponding to the data. The method can specifically include the following steps:

[0134] In step S602, data identification rule information sent by the second device is received, a third smart contract is generated based on the data identification rule information, and the third smart contract is deployed in the blockchain system.

[0135] In implementation, after receiving the data identification rule information sent by the second device, the above-mentioned blockchain system can generate a third smart contract based on the data identification rule information and deploy the third smart contract in the above-mentioned blockchain system.

[0136] In step S604, when the data identification request sent by the second device is obtained, the following processing is performed based on the third smart contract:

[0137] The data to be recognized is obtained, wherein the data includes a character sequence consisting of multiple characters.

[0138] The specific processing process of the above steps can refer to the specific processing process of step S302 in the embodiment of the above description.

[0139] The data to be recognized is input into the first model or the second model, and a character sequence corresponding to the data is output, wherein the first model is a model pre-trained by training samples, and the second model is a model pre-trained by training samples; the training process of the first model and the second model includes: obtaining multiple training samples, wherein the training samples include a character sequence composed of multiple characters; inputting the multiple training samples into the first model, predicting the character of each character position in the character sequence corresponding to the training samples, and determining the first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character; and inputting the multiple training samples into the second model, predicting the character of each character position in the character sequence corresponding to the training samples, and determining the first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character. The character at each character position is a second predicted probability of a preset character, and the first model and the second model are determined by the same baseline model; based on the first predicted probability and the label information of the training samples, a first number of training samples are selected from multiple training samples; and based on the second predicted probability and the label information of the training samples, a second number of training samples are selected from multiple training samples; the second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples; if the trained first model and / or the trained second model do not meet the corresponding convergence conditions, the steps of obtaining multiple training samples and training the first model and the second model are re-executed until the trained first model and / or the trained second model meet the corresponding convergence conditions. Alternatively, a plurality of training samples are obtained, wherein the training samples include a character sequence consisting of a plurality of characters; the plurality of training samples are input into the first model or the second model, and the character of each character position in the character sequence corresponding to the training samples is predicted, and a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character is determined; based on the first prediction probability and label information of the training samples, a first number of training samples are selected from the plurality of training samples; the first model or the second model is trained based on the first number of training samples, and if the trained first model or the second model does not meet the corresponding convergence condition, the steps of obtaining a plurality of training samples and training the first model or the second model are re-executed until the trained first model or the second model meets the corresponding convergence condition.

[0140] The specific processing process of the above steps can refer to the specific processing process of step S304 in the embodiment of the above description.

[0141] It can be seen from the technical solutions provided by the above embodiments of the present specification that the embodiments of the present specification obtain data to be identified, and then input the above data to be identified into the first model or the second model, and output a character sequence corresponding to the above data. Since the above first model or the second model is obtained by inputting the same multiple training samples into two identical models, namely the first model and the second model, respectively, determined by the same benchmark model, and selecting a first number of training samples from the above multiple training samples input by the above first model, and selecting a second number of training samples from the above multiple training samples input by the above second model, then, the second model is trained based on the first number of training samples, and based on The first model is trained with the second number of training samples until the trained first model and / or the trained second model meet the corresponding convergence conditions. Since the first number of training samples and the second number of training samples used in the training process of the first model or the second model are samples that may not contain noise and are selected from the multiple training samples, the first model and the second model are trained based on the selected noise-free samples, which effectively improves the model training accuracy and model performance. In this way, the method of using the trained first model or the second model provided in the embodiments of this specification to identify the data to be identified effectively improves the accuracy of identifying the data to be identified.

[0142] Corresponding to the model training method provided in the above embodiment, based on the same technical concept, the embodiment of this specification also provides a model training device, Figure 7 This is a schematic diagram of the first module composition of the model training device provided in the embodiment of this specification, and the model training device is used to perform the above Figure 1A or Figure 1B The model training method described in Figure 7 As shown, the device comprises:

[0143] A first acquisition module acquires a plurality of training samples, wherein the training samples include a character sequence consisting of a plurality of characters;

[0144] A first processing module, inputting the multiple training samples into a first model, predicting the character of each character position in the character sequence corresponding to the training samples, and determining a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character; and inputting the multiple training samples into a second model, predicting the character of each character position in the character sequence corresponding to the training samples, and determining a second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character, wherein the first model and the second model are determined by the same benchmark model;

[0145] A first selection module selects a first number of training samples from the multiple training samples based on the first prediction probability and the label information of the training samples; and selects a second number of training samples from the multiple training samples based on the second prediction probability and the label information of the training samples;

[0146] A first training module trains the second model based on the first number of training samples, and trains the first model based on the second number of training samples; if the trained first model and / or the trained second model do not meet the corresponding convergence conditions, re-execute the steps of obtaining multiple training samples and training the first model and the second model until the trained first model and / or the trained second model meet the corresponding convergence conditions.

[0147] Optionally, the first selection module includes:

[0148] A first determining unit, based on the label information of the training sample, determines the first character of each character position in the character sequence corresponding to the training sample;

[0149] A second determination unit determines the confidence of the character sequence corresponding to the training sample based on the first character of each character position in the character sequence corresponding to the training sample and the first prediction probability, wherein the confidence is used to characterize the accuracy of the label information of the training sample;

[0150] The first selection unit selects a first number of training samples from the multiple training samples based on the confidence of the character sequence corresponding to the training samples.

[0151] Optionally, the first selection unit determines, from the multiple training samples, training samples whose confidences are greater than a preset confidence threshold, and selects a first number of training samples from the training samples whose confidences are greater than the preset confidence threshold.

[0152] Optionally, the second determining unit includes:

[0153] A first selection subunit, for a target character position in the character sequence corresponding to the training sample, obtains from the first prediction probability a character prediction probability that the target character position is the first character, wherein the target character position is any character position in the character sequence corresponding to the training sample;

[0154] The first determination subunit uses the product of character prediction probabilities of multiple character positions in the character sequence corresponding to the training sample as the confidence of the character sequence corresponding to the training sample.

[0155] It can be seen from the technical solution provided by the above embodiments of the present specification that the embodiments of the present specification respectively input the same multiple training samples into two identical models, namely the first model and the second model, determined by the same benchmark model, and select a first number of training samples from the above multiple training samples input by the above first model, and select a second number of training samples from the above multiple training samples input by the above second model, and then train the second model based on the first number of training samples, and train the first model based on the second number of training samples until the trained first model and / or the trained second model meet the corresponding convergence conditions. Since the above first number of training samples and the second number of training samples are both selected from the above multiple training samples The samples that may not contain noise are obtained. In this way, the method of training the first model and the second model based on the above-mentioned samples without noise selected can effectively improve the model training accuracy and model performance. In addition, by using the first number of training samples selected by the first model to train the second model, and by using the second number of training samples selected by the second model to train the first model, the method of training the model based on the training samples selected by other models can further improve the model training accuracy and model performance, and can effectively avoid the possibility that when the model trains itself based on the training samples selected by itself, there may be noise samples in the selected training samples, resulting in reduced model training accuracy and model performance.

[0156] The model training device provided in the embodiments of this specification can implement each process in the embodiments corresponding to the above-mentioned model training method. To avoid repetition, it will not be described here.

[0157] It should be noted that the model training device provided in the embodiment of this specification and the model training method provided in the embodiment of this specification are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the above-mentioned model training method, and the repeated parts will not be repeated.

[0158] Corresponding to the model training method provided in the above embodiment, based on the same technical concept, the embodiment of this specification also provides a model training device, Figure 8 This is a schematic diagram of the first module composition of the model training device provided in the embodiment of this specification, and the model training device is used to perform the above Figure 2A or Figure 2B The model training method described in Figure 8 As shown, the device comprises:

[0159] A second acquisition module acquires a plurality of training samples, wherein the training samples include a character sequence consisting of a plurality of characters;

[0160] The second processing module inputs the multiple training samples into the first model, predicts the character of each character position in the character sequence corresponding to the training samples, and determines a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character;

[0161] A second selection module, selecting a first number of training samples from the multiple training samples based on the first prediction probability and the label information of the training samples;

[0162] The second training module trains the first model based on the first number of training samples. If the first model after training does not meet the corresponding convergence conditions, the steps of obtaining multiple training samples and training the first model are re-executed until the first model after training meets the corresponding convergence conditions.

[0163] It can be seen from the technical solution provided by the above embodiments of this specification that the embodiments of this specification input multiple training samples into a first model pre-trained based on a second smart contract, predict the character of each character position in the character sequence corresponding to the training sample, determine the first prediction probability that the character of each character position in the character sequence corresponding to the training sample is a preset character, and then, based on the first prediction probability and the label information of the training sample, select a first number of training samples from the multiple training samples, and train the first model based on the above first number of training samples until the trained first model meets the corresponding convergence conditions. Since the above first number of training samples are samples that may not contain noise selected from the above multiple training samples, the method of training the above first model based on the above selected samples without noise effectively improves the model training accuracy and model performance.

[0164] The model training device provided in the embodiments of this specification can implement each process in the embodiments corresponding to the above-mentioned model training method. To avoid repetition, it will not be described here.

[0165] It should be noted that the model training device provided in the embodiment of this specification and the model training method provided in the embodiment of this specification are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the above-mentioned model training method, and the repeated parts will not be repeated.

[0166] Corresponding to the data identification method provided in the above embodiment, based on the same technical concept, the embodiment of this specification also provides a data identification device, Fig. 9 This is a schematic diagram of the first module composition of the data recognition device provided in the embodiment of this specification, and the data recognition device is used to perform the above Figure 3A or Figure 3BDescribe the data identification method, such as Fig. 9 As shown, the device comprises:

[0167] A third acquisition module acquires data to be recognized, wherein the data includes a character sequence consisting of a plurality of characters;

[0168] The output module inputs the data to be recognized into the first model or the second model, and outputs a character sequence corresponding to the data, wherein the first model is a model pre-trained by a training sample, and the second model is a model pre-trained by a training sample; the training process of the first model and the second model includes:

[0169] Acquire multiple training samples, wherein the training samples include a character sequence consisting of multiple characters; input the multiple training samples into a first model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character; and input the multiple training samples into a second model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character, wherein the first model and the second model are determined by the same benchmark model; based on the first prediction probability and the label information of the training samples, selecting a first number of training samples from the multiple training samples; and selecting a second number of training samples from the multiple training samples based on the second prediction probability and the label information of the training samples; training the second model based on the first number of training samples, and training the first model based on the second number of training samples; if the trained first model and / or the trained second model do not meet the corresponding convergence conditions, re-executing the steps of obtaining multiple training samples and training the first model and the second model until the trained first model and / or the trained second model meet the corresponding convergence conditions;

[0170] Alternatively, a plurality of training samples are obtained, wherein the training samples include a character sequence consisting of a plurality of characters; the plurality of training samples are input into the first model or the second model, and the character of each character position in the character sequence corresponding to the training samples is predicted, and a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character is determined; based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the plurality of training samples; the first model or the second model is trained based on the first number of training samples, and if the first model or the second model after training does not meet the corresponding convergence condition, the steps of obtaining a plurality of training samples and training the first model or the second model are re-executed until the first model or the second model after training meets the corresponding convergence condition.

[0171] Optionally, the above data includes at least: one or more of images and texts.

[0172] It can be seen from the technical solutions provided by the above embodiments of the present specification that the embodiments of the present specification obtain data to be identified, and then input the above data to be identified into the first model or the second model, and output a character sequence corresponding to the above data. Since the above first model or the second model is obtained by inputting the same multiple training samples into two identical models, namely the first model and the second model, respectively, determined by the same benchmark model, and selecting a first number of training samples from the above multiple training samples input by the above first model, and selecting a second number of training samples from the above multiple training samples input by the above second model, then, the second model is trained based on the first number of training samples, and based on The first model is trained with the second number of training samples until the trained first model and / or the trained second model meet the corresponding convergence conditions. Since the first number of training samples and the second number of training samples used in the training process of the first model or the second model are samples that may not contain noise and are selected from the multiple training samples, the first model and the second model are trained based on the selected noise-free samples, which effectively improves the model training accuracy and model performance. In this way, the method of using the trained first model or the second model provided in the embodiments of this specification to identify the data to be identified effectively improves the accuracy of identifying the data to be identified.

[0173] The model training device provided in the embodiments of this specification can implement each process in the embodiments corresponding to the above-mentioned model training method. To avoid repetition, it will not be described here.

[0174] It should be noted that the model training device provided in the embodiment of this specification and the model training method provided in the embodiment of this specification are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the above-mentioned model training method, and the repeated parts will not be repeated.

[0175] Corresponding to the model training method provided in the above embodiment, based on the same technical concept, the embodiment of this specification also provides a model training device, Fig.10 This is a schematic diagram of the first module composition of the model training device provided in the embodiment of this specification, and the model training device is used to perform the above Figure 4A or Figure 4B The model training method described in Fig.10 As shown, the device comprises:

[0176] A first receiving module receives model training rule information sent by a first device, generates a first smart contract based on the model training rule information, and deploys the first smart contract in the blockchain system;

[0177] The third processing module, when obtaining the model training request sent by the first device, performs the following processing based on the first smart contract:

[0178] Acquire a plurality of training samples, wherein the training samples include a character sequence consisting of a plurality of characters;

[0179] Input the multiple training samples into a first model pre-trained based on the first smart contract, predict the character of each character position in the character sequence corresponding to the training samples, and determine a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character; and input the multiple training samples into a second model pre-trained based on the first smart contract, predict the character of each character position in the character sequence corresponding to the training samples, and determine a second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character, wherein the first model and the second model are determined by the same benchmark model;

[0180] Based on the first prediction probability and the label information of the training samples, selecting a first number of training samples from the multiple training samples; and based on the second prediction probability and the label information of the training samples, selecting a second number of training samples from the multiple training samples;

[0181] The second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples; if the trained first model and / or the trained second model do not meet the corresponding convergence conditions, re-execute the steps of obtaining multiple training samples and training the first model and the second model until the trained first model and / or the trained second model meet the corresponding convergence conditions.

[0182] It can be seen from the technical solution provided by the above embodiments of the present specification that the embodiments of the present specification respectively input the same multiple training samples into two identical models, namely the first model and the second model, determined by the same benchmark model, and select a first number of training samples from the above multiple training samples input by the above first model, and select a second number of training samples from the above multiple training samples input by the above second model, and then train the second model based on the first number of training samples, and train the first model based on the second number of training samples until the trained first model and / or the trained second model meet the corresponding convergence conditions. Since the above first number of training samples and the second number of training samples are both selected from the above multiple training samples The samples that may not contain noise are obtained. In this way, the method of training the first model and the second model based on the above-mentioned samples without noise selected can effectively improve the model training accuracy and model performance. In addition, by using the first number of training samples selected by the first model to train the second model, and by using the second number of training samples selected by the second model to train the first model, the method of training the model based on the training samples selected by other models can further improve the model training accuracy and model performance, and can effectively avoid the possibility that when the model trains itself based on the training samples selected by itself, there may be noise samples in the selected training samples, resulting in reduced model training accuracy and model performance.

[0183] The model training device provided in the embodiments of this specification can implement each process in the embodiments corresponding to the above-mentioned model training method. To avoid repetition, it will not be described here.

[0184] It should be noted that the model training device provided in the embodiment of this specification and the model training method provided in the embodiment of this specification are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the above-mentioned model training method, and the repeated parts will not be repeated.

[0185] Corresponding to the model training method provided in the above embodiment, based on the same technical concept, the embodiment of this specification also provides a model training device, Fig.11This is a schematic diagram of the first module composition of the model training device provided in the embodiment of this specification, and the model training device is used to perform the above Figure 5A or Figure 5B The model training method described in Fig.11 As shown, the device comprises:

[0186] A second receiving module receives second model training rule information sent by the first device, generates a second smart contract based on the second model training rule information, and deploys the second smart contract in the blockchain system;

[0187] The fourth processing module, when obtaining the model training request sent by the first device, performs the following processing based on the second smart contract:

[0188] Acquire a plurality of training samples, wherein the training samples include a character sequence consisting of a plurality of characters;

[0189] Input the multiple training samples into a first model pre-trained based on the second smart contract, predict the character of each character position in the character sequence corresponding to the training samples, and determine a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character;

[0190] Based on the first prediction probability and the label information of the training samples, selecting a first number of training samples from the multiple training samples;

[0191] The first model is trained based on the first number of training samples. If the trained first model does not meet the corresponding convergence condition, the steps of obtaining multiple training samples and training the first model are re-executed until the trained first model meets the corresponding convergence condition.

[0192] It can be seen from the technical solution provided by the above embodiments of this specification that the embodiments of this specification input multiple training samples into the first model pre-trained based on the second smart contract, predict the character of each character position in the character sequence corresponding to the training sample, determine the first prediction probability that the character of each character position in the character sequence corresponding to the training sample is a preset character, and then, based on the first prediction probability and the label information of the training sample, select a first number of training samples from the multiple training samples, and train the first model based on the above first number of training samples until the trained first model meets the corresponding convergence conditions. Since the above first number of training samples are samples that may not contain noise selected from the above multiple training samples, the method of training the above first model based on the above selected samples without noise effectively improves the model training accuracy and model performance.

[0193] The model training device provided in the embodiments of this specification can implement each process in the embodiments corresponding to the above-mentioned model training method. To avoid repetition, it will not be described here.

[0194] It should be noted that the model training device provided in the embodiment of this specification and the model training method provided in the embodiment of this specification are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the above-mentioned model training method, and the repeated parts will not be repeated.

[0195] Corresponding to the model training method provided in the above embodiment, based on the same technical concept, the embodiment of this specification also provides a data recognition device, Fig.12 This is a schematic diagram of the first module composition of the data recognition device provided in the embodiment of this specification, and the data recognition device is used to perform the above Fig. 6A or Figure 6B Describe the data identification method, such as Fig.11 As shown, the device comprises:

[0196] A third receiving module receives data identification rule information sent by the second device, generates a third smart contract based on the data identification rule information, and deploys the third smart contract in the blockchain system;

[0197] The fifth processing module, when obtaining the data identification request sent by the second device, performs the following processing based on the third smart contract:

[0198] Acquire data to be recognized, wherein the data includes a character sequence consisting of a plurality of characters;

[0199] The data to be recognized is input into the first model or the second model, and a character sequence corresponding to the data is output, wherein the first model is a model pre-trained by a training sample, and the second model is a model pre-trained by a training sample; the training process of the first model and the second model includes:

[0200] Acquire multiple training samples, wherein the training samples include a character sequence consisting of multiple characters; input the multiple training samples into a first model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character; and input the multiple training samples into a second model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character, wherein the first model and the second model are determined by the same benchmark model; based on the first prediction probability and the label information of the training samples, selecting a first number of training samples from the multiple training samples; and selecting a second number of training samples from the multiple training samples based on the second prediction probability and the label information of the training samples; training the second model based on the first number of training samples, and training the first model based on the second number of training samples; if the trained first model and / or the trained second model do not meet the corresponding convergence conditions, re-executing the steps of obtaining multiple training samples and training the first model and the second model until the trained first model and / or the trained second model meet the corresponding convergence conditions;

[0201] Alternatively, a plurality of training samples are obtained, wherein the training samples include a character sequence consisting of a plurality of characters; the plurality of training samples are input into the first model or the second model, and the character of each character position in the character sequence corresponding to the training samples is predicted, and a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character is determined; based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the plurality of training samples; the first model or the second model is trained based on the first number of training samples, and if the first model or the second model after training does not meet the corresponding convergence condition, the steps of obtaining a plurality of training samples and training the first model or the second model are re-executed until the first model or the second model after training meets the corresponding convergence condition.

[0202] It can be seen from the technical solutions provided by the above embodiments of the present specification that the embodiments of the present specification obtain data to be identified, and then input the above data to be identified into the first model or the second model, and output a character sequence corresponding to the above data. Since the above first model or the second model is obtained by inputting the same multiple training samples into two identical models, namely the first model and the second model, respectively, determined by the same benchmark model, and selecting a first number of training samples from the above multiple training samples input by the above first model, and selecting a second number of training samples from the above multiple training samples input by the above second model, then, the second model is trained based on the first number of training samples, and based on The first model is trained with the second number of training samples until the trained first model and / or the trained second model meet the corresponding convergence conditions. Since the first number of training samples and the second number of training samples used in the training process of the first model or the second model are samples that may not contain noise and are selected from the multiple training samples, the first model and the second model are trained based on the selected noise-free samples, which effectively improves the model training accuracy and model performance. In this way, the method of using the trained first model or the second model provided in the embodiments of this specification to identify the data to be identified effectively improves the accuracy of identifying the data to be identified.

[0203] The model training device provided in the embodiments of this specification can implement each process in the embodiments corresponding to the above-mentioned model training method. To avoid repetition, it will not be described here.

[0204] It should be noted that the model training device provided in the embodiment of this specification and the model training method provided in the embodiment of this specification are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the above-mentioned model training method, and the repeated parts will not be repeated.

[0205] Corresponding to the model training method provided in the above embodiment, based on the same technical concept, the embodiment of this specification also provides a model training device, such as Fig.13 As shown, Fig.13 A schematic diagram of the hardware structure of a model training device provided in an embodiment of this specification, which is used to perform Figure 1A , Figure 1B , Figure 2A , Figure 2B , Figure 4A , Figure 4B , Figure 5A , Figure 5B Alternatively, it can also be used to perform Figure 3A , Figure 3B , Fig. 6A , Figure 6BDescribes the data identification method.

[0206] The model training device may have relatively large differences due to different configurations or performances, and may include one or more processors 1301 and memory 1302, and one or more storage applications or data may be stored in the memory 1302. Among them, the memory 1302 can be a short-term storage or a persistent storage. The application stored in the memory 1302 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the task allocation device. Furthermore, the processor 1301 can be configured to communicate with the memory 1302 and execute a series of computer executable instructions in the memory 1302 on the data access device. The data access device may also include one or more power supplies 1303, one or more wired or wireless network interfaces 1304, one or more input and output interfaces 1305, and one or more keyboards 1306.

[0207] Specifically in this embodiment, the model training device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the task allocation device, and is configured to be executed by one or more processors. The one or more programs include computer executable instructions for performing the following:

[0208] Acquire a plurality of training samples, wherein the training samples include a character sequence consisting of a plurality of characters;

[0209] Input the multiple training samples into a first model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character; and input the multiple training samples into a second model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character, wherein the first model and the second model are determined by the same benchmark model;

[0210] Based on the first prediction probability and the label information of the training samples, selecting a first number of training samples from the multiple training samples; and based on the second prediction probability and the label information of the training samples, selecting a second number of training samples from the multiple training samples;

[0211] The second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples; if the trained first model and / or the trained second model do not meet the corresponding convergence conditions, re-execute the steps of obtaining multiple training samples and training the first model and the second model until the trained first model and / or the trained second model meet the corresponding convergence conditions.

[0212] Alternatively, the model training device may also be used to perform the following computer executable instructions:

[0213] Acquire a plurality of training samples, wherein the training samples include a character sequence consisting of a plurality of characters;

[0214] Inputting the plurality of training samples into the first model, predicting the character of each character position in the character sequence corresponding to the training samples, and determining a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character;

[0215] Based on the first prediction probability and the label information of the training samples, selecting a first number of training samples from the multiple training samples;

[0216] The first model is trained based on the first number of training samples. If the trained first model does not meet the corresponding convergence condition, the steps of obtaining multiple training samples and training the first model are re-executed until the trained first model meets the corresponding convergence condition.

[0217] Alternatively, the above-mentioned model training device may also be a device in a blockchain system, configured to perform the following computer executable instructions:

[0218] Receiving model training rule information sent by the first device, generating a first smart contract based on the model training rule information, and deploying the first smart contract in the blockchain system;

[0219] When the model training request sent by the first device is obtained, the following processing is performed based on the first smart contract:

[0220] Acquire a plurality of training samples, wherein the training samples include a character sequence consisting of a plurality of characters;

[0221] Input the multiple training samples into a first model pre-trained based on the first smart contract, predict the character of each character position in the character sequence corresponding to the training samples, and determine a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character; and input the multiple training samples into a second model pre-trained based on the first smart contract, predict the character of each character position in the character sequence corresponding to the training samples, and determine a second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character, wherein the first model and the second model are determined by the same benchmark model;

[0222] Based on the first prediction probability and the label information of the training samples, selecting a first number of training samples from the multiple training samples; and based on the second prediction probability and the label information of the training samples, selecting a second number of training samples from the multiple training samples;

[0223] The second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples; if the trained first model and / or the trained second model do not meet the corresponding convergence conditions, re-execute the steps of obtaining multiple training samples and training the first model and the second model until the trained first model and / or the trained second model meet the corresponding convergence conditions.

[0224] Alternatively, the above-mentioned model training device may also be a device in a blockchain system, configured to perform the following computer executable instructions:

[0225] Receiving second model training rule information sent by the first device, generating a second smart contract based on the second model training rule information, and deploying the second smart contract in the blockchain system;

[0226] When the model training request sent by the first device is obtained, the following processing is performed based on the second smart contract:

[0227] Acquire a plurality of training samples, wherein the training samples include a character sequence consisting of a plurality of characters;

[0228] Input the multiple training samples into a first model pre-trained based on the second smart contract, predict the character of each character position in the character sequence corresponding to the training samples, and determine a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character;

[0229] Based on the first prediction probability and the label information of the training samples, selecting a first number of training samples from the multiple training samples;

[0230] The first model is trained based on the first number of training samples. If the trained first model does not meet the corresponding convergence condition, the steps of obtaining multiple training samples and training the first model are re-executed until the trained first model meets the corresponding convergence condition.

[0231] Alternatively, the above device may also be a data identification device, and the above data identification device may also be used to perform the following computer executable instructions:

[0232] Acquire data to be recognized, wherein the data includes a character sequence consisting of a plurality of characters;

[0233] The data to be recognized is input into the first model or the second model, and a character sequence corresponding to the data is output, wherein the first model is a model pre-trained by a training sample, and the second model is a model pre-trained by a training sample; the training process of the first model and the second model includes:

[0234] Acquire multiple training samples, wherein the training samples include a character sequence consisting of multiple characters; input the multiple training samples into a first model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character; and input the multiple training samples into a second model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character, wherein the first model and the second model are determined by the same benchmark model; based on the first prediction probability and the label information of the training samples, selecting a first number of training samples from the multiple training samples; and selecting a second number of training samples from the multiple training samples based on the second prediction probability and the label information of the training samples; training the second model based on the first number of training samples, and training the first model based on the second number of training samples; if the trained first model and / or the trained second model do not meet the corresponding convergence conditions, re-executing the steps of obtaining multiple training samples and training the first model and the second model until the trained first model and / or the trained second model meet the corresponding convergence conditions;

[0235] Alternatively, a plurality of training samples are obtained, wherein the training samples include a character sequence consisting of a plurality of characters; the plurality of training samples are input into the first model or the second model, and the character of each character position in the character sequence corresponding to the training samples is predicted, and a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character is determined; based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the plurality of training samples; the first model or the second model is trained based on the first number of training samples, and if the first model or the second model after training does not meet the corresponding convergence condition, the steps of obtaining a plurality of training samples and training the first model or the second model are re-executed until the first model or the second model after training meets the corresponding convergence condition.

[0236] Alternatively, the above device may also be a data identification device, and the above data identification device may be a device in a blockchain system, configured to perform the following computer executable instructions:

[0237] receiving data identification rule information sent by the second device, generating a third smart contract based on the data identification rule information, and deploying the third smart contract in the blockchain system;

[0238] When the data identification request sent by the second device is obtained, the following processing is performed based on the third smart contract:

[0239] Acquire data to be recognized, wherein the data includes a character sequence consisting of a plurality of characters;

[0240] The data to be recognized is input into the first model or the second model, and a character sequence corresponding to the data is output, wherein the first model is a model pre-trained by a training sample, and the second model is a model pre-trained by a training sample; the training process of the first model and the second model includes:

[0241] Acquire multiple training samples, wherein the training samples include a character sequence consisting of multiple characters; input the multiple training samples into a first model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character; and input the multiple training samples into a second model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character, wherein the first model and the second model are determined by the same benchmark model; based on the first prediction probability and the label information of the training samples, selecting a first number of training samples from the multiple training samples; and selecting a second number of training samples from the multiple training samples based on the second prediction probability and the label information of the training samples; training the second model based on the first number of training samples, and training the first model based on the second number of training samples; if the trained first model and / or the trained second model do not meet the corresponding convergence conditions, re-executing the steps of obtaining multiple training samples and training the first model and the second model until the trained first model and / or the trained second model meet the corresponding convergence conditions;

[0242] Alternatively, a plurality of training samples are obtained, wherein the training samples include a character sequence consisting of a plurality of characters; the plurality of training samples are input into the first model or the second model, and the character of each character position in the character sequence corresponding to the training samples is predicted, and a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character is determined; based on the first prediction probability and the label information of the training samples, a first number of training samples are selected from the plurality of training samples; the first model or the second model is trained based on the first number of training samples, and if the first model or the second model after training does not meet the corresponding convergence condition, the steps of obtaining a plurality of training samples and training the first model or the second model are re-executed until the first model or the second model after training meets the corresponding convergence condition.

[0243] Further, corresponding to the model training method provided in the above embodiment, the embodiment of this specification also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by the processor 1101, each step of the above model training method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. Among them, the computer-readable storage medium is, such as a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0244] It should be noted that the model training device and computer-readable storage medium provided in the embodiments of this specification can implement each process in the above-mentioned model training method embodiments. To avoid repetition, they will not be described here.

[0245] Further, corresponding to the data identification method provided in the above embodiment, the embodiment of this specification also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by the processor 1101, each step of the above data identification method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. Among them, the computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0246] It should be noted that the data identification device and computer-readable storage medium provided in the embodiments of this specification can implement each process in the above-mentioned data identification method embodiment, and will not be described again here to avoid repetition.

[0247] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0248] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0249] This specification is described with reference to the flowchart and / or block diagram of the method, device (system), and computer program product according to the embodiment of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the process and / or box 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 produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one process or multiple processes in the flowchart and / or one box or multiple boxes in the block diagram.

[0250] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0251] These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0252] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0253] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0254] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0255] It is understood that the embodiments described in the embodiments of this specification can be implemented by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions of this specification or a combination thereof.

[0256] For software implementation, the above-mentioned techniques of the embodiments of this specification can be implemented by modules (such as procedures, functions, etc.) that perform the above-mentioned functions of the embodiments of this specification. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0257] It should also be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the above elements.

[0258] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of this specification, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the above-mentioned methods of each embodiment of this specification.

[0259] The embodiments of the present specification are described above in conjunction with the accompanying drawings, but the present specification is not limited to the above-mentioned specific implementations, which are merely illustrative and not restrictive. Under the guidance of the present specification, ordinary technicians in the field can make various changes and modifications to the present specification without departing from the purpose of the present specification and the scope of protection of the claims. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.

Claims

1. A model training method, the method comprising: Acquire a plurality of training samples, wherein the training samples include a character sequence consisting of a plurality of characters; Input the multiple training samples into a first model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character; and input the multiple training samples into a second model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character, wherein the first model and the second model are determined by the same benchmark model; Based on the first prediction probability and the label information of the training samples, selecting a first number of training samples from the multiple training samples; and based on the second prediction probability and the label information of the training samples, selecting a second number of training samples from the multiple training samples; The second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples; if the trained first model and / or the trained second model do not meet the corresponding convergence conditions, re-execute the steps of obtaining multiple training samples and training the first model and the second model until the trained first model and / or the trained second model meet the corresponding convergence conditions.

2. The method according to claim 1, wherein the step of selecting a first number of training samples from the plurality of training samples based on the first prediction probability and the label information of the training samples comprises: Based on the label information of the training sample, determining the character of each character position in the character sequence corresponding to the training sample as the first character; Based on the character of each character position in the character sequence corresponding to the training sample being the first character and the first prediction probability, determining the confidence of the character sequence corresponding to the training sample, wherein the confidence is used to characterize the accuracy of the label information of the training sample; A first number of training samples are selected from the plurality of training samples based on the confidences of the character sequences corresponding to the training samples.

3. The method according to claim 2, wherein the selecting a first number of training samples from the plurality of training samples based on the confidence of the character sequence corresponding to the training samples comprises: The training samples whose confidences are greater than a preset confidence threshold are determined from the multiple training samples, and a first number of training samples are selected from the training samples whose confidences are greater than the preset confidence threshold.

4. According to the method according to any one of claims 2 to 3, determining the confidence of the character sequence corresponding to the training sample based on the character of each character position in the character sequence corresponding to the training sample being the first character and the first prediction probability, comprises: For a target character position in the character sequence corresponding to the training sample, obtaining a character prediction probability that the target character position is the first character from the first prediction probability, wherein the target character position is any character position in the character sequence corresponding to the training sample; The product of character prediction probabilities of multiple character positions in the character sequence corresponding to the training sample is used as the confidence of the character sequence corresponding to the training sample.

5. The method according to claim 1, wherein the characters contained in the character sequence include one or more of Chinese characters, letters, numbers, symbols and graphics.

6. According to the method of claim 1, the benchmark model is a model constructed based on one or more different preset neural network algorithms.

7. According to the method of claim 1, the training sample further includes noise data unrelated to the character sequence, and the noise data includes one or more of Chinese characters, letters, numbers, symbols, graphics, and lines.

8. A data identification method, the method comprising: Acquire data to be recognized, wherein the data includes a character sequence consisting of a plurality of characters, and the data to be recognized also includes noise data unrelated to the character sequence; The data to be recognized is input into the first model or the second model, and a character sequence corresponding to the data is output, wherein the first model is a model pre-trained by a training sample, and the second model is a model pre-trained by a training sample; the training process of the first model and the second model includes: Acquire multiple training samples, wherein the training samples include a character sequence consisting of multiple characters; input the multiple training samples into a first model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character; and input the multiple training samples into a second model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character, wherein the first model and the second model are determined by the same benchmark model; based on the first prediction probability and the label information of the training samples, selecting a first number of training samples from the multiple training samples; and selecting a second number of training samples from the multiple training samples based on the second prediction probability and the label information of the training samples; training the second model based on the first number of training samples, and training the first model based on the second number of training samples; if the trained first model and / or the trained second model do not meet the corresponding convergence conditions, re-execute the steps of obtaining multiple training samples and training the first model and the second model until the trained first model and / or the trained second model meet the corresponding convergence conditions. 9 . The method according to claim 8 , wherein the noise data comprises one or more of Chinese characters, letters, numbers, symbols, graphics, and lines.

10. A model training method, applied to a blockchain system, comprising: Receiving model training rule information sent by the first device, generating a first smart contract based on the model training rule information, and deploying the first smart contract in the blockchain system; When the model training request sent by the first device is obtained, the following processing is performed based on the first smart contract: Acquire a plurality of training samples, wherein the training samples include a character sequence consisting of a plurality of characters; Input the multiple training samples into a first model pre-trained based on the first smart contract, predict the character of each character position in the character sequence corresponding to the training samples, and determine a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character; and input the multiple training samples into a second model pre-trained based on the first smart contract, predict the character of each character position in the character sequence corresponding to the training samples, and determine a second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character, wherein the first model and the second model are determined by the same benchmark model; Based on the first prediction probability and the label information of the training samples, selecting a first number of training samples from the multiple training samples; and based on the second prediction probability and the label information of the training samples, selecting a second number of training samples from the multiple training samples; The second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples; if the trained first model and / or the trained second model do not meet the corresponding convergence conditions, re-execute the steps of obtaining multiple training samples and training the first model and the second model until the trained first model and / or the trained second model meet the corresponding convergence conditions.

11. A model training device, comprising: A first acquisition module acquires a plurality of training samples, wherein the training samples include a character sequence consisting of a plurality of characters; A first processing module, inputting the multiple training samples into a first model, predicting the character of each character position in the character sequence corresponding to the training samples, and determining a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character; and inputting the multiple training samples into a second model, predicting the character of each character position in the character sequence corresponding to the training samples, and determining a second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character, wherein the first model and the second model are determined by the same benchmark model; A first selection module selects a first number of training samples from the multiple training samples based on the first prediction probability and the label information of the training samples; and selects a second number of training samples from the multiple training samples based on the second prediction probability and the label information of the training samples; A first training module trains the second model based on the first number of training samples, and trains the first model based on the second number of training samples; if the trained first model and / or the trained second model do not meet the corresponding convergence conditions, re-execute the steps of obtaining multiple training samples and training the first model and the second model until the trained first model and / or the trained second model meet the corresponding convergence conditions.

12. A data identification device, comprising: A third acquisition module acquires data to be identified, wherein the data includes a character sequence consisting of a plurality of characters, and the data to be identified also includes noise data unrelated to the character sequence; The output module inputs the data to be recognized into the first model or the second model, and outputs a character sequence corresponding to the data, wherein the first model is a model pre-trained by a training sample, and the second model is a model pre-trained by a training sample; the training process of the first model and the second model includes: Acquire multiple training samples, wherein the training samples include a character sequence consisting of multiple characters; input the multiple training samples into a first model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character; and input the multiple training samples into a second model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character, wherein the first model and the second model are determined by the same benchmark model; based on the first prediction probability and the label information of the training samples, selecting a first number of training samples from the multiple training samples; and selecting a second number of training samples from the multiple training samples based on the second prediction probability and the label information of the training samples; training the second model based on the first number of training samples, and training the first model based on the second number of training samples; if the trained first model and / or the trained second model do not meet the corresponding convergence conditions, re-execute the steps of obtaining multiple training samples and training the first model and the second model until the trained first model and / or the trained second model meet the corresponding convergence conditions.

13. A model training device, comprising: processor; as well as a memory arranged to store computer executable instructions which, when executed, cause the processor to: Acquire a plurality of training samples, wherein the training samples include a character sequence consisting of a plurality of characters; Input the multiple training samples into a first model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character; and input the multiple training samples into a second model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character, wherein the first model and the second model are determined by the same benchmark model; Based on the first prediction probability and the label information of the training samples, selecting a first number of training samples from the multiple training samples; and based on the second prediction probability and the label information of the training samples, selecting a second number of training samples from the multiple training samples; The second model is trained based on the first number of training samples, and the first model is trained based on the second number of training samples; if the trained first model and / or the trained second model do not meet the corresponding convergence conditions, re-execute the steps of obtaining multiple training samples and training the first model and the second model until the trained first model and / or the trained second model meet the corresponding convergence conditions.

14. A data identification device, comprising: processor; as well as a memory arranged to store computer executable instructions which, when executed, cause the processor to: Acquire data to be recognized, wherein the data includes a character sequence consisting of a plurality of characters, and the data to be recognized also includes noise data unrelated to the character sequence; The data to be recognized is input into the first model or the second model, and a character sequence corresponding to the data is output, wherein the first model is a model pre-trained by a training sample, and the second model is a model pre-trained by a training sample; the training process of the first model and the second model includes: Acquire multiple training samples, wherein the training samples include a character sequence consisting of multiple characters; input the multiple training samples into a first model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character; and input the multiple training samples into a second model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character, wherein the first model and the second model are determined by the same benchmark model; based on the first prediction probability and the label information of the training samples, selecting a first number of training samples from the multiple training samples; and selecting a second number of training samples from the multiple training samples based on the second prediction probability and the label information of the training samples; training the second model based on the first number of training samples, and training the first model based on the second number of training samples; if the trained first model and / or the trained second model do not meet the corresponding convergence conditions, re-execute the steps of obtaining multiple training samples and training the first model and the second model until the trained first model and / or the trained second model meet the corresponding convergence conditions.

15. A storage medium for storing computer executable instructions, wherein the executable instructions implement the following process when executed: Get multiple training samples, where The training sample includes a character sequence consisting of multiple characters; Input the multiple training samples into a first model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character; and input the multiple training samples into a second model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character, wherein the first model and the second model are determined by the same benchmark model; Based on the first prediction probability and the label information of the training samples, selecting a first number of training samples from the multiple training samples; and selecting a second number of training samples from the plurality of training samples based on the second prediction probability and the label information of the training samples; Training the second model based on the first number of training samples, and training the first model based on the second number of training samples; If the trained first model and / or the trained second model do not meet the corresponding convergence conditions, the steps of obtaining multiple training samples and training the first model and the second model are re-executed until the trained first model and / or the trained second model meet the corresponding convergence conditions.

16. A storage medium for storing computer executable instructions, wherein the executable instructions implement the following process when executed: Acquire data to be recognized, wherein the data includes a character sequence consisting of a plurality of characters, and the data to be recognized also includes noise data unrelated to the character sequence; The data to be recognized is input into the first model or the second model, and a character sequence corresponding to the data is output, wherein: The first model is a model pre-trained by training samples, and the second model is a model pre-trained by training samples; The training process of the first model and the second model includes: Acquire multiple training samples, wherein the training samples include a character sequence consisting of multiple characters; input the multiple training samples into a first model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a first prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character; and input the multiple training samples into a second model, predict the character of each character position in the character sequence corresponding to the training samples, and determine a second prediction probability that the character of each character position in the character sequence corresponding to the training samples is a preset character, wherein the first model and the second model are determined by the same benchmark model; based on the first prediction probability and the label information of the training samples, selecting a first number of training samples from the multiple training samples; and selecting a second number of training samples from the multiple training samples based on the second prediction probability and the label information of the training samples; training the second model based on the first number of training samples, and training the first model based on the second number of training samples; if the trained first model and / or the trained second model do not meet the corresponding convergence conditions, re-execute the steps of obtaining multiple training samples and training the first model and the second model until the trained first model and / or the trained second model meet the corresponding convergence conditions.