Data processing method and device, electronic equipment and storage medium

By screening out high-value target samples in the face live detection model, the problem of redundant and noisy data affecting the generalization of the model is solved, and the effectiveness and accuracy of model training are improved.

CN118940022APending Publication Date: 2024-11-12BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310539224.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-12
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

In the training of the face live detection model, there are redundant or noisy data in a large amount of new data, which affects the generalization and effectiveness of the model.

Method used

By entering the sample to be screened into the reference model and the detection model, the reference loss value and the target loss value are calculated respectively, and the target sample with high value is selected for model training.

Benefits of technology

It improves the effectiveness of model training and the accuracy of output results, and enhances the efficiency and generalization ability of the model during iteration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118940022A_ABST
    Figure CN118940022A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data processing method and device, electronic equipment and a storage medium. The data processing method comprises: for each sample in to-be-screened samples, inputting the sample into a reference model to obtain a reference loss value of the sample, the reference model being obtained based on reference sample training, and the reference sample and the to-be-screened samples being samples in the same field; determining a target loss value of each sample in the to-be-screened samples based on a detection model, and updating the detection model based on the target loss values; and on the basis of the reference loss value and the target loss value of each to-be-screened sample, selecting a sample from each to-be-screened sample to obtain a target sample. Compared with the mode that all newly-added data are used for model training, according to the method, the target samples are obtained through screening in the to-be-screened samples, the value of the target samples obtained through screening for model training is larger, and then the effectiveness of the target samples for model training is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to data processing technology, and more particularly to a data processing method, device, electronic device, and storage medium. Background Art

[0002] With the development of data processing technology, it is now possible to detect large amounts of data based on models. For example, face liveness detection can be achieved through a trained model to verify whether the detected data is real face liveness data, and then the model can be effectively applied to various aspects such as security, finance, or life. For example, face liveness detection can be used to defend against common attacks such as photos, videos, face swaps, masks, or screen reshoots.

[0003] In order to improve the generalization ability of the model, a large number of training sets are essential for model training. However, among the large amount of newly added data, some data may be redundant data, which has little value for model training; or some data may be noise data, the labels of which may be incorrect or cannot accurately describe the characteristics of the data, which may affect the generalization of the model. Therefore, if all the newly added data are used for model training, there may be data with poor effectiveness in the data used for model training. Summary of the invention

[0004] The present disclosure provides a data processing method, device, electronic device and storage medium to improve the effectiveness of target samples for model training.

[0005] In a first aspect, an embodiment of the present disclosure provides a data processing method, including:

[0006] For each sample in the samples to be screened, the sample is input into a reference model to obtain a reference loss value of the sample, the reference model is trained based on a reference sample, and the reference sample and the sample to be screened are samples in the same field;

[0007] Determine a target loss value for each sample in the samples to be screened based on the detection model, and update the detection model based on the target loss value;

[0008] Based on the reference loss value and the target loss value of each sample to be screened, a sample is selected from each sample to be screened to obtain a target sample.

[0009] In a second aspect, the present disclosure also provides a method for training a detection model, including:

[0010] Based on the first data set, a first detection model is obtained by training;

[0011] Acquire a second data set, and determine a sample to be screened in the second data set based on the second data set;

[0012] Determine the target sample among the samples to be screened according to the data processing method provided by the embodiment of the present disclosure;

[0013] Based on the determined target sample, the first detection model is iterated to obtain a second detection model.

[0014] In a third aspect, the present disclosure also provides a data processing device, including:

[0015] An input module, for inputting each sample in the samples to be screened into a reference model to obtain a reference loss value of the sample, wherein the reference model is trained based on a reference sample, and the reference sample and the sample to be screened are samples in the same field;

[0016] A determination module, configured to determine a target loss value of each sample in the samples to be screened based on a detection model, and update the detection model based on the target loss value;

[0017] A selection module is used to select a sample from each of the samples to be screened to obtain a target sample based on the reference loss value and the target loss value of each of the samples to be screened.

[0018] In a fourth aspect, the present disclosure also provides a detection model training device, including:

[0019] A model training module, used for training a first detection model based on a first data set;

[0020] A sample-to-be-screened determination module, configured to obtain a second data set, and determine a sample to be screened in the second data set based on the second data set;

[0021] A target sample determination module, used to determine the target sample among the samples to be screened according to the data processing method provided by the embodiment of the present disclosure;

[0022] The model iteration module is used to iterate the first detection model based on the determined target sample to obtain a second detection model.

[0023] In a fifth aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:

[0024] one or more processing devices;

[0025] a storage device for storing one or more programs,

[0026] When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the data processing method provided by the embodiment of the present disclosure, or implement the training method of the detection model provided by the embodiment of the present disclosure.

[0027] In a sixth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the data processing method provided by an embodiment of the present disclosure, or to execute the training method of the detection model provided by an embodiment of the present disclosure.

[0028] A data processing method provided by an embodiment of the present disclosure obtains a reference loss value for each sample by inputting each sample in the samples to be screened into a reference model, determines a target loss value for each sample in the samples to be screened based on a detection model, and then obtains a target sample by screening from each sample to be screened based on the reference loss value and the target loss value of each sample to be screened. Compared with using all the newly added data for model training, this method obtains the target sample by screening from the samples to be screened, so that the screened target sample has greater value for model training, thereby improving the effectiveness of the target sample for model training. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0030] Figure 1 It is a flowchart of a data processing method provided by an embodiment of the present disclosure;

[0031] Figure 2 is a flowchart of another data processing method provided by an embodiment of the present disclosure;

[0032] Figure 3 is a flowchart of another data processing method provided by an embodiment of the present disclosure;

[0033] Figure 4 It is a flowchart of a method for training a detection model provided by an embodiment of the present disclosure;

[0034] Figure 5 is a structural schematic diagram of a data processing device provided by an embodiment of the present disclosure;

[0035] Figure 6 It is a structural schematic diagram of a detection model training device provided by an embodiment of the present disclosure;

[0036] Figure 7 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0037] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0038] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0039] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0040] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0041] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0042] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0043] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0044] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0045] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0046] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0047] With the development of data processing technology, it is possible to detect a large amount of data based on models, such as face liveness detection, hand detection or body detection through trained models. Among them, liveness detection can be a method of determining the real physiological characteristics of an object in some identity verification scenarios, and face liveness detection can be a detection method of determining whether the detected data is real face liveness data.

