Model determination method, task execution method and storage medium

By iteratively updating the current model based on the structure controller and the previous model in the neural network architecture search technology, the output jump problem caused by discontinuous changes in the model structure is solved, and a smoother and more stable model structure search process is achieved, and the matching between the model and the task is improved.

CN120031093APending Publication Date: 2025-05-23BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311579045.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-23
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

In the existing neural network architecture search technology, discontinuous changes in model structure lead to rapid jump in model output, resulting in low matching between the target task model and the current task.

Method used

By obtaining the training data set of the current task, determining the current model based on the structure controller, and iteratively updates the current model based on the previous model on the training data set to obtain the task model. At the same time, the structure controller is iteratively updated based on the model accuracy of the task model until the preset iteration conditions are met.

Benefits of technology

This slows down the jump problem in model structure search, makes the search process more stable, improves the matching degree between the model structure and the current task, and searches for a model structure that is more suitable for the current task.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120031093A_ABST
    Figure CN120031093A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a model determination method, a task execution method and a storage medium, and relates to the technical field of computers, the method comprises the following steps: obtaining a training data set corresponding to a current task; a current model is determined based on the structure controller, the current model is iteratively updated on the training data set based on the previous model, a task model is obtained, the structure controller is deployed on a control server, and the current model is deployed on an evaluation server; after determining the model precision of the task model on the training data set, performing iterative updating on the structure controller on the training data set based on the model precision of the task model to obtain an updated structure controller; and returning to execute the step of determining the current model based on the structure controller until a preset iteration condition is met, and determining the task model determined before the preset iteration condition is met as a target task model corresponding to the current task. And the jump problem occurring in the model structure search is relieved, so that the target task model which is more adaptive to the current task is more stably determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a model determination method, a task execution method, and a storage medium. Background Art

[0002] In recent years, the research on artificial intelligence has shown a rapid development trend, and its development is closely related to deep learning technology. In deep learning technology, the quality of the model structure (i.e., the structure of the neural network) has a very important impact on the effect of the final model. At present, the model structure is designed manually. Manual design of the model structure requires the designer to have very rich experience and needs to search for various combinations. Since many network parameters will produce explosive combinations, the design difficulty is very high.

[0003] Therefore, in recent years, Neural Architecture Search (NAS) has become a research hotspot. It uses algorithms to automatically search for the best model structure instead of tedious manual operations. The existing NAS has the problem of low search efficiency. NAS based on parameter sharing strategy can solve the problem of low search efficiency.

[0004] In the process of implementing the present invention, the inventors found that there are at least the following technical problems in the prior art:

[0005] Since the changes in the model structure are not continuous, when the model structure changes during the model structure search process, the model output will jump rapidly, resulting in a low match between the determined target task model and the current task. Summary of the invention

[0006] The present invention provides a model determination method, a task execution method and a storage medium to alleviate the jump problem in the model structure search, make the search process more stable, and further determine the model structure that is more suitable for the current task.

[0007] In a first aspect, an embodiment of the present invention provides a model determination method, comprising:

[0008] Get the training data set corresponding to the current task;

[0009] Determine a current model based on a structure controller, and iteratively update the current model based on a previous model on the training data set to obtain a task model, wherein the structure controller is deployed on a control server and the current model is deployed on an evaluation server;

[0010] After determining the model accuracy of the task model on the training data set, iteratively updating the structure controller based on the model accuracy of the task model on the training data set to obtain an updated structure controller;

[0011] Return to execute the current model determined based on the structure controller until the preset iteration condition is met, and determine the task model determined before the preset iteration condition is met as the target task model corresponding to the current task.

[0012] In a second aspect, an embodiment of the present invention further provides a task execution method, including:

[0013] Get the execution data of the current task;

[0014] The execution data is input into a pre-trained target task model corresponding to the current task, so that the target task model determines the execution result of the current task according to the execution data, wherein the target task model corresponding to the current task is determined by any model determination method described in the first aspect.

[0015] In a third aspect, an embodiment of the present invention further provides a model determination device, including:

[0016] The training data acquisition module is used to obtain the training data set corresponding to the current task;

[0017] A first updating module is used to determine a current model based on a structure controller, and iteratively update the current model based on a previous model on the training data set to obtain a task model, wherein the structure controller is deployed on a control server, and the current model is deployed on an evaluation server;

[0018] A second updating module is used for iteratively updating the structure controller based on the model accuracy of the task model on the training data set after determining the model accuracy of the task model on the training data set to obtain an updated structure controller;

[0019] The determination module is used to return to the execution to determine the current model based on the structure controller until the preset iteration condition is met, and determine the task model determined before the preset iteration condition is met as the target task model corresponding to the current task.

[0020] In a fourth aspect, an embodiment of the present invention further provides a task execution device, including:

[0021] An execution data acquisition module is used to obtain the execution data of the current task;

