CN116225636A - Method, device, equipment and storage medium for generating task processing model - Google Patents

Method, device, equipment and storage medium for generating task processing model Download PDF

Info

Publication number
CN116225636A
CN116225636A CN202211441422.3A CN202211441422A CN116225636A CN 116225636 A CN116225636 A CN 116225636A CN 202211441422 A CN202211441422 A CN 202211441422A CN 116225636 A CN116225636 A CN 116225636A
Authority
CN
China
Prior art keywords
training
screening
sample
training set
task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211441422.3A
Other languages
Chinese (zh)
Inventor
姚鹏
廖超
谈建超
宋成儒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202211441422.3A priority Critical patent/CN116225636A/en
Publication of CN116225636A publication Critical patent/CN116225636A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Feedback Control In General (AREA)

Abstract

The method carries out training treatment on a task processing model through a current training set loaded into a training data buffer area, and determines first screening index parameters corresponding to each training sample; sample screening is carried out on the full training set based on the first screening index parameter, the second screening index parameter of other training samples and the target sample screening amount of the full training set, so that a screened training set is obtained, and each training sample in the training data buffer area is replaced by the screened training set; and taking the screened training set as a training set of the current wheel, repeatedly executing all steps until reaching the model training ending condition, and generating a target task processing model. Therefore, the calculation amount of model training is reduced, the cost and the dependence on computer resources are reduced, and the calculation efficiency is improved.

Description