[0048] In the face liveness detection application, facial images of users performing combined actions such as blinking, opening the mouth, shaking their heads or nodding can be collected. For example, static, dynamic, images or videos of the face in different positions or with different expressions can be collected through a camera as samples, and then the collected samples are input into the model for face liveness detection. The model can identify whether the input sample is a sample corresponding to a real live face, or a sample that does not belong to a live face, such as a cartoon face.

[0049] In the process of training the model for face liveness detection, a large number of samples are needed to realize the training of the model so that the output results of the model are more accurate. However, more samples do not necessarily make the model achieve better recognition ability. When faced with a large number of samples, if all samples are used for model training, there may be redundant data in all samples, and this part of data has little value for model training; or there may be noise data in all samples, and the labels of this part of data may be incorrect or cannot accurately describe the characteristics of the data, and this part of data may affect the generalization of the model. For example, in the process of model training, when a large number of fake face images are marked as real people, the generalization of the model will be greatly reduced. Therefore, if all samples are used for model training, there may be samples with poor effectiveness in the samples used for model training.

[0050] In summary, in order to ensure that the samples used for model training (such as incremental live data) play a role in the process of model training, the present disclosure provides a data processing method, which can screen the samples to be screened to obtain target samples, so that the screened target samples are representative. If the screened target samples are used for model training, the accuracy of the model output results can be improved, and the effectiveness and efficiency of the model in the iteration process can be improved.

[0051] Figure 1 It is a flow chart of a data processing method provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to the situation of screening samples with high effectiveness from samples to be screened. The method can be executed by a data processing device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server, etc.

[0052] like Figure 1 As shown, the data processing method includes:

[0053] S110. For each sample in the samples to be screened, the sample is input into a reference model to obtain a reference loss value of the sample. The reference model is trained based on the reference sample. The reference sample and the sample to be screened are samples in the same field.

[0054] The reference model may be an existing model for detection, such as a model for face liveness detection, hand detection, or human body detection, etc. The reference model may be a model that is trained based on reference samples in advance according to actual application needs and saved to an electronic device.

[0055] The samples to be screened may refer to samples that need to be screened, and the samples to be screened may be samples used to train the detection model. The reference samples used in the reference model training and the samples to be screened are samples in the same field, such as the reference samples and the samples to be screened can be used in the training process of the same data processing task, and the data processing task may be, for example, a liveness detection task.

[0056] There is no limit on the number of samples to be screened, and there can be multiple samples to be screened, which can be determined according to the actual application needs. The samples to be screened can be samples that have no intersection with the reference samples used for reference model training, or samples that are newly added on the basis of the reference samples used for reference model training, or samples that have partial intersection with the reference samples used for reference model training, as long as the samples to be screened and the reference samples used for reference model training are samples in the same field, and the samples to be screened can be determined according to the actual application needs.

[0057] The reference loss value may refer to the loss value calculated by a preset loss function under the reference model. The reference loss value may be used to estimate the degree of inconsistency between the predicted value of the reference model and the true value. There is no limitation on the reference loss value. For example, the reference loss value may be calculated by a cross entropy loss function using the predicted value of the reference model for the input sample and the true value of the input sample. The reference loss value may be used as long as it can estimate the degree of inconsistency between the predicted value of the reference model and the true value. Among them, the cross entropy loss function may evaluate the difference between the probability distribution obtained by the current training and the true distribution. For example, the cross entropy loss function may determine the similarity between the actual output probability and the expected output probability. The smaller the cross entropy value, the closer the two probability distributions are.

[0058] The predicted value of the reference model may refer to the output result of the reference model, and the true value may indicate the actual situation of the sample. For example, when the reference model is a model for face liveness detection, if the sample used is a sample corresponding to a real face liveness, the true value may indicate that the sample is a sample corresponding to a real face liveness, the predicted value may indicate that the sample used is a sample corresponding to a real face liveness, or the predicted value may indicate that the sample used is a sample that does not belong to a face liveness, and the reference loss value may estimate the degree of inconsistency between the predicted value of the reference model and the true value.

[0059] For each sample in the samples to be screened, the method of inputting the sample into the reference model to obtain the reference loss value of the sample is not limited. For example, when the reference loss value of the sample needs to be determined, the local reference model of the electronic device can be called through the sample input script, and each sample in the samples to be screened can be input into the reference model to obtain the reference loss value of the sample. The order of inputting each sample in the samples to be screened into the reference model can be determined according to the actual application needs, and is not specifically limited, as long as the reference loss value corresponding to each sample can be determined. Among them, the sample input script can be a script written according to the actual application needs.

[0060] In one embodiment, for some samples in the samples to be screened, each sample in the some samples can be input into the reference model to obtain the reference loss value of the sample. Some samples can be samples randomly selected from the samples to be screened, and some samples can be used as updated samples to be screened.

[0061] It should be noted that the model parameters of the reference model remain unchanged during the entire screening process. When each sample to be screened is input into the reference model to obtain the reference loss value of the sample, the reference loss value of each sample can be determined. If each sample is input into the reference model for multiple rounds, the reference loss value determined for each sample in different rounds will not be changed.

[0062] S120. Based on the detection model, determine the target loss value of each sample in the samples to be screened, and update the detection model based on the target loss value.

[0063] The detection model may be a newly created model for detection, such as a model for face liveness detection, hand detection, or body detection. The detection model and the reference model should be applicable to the detection of samples in the same field, such as a model for face liveness detection. When implementing a data processing method provided by an embodiment of the present disclosure, the detection model may be regarded as a newly created model that is continuously trained by samples to be screened.

[0064] In one embodiment, the reference model and the detection model have the same model structure.

[0065] The model structures of the reference model and the detection model are the same. The embodiments of the present disclosure do not limit the model structures of the reference model and the detection model. The model structures of the reference model and the detection model can be selected according to the actual application needs. For example, the model structures of the reference model and the detection model can both be structures corresponding to the same neural network model. When the model structures of the reference model and the detection model are the same, when the target sample is obtained by selecting a sample from the samples to be screened through the data processing method provided by the embodiments of the present disclosure, it is possible to more accurately determine the sample with greater value for model training in the samples to be screened.