[0022] An execution module is used to input the execution data into a pre-trained target task model corresponding to the current task, so that the target task model determines the execution result of the current task according to the execution data, wherein the target task model corresponding to the current task is determined by any model determination method described in the first aspect.

[0023] In the fifth aspect, an embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the model determination method described in any one of the first aspects or the task execution method described in any one of the second aspects is implemented.

[0024] In a sixth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute any of the model determination methods described in the first aspect or any of the task execution methods described in the second aspect.

[0025] The embodiments of the above invention have the following advantages or beneficial effects:

[0026] An embodiment of the present invention provides a model determination method, which includes: obtaining a training data set corresponding to a current task; determining a current model based on a structure controller, and iteratively updating the current model based on a previous model on the training data set to obtain a task model, wherein the structure controller is deployed on a control server and the current model is deployed on an evaluation server; after determining the model accuracy of the task model on the training data set, iteratively updating the structure controller based on the model accuracy of the task model on the training data set to obtain an updated structure controller; returning to execute determination of the current model based on the structure controller until a preset iteration condition is met, and determining the task model determined before the preset iteration condition is met as the target task model corresponding to the current task. In the above technical solution, the server can first obtain the training data set corresponding to the current task. After determining the current model based on the structure controller deployed on the control server, the server can constrain the update of the current model parameters based on the training data set based on the previous model deployed on the evaluation server to obtain the task model. The constraint of the previous model on the update of the current model parameters makes the difference between the output value of the task model and the output value of the previous model smaller, which reduces the jump problem in the model structure search and makes the model structure search process smoother and more stable. In addition, the smooth and stable model structure search process is conducive to searching for a model structure that is more suitable for the current task. Secondly, the model accuracy of the task model can be determined, and it can also The structure controller is updated based on the model accuracy of the task model on the training data set to update the model structure search algorithm of the structure controller, so that the structure controller can determine the model structure that is more suitable for the current task, and then return to execute the current model determined based on the structure controller, and use the updated structure controller determined above as the structure controller to re-determine the current model. In the cyclic process of determining the current model based on the structure controller, updating the structure controller based on the model accuracy of the task model obtained by updating the current model parameters, and using the updated structure controller as the structure controller to determine the current model again, the target task model corresponding to the current task is determined, and the target task model is more suitable for the current task. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 An overall flow chart of the model determination method provided for the prior art;

[0028] Figure 2 A directed acyclic graph provided for the prior art;

[0029] Figure 3 A flow chart of a model determination method provided by an embodiment of the present invention;

[0030] Figure 4 A flowchart of another model determination method provided by an embodiment of the present invention;

[0031] Figure 5 An overall flow chart of another model determination method provided by an embodiment of the present invention;

[0032] Figure 6 A flowchart of a task execution method provided by an embodiment of the present invention;

[0033] Figure 7 A schematic diagram of the structure of a model determination device provided by an embodiment of the present invention;

[0034] Figure 8 A schematic diagram of the structure of a task execution device provided by an embodiment of the present invention;

[0035] Fig. 9 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0036] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0037] It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe various operations (or steps) as sequential processes, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of various operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to methods, functions, procedures, subroutines, subprograms, etc. In addition, the embodiments in the present invention and the features in the embodiments can be combined with each other without conflict.

[0038] Neural network structure search requires a structure controller to generate alternative models. The working mode of the structure controller is: α~p(α;θ), where α represents the alternative model, p represents the structure controller, specifically indicating the probability of each alternative model being generated, and θ is the parameter of the structure controller.

[0039] For different structural controllers, the form of parameterization p(α; θ) is also different. For example, a recurrent neural network LSTM can be used as the structural controller and solved using the reinforcement learning method, or the structural controller parameter θ can be embedded into the network to obtain a differentiable structural controller, and then directly solved using the gradient descent method.

[0040] Given a task, the goal of neural network structure search is to find a model to maximize the prediction accuracy of the model. Therefore, the model structure search problem can be written as follows:

[0041]

[0042]

[0043] in, It represents the training loss on the training set when the parameter of model α is w, and W* is the optimal model parameter of the model. After obtaining the optimal parameter W*, the performance of model α can be evaluated using the validation set. Design performance indicators for the model, such as prediction accuracy.

[0044] Figure 1 The overall flow chart of the model determination method provided by the prior art, such as Figure 1 As shown in the figure, in order to guide the search process and provide supervision signals for the training of the structure controller, the performance of the searched model structure needs to be evaluated. The simplest way to evaluate the model structure is to use the training data to train the candidate model to convergence and then evaluate its performance on the validation set. This corresponds to the internal optimization problem in the constraint term of the above formula. However, since the entire search process requires exploring tens of thousands of candidate models, training them from scratch to convergence each time will bring huge computational overhead. The huge computational consumption has greatly hindered the research of neural network structure search methods and their application in industrial production. Therefore, a new performance evaluation method for neural network structure search has recently emerged: parameter sharing strategy. The parameter sharing strategy first maintains a super model containing all possible connection topological structures and available operator types to form a directed acyclic graph (DAG), and each candidate model is a submodel of the super model. The operator can be a convolution, skip layer, pooling operation, etc. In the process of model structure search, if different models select the same operator, the parameters in the operator are shared.