Method, device, equipment and storage medium for generating task processing model
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a method, a device, equipment and a storage medium for generating a task processing model.
Background
Automated machine learning (autopl) is an automated model development and iteration process, and has the advantages of large extensibility, high efficiency, less required expert knowledge, and the like, and Neural Architecture Search (NAS) and super-parametric optimization (HPO) serve as two main tasks of autopl, and have become very active research fields.
However, the autopl technique requires repeated training of multiple model structures or sets of hyper-parameters to implement the search process, which is computationally intensive and results in computational inefficiency.
Disclosure of Invention
The disclosure provides a method, a device, equipment and a storage medium for generating a task processing model, so as to at least solve at least one problem of low calculation efficiency and the like in the related art. The technical scheme of the present disclosure is as follows:
according to a first aspect of an embodiment of the present disclosure, there is provided a method for generating a task processing model, including:
acquiring an on-wheel training set based on the full training set, and loading each training sample in the on-wheel training set into a training data buffer area; each training sample in the full training set is sample data corresponding to the media resource;
loading each training sample in the training data buffer area to a task processing model aiming at media resources, performing training processing on the task processing model through each training sample in the training set of the current training round, and determining a first screening index parameter corresponding to each training sample in the current training round; the first screening index parameter represents the importance degree of each training sample in at least one task screening dimension in the current training round;
Under the condition that the current training set is a training set corresponding to non-initial training, acquiring second screening index parameters of other training samples except the current training set in the full training set; the second screening index parameter characterizes the importance degree of the other training samples in the at least one task screening dimension in the corresponding historical training rounds respectively; determining a target sample screening amount of the full-scale training set in the next training round, performing sample screening on the full-scale training set based on the first screening index, the second screening index parameter and the target sample screening amount to obtain a screened training set, and replacing each training sample in the training data buffer area with the screened training set;
and taking the screened training set as a training set of the current wheel, and returning to execute and load each training sample in the training data buffer zone to a task processing model aiming at the media resource until reaching the model training ending condition, so as to generate a target task processing model.
In an optional implementation method, the training processing is performed on the task processing model through each training sample in the training set of the current round, and a first screening index parameter corresponding to each training sample in the current training round is determined, including:
Training the task processing model through each training sample in the training set of the current wheel to obtain intermediate index parameters corresponding to each training sample; the intermediate index parameters are used for representing training index data in the model training process;
determining a target task screening dimension corresponding to the next training round, wherein the target task screening dimension is any one of at least one task screening dimension;
and carrying out parameter screening on the intermediate index parameters based on the target task screening dimension, and determining a first screening index parameter corresponding to each training sample in the current training round.
In an optional implementation method, the determining the target task screening dimension corresponding to the next training round includes:
acquiring a mixed screening dimension distribution diagram, wherein the mixed screening dimension distribution diagram represents distribution probability corresponding to the change of various task screening dimensions along with training rounds in the model training process;
determining the distribution proportion corresponding to each type of task screening dimension in the current model training stage based on the mixed screening dimension distribution diagram and the current model training stage to which the current training round belongs, and determining task screening dimension distribution data based on the distribution proportion; the task screening dimension distribution data represents preset task screening dimensions corresponding to each training round in the current model training stage;
Determining a target task screening dimension corresponding to the next training round based on the task screening dimension distribution data;
the distribution ratios corresponding to the task screening dimensions in different model training stages are different, and the sum value between the distribution ratios corresponding to the task screening dimensions in different model training stages is 1.
In an alternative implementation, the determining the target sample screening amount of the full training set in the next training round includes:
obtaining a fixed screening rate;
determining a preset screening rate corresponding to each training round based on the fixed screening rate and the maximum rated screening rate; the preset screening rate is reduced along with the increase of the training times;
and determining the target sample screening amount of the full-capacity training set in the next training round based on the preset screening rate corresponding to each training round and the total number of samples of the full-capacity training set.
In an optional implementation method, the determining, based on the fixed screening rate and the maximum rated screening rate, a preset screening rate corresponding to each training round includes:
when the fixed screening rate is less than or equal to half of the maximum rated screening rate, determining a first screening rate corresponding to each training round based on the total training round and the maximum rated screening rate; based on the first screening rate and the fixed screening rate, obtaining a preset screening rate corresponding to each training round;
And when the fixed screening rate is greater than half of the maximum rated screening rate, determining a second screening rate corresponding to each training round based on the total training round, the maximum rated screening rate and the fixed screening rate, and taking the second screening rate as a preset screening rate corresponding to each training round.
In an optional implementation method, the performing sample screening on the full-scale training set based on the first screening index parameter, the second screening index parameter and the target sample screening amount to obtain a screened training set includes:
under the condition that the screening dimension type of the first screening index parameter indicates a candidate screening dimension, carrying out normalization processing on the first screening index parameter and the second screening index parameter to obtain normalization screening weights corresponding to all training samples in the full training set; the candidate screening dimension is used for representing the screening dimension of the model training index;
and carrying out sample screening on the full-scale training set based on the target sample screening amount and the normalized screening weight to obtain a screened training set, wherein the number of training samples in the screened training set is the target sample screening amount.
In an optional implementation method, the performing sample screening on the full-scale training set based on the first screening index parameter, the second screening index parameter and the target sample screening amount to obtain a screened training set includes:
under the condition that the screening dimension type of the first screening index parameter indicates the screening dimension based on the predicted value, carrying out numerical adjustment on the predicted state value of the corresponding training sample based on the prediction accuracy probability of the predicted value corresponding to the first screening index parameter to obtain an adjusted first screening index parameter;
and carrying out sample screening on the full-scale training set based on the target sample screening amount, the numerical value of the adjusted first screening index parameter and the second screening index parameter to obtain a screened training set, wherein the number of training samples in the screened training set is the target sample screening amount.
In an optional implementation method, the performing numerical adjustment on the predicted state value of the corresponding training sample based on the predicted accurate probability of the predicted value corresponding to the first screening indicator parameter to obtain an adjusted first screening indicator parameter includes:
If the prediction accuracy probability of the predicted value corresponding to the first screening index parameter is used for indicating that the prediction is correct, carrying out numerical reduction adjustment on the predicted state value of the training sample corresponding to the prediction is correct based on a preset adjustment amplitude, and obtaining a first type of adjustment index parameter;
if the prediction accuracy probability of the predicted value corresponding to the first screening index parameter is used for indicating prediction errors, carrying out numerical value increasing adjustment on the predicted state value of the training sample corresponding to the prediction errors based on a preset adjustment amplitude to obtain a second type of adjustment index parameter;
and determining the adjusted first screening index parameter based on the first type adjustment index parameter or the second type adjustment index parameter.
In an alternative implementation method, the training tasks corresponding to the task processing model include a search task for a network structure of the media resource processing model and/or an optimization task for network structure superparameter.
According to a second aspect of the embodiments of the present disclosure, there is provided a generating apparatus of a task processing model, including:
the first acquisition module is configured to acquire an on-wheel training set based on the full training set, and load each training sample in the on-wheel training set into a training data buffer; each training sample in the full training set is sample data corresponding to the media resource;
The training processing module is configured to execute loading each training sample in the training data buffer area to a task processing model aiming at a media resource, perform training processing on the task processing model through each training sample in the training set of the current training round, and determine a first screening index parameter corresponding to each training sample in the current training round; the first screening index parameter represents the importance degree of each training sample in at least one task screening dimension in the current training round;
the second acquisition module is configured to acquire second screening index parameters of other training samples except the current round training set in the full-quantity training set under the condition that the current round training set is a training set corresponding to non-initial round training; the second screening index parameter characterizes the importance degree of the other training samples in the at least one task screening dimension in the corresponding historical training rounds respectively;
a screening processing module configured to determine a target sample screening amount of the full-scale training set in a next training round, perform sample screening on the full-scale training set based on the first screening index parameter, the second screening index parameter and the target sample screening amount, obtain a screened training set, and replace each training sample in the training data buffer with the screened training set;
And the iteration module is configured to take the filtered training set as a current training set, and return to execute and load each training sample in the training data buffer zone to a task processing model aiming at the media resource until a model training ending condition is reached, so as to generate a target task processing model.
In an alternative implementation, the training processing module includes:
the training processing sub-module is configured to execute training processing on the task processing model through each training sample to obtain intermediate index parameters corresponding to each training sample; the intermediate index parameters are used for representing training index data in the model training process;
a dimension determination submodule configured to perform determination of a target task screening dimension corresponding to a next training round, the target task screening dimension being any one of at least one of the task screening dimensions;
and the parameter determination submodule is configured to perform parameter screening on the intermediate index parameters based on the target task screening dimension and determine a first screening index parameter corresponding to each training sample in the current training round.
In an alternative implementation, the dimension determination submodule is specifically configured to perform:
Acquiring a mixed screening dimension distribution diagram, wherein the mixed screening dimension distribution diagram represents distribution probability corresponding to the change of various task screening dimensions along with training rounds in the model training process;
determining the distribution proportion corresponding to each type of task screening dimension in the current model training stage based on the mixed screening dimension distribution diagram and the current model training stage to which the current training round belongs, and determining task screening dimension distribution data based on the distribution proportion; the task screening dimension distribution data represents preset task screening dimensions corresponding to each training round in the current model training stage;
determining a target task screening dimension corresponding to the next training round based on the task screening dimension distribution data;
the distribution ratios corresponding to the task screening dimensions in different model training stages are different, and the sum value between the distribution ratios corresponding to the task screening dimensions in different model training stages is 1.
In an alternative implementation, the screening processing module includes:
a screening rate acquisition sub-module configured to perform acquisition of a fixed screening rate;
a first screening processing sub-module configured to perform determining a preset screening rate corresponding to each training round based on the fixed screening rate and a maximum rated screening rate; the preset screening rate is reduced along with the increase of the training times;
And the second screening processing sub-module is configured to execute the determination of the target sample screening amount of the full training set in the next training round based on the preset screening rate corresponding to each training round and the total number of samples of the full training set.
In an alternative implementation, the first screening process sub-module is specifically configured to perform:
when the fixed screening rate is less than or equal to half of the maximum rated screening rate, determining a first screening rate corresponding to each training round based on the total training round and the maximum rated screening rate; based on the first screening rate and the fixed screening rate, obtaining a preset screening rate corresponding to each training round;
and when the fixed screening rate is greater than half of the maximum rated screening rate, determining a second screening rate corresponding to each training round based on the total training round, the maximum rated screening rate and the fixed screening rate, and taking the second screening rate as a preset screening rate corresponding to each training round.
In an alternative implementation, the screening processing module is further configured to perform:
under the condition that the screening dimension type of the first screening index parameter indicates a candidate screening dimension, carrying out normalization processing on the first screening index parameter and the second screening index parameter to obtain normalization screening weights corresponding to all training samples in the full training set; the candidate screening dimension is used for representing the screening dimension of the model training index;
And carrying out sample screening on the full-scale training set based on the target sample screening amount and the normalized screening weight to obtain a screened training set, wherein the number of training samples in the screened training set is the target sample screening amount.
In an alternative implementation, the screening processing module is further configured to perform:
under the condition that the screening dimension type of the first screening index parameter indicates the screening dimension based on the predicted value, carrying out numerical adjustment on the predicted state value of the corresponding training sample based on the prediction accuracy probability of the predicted value corresponding to the first screening index parameter to obtain an adjusted first screening index parameter;
and carrying out sample screening on the full-scale training set based on the target sample screening amount, the numerical value of the adjusted first screening index parameter and the second screening index parameter to obtain a screened training set, wherein the number of training samples in the screened training set is the target sample screening amount.
In an optional implementation method, the performing numerical adjustment on the predicted value of the corresponding training sample based on the prediction accuracy probability of the predicted value corresponding to the first screening index parameter to obtain an adjusted first screening index parameter includes:
If the prediction accuracy probability of the predicted value corresponding to the first screening index parameter is used for indicating that the prediction is correct, carrying out numerical reduction adjustment on the predicted state value of the training sample corresponding to the prediction is correct based on a preset adjustment amplitude, and obtaining a first type of adjustment index parameter;
if the prediction accuracy probability of the predicted value corresponding to the first screening index parameter is used for indicating prediction errors, carrying out numerical value increasing adjustment on the predicted state value of the training sample corresponding to the prediction errors based on a preset adjustment amplitude to obtain a second type of adjustment index parameter;
and determining the adjusted first screening index parameter based on the first type adjustment index parameter or the second type adjustment index parameter.
In an alternative implementation method, the training tasks corresponding to the task processing model include a search task for a network structure of the media resource processing model and/or an optimization task for network structure superparameter.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method for generating a task processing model according to any of the above embodiments.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform the method for generating a task processing model described in any of the above embodiments.
According to a fifth aspect of the disclosed embodiments, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method of generating a task processing model as described in any of the above embodiments.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
in each training round of the task processing model, the embodiment of the disclosure determines whether each training sample is dynamically activated by determining the screening index parameter of each training sample and determining whether each training sample is dynamically activated according to the screening amount of the target sample so as to participate in the model training process of the next training round, so that each training sample is activated or deactivated in a dynamic screening manner, the task processing model of each training round is trained by the screened training set, each training sample is ensured to participate in model training, the model is trained without using full training data in the whole process, the model training calculated amount is reduced, the cost and dependence on computer resources are reduced, and the calculation efficiency is improved. Meanwhile, the performance of the model can be considered while training samples of each training round are reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this disclosure, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
FIG. 1 is a flowchart illustrating a method of generating a task processing model according to an exemplary embodiment.
FIG. 2 is a partial flow chart illustrating a method of generating a task processing model according to an exemplary embodiment.
FIG. 3 is a partial flow chart illustrating another method of generating a task processing model according to an exemplary embodiment.
FIG. 4 is a partial flow chart illustrating another method of generating a task processing model according to an exemplary embodiment.
FIG. 5 is a process flow diagram illustrating a method of generating a task processing model in accordance with an exemplary embodiment.
FIG. 6 is a block diagram of a generating device of a task processing model, according to an example embodiment.
Fig. 7 is a block diagram of an electronic device, according to an example embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for presentation, analyzed data, etc.) related to the present disclosure are information and data authorized by the user or sufficiently authorized by each party.
FIG. 1 is a flowchart illustrating a method of generating a task processing model according to an exemplary embodiment. The method for generating the task processing model can be applied to electronic equipment, and the electronic equipment is taken as a server for illustration, wherein the server comprises, but is not limited to, an independent server, a server cluster or a distributed system formed by a plurality of physical servers, and one or more cloud servers for providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, intermediate services, domain name services, security services, basic cloud computing services such as big data and an artificial intelligent platform, and the like. As shown in fig. 1, the method includes the following steps.
In step S101, an on-wheel training set is acquired based on the full training set, and each training sample in the on-wheel training set is loaded into the training data buffer.
Wherein, each training sample in the full training set is sample data corresponding to the media resource; when the training set of the wheel refers to the training set corresponding to the current training round. When the training set of rounds includes a plurality of training samples, the training samples may be sample data that is collected by a user and uploaded to a server for training a task processing model. The task processing model is specific to the media asset, which may be at least one of an image, audio, text, and video, for example, and the task processing model may be a corresponding image processing model, an audio recognition model, a text recognition model, a video processing model, or the like, for example.
The training data buffer area is a part of the memory space of the server and is used for storing the training data of the training task processing model, so that each training sample can be directly and quickly read from the training data buffer area in the training task processing model, the operation speed of the server is improved, and the reading and writing times of a hard disk are reduced.
In an alternative embodiment, acquiring the training set of the current wheel based on the full training set includes:
and acquiring an initialization training set based on the full training set, and taking the initialization training set as a current training set.
Wherein, the initialization training set refers to a training set for initializing a task processing model. The initialization training set may be a training set composed of a full number of training samples or a training set composed of target training samples whose current importance satisfies a preset condition.
Optionally, the user uploads a full-scale training set to the server, wherein the full-scale training set is a training set formed by full-scale training samples, and the server determines an initialization training set from the full-scale training set and takes the initialization training set as a current training set to participate in the model training process of the current training round.
Illustratively, the step of determining the initialization training set may include: the server firstly judges whether the task processing model needs to be trained by adopting an offline core set, wherein the offline core set refers to a training set formed by target training samples with the current importance degree meeting the preset condition, for example, a fixed subset with rich information is obtained through a designated screening index to serve as the offline core set. If yes, the offline core set is obtained to be used as an initialization training set. If the judgment result is negative, or the offline core set does not exist, the full training set is used as the initialization training set.
Of course, in other embodiments, some training sets with small sample sizes may be randomly sampled from the full training set to be used as the initialization training set, and participate in the model training process of the current training round.
In step S103, each training sample in the training data buffer is loaded to the task processing model for the media resource, and the task processing model is trained by each training sample in the training set of the current training round, and the corresponding first screening index parameter of each training sample in the current training round is determined.
The first screening index parameter characterizes importance degree of each training sample in at least one task screening dimension in the current training round.
Optionally, the task filtering dimension refers to a dimension corresponding to the task processing model based on different training indexes. Illustratively, the task filtering dimension may be at least one of a random filtering-based filtering dimension, a gradient-based filtering dimension, a loss function-based filtering dimension gradient, an entropy function-based filtering dimension, a predictive value-based filtering dimension, and the like.
In an alternative embodiment, as shown in fig. 2, training the task processing model through each training sample, determining a first screening index parameter corresponding to each training sample includes:
In step S201, the task processing model is trained by each training sample, so as to obtain intermediate index parameters corresponding to each training sample.
The intermediate index parameters are used for representing training index data in the model training process.
The intermediate index parameter may include at least one of a parameter based on a gradient index, a parameter based on a loss function index, a parameter based on an entropy function index, and a parameter based on a prediction tag index, for example. The gradient index is used for reflecting the updated amplitude of the model parameters of the training sample; the loss function index is used for representing the difference between the prediction of the model to the training sample and the true value; the entropy function index is used for expressing the classification prediction confidence of the model on the sample; the predictive label index is used to characterize the correct label or the incorrect label that the model predicts for the sample.
In step S203, a target task filtering dimension corresponding to the next training round is determined, where the target task filtering dimension is any one of the at least one task filtering dimension.
In the training process of the task processing model, the task screening dimension can be a single task screening dimension or a mixed task screening dimension.
Optionally, under the condition that the task screening dimension is a single task screening dimension, each training round in the training process adopts the same task screening dimension, and at this time, the target task screening dimension corresponding to the next training round is the task screening dimension corresponding to the current training round, namely, the task screening dimension corresponding to the first screening index parameter.
In an alternative embodiment, in a case where the task filtering dimension is a mixed task filtering dimension, determining the target task filtering dimension corresponding to the next training round includes:
in step S2031, a hybrid screening dimension allocation map is acquired.
The mixed screening dimension distribution diagram characterizes distribution probability corresponding to various task screening dimensions along with the change of training rounds in the model training process.
Optionally, the server obtains the multi-class task screening dimension by clustering the plurality of task screening dimensions. Taking five dimensions of a task screening dimension as a screening dimension based on random screening, a screening dimension based on gradient, a screening dimension gradient based on a loss function, a screening dimension based on an entropy function and a screening dimension based on a predicted value as examples, three types of task screening dimensions are obtained by clustering the five screening dimensions. For example, class a task screening dimensions are { randomly screened screening dimensions }, class B task screening dimensions are { predicted value-based screening dimensions, gradient-based screening dimensions }, class C task screening dimensions are { loss function-based screening dimension gradients, entropy function-based screening dimensions }.
It should be noted that, the dimensions corresponding to the respective task filtering dimensions may include any one of the dimensions included in the task filtering dimensions. For example, for task processing model 1, its class C task filtering dimension may refer to a filtering dimension gradient based on a loss function; for task processing model 2, its class C task filtering dimension may refer to an entropy function based filtering dimension.
In practical application, after various task screening dimensions corresponding to the task processing model are determined, screening distribution functions corresponding to the various task screening dimensions can be determined; and then, based on the determined screening distribution function, constructing a mixed screening dimension distribution diagram under the same coordinate system so as to extract the mixed screening dimension distribution diagram for subsequent operation when the server needs. The mixed screening dimension distribution diagram characterizes distribution probability corresponding to various task screening dimensions along with the change of training rounds in the model training process.
Exemplary, the screening distribution function corresponding to each task screening dimension may be a Gaussian function, the variance sigma of each Gaussian function 2 The mean values mu are the same and different. For example, six combinations { g210, g201, g120, g102, g012, g021} are provided for respective average values μ corresponding to the class a task screening dimension (g 0) and the class B task screening dimension (g 1) and the class C task screening dimension (g 2), and the higher the average value μ corresponding to each of the task screening dimensions in the combinations is. For example, the combination g210 illustrates that the average μ corresponding to the class C task filter dimension g2, the class B task filter dimension g1, and the class A task filter dimension g0 gradually increases. Experimental results show that among these combinations, the task processing model generated based on the combination g012 has the highest prediction accuracy (up to 95.41). Preferably, in the mixed screening dimension distribution diagram, a class A task screening dimension g0, The average value mu corresponding to the B-class task screening dimension g1 and the C-class task screening dimension g2 is gradually increased.
In step S2033, based on the mixed screening dimension distribution diagram and the current model training stage to which the current training round belongs, distribution ratios corresponding to the task screening dimensions of each type in the current model training stage are determined, and task screening dimension distribution data is determined based on the distribution ratios.
The task screening dimension distribution data represent preset task screening dimensions corresponding to each training round in the current model training stage.
Optionally, determining a current model training stage to which the current training round belongs, determining an allocation proportion corresponding to each type of task screening dimension in the model training stage based on the mixed screening dimension allocation map and the current model training stage, determining task screening dimension allocation data based on the determined allocation proportion, and determining a preset task screening dimension corresponding to each training round through the task screening dimension allocation data.
If the training process of the task processing model is divided into three training phases, and the training moments corresponding to the three training phases are respectively increased, the training phases are exemplified by a first training phase (e.g., training rounds 1-60), a second training phase (e.g., training rounds 61-125), and a third training phase (e.g., training rounds 126-200). The distribution ratios corresponding to the task screening dimensions in different model training stages are different, and the sum value between the distribution ratios corresponding to the task screening dimensions in different model training stages is 1.
Optionally, in practical application, in the current model training stage is the first training stage, the distribution proportion of random screening dimensions in various task screening dimensions is highest; the current model training stage is a second training stage, and the distribution proportion of the screening dimension based on the predicted value and the gradient screening dimension in the screening dimensions of various tasks is highest; and in the third training stage which is the current model training stage, the distribution proportion of the screening dimension based on the loss function and the screening dimension based on the entropy function in the screening dimensions of various tasks is highest.
In step S2035, a target task screening dimension corresponding to the next training round is determined based on the task screening dimension allocation data;
optionally, the server searches a preset task screening dimension corresponding to the next training round based on the task screening dimension distribution data, and uses the preset task screening dimension as a target task screening dimension corresponding to the next training round.
In step S205, parameter screening is performed on the intermediate index parameters based on the target task screening dimension, and a first screening index parameter corresponding to each training sample in the current training round is determined.
Optionally, the server determines, from at least one intermediate index parameter, a first screening index parameter corresponding to each training sample matched with the target task screening dimension, that is, only the first screening index parameter corresponding to the target task screening dimension needs to be determined.
According to the embodiment, the model training convergence is quickened by dynamically determining the target task screening dimension, so that the determined first screening index simulates the updating of the model weight of the full-quantity data to the greatest extent.
In step S105, in the case where the wheel training set is the training set corresponding to the non-first-round training, the second screening index parameters of the other training samples in the full-scale training set except the wheel training set are acquired.
The second screening index parameter characterizes importance degrees of other training samples in at least one task screening dimension in corresponding historical training rounds respectively.
Optionally, in the case that the server determines that the training set of the current round is the training set corresponding to the non-initial round of training, in addition to acquiring the first screening index parameter, the server needs to acquire a second screening index parameter of other training samples in the full-scale training set except the current round of training, where the second screening index parameter is a screening index parameter of other training samples in a historical training round and is the same as a task screening dimension of the first screening index parameter.
Optionally, the second screening indicator parameter is the same as the task screening dimension of the first screening indicator parameter. For example, if it is determined that the first screening index parameter of the current training round is a screening index parameter based on a gradient screening dimension, the second screening index parameter is also a screening index parameter based on a gradient screening dimension, and each other training sample may be obtained respectively, where, in each historical training round before the current training round, the closest gradient screening dimension calculated in one historical training round in the current training round is used as the second screening index parameter of the other training sample.
It should be noted that, if each historical training round is traversed, there is no corresponding second screening index parameter of some other training sample (for example, training sample m), the current task processing model may be invoked to process the training sample m in real time, so as to obtain a second screening index parameter corresponding to the training sample m; or the initial index parameter corresponding to the training sample m may be obtained, and the initial index parameter is used as the second screening index parameter corresponding to the training sample m.
In step S107, determining a target sample screening amount of the full-scale training set in the next training round, performing sample screening on the full-scale training set based on the first screening index parameter, the second screening index parameter and the target sample screening amount, to obtain a screened training set, and replacing each training sample in the training data buffer with the screened training set.
Alternatively, the target sample screening amount refers to the number of screening training samples screened from the full training set in the next training round. The target sample screening amount may be determined based on a fixed screening rate and the total number of samples of the full training set. The fixed screening rate is set in advance prior to model training.
In an alternative embodiment, the determining the target sample screening amount of the full training set in the next training round includes: the method comprises the steps that a fixed screening rate can be obtained firstly, if the current sample screening mode is determined to be a static sample screening mode, the preset fixed screening rate can be used as the screening rate corresponding to each training round, namely, the same number of training samples are screened by each training round, the screening rate of the training samples screened by each training round is the fixed screening rate, and the screening rate of the next training round is also the fixed screening rate; then, the product of the screening rate of the next training round and the total number of samples in the full-scale training set is used as the target sample screening amount of the full-scale training set in the next training round.
In another alternative embodiment, the determining the target sample screening amount of the full training set in the next training round includes:
obtaining a fixed screening rate;
determining a preset screening rate corresponding to each training round based on the fixed screening rate and the maximum rated screening rate; the preset screening rate decreases as the number of training rounds increases;
and determining the target sample screening amount of the full-quantity training set in the next training round based on the preset screening rate corresponding to each training round and the total number of samples of the full-quantity training set.
Wherein the fixed screening rate may be a previously defined screening rate. The maximum rated screening rate refers to the maximum proportion of samples that can be screened from the full training set during training, and can be any value from, but not limited to, 100% -90%. The maximum rated screening rate is typically 100%, i.e., at most, all samples in the full training set can be screened out.
Optionally, a fixed screening rate may be obtained first, and if it is determined that the current sample screening mode is a dynamic sample screening mode, based on the fixed screening rate and the obtained maximum rated screening rate, a preset screening rate corresponding to each training round may be determined according to a preset screening method, so that sample screening amounts of training samples screened by each training round are not completely the same; and then, searching out the preset screening rate of the next training round of the current training round based on the corresponding relation between each training round and the preset screening rate. And determining the target sample screening amount of the full training set based on the product of the preset screening rate of the next training round and the total number of samples of the full training set. The preset screening method may include, but is not limited to, a random number-based screening method, a gradient-based screening method, a hybrid screening method, and the like.
Wherein, the preset screening rate is reduced with the increase of the training times. That is, the number of training rounds is inversely proportional to the preset screening rate corresponding to the training rounds. For example only, if the preset screening rate of the nth training round may be 60%, the preset screening rate of the n+3 training round may be lower than the preset screening rate of the nth training round, for example, may be 52%.
According to the embodiment, the preset screening rate and the target sample screening amount of the full-quantity training set under different training rounds are dynamically determined through the fixed screening rate and the maximum rated screening rate, the preset screening rate is reduced along with the increase of the training rounds, the cost of the dynamic sample screening process on computer resources can be continuously reduced, the updating of the model weight of the full-quantity data is simulated to the greatest extent, and the model training convergence is further accelerated.
In an optional embodiment, the determining the preset screening rate corresponding to each training round based on the fixed screening rate and the maximum rated screening rate includes:
when the fixed screening rate is less than or equal to half of the maximum rated screening rate, determining a first screening rate corresponding to each training round based on the total training round and the maximum rated screening rate; based on the first screening rate and the fixed screening rate, obtaining a preset screening rate corresponding to each training round;
And when the fixed screening rate is greater than half of the maximum rated screening rate, determining a second screening rate corresponding to each training round based on the total training round, the maximum rated screening rate and the fixed screening rate, and taking the second screening rate as a preset screening rate corresponding to each training round.
Illustratively, taking N as the total training rounds (epochs) required by the task processing model, r as the fixed screening rate and the maximum rated screening rate being 100%, the server may first obtain the fixed screening rate r, and determine the size of half of the obtained fixed screening rate and the maximum rated screening rate (e.g., 100%).
And if the judging result is that the fixed screening rate is less than or equal to half of the maximum rated screening rate, determining the first screening rate corresponding to each training round based on the total training round N and the maximum rated screening rate. For example, the set R of N values is obtained from the maximum rated screening rate (100%) to the minimum screening rate (1%), and the screening rates corresponding to the N sets R are respectively obtained from the large to small equally divided values, and are used as the first screening rate corresponding to each training round. And then, obtaining the preset screening rate corresponding to each training round based on the first screening rate and the fixed screening rate. For example, for the ith training round, the preset screening rate is rj×2×r, where rj is the first screening rate corresponding to the ith training round, and so on, the preset screening rate corresponding to the ith training round can be obtained, and the preset screening rate corresponding to each training round is calculated.
If the fixed screening rate is greater than half of the maximum rated screening rate, determining that the minimum rated screening rate is r min =2×r-1, followed by a transition from the maximum nominal screening rate (100%) to the minimum screening rate (r min ) And equally dividing from large to small to obtain N sets of numerical values P of the total training rounds, and taking the screening rates corresponding to the N sets P as first screening rates corresponding to the training rounds. For example, for the jth training round, the corresponding preset screening rate is P [ j ]]And similarly, calculating to obtain the preset screening rate corresponding to each training round.
According to the embodiment, the fixed screening rate is compared with the half of the maximum rated screening rate, different screening logics are determined according to the comparison result to execute dynamic sample screening, the preset screening rate corresponding to each training round is determined, the determined preset screening rate is reduced along with the increase of the number of training rounds, and therefore the total sample size used based on the dynamic sample screening mode is equal to the total sample size used based on the static sample screening mode in the whole training process, the additional cost of the sample screening process in the dynamic sample screening mode on computer resources is reduced, the memory calculation bottleneck is avoided, the model can be trained better through dynamic sample screening, and the training effect of the model is improved.
Optionally, the performing sample screening on the full-scale training set based on the first screening index parameter, the second screening index parameter and the target sample screening amount to obtain a screened training set may include: the server may randomly sample the full-scale training set based on the first screening index parameter, the second screening index parameter, and the target sample screening amount to obtain a screened training set. The random sampling is to randomly shuffle the sequence of all samples, select the training samples with target sample screening amount as proxy data, and obtain the screened training set to participate in the next training of the model.
In an alternative embodiment, as shown in fig. 3, the sample screening is performed on the full training set based on the first screening index parameter, the second screening index parameter and the target sample screening amount to obtain a screened training set, which includes:
in step S301, under the condition that the first screening index parameter indicates a candidate screening dimension, normalizing the first screening index parameter and the second screening index parameter to obtain normalized screening weights corresponding to each training sample in the full training set;
in step S303, sample screening is performed on the full-scale training set based on the target sample screening amount and the normalized screening weight, so as to obtain a screened training set, where the number of training samples in the screened training set is the target sample screening amount.
The candidate screening dimension is used for representing the screening dimension of the model training index. Alternatively, the candidate screening dimension refers to other screening dimensions besides a predictor-based screening dimension and a random screening dimension, for example, the candidate screening dimension may be a gradient-based screening dimension, a loss function-based screening dimension gradient, and an entropy function-based screening dimension.
Specifically, for the screening dimension based on the gradient, the server can calculate the counter-transmission gradient norm of each training sample in the full-scale training set to the final loss function in the current model training, normalize the gradient norm and then use the normalized screening weight as the corresponding normalized screening weight of each training sample, use the normalized screening weight as the corresponding sampling weight of each training sample, and based on the sampling weight, sample screening is performed on the full-scale training set in a non-replacement mode, and the training sample corresponding to the screening amount of the target sample is screened and used as the screened training set.
For the screening dimension based on the loss function, the server can calculate the entropy function of each training sample in the full-scale training set under the current model state, normalize the entropy value of each entropy value to be used as normalized screening weight corresponding to each training sample, take the normalized screening weight as sampling weight corresponding to each training sample, screen the full-scale training set in a non-replacement mode based on the sampling weight, and screen the training sample corresponding to the screening amount of the target sample to be used as the screened training set.
For the screening dimension based on the entropy function, the server can calculate the entropy function of each training sample in the full-scale training set under the current model state, normalize the respective entropy value to be used as normalized screening weight corresponding to each training sample, take the normalized screening weight as sampling weight corresponding to each training sample, screen the full-scale training set in a non-replacement mode based on the sampling weight, and screen the training sample corresponding to the screening amount of the target sample to be used as the screened training set.
In the above embodiment, under the condition that the first screening index parameter indicates the candidate screening dimension, the first screening index parameter and the second screening index parameter are normalized to obtain the normalized screening weight corresponding to each training sample in the full-scale training set, and the target sample screening amount is combined to perform sample screening on the full-scale training set, so as to obtain the screened training set. Sample screening is carried out through normalization of screening weights, and sample screening efficiency is improved.
In another alternative embodiment, as shown in fig. 4, sample screening is performed on the full-scale training set based on the first screening index parameter, the second screening index parameter and the target sample screening amount, to obtain a screened training set, including:
In step S401, when the first screening indicator parameter indicates a screening dimension based on the predicted value, the predicted state value of the corresponding training sample is numerically adjusted based on the prediction accuracy probability of the predicted value corresponding to the first screening indicator parameter, so as to obtain an adjusted first screening indicator parameter.
In an alternative embodiment, based on the prediction accuracy probability of the predicted value corresponding to the first screening indicator parameter, performing numerical adjustment on the predicted state value of the corresponding training sample to obtain an adjusted first screening indicator parameter, including:
in step S4011, if the prediction accuracy probability of the predicted value corresponding to the first screening index parameter exists for indicating that the prediction is correct, performing numerical reduction adjustment on the predicted state value of the training sample corresponding to the prediction is correct based on the preset adjustment amplitude, so as to obtain a first type of adjustment index parameter;
in step S4013, if the prediction accuracy probability of the predicted value corresponding to the first screening index parameter is used for indicating the prediction error, performing a numerical value increasing adjustment on the predicted state value of the training sample corresponding to the prediction error based on the preset adjustment amplitude, so as to obtain a second type adjustment index parameter;
in step S4015, an adjusted first screening indicator parameter is determined based on the first type of adjustment indicator parameter or the second type of adjustment indicator parameter.
The prediction state value is an accumulated quantity used for representing an accumulated prediction correct result or an accumulated prediction incorrect result of the model in the history training process. The larger the value of the predicted state value of a certain training sample, the higher the cumulative amount reflecting the prediction error of the training sample, the smaller the value of the predicted state value of a certain training sample, and the higher the cumulative amount reflecting the prediction error of the training sample. The preset adjustment range may be preconfigured, and the value thereof may be a positive integer.
Alternatively, taking the preset adjustment amplitude of 1 as an example, the state value s is predicted i The method can be a Boolean variable, is more sensitive to noise interference and has larger randomness, and the corresponding numerical adjustment strategy is expressed as follows:
Figure BDA0003948498920000161
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure BDA0003948498920000162
is the true value, y i Is a predicted value, none represents the current trainingThe round does not output a predicted value, i.e. the training sample does not participate in the current training round, "= =" represents the same, "+|! = "means different; the initial value of the predictive state value for each training sample may be set to 0.
In the data adjustment process, if the predicted state value of the training sample before participating in the present round of training is s i Under the current training round, if the training sample is predicted to be correct (i.e
Figure BDA0003948498920000163
) Then s i Adding 1, updating the predicted state value of the training sample to s i -1, i.e. obtaining the first type of adjustment index parameter of the training sample as s i -1; if the training sample is predicted to be wrong (i.e +.>
Figure BDA0003948498920000164
) Then s i Subtracting 1, updating the predicted state value of the training sample to s i +1, i.e. the second type of adjustment index parameter of the training sample is s i +1; if the training sample does not participate in the present round of training (i.e
Figure BDA0003948498920000165
) Then the s i The value may remain unchanged, the predicted state value of the training sample remains, and so on. After the predicted state value of each training sample participating in the current training round is adjusted, summarizing is carried out based on the first type of adjustment index parameters or the corresponding second type of adjustment index parameters respectively corresponding to each training sample participating in the current training round, so as to obtain a screening index parameter sequence corresponding to each training sample in the current training round, and the screening index parameter sequence is used as the adjusted first screening index parameter corresponding to the current training round.
According to the embodiment, whether the prediction accuracy probability of the predicted value corresponding to the first screening index parameter is used for indicating the prediction is correct or the prediction is incorrect is determined, the predicted state value of the corresponding training sample is subjected to value reduction adjustment or value increase adjustment, the adjusted predicted state value is determined to be the adjusted first screening index parameter, the sample screening of the next training round is performed through the adjusted first screening index parameter, more samples with training value of the model are screened out, training convergence of the model is accelerated, and the model effect of the trained model is improved.
In step S403, sample screening is performed on the full-scale training set based on the target sample screening amount and the adjusted numerical values of the first screening index parameter and the second screening index parameter, so as to obtain a screened training set, where the number of training samples in the screened training set is the target sample screening amount.
Optionally, after calculating the adjusted first screening index parameter corresponding to each training sample in the current training set round, that is, the predicted state value s of each training sample in the current training set round i And then, acquiring second screening index parameters of other residual training samples in the full training set, namely, the predicted state values of the other residual training samples, normalizing the second screening index parameters to be used as normalized screening weights corresponding to all training samples in the full training set, taking the normalized screening weights as sampling weights corresponding to all training samples, and screening the training samples with the target sample screening quantity according to the sequence from large to small based on the sampling weights to be used as a screened training set.
According to the embodiment, under the condition that the first screening index parameter indicates the screening dimension based on the predicted value, the predicted value of the corresponding training sample is subjected to numerical adjustment based on the prediction accuracy probability of the predicted value corresponding to the first screening index parameter, the adjusted first screening index parameter is obtained, the target sample screening amount and the second screening index parameter are combined, the whole training set is subjected to sample screening, the contribution degree of the training samples in the screened training set to training is higher, and model training convergence can be accelerated.
In step S109, the filtered training set is used as a current training set, and each training sample in the training data buffer area is returned to be loaded to the task processing model for the media resource until the model training end condition is reached, so as to generate a target task processing model.
Optionally, the server takes the filtered training set as the training set of the current wheel, returns and executes each training sample in the training data buffer area to the task processing model aiming at the media resource, and repeatedly executes the steps S103-109 until reaching the model training ending condition of the task processing model, and generates the target task processing model. The model training ending condition may include, but is not limited to, the number of times the model training reaches a rated number, the model accuracy reaches a preset value, the loss function is minimized, etc.
In an alternative embodiment, the training tasks corresponding to the task processing model include a search task for the network structure of the media resource processing model and/or an optimization task for the network structure super-parameters. By way of example, the media asset processing model may be an image processing model, an audio recognition model, a text recognition model, a video processing model, and the like. The search task of the network structure refers to a NAS task, and the optimization task of the network structure superparameter refers to an HPO task.
In the above embodiment, in each training round of the task processing model, the screening index parameter of each training sample is determined, and whether each training sample is dynamically activated is determined according to the screening amount of the target sample, so as to participate in the model training process of the next training round, each training sample is activated or deactivated in a dynamic screening manner, the task processing model of each training round is trained through the screened training set, each training sample is ensured to participate in model training, and the model is trained without using full training data in the whole process, so that the model training calculation amount is reduced, the cost and dependence on computer resources are reduced, and the calculation efficiency is improved. Meanwhile, the performance of the model can be considered while training samples of each training round are reduced.
The following describes a method for generating a task processing model provided in the present disclosure in a specific embodiment. The present disclosure may be applied to an end-to-end data screening framework by which automated machine learning (AutoML) and data screening tasks may be co-optimized, as shown in fig. 5, the overall implementation steps include:
1) Initializing a model, and if the offline core set is required to be used for screening, taking the result as an initial importance index of data, and loading the screened sample into a first-round training data buffer area; otherwise, loading all samples into a data buffer area to prepare for participating in training;
2) The importance index to be adopted is selected, and the importance index can be obtained by selecting an independent index according to a specific task or according to a multi-index mixed sampling mode;
3) Loading samples to be trained from a data buffer area and participating in model training, and recording and updating the importance index result selected in the step 2) aiming at each training sample;
4) The specific data screening rate required by the next round of training process is obtained through data screening, and samples to be trained of the next round are obtained in a sampling mode, so that a proxy data set is formed and used as a screened training set;
5) Returning to the step 2), training iteration round number +1.
The method and the device jointly optimize the data screening and the AutoML task, and achieve the purpose of agent data screening by determining whether the training samples participate in model training in a dynamic activation mode, so that acceleration of the AutoML task is completed. In addition, by comparing several screening indicators for determining the data importance measure with the screening indicators of the hybrid measure, they can be flexibly inserted as alternative interfaces into the data screening framework corresponding to the generation method of the task processing model. Meanwhile, a large number of test results show that the method disclosed by the invention only adopts training data with the data proportion of 10% to execute the super-parameter search task or the network structure search task, so that not only can good super-parameters and network architecture be quickly searched, but also the performance of a task processing model obtained by searching is ensured, namely, the performance degradation caused by the reduction of the training data can be furthest reduced by utilizing the method disclosed by the invention.
The method of the above embodiments, in which the specific manner of each step has been described in detail in the foregoing embodiments of the method, will not be described in detail herein.
FIG. 6 is a block diagram of a generating device of a task processing model, according to an example embodiment. Referring to fig. 6, the apparatus includes:
a first obtaining module 610, configured to obtain an on-wheel training set based on a full training set, and load each training sample in the on-wheel training set into a training data buffer; each training sample in the full training set is sample data corresponding to the media resource;
a training processing module 620, configured to perform loading each training sample in the training data buffer into a task processing model for a media resource, perform training processing on the task processing model through each training sample in the training set of the current training round, and determine a first screening index parameter corresponding to each training sample in the current training round; the first screening index parameter represents the importance degree of each training sample in at least one task screening dimension in the current training round;
a second obtaining module 630, configured to obtain second screening index parameters of other training samples in the full training set except the current round training set when the current round training set is a training set corresponding to a non-first round training set; the second screening index parameter characterizes the importance degree of the other training samples in the at least one task screening dimension in the corresponding historical training rounds respectively;
A screening processing module 640 configured to determine a target sample screening amount of the full-scale training set in a next training round, perform sample screening on the full-scale training set based on the first screening index parameter, the second screening index parameter and the target sample screening amount, obtain a screened training set, and replace each training sample in the training data buffer with the screened training set;
and the iteration module is configured to take the filtered training set as a current training set, and return to execute and load each training sample in the training data buffer zone to a task processing model aiming at the media resource until a model training ending condition is reached, so as to generate a target task processing model.
In an alternative implementation, the training processing module includes:
the training processing sub-module is configured to execute training processing on the task processing model through each training sample to obtain intermediate index parameters corresponding to each training sample; the intermediate index parameters are used for representing training index data in the model training process;
a dimension determination submodule configured to perform determination of a target task screening dimension corresponding to a next training round, the target task screening dimension being any one of at least one of the task screening dimensions;
And the parameter determination submodule is configured to perform parameter screening on the intermediate index parameters based on the target task screening dimension and determine a first screening index parameter corresponding to each training sample in the current training round.
In an alternative implementation, the dimension determination submodule is specifically configured to perform:
acquiring a mixed screening dimension distribution diagram, wherein the mixed screening dimension distribution diagram represents distribution probability corresponding to the change of various task screening dimensions along with training rounds in the model training process;
determining the distribution proportion corresponding to each type of task screening dimension in the current model training stage based on the mixed screening dimension distribution diagram and the current model training stage to which the current training round belongs, and determining task screening dimension distribution data based on the distribution proportion; the task screening dimension distribution data represents preset task screening dimensions corresponding to each training round in the current model training stage;
determining a target task screening dimension corresponding to the next training round based on the task screening dimension distribution data;
the distribution ratios corresponding to the task screening dimensions in different model training stages are different, and the sum value between the distribution ratios corresponding to the task screening dimensions in different model training stages is 1.
In an alternative implementation, the screening processing module includes:
a screening rate acquisition sub-module configured to perform acquisition of a fixed screening rate;
a first screening processing sub-module configured to perform determining a preset screening rate corresponding to each training round based on the fixed screening rate and a maximum rated screening rate; the preset screening rate decreases as the number of training rounds increases;
and the second screening processing sub-module is configured to execute the determination of the target sample screening amount of the full training set in the next training round based on the preset screening rate corresponding to each training round and the total number of samples of the full training set.
In an alternative implementation, the first screening process sub-module is specifically configured to perform:
when the fixed screening rate is less than or equal to half of the maximum rated screening rate, determining a first screening rate corresponding to each training round based on the total training round and the maximum rated screening rate; based on the first screening rate and the fixed screening rate, obtaining a preset screening rate corresponding to each training round;
and when the fixed screening rate is greater than half of the maximum rated screening rate, determining a second screening rate corresponding to each training round based on the total training round, the maximum rated screening rate and the fixed screening rate, and taking the second screening rate as a preset screening rate corresponding to each training round.
In an alternative implementation, the screening processing module is further configured to perform:
under the condition that the screening dimension type of the first screening index parameter indicates a candidate screening dimension, carrying out normalization processing on the first screening index parameter and the second screening index parameter to obtain normalization screening weights corresponding to all training samples in the full training set; the candidate screening dimension is used for representing the screening dimension of the model training index;
and carrying out sample screening on the full-scale training set based on the target sample screening amount and the normalized screening weight to obtain a screened training set, wherein the number of training samples in the screened training set is the target sample screening amount.
In an alternative implementation, the screening processing module is further configured to perform:
under the condition that the screening dimension type of the first screening index parameter indicates the screening dimension based on the predicted value, carrying out numerical adjustment on the predicted state value of the corresponding training sample based on the prediction accuracy probability of the predicted value corresponding to the first screening index parameter to obtain an adjusted first screening index parameter;
and carrying out sample screening on the full-scale training set based on the target sample screening amount, the numerical value of the adjusted first screening index parameter and the second screening index parameter to obtain a screened training set, wherein the number of training samples in the screened training set is the target sample screening amount.
In an optional implementation method, the performing numerical adjustment on the predicted value of the corresponding training sample based on the prediction accuracy probability of the predicted value corresponding to the first screening index parameter to obtain an adjusted first screening index parameter includes:
if the prediction accuracy probability of the predicted value corresponding to the first screening index parameter is used for indicating that the prediction is correct, carrying out numerical reduction adjustment on the predicted state value of the training sample corresponding to the prediction is correct based on a preset adjustment amplitude, and obtaining a first type of adjustment index parameter; if the prediction accuracy probability of the predicted value corresponding to the first screening index parameter is used for indicating prediction errors, carrying out numerical value increasing adjustment on the predicted state value of the training sample corresponding to the prediction errors based on a preset adjustment amplitude to obtain a second type of adjustment index parameter;
and determining the adjusted first screening index parameter based on the first type adjustment index parameter or the second type adjustment index parameter.
In an alternative implementation method, the training tasks corresponding to the task processing model include a search task for a network structure of the media resource processing model and/or an optimization task for network structure superparameter.
Fig. 7 is a block diagram of an electronic device, according to an example embodiment. Referring to fig. 7, the electronic device includes a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the steps of the method for generating a task processing model in any of the above embodiments when executing instructions stored on the memory.
The electronic device may be a terminal, a server, or a similar computing device, for example, the electronic device is a server, fig. 7 is a block diagram illustrating an electronic device for determining recommended content or recommending, the electronic device 1000 may be relatively different due to configuration or performance, and may include one or more central processing units (Central Processing Units, CPU) 1010 (the processor 1010 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA), a memory 1030 for storing data, one or more storage media 1020 (e.g., one or more mass storage devices) for storing application 1023 or data 1022. Wherein the memory 1030 and storage medium 1020 can be transitory or persistent storage. The program stored on the storage medium 1020 may include one or more modules, each of which may include a series of instruction operations in the electronic device. Still further, the central processor 1010 may be configured to communicate with a storage medium 1020 and execute a series of instruction operations in the storage medium 1020 on the electronic device 1000.
The electronic device 1000 can also include one or more power supplies 1060, one or more wired or wireless network interfaces 1050, one or more input/output interfaces 1040, and/or one or more operating systems 1021, such as Windows Server, mac OS X, unix, linux, freeBSD, and the like.
Input-output interface 1040 may be used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the electronic device 1000. In one example, input-output interface 1040 includes a network adapter (Network Interface Controller, NIC) that may be connected to other network devices via base stations to communicate with the internet. In an exemplary embodiment, the input/output interface 1040 may be a Radio Frequency (RF) module for communicating with the internet wirelessly.
It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 7 is merely illustrative and is not intended to limit the configuration of the electronic device described above. For example, electronic device 1000 may also include more or fewer components than shown in FIG. 7 or have a different configuration than shown in FIG. 7.
In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory, that includes instructions executable by a processor of the electronic device 1000 to perform the above-described method. Alternatively, the computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
In an exemplary embodiment, a computer storage medium is also provided, which when executed by a processor of an electronic device, enables the electronic device to perform the method provided in any one of the implementations described above.
In an exemplary embodiment, a computer program product is also provided, comprising a computer program/instruction which, when executed by a processor, implements the method provided in any of the above-mentioned implementations. Optionally, the computer program is stored in a computer readable storage medium. The processor of the electronic device reads the computer program from the computer-readable storage medium, and the processor executes the computer program so that the electronic device performs the method provided in any one of the above embodiments.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (12)