[0066] In one embodiment, when initially establishing a detection model, the detection model may adopt a model that is consistent with the initial reference model adopted when training the reference model, wherein the initial reference model may be the model adopted when initially training the reference model; the detection model may also directly adopt a model that is consistent with the reference model, for example, the model structure and model parameters of the initially established detection model are consistent with the model structure and model parameters of the reference model, without specific limitation.

[0067] The target loss value may refer to the loss value calculated by a preset loss function under the detection model. The target loss value may be used to estimate the degree of inconsistency between the predicted value of the detection model and the true value.

[0068] Based on the detection model, the target loss value of each sample in the samples to be screened is determined. There is no limitation on the method of updating the detection model based on the target loss value, such as training the detection model for one or more rounds based on the samples to be screened to obtain the target loss value of each sample in the samples to be screened. Specifically, in each round of model training, after each sample in the samples to be screened is input into the detection model, the detection model can output the predicted value corresponding to the sample, and can also obtain the target loss value corresponding to the sample; then, based on the target loss value, the difference between the predicted value and the true value can be determined; after determining the difference between the predicted value and the true value, the detection model can adjust the parameters of the detection model based on the difference, that is, update the detection model to reduce the loss between the true value and the predicted value, so that the predicted value of the detection model gradually approaches the true value.

[0069] In one embodiment, when multiple rounds of training are performed based on the samples to be screened, all the samples to be screened can be selected for training in each round of training, or some of the samples to be screened can be selected for training in different rounds according to actual application needs, without specific limitation.

[0070] In one embodiment, when selecting some samples from the samples to be screened and determining the reference loss value of each sample in the some samples, the detection model should also be trained based on the selected some samples to obtain the target loss value of each sample in the some samples to be screened, so that based on the reference loss value and the target loss value, samples can be subsequently selected from the some samples to obtain the target samples.

[0071] In one embodiment, when the detection model is trained for multiple rounds based on the samples to be screened, for each training round, the target loss value of each sample participating in the training in the samples to be screened in each round should be determined so that the samples to be screened can be screened subsequently, that is, samples are selected from the samples to be screened to obtain target samples.

[0072] S130. Based on the reference loss value and the target loss value of each sample to be screened, select a sample from each sample to be screened to obtain a target sample.

[0073] The target sample may refer to a sample selected from each sample to be screened based on the reference loss value and the target loss value of each sample to be screened. The target sample may be a sample with greater value for model training, that is, the target sample may be a sample with high effectiveness for model training.

[0074] Based on the reference loss value and target loss value of each sample to be screened, a method of selecting a sample from each sample to be screened to obtain a target sample may be to compare the reference loss value and target loss value of each sample to be screened with a set reference threshold value, and then select the target sample; or the target sample may be selected based on the difference between the target loss value and the reference loss value of each sample to be screened. The reference threshold value may be set according to actual application needs and is not specifically limited.

[0075] In one embodiment, the reference loss value and the target loss value of each sample in the samples to be screened can be compared with the set reference threshold value, and then the target sample is selected. Specifically, there are four situations: when the reference loss value and the target loss value of the sample are both greater than the set reference threshold value, the sample may be noise data that may affect the generalization of the model, and the sample is not used as the target sample; when the reference loss value and the target loss value of the sample are both less than the set reference threshold value, the sample may be redundant data with little value for model training, and the sample is not used as the target sample; when the reference loss value of the sample exceeds the set reference threshold value, and the set reference threshold value exceeds the target loss value, the sample may be a sample that is difficult to identify for the reference model, and the sample is prone to overfitting when training the detection model, so the current sample is less effective for the detection model training, and the sample is not used as the target sample; when the target loss value of the sample exceeds the set reference threshold value, and the set reference threshold value exceeds the reference loss value, the sample may be a sample with less impact on the reference model, the sample can improve the richness of the sample corresponding to the training reference model, and the current sample is more effective for the detection model training, and the sample is used as the target sample.

[0076] It should be noted that in the above four cases where the reference loss value and target loss value of each sample to be screened are compared with the set reference thresholds respectively, and then the target sample is selected, the set reference thresholds selected in different cases may be different. In the same case, the set reference thresholds for comparison with the target loss value or the reference loss value may also be different. The set reference thresholds can be determined specifically according to actual application needs.

[0077] In one embodiment, the target sample can be selected based on the difference between the target loss value and the reference loss value of each sample to be screened. For each sample in the samples to be screened, the difference between the target loss value and the reference loss value corresponding to the sample can be determined, and then the difference values ​​corresponding to each sample are arranged in order from large to small, and the samples with a set number of difference values ​​arranged in front are selected as target samples. The set number of difference values ​​can be determined according to actual application needs, such as the set number of difference values ​​can be 20% of the number of all samples to be screened.

[0078] The above two examples of selecting samples from each sample to be screened to obtain the target sample can be explained by training the detection model for one round for the sample to be screened. When the detection model is trained for multiple rounds for the sample to be screened, samples can be selected for each round in the manner of the above examples, and the samples selected in each round can be regarded as candidate samples; then the candidate samples with intersections between the rounds are taken as the target samples finally selected. Among them, the candidate samples are the samples selected from the sample to be screened in each round when the detection model is trained for multiple rounds for the sample to be screened.

[0079] A data processing method provided by an embodiment of the present disclosure includes: for each sample in the samples to be screened, inputting the sample into a reference model to obtain a reference loss value of the sample, the reference model is obtained based on the training of the reference sample, and the reference sample and the sample to be screened are samples in the same field; based on the detection model, determining the target loss value of each sample in the samples to be screened, and updating the detection model based on the target loss value; based on the reference loss value and the target loss value of each sample to be screened, selecting a sample from each sample to be screened to obtain a target sample. The above technical scheme, by inputting each sample in the samples to be screened into the reference model to obtain the reference loss value of each sample, determining the target loss value of each sample in the samples to be screened based on the detection model, and then screening the target sample from each sample to be screened based on the reference loss value and the target loss value of each sample to be screened, compared with using all the newly added data for model training, this method is to screen the target sample in the samples to be screened, so that the screened target sample has greater value for model training, thereby improving the effectiveness of the target sample for model training.