[0045] Figure 2 A directed acyclic graph provided by the prior art, such as Figure 2 As shown, it includes 6 nodes representing operators, the operators are used to process the data input into the model, and the connecting lines represent the flow path of the data. Figure 2The dotted line in the middle indicates the direction of data transmission in the alternative model, where data is input into the alternative model from node 1 and output from node 6. The structural controller can determine the alternative model through the nodes obtained by sampling and the connections between the nodes. The parameters of the operators corresponding to these nodes are shared for any model. That is, any alternative model uses node i, and the operator corresponding to node i uses the same parameters to process the data passed to node j. Of course, the parameters of the operators corresponding to each node will also be updated as the parameter optimization proceeds during the model structure search process. In this way, the evaluation of the alternative model only requires one forward calculation on the validation set, avoiding the complex optimization of the constraint terms in the loss function. The parameter sharing strategy greatly accelerates the search process, and a search can be completed in one day using only a few GPUs.

[0046] Currently, parameter sharing technology has become an indispensable part of NAS. Since the changes in the model structure itself are not continuous, when the model structure changes during the model structure search process, the model output will jump rapidly. Since the current parameters of the operator in parameter sharing are optimized by the previous candidate model containing the operator, the output jump of the model will be amplified by parameter sharing, which will lead to a low match between the determined target task model and the current task.

[0047] In response to the above problems, this application proposes a model determination method, which controls the update of the current model based on the previous model, reduces the jump of model output caused by changes in model structure, and determines a model structure that better matches the current task.

[0048] The model determination method proposed in this application will be described in detail below with reference to diagrams and embodiments.

[0049] Figure 3 The flowchart of a model determination method provided by an embodiment of the present invention is applicable to situations where a model structure needs to be determined quickly. The method can be executed by a model determination device, which can be implemented by software and / or hardware. Figure 3 The method specifically comprises the following steps:

[0050] Step 310: Obtain a training data set corresponding to the current task.

[0051] Among them, the current task can be understood as data processing tasks such as image classification, target detection, data tracking, sentiment analysis, and self-supervised pre-training.

[0052] Specifically, the server obtains a training data set corresponding to the current task within a historical time period, and the training data set may include execution data and execution results of the current task within the historical time period.

[0053] In the embodiment of the present invention, a training data set corresponding to the current task is obtained to provide a data basis for determining a target task model corresponding to the current task.

[0054] Step 320: determine the current model based on the structure controller, and iteratively update the current model based on the previous model on the training data set to obtain a task model.

[0055] Among them, the structure controller is deployed on the control server, and the current model is deployed on the evaluation server.

[0056] The structural controller may be a controller operating based on αp(α;θ).

[0057] Specifically, the structure controller can determine the current model through sampling. In order to make the current model more suitable for the current task, the server can update the parameters of the current model on the training data set. Furthermore, in order to reduce the jump in model output caused by changes in model structure, it is necessary to reduce the difference between the output value of the task model obtained by updating the current model and the output value of the previous model. Therefore, the previous model can be used to constrain the update of the current model.

[0058] In addition, the difference in the output value of the model can be reflected by the model distance. Therefore, the current model can be iteratively updated based on a part of the training data in the training data set to obtain the initial task model. At the same time, the model distance between the previous model and the initial task model is determined based on the sampled training data in a part of the training data in the training data set. Since the smaller the model distance, the smaller the difference in the output value of the model, during the update process of the current model, the initial task model corresponding to the minimum model distance when the model converges can be determined as the task model to update the current model parameters. Of course, the model structures of the current model, the initial task model, and the task model are all the same, and only the model parameters are different.

[0059] It should be noted that the server can be a control server deployed with a structural controller, or an evaluation server deployed with the current model. Of course, it can also be a server other than the control server and the evaluation server. The data required in the process of determining the target task model can be transmitted between servers.

[0060] In an embodiment of the present invention, after the current model is determined based on the structure controller, the parameters of the current model are updated based on the training data set and the previous model to obtain the task model. In addition, the difference between the output value of the task model and the output value of the previous model is small, which reduces the jump problem occurring in the model structure search and makes the model structure search process smoother and more stable.

[0061] Step 330: After determining the model accuracy of the task model on the training data set, the structure controller is iteratively updated based on the model accuracy of the task model on the training data set to obtain an updated structure controller.

[0062] In order to improve the adaptability of the model searched by the structure controller to the current task, the structure controller needs to be updated. The evaluation result of the model determined on the training data set corresponding to the current task reflects the adaptability of the model to the current task. Therefore, the structure controller can be updated according to the evaluation result of the model.

[0063] Specifically, the evaluation result of the model can be understood as the accuracy of the model. Therefore, the server can determine the model accuracy of the task model based on another part of the training data in the training data set. The training data used to determine the model accuracy of the task model is different from the training data used to update the current model in the above step. Then, the structure controller can be iteratively updated based on the model accuracy of the task model on the training data set to obtain an updated structure controller. Of course, the model structures of the updated structure controller and the structure controller are consistent, and only the model parameters are different.

[0064] In practical applications, the structural controller can be updated based on reinforcement learning or based on a gradient strategy, which is not specifically limited here.

[0065] In an embodiment of the present invention, the model accuracy of the task model can be determined first, and then the structure controller can be updated according to the model accuracy of the task model to update the model structure search algorithm of the structure controller, so that the structure controller can determine a model structure that is more suitable for the current task.

[0066] Step 340 , returning to execute determining the current model based on the structure controller until a preset iteration condition is met, and determining the task model determined before the preset iteration condition is met as the target task model corresponding to the current task.

[0067] The model structure search algorithm of the updated structure controller can determine the model structure that is more suitable for the current task. Therefore, after obtaining the updated structure controller, it is possible to return to execute the current model based on the structure controller and use the updated structure controller as the structure controller to determine the current model. Of course, the current model determined here is the next model of the previous step, and the current model of the previous step is the previous model here.

[0068] As mentioned above, the current model can be iteratively updated based on the previous model to obtain the task model. After the model accuracy of the task model is determined, the structure controller is iteratively updated based on the model accuracy of the task model to obtain an updated structure controller until the preset iteration condition is met. When it is determined that the preset iteration condition is met, the task model determined before the preset iteration condition is met can be determined as the target task model corresponding to the current task.

[0069] In an embodiment of the present invention, in a cyclic process of determining the current model based on the structure controller, updating the structure controller based on the model accuracy of the task model obtained by updating the current model parameters, and using the updated structure controller as the structure controller to determine the current model again, it is possible to determine a target task model that is more suitable for the current task.

[0070] The model determination method provided by an embodiment of the present invention includes: obtaining a training data set corresponding to a current task; determining a current model based on a structure controller, and iteratively updating the current model based on a previous model on the training data set to obtain a task model, wherein the structure controller is deployed on a control server and the current model is deployed on an evaluation server; after determining the model accuracy of the task model on the training data set, iteratively updating the structure controller based on the model accuracy of the task model on the training data set to obtain an updated structure controller; returning to execute determination of the current model based on the structure controller until a preset iteration condition is met, and determining the task model determined before the preset iteration condition is met as the target task model corresponding to the current task. In the above technical solution, the server can first obtain the training data set corresponding to the current task. After determining the current model based on the structure controller deployed on the control server, the server can constrain the update of the current model parameters based on the training data set based on the previous model deployed on the evaluation server to obtain the task model. The constraint of the previous model on the update of the current model parameters makes the difference between the output value of the task model and the output value of the previous model smaller, which reduces the jump problem in the model structure search and makes the model structure search process smoother and more stable. In addition, the smooth and stable model structure search process is conducive to searching for a model structure that is more suitable for the current task. Secondly, the model accuracy of the task model can be determined, and it can also The structure controller is updated based on the model accuracy of the task model on the training data set to update the model structure search algorithm of the structure controller, so that the structure controller can determine the model structure that is more suitable for the current task, and then return to execute the current model determined based on the structure controller, and use the updated structure controller determined above as the structure controller to re-determine the current model. In the cyclic process of determining the current model based on the structure controller, updating the structure controller based on the model accuracy of the task model obtained by updating the current model parameters, and using the updated structure controller as the structure controller to determine the current model again, the target task model corresponding to the current task is determined, and the target task model is more suitable for the current task.

[0071] Figure 4 This is a flowchart of another model determination method provided by an embodiment of the present invention. The embodiment of the present invention is applicable to the need to quickly determine the model structure. This embodiment is specific based on the above embodiment, and the explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. Figure 4 , the model determination method provided by the embodiment of the present invention includes:

[0072] Step 410: Obtain a training data set corresponding to the current task.

[0073] Specifically, the training data in the training data set are all data of the same distribution. The server obtains the training data set corresponding to the current task in the historical time period. The training data set may include the execution data and execution results of the current task in the historical time period. Since the training data set is required for updating the model structure and determining the model accuracy, after obtaining the training data set corresponding to the current task, the training data set may be divided into a first subset and a second subset. The first subset may be used to update the current model parameters, and the second subset may be used to determine the model accuracy.

[0074] In the embodiment of the present invention, a training data set corresponding to the current task is obtained to provide a data basis for determining a target task model corresponding to the current task.

[0075] Step 420: Determine the current model based on the structure controller.

[0076] Specifically, the server can call the control server to determine the current model α based on the structure controller deployed on the control server. The structure controller p(α; θ) can determine the current model α by sampling t , where α t Represents the current model corresponding to the current time t.

[0077] In the embodiment of the present invention, the current model corresponding to the current moment is determined based on the structure controller.

[0078] Step 430: Iteratively update the current model based on the previous model on the training data set to obtain a task model.

[0079] Among them, the structure controller is deployed on the control server, and the current model is deployed on the evaluation server.

[0080] In one implementation, step 430 may specifically include:

[0081] The current model is iteratively updated based on the first subset of the training data set to obtain an initial task model; the model distance between the previous model and the initial task model is determined based on a preset number of training data in the first subset of the training data; the current model is iteratively updated according to the model distance constraints to obtain the task model.

[0082] Further, determining the model distance between the previous model and the initial task model based on a preset amount of training data in the first subset of the training data includes:

[0083] Based on a preset number of training data in the first subset of the training data, the output value of the previous model and the output value of the initial task model are respectively determined; and the model distance between the previous model and the initial task model is determined according to the mean square error of the output value of the previous model and the output value of the initial task model corresponding to each of the training data.

[0084] Further, the task model is obtained by iteratively updating the current model according to the model distance constraint, including:

[0085] The model distance is optimized, and the initial task model corresponding to the optimized model distance is determined as the task model.

[0086] The server can call the evaluation server to obtain the previous model. Figure 5 The overall flow chart of another model determination method provided by the embodiment of the present invention is as follows: Figure 5 As shown, the previous model f(α t-1 ,w t ) constrains the current model f(α t ,w t ), specifically, the current model can be iteratively updated based on the first subset of the training data set to obtain the initial task model f(α t ,w t +△w), and determine the model distance between the previous model and the initial task model based on the N sampled training data in the first subset of the training data set According to the model distance and the original loss function used when the current model parameters are updated, the target loss function used when the current model parameters are updated can be determined as Among them, λ is a hyperparameter. Since the smaller the model distance, the smaller the difference in the model output value, therefore, in the process of updating the current model, by optimizing the model distance, the difference between the output of the previous model and the initial task model can be controlled, and then the initial task model corresponding to the minimum model distance when the target loss function converges can be determined as the task model to achieve the update of the current model parameters.

[0087] In an embodiment of the present invention, the parameters of the current model are updated based on the first subset of the training data set and the previous model to obtain a task model. In addition, during the parameter updating process, the model distance is used to constrain the difference in output values ​​of the models determined in two adjacent model structure searches, thereby shortening the model distance between the models determined in the two adjacent model structure searches as much as possible, alleviating the jump problem occurring in the model structure search, and making the model structure search process smoother and more stable.

[0088] Step 440: Perform forward calculation on the second subset of the training data set to determine the model accuracy of the task model.

[0089] Specifically, the server can input any training data in the second subset of the training data set as input data into the task model to obtain the predicted output corresponding to the training data. The model accuracy can be determined based on the actual output and predicted output corresponding to the training data. Specifically, the actual output and predicted output corresponding to the training data are substituted into the target loss function to obtain the model accuracy.

[0090] In practical applications, each training data in the second subset of the training data set can also be used as input data to input into the task model to obtain the predicted output corresponding to each training data. The model accuracy can be determined based on the true output and predicted output corresponding to each training data. Specifically, the amount of training data whose true output and predicted output are consistent and the total amount of training data in the second subset are determined, and the ratio of the data amount to the total amount of data is determined as the model accuracy.

[0091] In the embodiment of the present invention, the model accuracy of the task model is determined by performing forward calculation on the second subset of the training data set.

[0092] Step 450: Based on the model accuracy and the preset learning accuracy, the structure controller is updated on the training data set based on the policy gradient method to obtain the updated structure controller.

[0093] Specifically, the server can update the parameters of the structure controller on the training data set based on the preset learning accuracy and the aforementioned determined model accuracy based on the policy gradient method, specifically based on the gradient descent formula Update the parameters of the structure controller deployed on the control server to obtain an updated structure controller. t represents the parameters of the structural controller, θ t+1 Represents the parameters of the updated structure controller, η represents the preset learning accuracy, p(α) represents the structure controller, and R represents the model accuracy.

[0094] In an embodiment of the present invention, based on the model accuracy and preset learning accuracy, the structure controller is updated on the training data set based on the policy gradient method, and the model structure search algorithm of the structure controller is updated to obtain an updated structure controller. The updated structure controller can determine a model structure that is more suitable for the current task.

[0095] Step 460: Determine whether a preset iteration condition is met.

[0096] The preset iteration condition is that the structure controller converges or the number of iterations of the structure controller reaches a preset number.

[0097] Specifically, when the server determines that the structure controller converges or the number of iterations of the structure controller reaches a preset number, it can be determined that the preset iteration condition is met.

[0098] When it is determined that the preset iteration condition is met, step 470 is executed; otherwise, the process returns to step 420.

[0099] Step 470: Determine the task model determined before satisfying the preset iteration condition as the target task model corresponding to the current task.

[0100] Specifically, when it is determined that the preset iteration condition is met, the server may determine the task model determined before the preset iteration condition is met as the target task model corresponding to the current task.

[0101] In an embodiment of the present invention, in a cyclic process of determining the current model based on the structure controller, updating the structure controller based on the model accuracy of the task model obtained by updating the current model parameters, and using the updated structure controller as the structure controller to determine the current model again, it is possible to determine a target task model that is more suitable for the current task.

[0102] The model determination method provided by the embodiment of the present invention includes: obtaining a training data set corresponding to a current task; determining a current model based on a structure controller; iteratively updating the current model based on a previous model on the training data set to obtain a task model, wherein the structure controller is deployed on a control server and the current model is deployed on an evaluation server; performing forward calculation on a second subset of the training data set to determine the model accuracy of the task model; based on the model accuracy and a preset learning accuracy, updating the structure controller on the training data set based on a policy gradient method to obtain the updated structure controller; returning to execute the determination of the current model based on the structure controller until a preset iteration condition is met, and determining the task model determined before the preset iteration condition is met as the target task model corresponding to the current task. In the above technical scheme, the server can first obtain the training data set corresponding to the current task, and divide the training data set into a first subset and a second subset. Secondly, the current model can be determined based on the structure controller deployed on the control server, and the current model parameters can be updated. In the process of updating the current model parameters, the update of the current model parameters is constrained on the first subset of the training data set based on the previous model deployed on the evaluation server to obtain the task model. In the parameter updating process, the model distance is used to constrain the difference in the output values ​​of the models determined in the two adjacent model structure searches, and the model distance between the models determined in the two adjacent model structure searches is shortened as much as possible, which reduces the jump problem in the model structure search and makes the model structure search process smoother and more stable. In addition, the smooth and stable model structure search process is conducive to searching for a model structure that is more suitable for the current task. Again, the model accuracy of the task model can be determined by performing forward calculation on the second subset of the training data set, and it can also Based on the model accuracy and preset learning accuracy, the structure controller is updated on the training data set based on the policy gradient method to update the model structure search algorithm of the structure controller to obtain an updated structure controller. The updated structure controller can determine a model structure that is more suitable for the current task, and then return to execute the current model determined based on the structure controller, and use the updated structure controller determined above as the structure controller to re-determine the current model until the structure controller converges or the number of iterations of the structure controller reaches a preset number. It can be determined that the preset iteration conditions are met, and the task model determined before the preset iteration conditions are met is determined as the target task model corresponding to the current task. In the cyclic process of determining the current model based on the structure controller, updating the structure controller based on the model accuracy of the task model obtained by updating the current model parameters, and using the updated structure controller as the structure controller to determine the current model again, the target task model corresponding to the current task is determined, and the target task model is more suitable for the current task.

[0103] Figure 6The present invention provides a flowchart of a task execution method, which is applicable to situations where the task execution result needs to be accurately determined. The method can be executed by a task execution device, which can be implemented by software and / or hardware. Figure 6 The method specifically comprises the following steps:

[0104] Step 610: Obtain execution data of the current task.

[0105] Among them, the current task can be data processing tasks such as image classification, target detection, data tracking, sentiment analysis, and self-supervised pre-training.

[0106] Specifically, the execution data of the current task can be obtained.

[0107] Step 620: Input the execution data into a pre-trained target task model corresponding to the current task, so that the target task model determines the execution result of the current task according to the execution data.

[0108] Among them, the target task model corresponding to the current task is determined by the model determination method described in any of the aforementioned embodiments.

[0109] The target task model is determined by the model determination method described in any of the aforementioned embodiments and is obtained by training with a training data set corresponding to the current task in a historical time period.

[0110] Specifically, the execution data may be input as input data into the target task model, and the target task model may process the execution data to obtain an execution result corresponding to the execution data.

[0111] The task execution method provided by the embodiment of the present invention includes: obtaining the execution data of the current task; inputting the execution data into a pre-trained target task model corresponding to the current task, so that the target task model determines the execution result of the current task according to the execution data, wherein the target task model corresponding to the current task is determined by the model determination method described in any of the aforementioned embodiments. In the above technical scheme, after obtaining the execution data of the current task, the execution data can be input into a pre-trained target task model corresponding to the current task, and the target task model can process the execution data to obtain the execution result corresponding to the execution data, thereby determining the task execution result.

[0112] Figure 7 The schematic diagram of the structure of a model determination device provided by an embodiment of the present invention. The device and the model determination method of the above embodiments belong to the same inventive concept, and the details not described in detail in the embodiment of the model determination device can refer to the embodiment of the above model determination method.

[0113] The model determines the specific structure of the device such as Figure 7 As shown, including:

[0114] The training data acquisition module 710 is used to acquire the training data set corresponding to the current task;

[0115] A first updating module 720 is used to determine a current model based on a structure controller, and iteratively update the current model based on a previous model on the training data set to obtain a task model, wherein the structure controller is deployed on a control server and the current model is deployed on an evaluation server;

[0116] A second updating module 730 is used for iteratively updating the structure controller based on the model accuracy of the task model on the training data set after determining the model accuracy of the task model on the training data set to obtain an updated structure controller;

[0117] The determination module 740 is used to return to the execution of determining the current model based on the structure controller until a preset iteration condition is met, and determine the task model determined before the preset iteration condition is met as the target task model corresponding to the current task.

[0118] Based on the above embodiment, the first updating module 720 is specifically used for:

[0119] The current model is iteratively updated based on the first subset of the training data set to obtain an initial task model; the model distance between the previous model and the initial task model is determined based on a preset number of training data in the first subset of the training data; the current model is iteratively updated according to the model distance constraints to obtain the task model.

[0120] In one embodiment, determining the model distance between the previous model and the initial task model based on a preset amount of training data in the first subset of the training data includes:

[0121] Based on a preset number of training data in the first subset of the training data, the output value of the previous model and the output value of the initial task model are respectively determined; and the model distance between the previous model and the initial task model is determined according to the mean square error of the output value of the previous model and the output value of the initial task model corresponding to each of the training data.

[0122] In one implementation, the task model is obtained by iteratively updating the current model according to the model distance constraint, including:

[0123] The model distance is optimized, and the initial task model corresponding to the optimized model distance is determined as the task model.

[0124] Based on the above embodiment, the second updating module 730 is specifically used for:

[0125] Forward calculation is performed on the second subset of the training data set to determine the model accuracy of the task model; based on the model accuracy and the preset learning accuracy, the structure controller is updated on the training data set based on the policy gradient method to obtain the updated structure controller.

[0126] Optionally, the preset iteration condition is that the structure controller converges or the number of iterations of the structure controller reaches a preset number.

[0127] The model determination device provided in the embodiment of the present invention can execute the model determination method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the model determination method.

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

[0129] Figure 8 This is a schematic diagram of the structure of a task execution device provided by an embodiment of the present invention. The device and the task execution methods of the above embodiments belong to the same inventive concept, and the details not described in detail in the embodiment of the task execution device can refer to the embodiment of the above task execution method.

[0130] The specific structure of the task execution device is as follows: Figure 8 As shown, including:

[0131] An execution data acquisition module 810 is used to acquire the execution data of the current task;

[0132] The execution module 820 is used to input the execution data into a pre-trained target task model corresponding to the current task, so that the target task model determines the execution result of the current task according to the execution data, wherein the target task model corresponding to the current task is determined by the model determination method described in any of the aforementioned embodiments.

[0133] The task execution device provided in the embodiment of the present invention can execute the task execution method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the task execution method.

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

[0135] Fig. 9 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Fig. 9 A block diagram of an exemplary computer device 9 suitable for use in implementing embodiments of the present invention is shown. Fig. 9 The computer device 9 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0136] like Fig. 9 As shown, the computer device 9 is in the form of a general-purpose computing electronic device. The components of the computer device 9 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).

[0137] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0138] The computer device 9 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 9, including volatile and non-volatile media, removable and non-removable media.

[0139] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer device 9 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Fig. 9 not shown, usually called a "hard drive"). Although Fig. 9Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0140] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0141] The computer device 9 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the computer device 9, and / or any device that enables the computer device 9 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 22. Furthermore, the computer device 9 may also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN) and / or public network, such as the Internet) through a network adapter 20. Fig. 9 As shown, the network adapter 20 communicates with other modules of the computer device 9 via the bus 18. It should be understood that although Fig. 9 Not shown, other hardware and / or software modules may be used in conjunction with computer device 9, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0142] The processing unit 16 executes various functional applications and page displays by running programs stored in the system memory 28, such as implementing the model determination method and task execution method provided in the embodiments of the present invention.

[0143] Among them, the model determination method includes: obtaining a training data set corresponding to the current task; determining the current model based on the structure controller, and iteratively updating the current model based on the previous model on the training data set to obtain a task model, wherein the structure controller is deployed on a control server and the current model is deployed on an evaluation server; after determining the model accuracy of the task model on the training data set, iteratively updating the structure controller based on the model accuracy of the task model on the training data set to obtain an updated structure controller; returning to execute the determination of the current model based on the structure controller until a preset iteration condition is met, and determining the task model determined before the preset iteration condition is met as the target task model corresponding to the current task.

[0144] The task execution method includes: obtaining the execution data of the current task; inputting the execution data into a pre-trained target task model corresponding to the current task, so that the target task model determines the execution result of the current task according to the execution data, wherein the target task model corresponding to the current task is determined by a model determination method.