1. A method for generating a task processing model, comprising:
acquiring an on-wheel training set based on the full training set, and loading each training sample in the on-wheel training set into a training data buffer area; each training sample in the full training set is sample data corresponding to the media resource;
loading each training sample in the training data buffer area to a task processing model aiming at media resources, performing training processing on the task processing model through each training sample in the training set of the current training round, and determining a first screening index parameter corresponding to each training sample in the current training round; the first screening index parameter represents the importance degree of each training sample in at least one task screening dimension in the current training round;
Under the condition that the current training set is a training set corresponding to non-initial training, acquiring second screening index parameters of other training samples except the current training set in the full training set; the second screening index parameter characterizes the importance degree of the other training samples in the at least one task screening dimension in the corresponding historical training rounds respectively; determining a target sample screening amount of the full-scale training set in the next training round, performing sample screening on the full-scale training set based on the first screening index, the second screening index parameter and the target sample screening amount to obtain a screened training set, and replacing each training sample in the training data buffer area with the screened training set;
and taking the screened training set as a training set of the current wheel, and returning to execute and load each training sample in the training data buffer zone to a task processing model aiming at the media resource until reaching the model training ending condition, so as to generate a target task processing model.
2. The method according to claim 1, wherein said training the task processing model by each of the training samples in the training set of the current training set, and determining a first screening index parameter corresponding to each of the training samples in the current training set, includes:
Training the task processing model through each training sample in the training set of the current wheel to obtain intermediate index parameters corresponding to each training sample; the intermediate index parameters are used for representing training index data in the model training process;
determining a target task screening dimension corresponding to the next training round, wherein the target task screening dimension is any one of at least one task screening dimension;
and carrying out parameter screening on the intermediate index parameters based on the target task screening dimension, and determining a first screening index parameter corresponding to each training sample in the current training round.
3. The method of claim 2, wherein determining the target task screening dimension for the next training round comprises:
acquiring a mixed screening dimension distribution diagram, wherein the mixed screening dimension distribution diagram represents distribution probability corresponding to the change of various task screening dimensions along with training rounds in the model training process;
determining the distribution proportion corresponding to each type of task screening dimension in the current model training stage based on the mixed screening dimension distribution diagram and the current model training stage to which the current training round belongs, and determining task screening dimension distribution data based on the distribution proportion; the task screening dimension distribution data represents preset task screening dimensions corresponding to each training round in the current model training stage;
Determining a target task screening dimension corresponding to the next training round based on the task screening dimension distribution data;
the distribution ratios corresponding to the task screening dimensions in different model training stages are different, and the sum value between the distribution ratios corresponding to the task screening dimensions in different model training stages is 1.
4. The method of claim 1, wherein said determining a target sample screening amount for the full training set in a next training round comprises:
obtaining a fixed screening rate;
determining a preset screening rate corresponding to each training round based on the fixed screening rate and the maximum rated screening rate; the preset screening rate is reduced along with the increase of the training times;
and determining the target sample screening amount of the full-capacity training set in the next training round based on the preset screening rate corresponding to each training round and the total number of samples of the full-capacity training set.
5. The method of claim 4, wherein determining a preset screening rate for each training round based on the fixed screening rate and a maximum rated screening rate comprises:
when the fixed screening rate is less than or equal to half of the maximum rated screening rate, determining a first screening rate corresponding to each training round based on the total training round and the maximum rated screening rate; based on the first screening rate and the fixed screening rate, obtaining a preset screening rate corresponding to each training round;
And when the fixed screening rate is greater than half of the maximum rated screening rate, determining a second screening rate corresponding to each training round based on the total training round, the maximum rated screening rate and the fixed screening rate, and taking the second screening rate as a preset screening rate corresponding to each training round.
6. The method according to any one of claims 1-5, wherein the performing sample screening on the full-scale training set based on the first screening index parameter, the second screening index parameter, and the target sample screening amount to obtain a screened training set includes:
under the condition that the screening dimension type of the first screening index parameter indicates a candidate screening dimension, carrying out normalization processing on the first screening index parameter and the second screening index parameter to obtain normalization screening weights corresponding to all training samples in the full training set; the candidate screening dimension is used for representing the screening dimension of the model training index;
and carrying out sample screening on the full-scale training set based on the target sample screening amount and the normalized screening weight to obtain a screened training set, wherein the number of training samples in the screened training set is the target sample screening amount.
7. The method according to any one of claims 1-5, wherein the performing sample screening on the full-scale training set based on the first screening index parameter, the second screening index parameter, and the target sample screening amount to obtain a screened training set includes:
under the condition that the screening dimension type of the first screening index parameter indicates the screening dimension based on the predicted value, carrying out numerical adjustment on the predicted state value of the corresponding training sample based on the prediction accuracy probability of the predicted value corresponding to the first screening index parameter to obtain an adjusted first screening index parameter;
and carrying out sample screening on the full-scale training set based on the target sample screening amount, the numerical value of the adjusted first screening index parameter and the second screening index parameter to obtain a screened training set, wherein the number of training samples in the screened training set is the target sample screening amount.
8. The method of claim 7, wherein the performing numerical adjustment on the predicted state value of the corresponding training sample based on the prediction accuracy probability of the predicted value corresponding to the first screening indicator parameter to obtain the adjusted first screening indicator parameter includes:
If the prediction accuracy probability of the predicted value corresponding to the first screening index parameter is used for indicating that the prediction is correct, carrying out numerical reduction adjustment on the predicted state value of the training sample corresponding to the prediction is correct based on a preset adjustment amplitude, and obtaining a first type of adjustment index parameter;
if the prediction accuracy probability of the predicted value corresponding to the first screening index parameter is used for indicating prediction errors, carrying out numerical value increasing adjustment on the predicted state value of the training sample corresponding to the prediction errors based on a preset adjustment amplitude to obtain a second type of adjustment index parameter;
and determining the adjusted first screening index parameter based on the first type adjustment index parameter or the second type adjustment index parameter.
9. The method according to any of claims 1-5, wherein the training tasks corresponding to the task processing model comprise a search task for a network structure of the media resource processing model and/or an optimization task for network structure superparameters.
10. A task processing model generation device, comprising:
the first acquisition module is configured to acquire an on-wheel training set based on the full training set, and load each training sample in the on-wheel training set into a training data buffer; each training sample in the full training set is sample data corresponding to the media resource;
The training processing module is configured to execute loading each training sample in the training data buffer area to a task processing model aiming at a media resource, perform training processing on the task processing model through each training sample in the training set of the current training round, and determine a first screening index parameter corresponding to each training sample in the current training round; the first screening index parameter represents the importance degree of each training sample in at least one task screening dimension in the current training round;
the second acquisition module is configured to acquire second screening index parameters of other training samples except the current round training set in the full-quantity training set under the condition that the current round training set is a training set corresponding to non-initial round training; the second screening index parameter characterizes the importance degree of the other training samples in the at least one task screening dimension in the corresponding historical training rounds respectively;
a screening processing module configured to determine a target sample screening amount of the full-scale training set in a next training round, perform sample screening on the full-scale training set based on the first screening index parameter, the second screening index parameter and the target sample screening amount, obtain a screened training set, and replace each training sample in the training data buffer with the screened training set;
And the iteration module is configured to take the filtered training set as a current training set, and return to execute and load each training sample in the training data buffer zone to a task processing model aiming at the media resource until a model training ending condition is reached, so as to generate a target task processing model.
11. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of generating a task processing model according to any one of claims 1 to 9.
12. A computer readable storage medium, characterized in that instructions in the computer readable storage medium, when executed by a processor of an electronic device, cause the electronic device to perform the method of generating a task processing model according to any of claims 1 to 9.
CN202211441422.3A 2022-11-17 2022-11-17 Method, device, equipment and storage medium for generating task processing model Pending CN116225636A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211441422.3A CN116225636A (en) 2022-11-17 2022-11-17 Method, device, equipment and storage medium for generating task processing model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211441422.3A CN116225636A (en) 2022-11-17 2022-11-17 Method, device, equipment and storage medium for generating task processing model