[0080] Figure 2 It is a flow chart of another data processing method provided by an embodiment of the present disclosure. The embodiment of the present disclosure is to further refine the target sample by selecting samples from each sample to be screened based on the reference loss value and target loss value of each sample to be screened.

[0081] like Figure 2 As shown, the data processing method includes:

[0082] S201. For each sample in the samples to be screened, the sample is input into a reference model to obtain a reference loss value of the sample. The reference model is trained based on a reference sample. The reference sample and the sample to be screened are samples in the same field.

[0083] S202: Based on the detection model, determine the target loss value of each sample in the samples to be screened, and update the detection model based on the target loss value.

[0084] S203. Determine reference information corresponding to each sample to be screened based on the reference loss value and target loss value of each sample to be screened.

[0085] For each sample in each to-be-screened sample, the reference information corresponding to the sample may refer to information determined based on the reference loss value and the target loss value of the sample. There is no limitation on the reference information corresponding to each to-be-screened sample, as long as the reference information can be used to subsequently select a sample from each to-be-screened sample to obtain a target sample.

[0086] In one embodiment, for each sample in the samples to be screened, the reference information corresponding to the sample may be information indicated by the result of comparing the reference loss value and the target loss value of the sample with the set reference threshold value respectively; for example, the reference information corresponding to the sample may also be information indicated by the difference between the target loss value and the reference loss value of the sample.

[0087] Among them, the results of comparing the reference loss value and target loss value of the sample with the set reference threshold respectively can be as follows: both the reference loss value and the target loss value are greater than the set reference threshold; both the reference loss value and the target loss value are less than the set reference threshold; the reference loss value exceeds the set reference threshold, and the set reference threshold exceeds the target loss value; the target loss value exceeds the set reference threshold, and the set reference threshold exceeds the reference loss value.

[0088] In one embodiment, based on the reference loss value and the target loss value of each sample to be screened, the reference information corresponding to each sample to be screened is determined, including:

[0089] For each sample in the samples to be screened, the reference information corresponding to the sample is determined based on the difference between the target loss value of the sample and the reference loss value.

[0090] There is no limitation on the method of determining the reference information corresponding to the sample based on the difference between the target loss value and the reference loss value of the sample. For example, the difference between the target loss value and the reference loss value of the sample can be determined as the reference information of the sample, that is, the reference information of the sample can be understood as the information indicated by the difference between the target loss value and the reference loss value of the sample.

[0091] S204: Based on the reference information corresponding to each sample to be screened, select a sample from each sample to be screened to obtain a target sample.

[0092] Based on the reference information corresponding to each sample to be screened, a method of selecting samples from each sample to be screened to obtain a target sample can be that, when the reference information is information indicated by the result of comparing the reference loss value and the target loss value of the sample with the set reference threshold, if the result of comparing the reference loss value and the target loss value of the sample with the set reference threshold is that the target loss value exceeds the set reference threshold and the set reference threshold exceeds the reference loss value, it indicates that the sample may be a sample with less impact on the reference model, the sample can improve the richness of the sample corresponding to the training reference model, and the current sample has a higher effectiveness for the training of the detection model, then the sample is used as the target sample.

[0093] Based on the reference information corresponding to each sample to be screened, a method of selecting samples from each sample to be screened to obtain a target sample can also be that, when the reference information is the difference between the target loss value and the reference loss value of the sample, the difference values ​​corresponding to each sample can be arranged in order from large to small, and a set number of samples arranged in front can be selected as the target samples. The set number can be determined according to actual application needs, such as the set number can be 20% of the number of all samples to be screened.

[0094] Figure 2 A data processing method is provided, which determines reference information corresponding to each sample to be screened based on the reference loss value and target loss value of each sample to be screened, and then selects samples from each sample to be screened based on the reference information corresponding to each sample to be screened to obtain a target sample. The target sample selected in the above manner can be a sample with less influence on the reference model, and the target sample can improve the richness of the sample corresponding to the training reference model, and the target sample has a high effectiveness for the detection model training.

[0095] Figure 3 It is a flow chart of another data processing method provided by an embodiment of the present disclosure. The embodiment of the present disclosure is to determine the target loss value of each sample in the samples to be screened based on the detection model, and to further refine the detection model based on the target loss value, as well as to select samples from each sample to be screened based on the reference loss value and target loss value of each sample to be screened to obtain the target sample.

[0096] like Figure 3 As shown, the data processing method includes:

[0097] S301. For each sample in the samples to be screened, the sample is input into a reference model to obtain a reference loss value of the sample. The reference model is trained based on a reference sample. The reference sample and the sample to be screened are samples in the same field.

[0098] S302: Based on the set number of rounds of training for the detection model, determine the target loss value of each sample in the samples to be screened in each round.

[0099] Among them, the set number of rounds can be a pre-set number of rounds for training the detection model, and there is no limitation on the set number of rounds. For example, the set number of rounds can be one round or more rounds, and the set number of rounds can be determined according to actual application needs.

[0100] It should be noted that in the process of training the detection model for a set number of rounds, the detection model can be updated based on the target loss value. For example, the detection model can be updated once based on the target loss value of each sample in the samples to be screened in each training round, without any specific limitation.

[0101] Based on the set number of rounds of training for the detection model, the target loss value of each sample in the samples to be screened in each round is determined. That is, in each training round, each sample in the samples to be screened can be input into the detection model to obtain the target loss value of each sample in the samples to be screened in each training round.

[0102] S303: For each round, based on the reference loss value and target loss value of each sample to be screened, determine the reference information corresponding to each sample to be screened in the current round.

[0103] In each training round, for each sample in the samples to be screened, the information indicated by the result of comparing the reference loss value and the target loss value of the sample with the set reference threshold value can be determined as the reference information corresponding to the sample; the information indicated by the difference between the target loss value and the reference loss value of the sample can also be determined as the reference information corresponding to the sample.

[0104] In each training round, reference information corresponding to each sample in each to-be-screened sample is determined. After multiple rounds of training, reference information corresponding to each sample in each to-be-screened sample in each round of multiple training rounds can be obtained.

[0105] S304: Determine candidate samples corresponding to each round based on reference information corresponding to each sample to be screened in each round.

[0106] The candidate samples may refer to samples selected from the samples to be screened in each round when the samples to be screened perform multiple rounds of training on the detection model. The number of the selected candidate samples may be multiple, and is not specifically limited.

[0107] Based on the reference information corresponding to each sample to be screened in each round, the method for determining the candidate samples corresponding to each round can be that, for each round, if the reference information corresponding to each sample to be screened in the round is the information indicated by the result of comparing the reference loss value and the target loss value of the sample with the set reference threshold value respectively, then the sample whose target loss value in the round exceeds the set reference threshold value and whose set reference threshold exceeds the reference loss value can be determined as the candidate sample corresponding to the round.

[0108] Based on the reference information corresponding to each sample to be screened in each round, the method for determining the candidate samples corresponding to each round can also be that, for each round, if the reference information corresponding to each sample to be screened in the round is the information indicated by the difference between the target loss value and the reference loss value, the difference between the target loss value and the reference loss value corresponding to each sample in the round can be arranged in order from large to small, and a set number of samples arranged in front are selected as the candidate samples corresponding to the round.

[0109] In one embodiment, based on the reference information corresponding to each to-be-screened sample in each round, determining the candidate sample corresponding to each round includes:

[0110] For each round, from the reference information corresponding to each sample to be screened in the current round, select the reference information arranged in the first set number in descending order of reference information values;

[0111] Based on the samples corresponding to the reference information selected in the current round, the candidate samples corresponding to the current round are determined.

[0112] The reference information may be the difference between the target loss value and the reference loss value of the sample. For each round, the reference information of each sample in the current round may be arranged in descending order, and a set number of reference information arranged in front may be selected; then, based on the samples corresponding to the reference information selected in the current round, the candidate samples corresponding to the current round may be determined, such as the samples corresponding to the reference information selected in the current round may be determined as the candidate samples corresponding to the current round. The current round is the round in which the corresponding candidate samples are currently determined.

[0113] S305: Determine the target sample based on the candidate samples corresponding to each round.

[0114] Based on the candidate samples corresponding to each round, the target sample can be determined by taking the candidate samples that appear more than a set number of times in all rounds as the target sample. For example, if the detection model is trained for a total of n rounds, and in the n rounds of training, the sample A to be screened is determined as a candidate sample in x rounds, then the number of times the sample A to be screened appears in all rounds can be considered to be x. The set number of times can be the number of times the candidate sample appears in advance, which can be determined according to the actual application needs.

[0115] In one embodiment, determining a target sample based on candidate samples corresponding to each round includes:

[0116] Determine the intersection of candidate samples corresponding to each round;

[0117] A target sample is determined based on the candidate samples included in the intersection.

[0118] In this embodiment, when determining the target sample, the candidate samples corresponding to each round may be intersected to determine the candidate samples selected in each round, and the candidate samples selected in each round may be determined as the target sample.

[0119] For example, when the number of rounds is set to 5, the model is trained for 5 times, the number of samples to be screened in each round is 10, and each sample in the samples to be screened is numbered from 1 to 10. If the candidate samples selected for the first time are samples 10 and sample 9, the candidate samples selected for the second time are samples 8 and sample 9, the candidate samples selected for the third time are samples 9 and sample 7, the candidate samples selected for the fourth time are samples 5 and sample 9, and the candidate samples selected for the fifth time are samples 1 and sample 9, then the intersection of the candidate samples corresponding to each round is determined to be sample 9, and sample 9 included in the intersection is determined as the target sample.

[0120] Figure 3 A data processing method is provided. When a detection model is trained for a set number of rounds, candidate samples are selected from each sample to be screened based on reference information corresponding to each sample to be screened in each training round, and then target samples are selected from the candidate samples corresponding to each round. Compared with using all new data for model training, this method uses the samples to be screened to perform multiple rounds of model training, so as to screen the target samples from the samples to be screened based on the reference information corresponding to each sample to be screened in each round, so that the screened target samples are more valuable for model training, thereby improving the effectiveness of the target samples for model training.

[0121] In one embodiment, in order to improve the effectiveness of samples used for model training, the present disclosure provides a method for selecting a live body incremental data set, which is an exemplary description of the data processing method provided in the above embodiment. Among them, the live body incremental data set can be considered as an incremental data set for liveness detection. A method for selecting a live body incremental data set specifically includes the following steps:

[0122] (1) This method is implemented based on two data sets, namely the existing data set Dold (i.e., the reference samples used for reference model training) and the new data set Dnew (i.e., the samples to be screened);

[0123] (2) Based on the existing dataset Dold, the reference model Mold is trained;

[0124] (3) For the new data set Dnew, a detection model Mnew with the same structure as the reference model Mold is pre-determined so that the detection model Mnew can be trained based on Dnew later;

[0125] (4) When training Mnew, for each sample x of Dnew new Also enter Mold at the same time, then for each sample x new , we can also get the target loss value L(x new ; Mnew) and reference loss value L(x new ;Mold);

[0126] (5) In each round of training, for each sample in Dnew, the L(x new ;Mnew)-L(x new Mold) is determined as the reference information corresponding to the sample, and the results of the above differences in this round of training are sorted in order from large to small, and the samples corresponding to the top 20% of the results are determined as the candidate samples corresponding to this round of training;

[0127] (6) Each round of training can obtain the L(x) corresponding to each sample in Dnew. new ;Mnew)-L(x new Mold), and then determine the candidate samples corresponding to each round of training;

[0128] (7) Based on the data set Dnew, the model Mnew is trained for 50 rounds and then the intersection of the candidate samples corresponding to each round is determined. The candidate samples included in the intersection are determined as target samples.

[0129] Through the above-mentioned method for selecting a living incremental data set, the most valuable data (ie, target samples) for the current model in the new data set can be selected, or the correct samples in the new data set can be selected and samples with incorrect labels can be eliminated.

[0130] Figure 4 It is a flow chart of a method for training a detection model provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to the situation where a detection model is trained based on the target sample after the target sample in the samples to be screened is determined based on the above-mentioned data processing method. The method can be executed by a training device for the detection model, which can be implemented in the form of software and / or hardware, and optionally, by an electronic device, which can be a mobile terminal, a PC or a server, etc.

[0131] like Figure 4 As shown, the training method of the detection model includes:

[0132] S410: Based on the first data set, train and obtain a first detection model.

[0133] The first data set may be an existing data set for training the first detection model, and the first data set may include multiple samples, so that the first detection model can be obtained by training the multiple samples included in the first data set.

[0134] The first detection model may be a model used for detection, and there is no limitation on the first detection model. For example, the first detection model may be a model used for face liveness detection, hand detection, or human body detection.

[0135] S420: Acquire a second data set, and determine samples to be screened in the second data set based on the second data set.

[0136] Among them, the samples in the second data set can be samples that have no intersection with the samples in the first data set, or samples that are newly added on the basis of the samples in the first data set, or samples that have partial intersection with the samples in the first data set, as long as the samples in the second data set and the samples in the first data set are samples in the same field.

[0137] The method of determining the samples to be screened in the second data set based on the second data set is not limited. For example, all samples in the second data set can be determined as samples to be screened, and some samples in the second data set can also be determined as samples to be screened according to actual application needs.

[0138] S430. Determine a target sample among the samples to be screened according to the data processing method provided by the embodiment of the present disclosure.

[0139] Determining the target samples among the samples to be screened according to the data processing method provided in the embodiment of the present disclosure can make the screened target samples more valuable for model training, thereby improving the effectiveness of the target samples for model training.

[0140] S440: Iterate the first detection model based on the determined target sample to obtain a second detection model.

[0141] Based on the determined target sample, the first detection model is iterated to obtain the second detection model in any manner. For example, the first detection model can be trained for multiple rounds based on the target sample. During the training process, the predicted value of the first detection model gradually approaches the true value, and finally the second detection model is obtained.

[0142] A method for training a detection model provided by an embodiment of the present disclosure includes: training a first detection model based on a first data set; obtaining a second data set, and determining a sample to be screened in the second data set based on the second data set; determining a target sample in the sample to be screened according to the data processing method provided by an embodiment of the present disclosure; and iterating the first detection model based on the determined target sample to obtain a second detection model. The above technical solution uses the screened target sample to iterate the first detection model to obtain the second detection model, which can ensure that the iteration direction of the first detection model is positive, such as improving the generalization ability of the model; if the first detection model is directly iterated with the unscreened second data set, it is possible that the generalization ability of the second detection model obtained is not significantly improved, and even the generalization ability of the second detection model is worse than that of the first detection model.

[0143] Figure 5 is a structural diagram of a data processing device provided by an embodiment of the present disclosure, such as Figure 5 As shown, the data processing device includes: an input module 501, a determination module 502 and a selection module 503.

[0144] An input module 501 is used to input each sample in the samples to be screened into a reference model to obtain a reference loss value of the sample, where the reference model is trained based on the reference sample, and the reference sample and the sample to be screened are samples in the same field;

[0145] A determination module 502 is used to determine a target loss value of each sample in the samples to be screened based on the detection model, and update the detection model based on the target loss value;

[0146] The selection module 503 is used to select samples from the samples to be screened to obtain target samples based on the reference loss value and the target loss value of each sample to be screened.

[0147] The technical solution provided by the embodiment of the present disclosure is that, first, for each sample in the samples to be screened, the input module inputs the sample into the reference model to obtain the reference loss value of the sample, the reference model is obtained based on the reference sample training, and the reference sample and the sample to be screened are samples in the same field; then, the determination module determines the target loss value of each sample in the samples to be screened based on the detection model, and updates the detection model based on the target loss value; finally, the selection module selects samples from each sample to be screened based on the reference loss value and the target loss value of each sample to be screened to obtain the target sample. The device obtains the reference loss value of each sample in the samples to be screened by inputting each sample in the samples to be screened into the reference model, determines the target loss value of each sample in the samples to be screened based on the detection model, and then screens the target sample from each sample to be screened based on the reference loss value and the target loss value of each sample to be screened. Compared with using all the newly added data for model training, the device screens the target sample in the samples to be screened, so that the screened target sample has greater value for model training, thereby improving the effectiveness of the target sample for model training.

[0148] Furthermore, the selection module 503 is specifically used for:

[0149] Determine reference information corresponding to each sample to be screened based on the reference loss value and the target loss value of each sample to be screened;

[0150] Based on the reference information corresponding to each sample to be screened, a sample is selected from each sample to be screened to obtain a target sample.

[0151] Furthermore, the selection module 503 is specifically used for:

[0152] For each sample in the samples to be screened, the reference information corresponding to the sample is determined based on the difference between the target loss value of the sample and the reference loss value.

[0153] Further, the determination module 502 is specifically used for:

[0154] Based on the set number of rounds of training for the detection model, the target loss value of each sample in the samples to be screened in each round is determined.

[0155] Furthermore, the selection module 503 is specifically used for:

[0156] For each round, based on the reference loss value and target loss value of each sample to be screened, determine the reference information corresponding to each sample to be screened in the current round;

[0157] Determine the candidate samples corresponding to each round based on the reference information corresponding to each sample to be screened in each round;

[0158] Based on the candidate samples corresponding to each round, the target sample is determined.

[0159] Furthermore, the selection module 503 is specifically used for:

[0160] For each round, from the reference information corresponding to each sample to be screened in the current round, select the reference information arranged in the first set number in descending order of reference information values;

[0161] Based on the samples corresponding to the reference information selected in the current round, the candidate samples corresponding to the current round are determined.

[0162] Furthermore, the selection module 503 is specifically used for:

[0163] Determine the intersection of candidate samples corresponding to each round;

[0164] A target sample is determined based on the candidate samples included in the intersection.

[0165] Furthermore, the model structure of the reference model is the same as that of the detection model.

[0166] The data processing device provided in the embodiments of the present disclosure can execute the data processing method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0167] Figure 6 is a schematic diagram of the structure of a detection model training device provided by an embodiment of the present disclosure, such as Figure 6 As shown, the training device of the detection model includes: a model training module 601, a sample determination module 602 to be screened, a target sample determination module 603 and a model iteration module 604.

[0168] A model training module 601 is used to train a first detection model based on a first data set;

[0169] The sample-to-be-screened determination module 602 is configured to obtain a second data set and determine the sample to be screened in the second data set based on the second data set;

[0170] A target sample determination module 603 is used to determine a target sample among samples to be screened according to the data processing method provided by an embodiment of the present disclosure;

[0171] The model iteration module 604 is used to iterate the first detection model based on the determined target sample to obtain a second detection model.

[0172] The technical solution provided by the embodiment of the present disclosure firstly trains a first detection model based on a first data set through a model training module; then obtains a second data set through a sample determination module to be screened, and determines the sample to be screened in the second data set based on the second data set; then determines the target sample in the sample to be screened according to the data processing method provided by the embodiment of the present disclosure through a target sample determination module; finally, iterates the first detection model based on the determined target sample through a model iteration module to obtain a second detection model. The device iterates the first detection model using the screened target sample to obtain the second detection model, which can ensure that the iteration direction of the first detection model is positive, such as improving the generalization ability of the model; if the first detection model is directly iterated with the unscreened second data set, it is possible that the generalization ability of the second detection model obtained is not significantly improved, and even the generalization ability of the second detection model is worse than that of the first detection model.

[0173] The training device for the detection model provided in the embodiment of the present disclosure can execute the training method for the detection model provided in the embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0174] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.

[0175] Figure 7 Schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 7 , which shows an electronic device (eg, Figure 7 A schematic diagram of the structure of a terminal device or server in FIG. 700.

[0176] An electronic device provided by an embodiment of the present disclosure includes:

[0177] one or more processing devices;

[0178] a storage device for storing one or more programs,

[0179] When one or more programs are executed by one or more processing devices, the one or more processing devices implement the data processing method provided by the above embodiment, or implement the training method of the detection model provided by the above embodiment.

[0180] The terminal devices in the embodiments of the present disclosure may include but are not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., as well as fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0181] like Figure 7 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An edit / output (I / O) interface 705 is also connected to the bus 704.

[0182] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0183] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 709, or installed from a storage device 708, or installed from a ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0184] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0185] The electronic device provided by the embodiment of the present disclosure and the data processing method provided by the above embodiment or the training method of the detection model provided by the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0186] An embodiment of the present disclosure provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the data processing method provided by the above embodiment is implemented, or the training method of the detection model provided by the above embodiment is implemented.

[0187] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two.

[0188] The computer storage medium may be a storage medium of computer executable instructions, which, when executed by a computer processor, are used to perform the methods provided by the present disclosure.

[0189] Computer readable storage media may be, for example, but not limited to: electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination thereof. More specific examples of computer readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate, or transmit a program used by or in combination with an instruction execution system, device, or device. The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wire, optical cable, RF (radio frequency), etc., or any suitable combination of the foregoing.

[0190] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0191] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0192] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: for each sample in the samples to be screened, input the sample into the reference model to obtain the reference loss value of the sample, the reference model is trained based on the reference sample, and the reference sample and the sample to be screened are samples in the same field; based on the detection model, determine the target loss value of each sample in the samples to be screened, and update the detection model based on the target loss value; based on the reference loss value and target loss value of each sample to be screened, select a sample from each sample to be screened to obtain a target sample.

[0193] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: trains a first detection model based on the first data set; obtains a second data set, and determines the samples to be screened in the second data set based on the second data set; determines the target samples in the samples to be screened according to the data processing method provided in the embodiment of the present disclosure; and iterates the first detection model based on the determined target samples to obtain the second detection model.

[0194] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or combinations thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0195] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0196] The modules or units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a module or unit does not, in some cases, constitute a limitation on the unit itself. For example, a determination module may also be described as a "target loss value determination module."

[0197] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0198] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0199] According to one or more embodiments of the present disclosure, a data processing method is provided, including:

[0200] For each sample in the samples to be screened, the sample is input into a reference model to obtain a reference loss value of the sample, the reference model is trained based on a reference sample, and the reference sample and the sample to be screened are samples in the same field;

[0201] Determine a target loss value for each sample in the samples to be screened based on the detection model, and update the detection model based on the target loss value;

[0202] Based on the reference loss value and the target loss value of each sample to be screened, a sample is selected from each sample to be screened to obtain a target sample.

[0203] According to one or more embodiments of the present disclosure, a data processing method is provided, including:

[0204] Based on the reference loss value and the target loss value of each sample to be screened, selecting a sample from each sample to be screened to obtain a target sample comprises:

[0205] Determining reference information corresponding to each of the samples to be screened based on the reference loss value and the target loss value of each of the samples to be screened;

[0206] Based on the reference information corresponding to each of the samples to be screened, a sample is selected from each of the samples to be screened to obtain a target sample.

[0207] According to one or more embodiments of the present disclosure, a data processing method is provided, including:

[0208] Determining reference information corresponding to each of the samples to be screened based on the reference loss value and the target loss value of each of the samples to be screened includes:

[0209] For each sample in the samples to be screened, reference information corresponding to the sample is determined based on a difference between the target loss value and the reference loss value of the sample.

[0210] According to one or more embodiments of the present disclosure, a data processing method is provided, including:

[0211] Determining a target loss value of each sample in the samples to be screened based on the detection model includes:

[0212] Based on a set number of rounds of training for the detection model, a target loss value for each sample in the samples to be screened in each round is determined.

[0213] According to one or more embodiments of the present disclosure, a data processing method is provided, including:

[0214] Based on the reference loss value and the target loss value of each sample to be screened, selecting a sample from each sample to be screened to obtain a target sample comprises:

[0215] For each round, based on the reference loss value and the target loss value of each sample to be screened, determine the reference information corresponding to each sample to be screened in the current round;

[0216] Determine candidate samples corresponding to each round based on the reference information corresponding to each sample to be screened in each round;

[0217] Based on the candidate samples corresponding to each round, the target sample is determined.

[0218] According to one or more embodiments of the present disclosure, a data processing method is provided, including:

[0219] Determining candidate samples corresponding to each round based on reference information corresponding to each sample to be screened in each round includes:

[0220] For each round, from the reference information corresponding to each sample to be screened in the current round, select the reference information arranged in the first set number in descending order of reference information values;

[0221] Based on the samples corresponding to the reference information selected in the current round, candidate samples corresponding to the current round are determined.

[0222] According to one or more embodiments of the present disclosure, a data processing method is provided, including:

[0223] Based on the candidate samples corresponding to each round, the target samples are determined, including:

[0224] Determine the intersection of candidate samples corresponding to each round;

[0225] A target sample is determined based on the candidate samples included in the intersection.

[0226] According to one or more embodiments of the present disclosure, a data processing method is provided, including:

[0227] The reference model and the detection model have the same model structure.

[0228] According to one or more embodiments of the present disclosure, a method for training a detection model is provided, comprising:

[0229] Based on the first data set, a first detection model is obtained by training;

[0230] Acquire a second data set, and determine a sample to be screened in the second data set based on the second data set;

[0231] Determine the target sample among the samples to be screened according to any of the aforementioned data processing methods;

[0232] Based on the determined target sample, the first detection model is iterated to obtain a second detection model.

[0233] According to one or more embodiments of the present disclosure, there is provided a data processing device, including:

[0234] An input module, for inputting each sample in the samples to be screened into a reference model to obtain a reference loss value of the sample, wherein the reference model is trained based on a reference sample, and the reference sample and the sample to be screened are samples in the same field;

[0235] A determination module, configured to determine a target loss value of each sample in the samples to be screened based on a detection model, and update the detection model based on the target loss value;

[0236] A selection module is used to select a sample from each of the samples to be screened to obtain a target sample based on the reference loss value and the target loss value of each of the samples to be screened.

[0237] According to one or more embodiments of the present disclosure, a detection model training device is provided, comprising:

[0238] A model training module, used for training a first detection model based on a first data set;

[0239] A sample-to-be-screened determination module, configured to obtain a second data set, and determine a sample to be screened in the second data set based on the second data set;

[0240] A target sample determination module, used to determine the target sample among the samples to be screened according to any of the aforementioned data processing methods;

[0241] The model iteration module is used to iterate the first detection model based on the determined target sample to obtain a second detection model.

[0242] According to one or more embodiments of the present disclosure, there is provided an electronic device, including:

[0243] one or more processing devices;

[0244] a storage device for storing one or more programs,

[0245] When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement any of the aforementioned data processing methods, or implement the aforementioned detection model training method.

[0246] According to one or more embodiments of the present disclosure, a storage medium containing computer executable instructions is provided, and the computer executable instructions, when executed by a computer processor, are used to execute any of the aforementioned data processing methods, or to execute the aforementioned detection model training method.

[0247] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0248] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0249] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A data processing method, characterized in that: include: For each sample in the samples to be screened, the sample is input into a reference model to obtain a reference loss value of the sample, the reference model is trained based on a reference sample, and the reference sample and the sample to be screened are samples in the same field; Determine a target loss value for each sample in the samples to be screened based on the detection model, and update the detection model based on the target loss value; Based on the reference loss value and the target loss value of each sample to be screened, a sample is selected from each sample to be screened to obtain a target sample.

2. The method according to claim 1, characterized in that Based on the reference loss value and the target loss value of each sample to be screened, selecting a sample from each sample to be screened to obtain a target sample comprises: Determining reference information corresponding to each of the samples to be screened based on the reference loss value and the target loss value of each of the samples to be screened; Based on the reference information corresponding to each of the samples to be screened, a sample is selected from each of the samples to be screened to obtain a target sample.

3. The method according to claim 2, characterized in that Determining reference information corresponding to each of the samples to be screened based on the reference loss value and the target loss value of each of the samples to be screened includes: For each sample in the samples to be screened, reference information corresponding to the sample is determined based on a difference between the target loss value and the reference loss value of the sample.

4. The method according to claim 1, characterized in that Determining a target loss value of each sample in the samples to be screened based on the detection model includes: Based on a set number of rounds of training for the detection model, a target loss value for each sample in the samples to be screened in each round is determined.

5. The method according to claim 4, characterized in that Based on the reference loss value and the target loss value of each sample to be screened, selecting a sample from each sample to be screened to obtain a target sample comprises: For each round, based on the reference loss value and the target loss value of each sample to be screened, determine the reference information corresponding to each sample to be screened in the current round; Determine candidate samples corresponding to each round based on the reference information corresponding to each sample to be screened in each round; Based on the candidate samples corresponding to each round, the target sample is determined.

6. The method according to claim 5, characterized in that Determining candidate samples corresponding to each round based on reference information corresponding to each sample to be screened in each round includes: For each round, from the reference information corresponding to each sample to be screened in the current round, select the reference information arranged in the first set number in descending order of reference information values; Based on the samples corresponding to the reference information selected in the current round, candidate samples corresponding to the current round are determined.

7. The method according to claim 5, characterized in that Based on the candidate samples corresponding to each round, the target samples are determined, including: Determine the intersection of candidate samples corresponding to each round; A target sample is determined based on the candidate samples included in the intersection.

8. The method according to claim 1, characterized in that The reference model and the detection model have the same model structure.

9. A method for training a detection model, characterized in that: include: Based on the first data set, a first detection model is obtained by training; Acquire a second data set, and determine a sample to be screened in the second data set based on the second data set; Determine the target sample among the samples to be screened according to the data processing method according to any one of claims 1 to 8; Based on the determined target sample, the first detection model is iterated to obtain a second detection model.

10. A data processing device, characterized in that: include: An input module, for inputting each sample in the samples to be screened into a reference model to obtain a reference loss value of the sample, wherein the reference model is trained based on a reference sample, and the reference sample and the sample to be screened are samples in the same field; A determination module, configured to determine a target loss value of each sample in the samples to be screened based on a detection model, and update the detection model based on the target loss value; A selection module is used to select a sample from each of the samples to be screened to obtain a target sample based on the reference loss value and the target loss value of each of the samples to be screened.

11. A detection model training device, characterized in that: include: A model training module, used for training a first detection model based on a first data set; A sample-to-be-screened determination module, configured to obtain a second data set, and determine a sample to be screened in the second data set based on the second data set; A target sample determination module, used to determine the target sample among the samples to be screened according to the data processing method according to any one of claims 1 to 8; The model iteration module is used to iterate the first detection model based on the determined target sample to obtain a second detection model.

12. An electronic device, characterized in that: The electronic device comprises: one or more processing devices; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the data processing method as described in any one of claims 1 to 8, or implement the training method of the detection model as described in claim 9.

13. A storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the data processing method as described in any one of claims 1 to 8, or to execute the detection model training method as described in claim 9.

Citation Information

Cited By

  • Model training method and sample determination method for model training

    CN119357679A