[0145] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the model determination method provided by any embodiment of the present invention.

[0146] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, for example, the model determination method and task execution method provided in the embodiment of the present invention are implemented.

[0147] Among them, the model determination method includes: obtaining a training data set corresponding to the current task; determining the current model based on the structure controller, and iteratively updating the current model based on the previous model on the training data set to obtain a task model, wherein the structure controller is deployed on a control server and the current model is deployed on an evaluation server; after determining the model accuracy of the task model on the training data set, iteratively updating the structure controller based on the model accuracy of the task model on the training data set to obtain an updated structure controller; returning to execute the determination of the current model based on the structure controller until a preset iteration condition is met, and determining the task model determined before the preset iteration condition is met as the target task model corresponding to the current task.

[0148] The task execution method includes: obtaining the execution data of the current task; inputting the execution data into a pre-trained target task model corresponding to the current task, so that the target task model determines the execution result of the current task according to the execution data, wherein the target task model corresponding to the current task is determined by a model determination method.

[0149] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0150] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0151] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

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

[0153] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0154] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A model determination method, It is characterized in that include: Get the training data set corresponding to the current task; Determine a current model based on a structure controller, and iteratively update the current model based on a previous model on the training data set to obtain a task model, wherein the structure controller is deployed on a control server and the current model is deployed on an evaluation server; After determining the model accuracy of the task model on the training data set, iteratively updating the structure controller based on the model accuracy of the task model on the training data set to obtain an updated structure controller; Return to execute the current model determined based on the structure controller until the preset iteration condition is met, and determine the task model determined before the preset iteration condition is met as the target task model corresponding to the current task.

2. The model determination method according to claim 1, It is characterized in that Iteratively updating the current model based on the previous model on the training data set to obtain a task model, including: Iteratively updating the current model based on the first subset of the training data set to obtain an initial task model; Determining a model distance between the previous model and the initial task model based on a preset number of training data in the first subset of the training data; The task model is obtained by iteratively updating the current model according to the model distance constraints.

3. The model determination method according to claim 2, It is characterized in that Determining a model distance between the previous model and the initial task model based on a preset amount of training data in the first subset of the training data includes: Determine the output value of the previous model and the output value of the initial task model respectively based on a preset number of training data in the first subset of the training data; The model distance between the previous model and the initial task model is determined according to the mean square error of the output value of the previous model and the output value of the initial task model corresponding to each of the training data.

4. The model determination method according to claim 2, It is characterized in that Iteratively updating the current model according to the model distance constraint to obtain the task model includes: The model distance is optimized, and the initial task model corresponding to the optimized model distance is determined as the task model.

5. The model determination method according to claim 1, It is characterized in that Determining the model accuracy of the task model on the training data set includes: Performing forward computation on a second subset of the training data set to determine the model accuracy of the task model.

6. The model determination method according to claim 1, It is characterized in that Iteratively updating the structure controller based on the model accuracy of the task model on the training data set to obtain an updated structure controller, comprising: Based on the model accuracy and the preset learning accuracy, the structure controller is updated on the training data set based on the policy gradient method to obtain the updated structure controller.

7. The model determination method according to claim 1, It is characterized in that The preset iteration condition is that the structure controller converges or the number of iterations of the structure controller reaches a preset number.

8. A task execution method, It is characterized in that include: Get the execution data of the current task; The execution data is input into a pre-trained target task model corresponding to the current task, so that the target task model determines the execution result of the current task according to the execution data, wherein the target task model corresponding to the current task is determined by the model determination method described in any one of claims 1-7.

9. A model determination device, It is characterized in that include: The training data acquisition module is used to obtain the training data set corresponding to the current task; A first updating module is used to determine a current model based on a structure controller, and iteratively update the current model based on a previous model on the training data set to obtain a task model, wherein the structure controller is deployed on a control server, and the current model is deployed on an evaluation server; A second updating module is used for iteratively updating the structure controller based on the model accuracy of the task model on the training data set after determining the model accuracy of the task model on the training data set to obtain an updated structure controller; The determination module is used to return to the execution to determine the current model based on the structure controller until the preset iteration condition is met, and determine the task model determined before the preset iteration condition is met as the target task model corresponding to the current task.

10. A task execution device, It is characterized in that include: An execution data acquisition module is used to obtain the execution data of the current task; An execution module is used to input the execution data into a pre-trained target task model corresponding to the current task, so that the target task model determines the execution result of the current task according to the execution data, wherein the target task model corresponding to the current task is determined by the model determination method described in any one of claims 1-7.

11. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the model determination method according to any one of claims 1 to 7 or claim 8 is implemented.

12. A storage medium containing computer executable instructions, It is characterized in that The computer executable instructions are used to perform the model determination method as claimed in any one of claims 1 to 7 or claim 8 when executed by a computer processor.