Publications (1)

Publication Number Publication Date
CN116225636A true CN116225636A (en) 2023-06-06

Family

ID=86581223

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211441422.3A Pending CN116225636A (en) 2022-11-17 2022-11-17 Method, device, equipment and storage medium for generating task processing model

Country Status (1)

Country Link
CN (1) CN116225636A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117909371A (en) * 2024-03-18 2024-04-19 之江实验室 Model training method and device, storage medium and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117909371A (en) * 2024-03-18 2024-04-19 之江实验室 Model training method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
AU2021232839B2 (en) Updating Attribute Data Structures to Indicate Trends in Attribute Data Provided to Automated Modelling Systems
US20210049512A1 (en) Explainers for machine learning classifiers
CN108804641B (en) Text similarity calculation method, device, equipment and storage medium
US20240185130A1 (en) Normalizing text attributes for machine learning models
US10878335B1 (en) Scalable text analysis using probabilistic data structures
CN110163252B (en) Data classification method and device, electronic equipment and storage medium
CN114332984B (en) Training data processing method, device and storage medium
CN114418035A (en) Decision tree model generation method and data recommendation method based on decision tree model
CN114609994B (en) Fault diagnosis method and device based on multi-granularity regularized rebalancing increment learning
CN116225636A (en) Method, device, equipment and storage medium for generating task processing model
CN112884569A (en) Credit assessment model training method, device and equipment
CN113919510A (en) Sample feature selection method, device, equipment and medium
CN111325255B (en) Specific crowd delineating method and device, electronic equipment and storage medium
CN111783883A (en) Abnormal data detection method and device
CN112579422A (en) Scheme testing method and device, server and storage medium
CN108830302B (en) Image classification method, training method, classification prediction method and related device
CN111078972B (en) Questioning behavior data acquisition method, questioning behavior data acquisition device and server
CN112819232A (en) People flow characteristic prediction method and device based on card punching data
CN111708884A (en) Text classification method and device and electronic equipment
CN118036756B (en) Method, device, computer equipment and storage medium for large model multi-round dialogue
CN117194275B (en) Automatic software automatic test plan generation method and system based on intelligent algorithm
CN116128482A (en) Operation maintenance method and device for electric power metering equipment, terminal and storage medium
CN114265720A (en) Method, electronic device and computer program product for selecting backup destination
CN117540206A (en) Label prediction method, device, equipment and storage medium
CN118013188A (en) Method, device, equipment and storage medium for processing noise data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination