CN111931946A - Data processing method and device, computer equipment and storage medium - Google Patents

Data processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111931946A
CN111931946A CN202010813935.7A CN202010813935A CN111931946A CN 111931946 A CN111931946 A CN 111931946A CN 202010813935 A CN202010813935 A CN 202010813935A CN 111931946 A CN111931946 A CN 111931946A
Authority
CN
China
Prior art keywords
value
hyper
parameter
target
data processing
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.)
Granted
Application number
CN202010813935.7A
Other languages
Chinese (zh)
Other versions
CN111931946B (en
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 CN202010813935.7A priority Critical patent/CN111931946B/en
Publication of CN111931946A publication Critical patent/CN111931946A/en
Application granted granted Critical
Publication of CN111931946B publication Critical patent/CN111931946B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Geophysics And Detection Of Objects (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the disclosure can automatically acquire sample data from a database, execute a parameter adjusting step and a model training step, and can use a trained model to execute the data processing step. On the other hand, the initial value, the exploration direction, the step length and the like of the hyper-parameter are explored, the target candidate value is determined in the explored target range and then is used as the initial value to continue exploration, the exploration range of the hyper-parameter is expanded, the process of searching the optimal hyper-parameter exploration direction is accelerated, the situation that the optimal hyper-parameter cannot be found due to improper exploration boundary setting is avoided, the parameter adjusting accuracy and efficiency are improved, and the accuracy and efficiency of overall data processing are improved.

Description

Data processing method and device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a data processing method and apparatus, a computer device, and a storage medium.
Background
With the development of computer technology, more and more scenes of data processing processes adopt data processing models for data processing, the training process of the data processing models is determined by a plurality of hyper-parameters, such as network depth, learning rate, convolution kernel size and the like, better hyper-parameters are configured for the models, and the model training efficiency and the model performance can be effectively improved.
At present, a data processing method generally includes that technicians generally configure hyper-parameters for an initial data processing model, train the model, and manually adjust the hyper-parameters according to training results, and then perform model training to finally obtain better hyper-parameters, train a data processing model, and use the trained data processing model to perform data processing. The method is a manual parameter adjusting mode, and also has some automatic parameter adjusting modes. For example, the Bayesian parameter adjustment method is to artificially set an exploration boundary, that is, to set an exploration range for the hyper-parameter, and then to select the hyper-parameter from the exploration range to perform model training to find the optimal hyper-parameter.
In the manual parameter adjusting mode, a large amount of manpower is consumed, the parameter adjusting efficiency is low, the efficiency of the whole data processing method is low, the manual parameter adjusting depends on the professional experience of technicians, errors may occur, and the accuracy of data processing of the finally obtained data processing model may be low. In the automatic parameter adjusting mode, an exploration boundary needs to be set manually, and when the exploration boundary is set too small, the optimal hyper-parameter may be out of the boundary range, so that the optimal hyper-parameter cannot be found; when the exploration boundary is set too large, the number of times of trying to select parameters may be large, and the time consumed for parameter adjustment may be large, so that the data processing efficiency is low, and the accuracy is low.
Disclosure of Invention
The present disclosure provides a data processing method, apparatus, computer device, and storage medium, which can improve the efficiency and accuracy of data processing. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a data processing method, including:
responding to a parameter adjusting instruction, and acquiring a plurality of sample data of a target scene indicated by the parameter adjusting instruction from a database;
acquiring an exploration value of the hyper-parameter according to the initial value, the exploration direction and the step length of the hyper-parameter;
determining a target range of the hyper-parameter according to a training result of the initial data processing model configured with the exploration value by the plurality of sample data;
determining a candidate value of the hyper-parameter from the target range to configure the initial data processing model for training until a target candidate value of the hyper-parameter is obtained based on the target range and the historical value information of the hyper-parameter;
taking the target candidate value as an initial value of the hyperparameter, and continuing to execute the steps of searching value acquisition, target range determination and target candidate value determination until a first target condition is met, so as to obtain a target value of the hyperparameter and a data processing model obtained by training an initial data processing model configured with the target value;
and responding to a data processing instruction, and processing the target data of the target scene according to the data processing model.
Optionally, the obtaining an exploration value of the hyper-parameter according to an initial value, an exploration direction, and a step size of the hyper-parameter, and determining a target range of the hyper-parameter according to a training result of the initial data processing model configured with the exploration value by the plurality of sample data includes:
acquiring different exploration values of the hyper-parameters according to the initial values of the hyper-parameters, different exploration directions and step lengths;
training the initial data processing model configured with the different exploration values based on the plurality of sample data to obtain a target function value corresponding to each exploration value;
taking the exploration direction corresponding to the exploration value with the objective function value meeting the condition as the target exploration direction of the hyper-parameter;
and determining the target range of the hyper-parameter based on the initial value of the hyper-parameter, the target exploration direction and the step length.
Optionally, the hyper-parameters comprise multi-dimensional hyper-parameters;
the step of obtaining different search values of the hyper-parameter according to the initial value of the hyper-parameter, different search directions and step lengths, and determining the target range of the hyper-parameter according to the training result of the initial data processing model configured with the search values by the plurality of sample data comprises the following steps:
for a first dimensional hyper-parameter in the multi-dimensional hyper-parameters, acquiring different exploration values of the first dimensional hyper-parameter according to an initial value of the first dimensional hyper-parameter, different exploration directions and step lengths;
training a first initial data processing model based on a plurality of sample data to obtain an objective function value corresponding to each exploration value, wherein the value of a first dimensional hyper-parameter in hyper-parameters configured by the first initial data processing model is an exploration value different from the first dimensional hyper-parameter, and the values of other dimensional hyper-parameters are initial values;
taking the exploration direction corresponding to the exploration value with the objective function value meeting the condition as the target exploration direction of the first dimensional hyper-parameter;
determining a target range of the first dimensional hyper-parameter based on the initial value of the first dimensional hyper-parameter, the target exploration direction and the step length;
and continuing to execute the exploration value acquisition and model training steps on other dimensional hyper-parameters in the multi-dimensional hyper-parameters until the multi-dimensional hyper-parameters all acquire target ranges, and acquiring the target ranges of the multi-dimensional hyper-parameters.
Optionally, the step of taking the target candidate value as the initial value of the hyperparameter and continuing to perform the search value acquisition, the target range determination, and the target candidate value determination includes:
adjusting the step length according to the step length attenuation coefficient;
and continuing to execute the exploration value acquisition step, the target range determination step and the target candidate value determination step based on the adjusted step length.
Optionally, the determining, based on the target range and the historical value information of the hyper-parameter, a candidate value of the hyper-parameter from the target range to configure the initial data processing model for training until a target candidate value of the hyper-parameter is obtained includes:
acquiring a corresponding relation between the value of the hyper-parameter and the value of the objective function based on the target range and the historical value information of the hyper-parameter;
determining a candidate value of the hyperparameter from the target range according to the corresponding relation;
training an initial data processing model configured with the candidate values of the hyperparameters based on the plurality of sample data to obtain target function values corresponding to the candidate values;
updating the corresponding relation between the value of the hyper-parameter and the value of the objective function according to the value of the objective function;
and continuing to execute the steps of determining the candidate value and training the model based on the updated corresponding relation until a second target condition is met, and obtaining the target candidate value of the hyperparameter.
Optionally, the training process for training the initial data processing model includes:
randomly selecting a plurality of sample data from the plurality of sample data, inputting the plurality of sample data into the initial data processing model, classifying randomly selected features in a plurality of sample features in the plurality of sample data by the initial data processing model, and outputting a prediction result corresponding to the plurality of sample data;
determining a target function value of each sample data according to the prediction results corresponding to the plurality of sample data and the corresponding target results;
and adjusting the model parameters of the initial data processing model according to the value of the objective function until the model parameters meet a third objective condition.
Optionally, the step of obtaining the explored value of the hyper-parameter and determining the target range is performed by a first device, the step of determining the candidate value of the hyper-parameter and determining the target candidate value are performed by a second device, and the first device and the second device communicate with each other through a hyper text transfer protocol HTTP or a secure hyper text transfer protocol HTTPs.
Optionally, the step of obtaining the exploratory value of the hyperparameter and determining the target range is performed by a first thread, and the step of determining the candidate value of the hyperparameter and determining the target candidate value are performed by a second thread, and data is communicated between the first thread and the second thread through communication.
According to a second aspect of the embodiments of the present disclosure, there is provided a data processing apparatus including:
the obtaining unit is configured to execute responding to a parameter adjusting instruction, and obtain a plurality of sample data of a target scene indicated by the parameter adjusting instruction from a database;
the acquisition unit is further configured to acquire an exploration value of the hyper-parameter according to an initial value, an exploration direction and a step length of the hyper-parameter;
a first determining unit configured to perform a training result of an initial data processing model configured with the exploration value according to the plurality of sample data, and determine a target range of the hyper-parameter;
the second determining unit is configured to execute determination of candidate values of the hyper-parameters from the target range based on the target range and historical value information of the hyper-parameters so as to configure the initial data processing model for training until target candidate values of the hyper-parameters are obtained;
the acquiring unit, the first determining unit and the second determining unit are further configured to perform the steps of acquiring the search value, determining a target range and determining a target candidate value, with the target candidate value as an initial value of the hyper-parameter, until a first target condition is met, obtaining a target value of the hyper-parameter, and training an initial data processing model configured with the target value to obtain a data processing model;
a processing unit configured to perform processing of target data of the target scene according to the data processing model in response to a data processing instruction.
Optionally, the obtaining unit is configured to obtain different exploration values of the hyper-parameter according to an initial value of the hyper-parameter, different exploration directions and step lengths;
the first determination unit is configured to perform:
training the initial data processing model configured with the different exploration values based on the plurality of sample data to obtain a target function value corresponding to each exploration value;
taking the exploration direction corresponding to the exploration value with the objective function value meeting the condition as the target exploration direction of the hyper-parameter;
and determining the target range of the hyper-parameter based on the initial value of the hyper-parameter, the target exploration direction and the step length.
Optionally, the hyper-parameters comprise multi-dimensional hyper-parameters;
the acquisition unit is configured to acquire different exploration values of a first-dimension hyper-parameter in the multi-dimension hyper-parameters according to an initial value of the first-dimension hyper-parameter, different exploration directions and step lengths;
the first determination unit is configured to perform:
training a first initial data processing model based on a plurality of sample data to obtain an objective function value corresponding to each exploration value, wherein the value of a first dimensional hyper-parameter in hyper-parameters configured by the first initial data processing model is an exploration value different from the first dimensional hyper-parameter, and the values of other dimensional hyper-parameters are initial values;
taking the exploration direction corresponding to the exploration value with the objective function value meeting the condition as the target exploration direction of the first dimensional hyper-parameter;
determining a target range of the first dimensional hyper-parameter based on the initial value of the first dimensional hyper-parameter, the target exploration direction and the step length;
the acquiring unit and the first determining unit are respectively configured to execute the search value acquiring and model training steps for other dimensional hyper-parameters in the multi-dimensional hyper-parameters continuously until the multi-dimensional hyper-parameters all acquire a target range, and obtain the target range of the multi-dimensional hyper-parameters.
Optionally, the apparatus further comprises:
an adjusting unit configured to perform adjustment of the step size according to a step size attenuation coefficient;
the acquiring unit and the first determining unit are further configured to execute the step of acquiring the search value, and the step of determining the target range and the target candidate value, respectively, based on the adjusted step size.
Optionally, the second determining unit is configured to perform:
acquiring a corresponding relation between the value of the hyper-parameter and the value of the objective function based on the target range and the historical value information of the hyper-parameter;
determining a candidate value of the hyperparameter from the target range according to the corresponding relation;
training an initial data processing model configured with the candidate values of the hyperparameters based on the plurality of sample data to obtain target function values corresponding to the candidate values;
updating the corresponding relation between the value of the hyper-parameter and the value of the objective function according to the value of the objective function;
and continuing to execute the steps of determining the candidate value and training the model based on the updated corresponding relation until a second target condition is met, and obtaining the target candidate value of the hyperparameter.
Optionally, the training process for training the initial data processing model includes:
randomly selecting a plurality of sample data from the plurality of sample data, inputting the plurality of sample data into the initial data processing model, classifying randomly selected features in a plurality of sample features in the plurality of sample data by the initial data processing model, and outputting a prediction result corresponding to the plurality of sample data;
determining a target function value of each sample data according to the prediction results corresponding to the plurality of sample data and the corresponding target results;
and adjusting the model parameters of the initial data processing model according to the value of the objective function until the model parameters meet a third objective condition.
Optionally, the step of obtaining the explored value of the hyper-parameter and determining the target range is performed by a first device, the step of determining the candidate value of the hyper-parameter and determining the target candidate value are performed by a second device, and the first device and the second device communicate with each other through a hyper text transfer protocol HTTP or a secure hyper text transfer protocol HTTPs.
Optionally, the step of obtaining the exploratory value of the hyperparameter and determining the target range is performed by a first thread, and the step of determining the candidate value of the hyperparameter and determining the target candidate value are performed by a second thread, and data is communicated between the first thread and the second thread through communication.
According to a third aspect of embodiments of the present disclosure, there is provided a computer apparatus comprising:
one or more processors;
volatile or non-volatile memory for storing the one or more processor-executable commands;
wherein the one or more processors are configured to perform the data processing method of the first aspect.
According to a fourth aspect provided by embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, wherein instructions of the storage medium, when executed by a processor of a computer device, enable the computer device to perform the data processing method according to the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product, wherein the instructions of the computer program product, when executed by a processor of a computer device, enable the computer device to perform the data processing method according to the first aspect.
According to a sixth aspect of embodiments of the present disclosure, there is provided a computer device, the computer device comprising: one or more processors, one or more memories, and a communication interface; wherein the one or more processors are configured to store at least one instruction executable by the one or more processors, and the one or more memories are volatile memory or non-volatile memory; the communication interface is used for connecting the computer equipment to a network;
wherein the at least one instruction, when executed by the one or more processors, enables the computer device to perform the steps of:
responding to a parameter adjusting instruction, and acquiring a plurality of sample data of a target scene indicated by the parameter adjusting instruction from a database;
acquiring an exploration value of the hyper-parameter according to the initial value, the exploration direction and the step length of the hyper-parameter;
determining a target range of the hyper-parameter according to a training result of the initial data processing model configured with the exploration value by the plurality of sample data;
determining a candidate value of the hyper-parameter from the target range to configure the initial data processing model for training until a target candidate value of the hyper-parameter is obtained based on the target range and the historical value information of the hyper-parameter;
taking the target candidate value as an initial value of the hyperparameter, and continuing to execute the steps of searching value acquisition, target range determination and target candidate value determination until a first target condition is met, so as to obtain a target value of the hyperparameter and a data processing model obtained by training an initial data processing model configured with the target value;
and responding to a data processing instruction, and processing the target data of the target scene according to the data processing model.
Optionally, the computer device further comprises a communication bus for transferring messages between the processor, the memory and the communication interface.
Optionally, the computer device further comprises a power supply component for supplying power to the respective components of the computer device.
Optionally, the at least one instruction, when executed by the one or more processors, enables the computer device to perform the steps of:
acquiring different exploration values of the hyper-parameters according to the initial values of the hyper-parameters, different exploration directions and step lengths;
training the initial data processing model configured with the different exploration values based on the plurality of sample data to obtain a target function value corresponding to each exploration value;
taking the exploration direction corresponding to the exploration value with the objective function value meeting the condition as the target exploration direction of the hyper-parameter;
and determining the target range of the hyper-parameter based on the initial value of the hyper-parameter, the target exploration direction and the step length.
Optionally, the hyper-parameters comprise multi-dimensional hyper-parameters;
the at least one instruction, when executed by one or more processors, enables the computer device to perform the steps of:
for a first dimensional hyper-parameter in the multi-dimensional hyper-parameters, acquiring different exploration values of the first dimensional hyper-parameter according to an initial value of the first dimensional hyper-parameter, different exploration directions and step lengths;
training a first initial data processing model based on a plurality of sample data to obtain an objective function value corresponding to each exploration value, wherein the value of a first dimensional hyper-parameter in hyper-parameters configured by the first initial data processing model is an exploration value different from the first dimensional hyper-parameter, and the values of other dimensional hyper-parameters are initial values;
taking the exploration direction corresponding to the exploration value with the objective function value meeting the condition as the target exploration direction of the first dimensional hyper-parameter;
determining a target range of the first dimensional hyper-parameter based on the initial value of the first dimensional hyper-parameter, the target exploration direction and the step length;
and continuing to execute the exploration value acquisition and model training steps on other dimensional hyper-parameters in the multi-dimensional hyper-parameters until the multi-dimensional hyper-parameters all acquire target ranges, and acquiring the target ranges of the multi-dimensional hyper-parameters.
Optionally, the at least one instruction, when executed by the one or more processors, enables the computer device to perform the steps of:
adjusting the step length according to the step length attenuation coefficient;
and continuing to execute the exploration value acquisition step, the target range determination step and the target candidate value determination step based on the adjusted step length.
Optionally, the at least one instruction, when executed by the one or more processors, enables the computer device to perform the steps of:
acquiring a corresponding relation between the value of the hyper-parameter and the value of the objective function based on the target range and the historical value information of the hyper-parameter;
determining a candidate value of the hyperparameter from the target range according to the corresponding relation;
training an initial data processing model configured with the candidate values of the hyperparameters based on the plurality of sample data to obtain target function values corresponding to the candidate values;
updating the corresponding relation between the value of the hyper-parameter and the value of the objective function according to the value of the objective function;
and continuing to execute the steps of determining the candidate value and training the model based on the updated corresponding relation until a second target condition is met, and obtaining the target candidate value of the hyperparameter.
Optionally, the training process for training the initial data processing model includes:
randomly selecting a plurality of sample data from the plurality of sample data, inputting the plurality of sample data into the initial data processing model, classifying randomly selected features in a plurality of sample features in the plurality of sample data by the initial data processing model, and outputting a prediction result corresponding to the plurality of sample data;
determining a target function value of each sample data according to the prediction results corresponding to the plurality of sample data and the corresponding target results;
and adjusting the model parameters of the initial data processing model according to the value of the objective function until the model parameters meet a third objective condition.
Optionally, the step of obtaining the explored value of the hyper-parameter and determining the target range is performed by a first device, the step of determining the candidate value of the hyper-parameter and determining the target candidate value are performed by a second device, and the first device and the second device communicate with each other through a hyper text transfer protocol HTTP or a secure hyper text transfer protocol HTTPs.
Optionally, the step of obtaining the exploratory value of the hyperparameter and determining the target range is performed by a first thread, and the step of determining the candidate value of the hyperparameter and determining the target candidate value are performed by a second thread, and data is communicated between the first thread and the second thread through communication.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
in the embodiment of the disclosure, in response to a parameter adjusting instruction, sample data can be automatically acquired from a database, a parameter adjusting step is executed to obtain a target value of a hyper-parameter and a data processing model obtained by training an initial data processing model configured with the target value, and if a data processing requirement exists, the data processing step can be executed by using the data processing model. On the other hand, when the target value of the hyper-parameter is determined, the target range of the hyper-parameter is determined by searching through the initial value, the searching direction, the step length and the like of the hyper-parameter, and then the target candidate value is determined and then is used as the initial value to continue to determine the target range of the hyper-parameter.
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 specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a schematic diagram of an implementation environment for a data processing method according to an example embodiment;
FIG. 2 is a flow diagram illustrating a method of data processing in accordance with an exemplary embodiment;
FIG. 3 is a flow chart illustrating a method of data processing according to an exemplary embodiment;
FIG. 4 is a flowchart illustrating a data processing system in accordance with an exemplary embodiment;
FIG. 5 is a flow chart illustrating a method of data processing in accordance with an exemplary embodiment;
FIG. 6 is a block diagram illustrating a data processing apparatus in accordance with an exemplary embodiment;
FIG. 7 is a block diagram illustrating a terminal in accordance with an exemplary embodiment;
FIG. 8 is a schematic diagram illustrating the structure of a server in accordance with an exemplary embodiment;
FIG. 9 is a schematic diagram illustrating a configuration of a computer device, according to an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in 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 above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The user information to which the present disclosure relates may be information authorized by the user or sufficiently authorized by each party.
Fig. 1 is a schematic diagram of an implementation environment of a data processing method according to an exemplary embodiment, and referring to fig. 1, the implementation environment may include at least one computer device 101 and a database 102, where the at least one computer device 101 and the database 102 are connected through a wired or wireless connection and are capable of data interaction.
Wherein the at least one computer device 101 has computing capabilities and is capable of processing data. In the embodiment of the present disclosure, the at least one computer device 102 may obtain sample data, train the initial data processing model based on the sample data, and obtain the data processing model, so that when there is a data processing requirement, the trained data processing model is used to process the data. Wherein the hyper-parameters set by the initial data processing model before training can be optimized by the at least one computer device 101. Sample data or data required by the at least one computer device 101 may be obtained from a database 102, the database 102 being used for storing and managing data.
The data may be data of a plurality of data processing scenarios, for example, the data processing scenario may be a resource delivery scenario, in the scenario, the data and sample data may be resources to be delivered and users to be delivered, and the data processing model may be configured to determine a user set to be delivered from the users to be delivered according to the resources to be delivered, that is, the data processing model may determine a model for the user set, and the at least one computer device 101 is configured to determine a hyper-parameter value of the model and train the model with the hyper-parameter value, so that the trained model may be used to process the resources to be delivered and determine the user set to be delivered. In this scenario, the data processing model may also be configured to determine, according to the user to be launched, resources to be launched to the user to be launched from the resources to be launched, or rank the resources to be launched according to the user to be launched, and launch the resources according to the rank.
For another example, the data processing scene may be a target recognition scene, the data and the sample data may be an image or a video, and the data processing model may be a target recognition model, which is used to recognize a target in the image or the video and output a position of the target, or after recognizing the target, annotate the target and output the annotated image or video.
For another example, the data processing scenario may be a classification and decision scenario, and the data processing model may be a classification and decision model, where the data processing model is used to make a decision on a target problem, for example, determine whether a user clicks to play a certain display resource according to personal information of the user.
The foregoing provides a centralized data processing scenario, and the data processing method provided in the embodiment of the present disclosure may also be applied to other scenarios.
Fig. 2 is a flowchart illustrating a data processing method applied to a computer device according to an exemplary embodiment, and the method may include the following steps, as shown in fig. 2.
201. The computer equipment responds to the parameter adjusting instruction and obtains a plurality of sample data of the target scene indicated by the parameter adjusting instruction from the database.
202. And the computer equipment acquires the exploration value of the hyper-parameter according to the initial value, the exploration direction and the step length of the hyper-parameter.
203. And the computer equipment determines the target range of the hyper-parameter according to the training result of the plurality of sample data to the initial data processing model configured with the exploration value.
204. And the computer equipment determines a candidate value of the hyper-parameter from the target range based on the target range and the historical value information of the hyper-parameter so as to configure the initial data processing model for training until the target candidate value of the hyper-parameter is obtained.
205. And the computer equipment takes the target candidate value as an initial value of the hyperparameter, and continues to execute the steps of acquiring the search value, determining a target range and determining a target candidate value until a first target condition is met, so as to obtain a target value of the hyperparameter and a data processing model obtained by training an initial data processing model configured with the target value.
206. The computer device responds to the data processing instruction and processes the target data of the target scene according to the data processing model.
In the embodiment of the disclosure, in response to a parameter adjusting instruction, sample data can be automatically acquired from a database, a parameter adjusting step is executed to obtain a target value of a hyper-parameter and a data processing model obtained by training an initial data processing model configured with the target value, and if a data processing requirement exists, the data processing step can be executed by using the data processing model. On the other hand, when the target value of the hyper-parameter is determined, the target range of the hyper-parameter is determined by searching through the initial value, the searching direction, the step length and the like of the hyper-parameter, and then the target candidate value is determined and then is used as the initial value to continue to determine the target range of the hyper-parameter.
Optionally, the obtaining an exploration value of the hyper-parameter according to an initial value, an exploration direction, and a step length of the hyper-parameter, and determining a target range of the hyper-parameter according to a training result of the initial data processing model configured with the exploration value by the multiple sample data includes:
acquiring different exploration values of the hyper-parameter according to the initial value of the hyper-parameter, different exploration directions and step lengths;
training an initial data processing model configured with the different exploration values based on the plurality of sample data to obtain a target function value corresponding to each exploration value;
taking the exploration direction corresponding to the exploration value of which the value of the objective function meets the condition as the target exploration direction of the hyper-parameter;
and determining the target range of the hyperparameter based on the initial value of the hyperparameter, the target exploration direction and the step length.
Optionally, the hyper-parameters comprise multi-dimensional hyper-parameters;
the method for determining the target range of the hyper-parameter according to the training result of the initial data processing model configured with the search value by the multiple sample data comprises the following steps:
for a first dimensional hyper-parameter in the multi-dimensional hyper-parameters, acquiring different exploration values of the first dimensional hyper-parameter according to an initial value of the first dimensional hyper-parameter, different exploration directions and step lengths;
training a first initial data processing model based on a plurality of sample data to obtain an objective function value corresponding to each exploration value, wherein the value of a first dimensional hyper-parameter in hyper-parameters configured by the first initial data processing model is an exploration value different from the first dimensional hyper-parameter, and the values of other dimensional hyper-parameters are initial values;
taking the exploration direction corresponding to the exploration value of which the value of the objective function meets the condition as the target exploration direction of the first dimensional hyper-parameter;
determining a target range of the first dimensional hyper-parameter based on the initial value of the first dimensional hyper-parameter, the target exploration direction and the step length;
and continuing to execute the exploration value acquisition and model training steps on other dimensional hyper-parameters in the multi-dimensional hyper-parameters until the multi-dimensional hyper-parameters all acquire target ranges, and acquiring the target ranges of the multi-dimensional hyper-parameters.
Optionally, the step of taking the target candidate value as the initial value of the hyperparameter and continuing to perform the search value acquisition, the target range determination, and the target candidate value determination includes:
adjusting the step length according to the step length attenuation coefficient;
and continuing to execute the exploration value acquisition step, the target range determination step and the target candidate value determination step based on the adjusted step length.
Optionally, the determining, from the target range, a candidate value of the hyper-parameter to configure the initial data processing model for training until obtaining the target candidate value of the hyper-parameter based on the target range and the historical value information of the hyper-parameter includes:
acquiring a corresponding relation between the value of the hyper-parameter and the value of the objective function based on the target range and the historical value information of the hyper-parameter;
determining a candidate value of the hyperparameter from the target range according to the corresponding relation;
training an initial data processing model configured with the candidate value of the hyperparameter on the basis of the plurality of sample data to obtain a target function value corresponding to the candidate value;
updating the corresponding relation between the value of the hyper-parameter and the value of the objective function according to the value of the objective function;
and continuing to execute the steps of determining the candidate value and training the model based on the updated corresponding relation until the second target condition is met, and obtaining the target candidate value of the hyperparameter.
Optionally, the training process for training the initial data processing model includes:
randomly selecting a plurality of sample data from the plurality of sample data, inputting the plurality of sample data into the initial data processing model, classifying randomly selected features in a plurality of sample features in the plurality of sample data by the initial data processing model, and outputting a prediction result corresponding to the plurality of sample data;
determining a target function value of each sample data according to the prediction results corresponding to the plurality of sample data and the corresponding target results;
and adjusting the model parameters of the initial data processing model according to the value of the objective function until the model parameters meet a third objective condition.
Optionally, the step of obtaining the explored value of the hyper-parameter and determining the target range is performed by a first device, and the step of determining the candidate value of the hyper-parameter and determining the target candidate value are performed by a second device, and the first device and the second device communicate with each other through a hyper text transfer protocol HTTP or a secure hyper text transfer protocol HTTPs.
Optionally, the step of obtaining the exploratory value of the hyperparameter and determining the target range is performed by a first thread, and the step of determining the candidate value of the hyperparameter and determining the target candidate value are performed by a second thread, and data is communicated between the first thread and the second thread through communication.
FIG. 3 is a flow chart illustrating a data processing method, as shown in FIG. 3, for use in a computer device, which may include the following steps, according to an example embodiment.
301. The computer equipment responds to the parameter adjusting instruction and obtains a plurality of sample data of the target scene indicated by the parameter adjusting instruction from the database.
The parameter adjusting instruction is used for indicating the computer equipment to acquire sample data, adjusting the value of the hyper-parameter of the initial data processing model based on the sample data, determining a target value, configuring the initial data processing model according to the target value, and training the configured initial data processing model to obtain the data processing model. If the computer equipment has data processing requirements, the data can be processed based on the trained data processing model.
The database can store and manage data, and relevant data can be extracted from the database if other devices have data acquisition requirements. In the disclosed embodiment, the database may include sample data required for model training. Of course, other data may be included in the database, for example, the database may store initial values of the hyper-parameters of the initial data processing model, and the initial values may be preset by a person skilled in the relevant art. For another example, the step attenuation coefficient and the like may also be stored in the database, which is not limited in the embodiment of the present disclosure.
In a possible implementation manner, the database may store sample data of multiple scenes, and the computer device may obtain the sample data of a desired scene according to its own requirements. Correspondingly, in step 301, in response to the parameter adjusting instruction, the computer device may obtain, according to the identification information of the target scene in the parameter adjusting instruction, a plurality of sample data corresponding to the identification information from the database. Of course, the computer device may also obtain other data, such as the initial values of the hyper-parameters of the initial data processing model described above, or the step attenuation coefficients, or both.
302. The computer equipment obtains the initial value of the hyper-parameter, and the hyper-parameter is a multi-dimensional hyper-parameter.
The initial value of the hyper-parameter may be set by the skilled person as required, and the initial value may be set in the computer device or may be stored in the database. The hyper-parameter may be a multi-dimensional hyper-parameter, and the initial value of the hyper-parameter includes the initial value of each dimension of the hyper-parameter.
When the computer device needs to perform parameter adjustment (that is, parameter optimization), the initial value of the hyper-parameter may be extracted from the current storage data, or the initial value of the hyper-parameter may be extracted from the database, which is not limited in the embodiment of the present disclosure.
303. And for a first dimensional hyper-parameter in the multi-dimensional hyper-parameters, the computer equipment acquires different exploration values of the first dimensional hyper-parameter according to the initial value, different exploration directions and step lengths of the first dimensional hyper-parameter.
The computer device may explore the hyperparameters from different exploration directions and perform a model training step, shown below as step 304, for each exploration result to determine a target exploration direction for the hyperparameters. The hyper-parameters are multi-dimensional hyper-parameters, and the computer equipment can explore each dimension of hyper-parameters from different exploration directions and determine the target exploration direction of each dimension of hyper-parameters.
In step 303, the first dimensional hyperparameter is any one of the multidimensional hyperparameters, the computer device may acquire the search value of the first dimensional hyperparameter to perform subsequent steps 304, 305 and 306, and may further perform the same procedure as in step 303 on the other dimensional hyperparameters in the multidimensional hyperparameter to acquire search values of the other dimensional hyperparameters, and continue to perform subsequent steps 304, 305 and 306 until all the dimensional hyperparameters determine the target range.
For example, the multidimensional hyperparameter is an N-dimensional hyperparameter, which is hyperparameter 1, hyperparameter 2, … …, and hyperparameter N, respectively, where N is an integer greater than 1. In step 303, the computer device obtains different search values of the hyper-parameter 1 according to the initial value of the hyper-parameter 1, different search directions and step lengths. Subsequently, when the step 303 is executed again, the computer device may obtain different search values of the hyper-parameter 2 until different search values of the hyper-parameter N are obtained.
The exploration direction (which may also be referred to as a coordinate direction) may include a variety of directions, such as a forward exploration direction (which may also be referred to as a forward exploration direction) and a reverse exploration direction. Specifically, in step 303, the computer device may obtain a first search value and a second search value of the first dimensional hyper-parameter according to the initial value, the forward search direction, the backward search direction, and the step size of the first dimensional hyper-parameter. That is, the computer device may obtain the first search value of the first dimensional hyper-parameter according to the initial value, the forward search direction, and the step size of the first dimensional hyper-parameter, and obtain the second search value of the first dimensional hyper-parameter according to the initial value, the reverse search direction, and the step size of the first dimensional hyper-parameter. And furthermore, the two exploration values can be respectively configured to the initial data processing model for model training, and the exploration direction in which the two exploration values are explored is determined, so that the performance of the initial data processing model is improved.
In one particular possible embodiment, the computer device may obtain the product of the direction vector and the step size for different exploration directions, obtain the sum of the product and the initial value of the first dimensional hyperparameter, and use the sum as the exploration value of the first dimensional hyperparameter.
304. The computer device trains a first initial data processing model based on a plurality of sample data to obtain an objective function value corresponding to each exploration value, wherein the value of a first dimensional hyper-parameter in hyper-parameters configured by the first initial data processing model is an exploration value different from the first dimensional hyper-parameter, and the values of other dimensional hyper-parameters are initial values.
After the computer equipment acquires different exploration values of the first dimensional hyper-parameter, the values of other hyper-parameters can be kept unchanged as initial values, the initial values are used as different groups of values of the hyper-parameters to carry out hyper-parameter configuration on the initial data processing model, and the configured initial data processing model is trained on the basis of a plurality of acquired sample data to determine the value of the objective function of the initial data processing model configured with each group of values at present.
The objective function value is used to indicate the data processing capability of the current initial data processing model, and the objective function may be set by a relevant technician as required, which is not limited in the embodiments of the present disclosure. For example, the objective function value is used to indicate the accuracy of the current initial data processing model processing data, or the error of the current initial data processing model processing data, or the speed of the current initial data processing model processing data.
The data processing model may be any model, in a possible implementation manner, the data processing model may be a random forest model, the random forest is a decision tree model based on a bagging framework, and the hyper-parameters of the random forest may include parameters of an RF framework and parameters of an RF decision tree. Specifically, taking the data processing model as a random forest model as an example for explanation, the process of training the initial data processing model based on a plurality of sample data can be realized through the following steps one to three.
The method comprises the following steps that firstly, a plurality of sample data are randomly selected by computer equipment from the sample data, the sample data are input into an initial data processing model, randomly selected features in a plurality of sample features in the sample data are classified by the initial data processing model, and a prediction result corresponding to the sample data is output.
In the first step, the process of randomly selecting a plurality of sample data by the computer device may be a drawing process with a playback, for example, the plurality of sample data is N sample data, the computer device may randomly select one sample data from the N sample data, input the sample data into the initial data processing model for classification to obtain a prediction result, then randomly select one sample data from the N sample data for model training, and the sample data randomly selected again may be the same as or different from the sample data randomly selected at the previous time. The computer device may continue the selection process N-2 more times, N being a positive integer greater than 1.
Each sample data may have a plurality of sample features, and when performing classification, the computer device may randomly select one or more sample features from the plurality of sample features for classification, for example, the number of sample features may be M, and the computer device may randomly select M sample features from the M sample features for classification, where M is less than or equal to M, and M and N are both positive integers.
When the computer device selects one or more sample characteristics for classification, one sample characteristic can be randomly selected for classification, and then the next sample characteristic is randomly selected for continuous classification based on the classification result, and so on.
And step two, the computer equipment determines the objective function value of each sample data according to the prediction results corresponding to the plurality of sample data and the corresponding target results.
Each sample data carries a corresponding target result, the target result is a real and accurate result, and the accuracy or error of the prediction result can be determined through the prediction result and the target result, so as to determine whether the model parameters need to be adjusted or not, and improve the data processing capacity of the model.
Wherein, the objective function is used for measuring the data processing capability of the current initial data processing model. The objective function value is determined according to the prediction result and the target result, and the objective function value can be used for measuring the accuracy or the error of the prediction result, or the objective function value can be used for measuring the difference value of the data processing capacity of the current data processing model compared with the data processing capacity of the last iteration process, or measuring the data processing capacity of the current initial data processing model. For example, the objective function may be a loss function, or may be other functions, and the values of the objective function and the objective function are not limited in this disclosure.
And step three, the computer equipment adjusts the model parameters of the initial data processing model according to the value of the objective function until the model parameters meet a third target condition.
By means of the objective function value, after the data processing capacity of the initial data processing model in the iteration is known, whether model parameters need to be adjusted or not can be determined according to the objective function value, and how to adjust the model parameters is determined, so that the data processing capacity of the initial data processing model is improved.
The training process of the initial data model training may determine the timing of the training ending through a third target condition. The third target condition may be set by a relevant technician as required, for example, the value of the target function may be converged, or the value of the target function is greater than a target threshold, or the number of iterations reaches a target number, and the like, which is not limited in the embodiment of the present disclosure.
305. And the computer equipment takes the exploration direction corresponding to the exploration value with the objective function value meeting the condition as the target exploration direction of the first dimensional hyperparameter.
The different exploration values of the first dimensional hyper-parameter are obtained based on different exploration directions, and by means of the value of the objective function, which exploration direction can improve the data processing capacity of the initial data processing model can be determined, so that the exploration direction can be used as a target exploration direction, and the target exploration direction is a forward or better exploration direction.
The target exploration direction can be selected by setting conditions for the value of the target function, and when the value of the target function meets the conditions, for example, the accuracy is improved or is higher than a certain value, or the loss value is reduced or reduced, the data processing capacity of the initial data processing model can be improved by the exploration direction.
The objective function value meeting conditions can include various conditions, and can be set by related technical personnel according to requirements. For example, if the objective function value is accuracy, the objective function value conformity condition may be that the accuracy is greater than the accuracy threshold, or an objective function value in which the objective function value of one of the exploration values is greater than the other of the exploration values may be used; if the objective function value is a loss value, the loss may be smaller than a loss threshold, or the objective function value of one of the exploration values may be smaller than another exploration value, which is not limited in the embodiments of the present disclosure.
Through the step 305, the hyperparameter exploration direction with positive feedback on the processing performance of the initial data processing model is determined as the target exploration direction, that is, after the value of the hyperparameter is changed to the exploration value, the accuracy of the initial data processing model for processing data can be improved, the error is reduced, and the efficiency is improved.
306. The computer device determines a target range for the first dimensional hyperparameter based on the initial value of the first dimensional hyperparameter, the target exploration direction, and the step size.
After the computer device determines the target exploration direction of the first dimensional hyperparameter, a target range of the first dimensional hyperparameter can be determined, wherein the target range is the exploration range of the first dimensional hyperparameter. The computer equipment can select the value of the first dimensional hyper-parameter in the target range, and then carry out subsequent model configuration and training processes, so as to further determine the optimal value of the first dimensional hyper-parameter.
The initial value can be extended by setting the step length and the exploration direction in the exploration process, so that the target range is obtained. Specifically, the computer device may determine the boundary of the target range of the first dimensional hyperparameter according to the initial value of the first dimensional hyperparameter, the target exploration direction, and the step size.
In one possible implementation, the computer device may take as the target range a range between the initial value of the first dimensional hyperparameter and a sum of the initial value and a product of a direction vector and a step size of the target exploration direction. The boundary of the target range is an initial value, and the sum of the initial value and the product of the direction vector and the step length of the target exploration direction. That is, [ initial value, initial value + direction vector x step size of target exploration direction ]. That is, the computer device may obtain the initial value as a first boundary of the target range, and obtain the target range by taking a sum of a product of a direction vector and a step size of the target exploration direction and the initial value as a second boundary of the target range.
307. And the computer equipment continues to execute the steps of obtaining the exploration value and training the model for other dimensional hyperparameters in the multi-dimensional hyperparameters until the multi-dimensional hyperparameters all obtain target ranges, and the target ranges of the multi-dimensional hyperparameters are obtained.
The computer device may determine the target ranges of other wielding super parameters by the same process as described above, and further obtain the target ranges of all wielding super parameters, which is not described herein.
The steps 303 to 307 are a process of obtaining an exploration value of the hyper-parameter according to an initial value, an exploration direction and a step length of the hyper-parameter, and determining a target range of the hyper-parameter according to a training result of the initial data processing model configured with the exploration value by the plurality of sample data, wherein the hyper-parameter is explored through setting the initial value and the step length to obtain an exploration range, so as to perform a subsequent optimal hyper-parameter determining process.
The above-mentioned steps 303 to 307 are a process of obtaining different exploration values of the hyper-parameter according to the initial value of the hyper-parameter, different exploration directions and step lengths, training an initial data processing model configured with the different exploration values based on the plurality of sample data to obtain an objective function value corresponding to each exploration value, taking the exploration direction corresponding to the exploration value with the objective function value meeting the condition as the target exploration direction of the hyper-parameter, and determining the target range of the hyper-parameter based on the initial value of the hyper-parameter, the target exploration direction and the step length, where the hyper-parameter may be a multi-dimensional hyper-parameter, that is, the process shown in the above-mentioned steps 303 to 307. Of course, the super-parameter may also be a one-dimensional super-parameter, and the processing procedure is the same as the processing procedure in the above step 303 to step 307, which is not described herein again.
308. And the computer equipment acquires the corresponding relation between the value of the hyper-parameter and the value of the objective function based on the target range and the historical value information of the hyper-parameter.
The historical value information can also be called historical exploration information of the hyper-parameter, and the corresponding relation between the value of the hyper-parameter and the value of the objective function can be determined from the historical value information. Through the corresponding relation, the subsequent steps can be further executed, and when the value of the hyper-parameter is analyzed in the target range, the value of the corresponding prediction target function is analyzed, so that the candidate value is selected from the target range in an auxiliary mode to try.
Optionally, the obtaining process of the corresponding relationship may be a creating process of a probability model, and specifically, the computer device may establish the probability model based on the target range and the historical value information of the hyper-parameter, where the probability model is used to represent the corresponding relationship between the value of the hyper-parameter and the value of the objective function. That is, according to the value in the target range and the historical value information, a corresponding relationship between the value of the hyper-parameter and the value of the target function is obtained through fitting, and the corresponding relationship is the probability model or can be called as a function.
309. And the computer equipment determines the candidate value of the hyperparameter from the target range according to the corresponding relation.
The computer equipment determines the corresponding relation between the value of the hyper-parameter and the value of the objective function, and can analyze the value of the objective function corresponding to various value combinations of the hyper-parameter in the target range, and further select the candidate value of which the value of the objective function meets the condition.
In one possible implementation, this step 309 may be implemented based on an ACquisition function (AC function). The AC function may include various types, for example, three types of Probasic of Improvement (PI), accepted Improvement (EI), GP Upper confirmation Bound (GP-UCB), and may further include other AC functions. The embodiment of the present disclosure does not limit which AC function is specifically used.
310. And training the initial data processing model configured with the candidate value of the hyperparameter by the computer equipment based on the plurality of sample data to obtain an objective function value corresponding to the candidate value.
After determining the candidate value of the hyper-parameter, the computer device may perform a hyper-parameter configuration and model training process for the initial data processing model, which is the same as step 304, and is not repeated here.
311. And the computer equipment updates the corresponding relation between the value of the hyper-parameter and the value of the objective function according to the value of the objective function.
After the computer device obtains the value of the objective function, the candidate value of the hyper-parameter in the model training process may also be used as the historical value information, and then the corresponding relationship between the value of the hyper-parameter and the value of the objective function is updated, it can be understood that the corresponding relationship is updated, and the selected candidate values may also be different, so that the computer device may execute the subsequent step 312.
312. And the computer equipment continues to execute the steps of determining the candidate value and training the model based on the updated corresponding relation until a second target condition is met, and a target candidate value of the hyperparameter is obtained.
The second target condition may be set by a relevant technician as required, for example, the value of the target function may be converged, or the value of the target function is greater than a second target threshold, or the number of iterations reaches a second target number, and the like, which is not limited in the embodiment of the present disclosure. The second target threshold and the second target number may be set by a person skilled in the relevant art according to requirements, and the embodiment of the disclosure is not limited thereto.
In the above steps 308 to 312, based on the target range and the historical value information of the hyper-parameter, the candidate value of the hyper-parameter is determined from the target range to configure the initial data processing model for training until the process of obtaining the target candidate value of the hyper-parameter is obtained. On the other hand, when the target value of the hyper-parameter is determined, the target range of the hyper-parameter is determined by searching through the initial value, the searching direction, the step length and the like of the hyper-parameter, and then the target candidate value is determined and then is used as the initial value to continue to determine the target range of the hyper-parameter.
313. The computer device takes the target candidate value as an initial value of the hyperparameter, and continues to execute the steps 303 to 312 until a first target condition is met, so as to obtain a target value of the hyperparameter, and a data processing model obtained by training an initial data processing model configured with the target value.
Through the above steps 308 to 312, an optimal hyper-parameter value, that is, a target candidate value, is determined from the target range, the target candidate value is an optimal value of the hyper-parameter value within the target range, and the computer device may further continue to expand the exploration range (that is, the target range) to further determine the optimal value of the hyper-parameter, so as to avoid obtaining a local optimal value and obtain a more accurate value. Therefore, the computer device may further explore the optimal value of the current iteration as an initial value, and the process of exploring and obtaining the optimal value is the same as the process from step 303 to step 312, which is not described herein in detail in this embodiment of the disclosure.
And obtaining a target range through exploration, solving an optimal solution in the target range, further expanding the exploration range, exploring a new target range, and solving the optimal solution in the new target range, wherein each exploration and each optimal solution solving process can be regarded as one iteration, and more accurate hyper-parameter values can be obtained through multiple iterations.
Under the plurality of iterations, a first target condition may be set thereto as a condition for the iteration to end. The first target condition may be set by a relevant technician as required, for example, the value of the target function may be converged, or the value of the target function is greater than a first target threshold, or the number of iterations reaches a first target number, and the like, which is not limited in the embodiment of the present disclosure. The first target threshold or the first target number may be set by a person skilled in the relevant art according to requirements, and the embodiment of the disclosure is not limited thereto.
In a possible implementation manner, in order to avoid too long search time, or avoid performing too much meaningless search, or for more precise search, a step-size attenuation coefficient may be set, and when the above steps are repeatedly performed, that is, when the next iteration is performed, the step size may be adjusted by the step-size attenuation coefficient, so that the step size is gradually attenuated. Specifically, the computer device may adjust the step size according to the step size attenuation coefficient, and based on the adjusted step size, continue to perform the step of obtaining the search value, and the steps of determining the target range and determining the target candidate value.
Through the steps 301 to 313, the computer device trains to obtain the data processing model, and when there is a data processing requirement, the computer device may call the data processing model and process the data by using the data processing model. The steps 303 to 307 may be implemented by using a coordinate descent algorithm, and the steps 308 to 312 may be implemented by using a bayesian optimization method.
314. The computer device responds to the data processing instruction and processes the target data of the target scene according to the data processing model.
The data processing instruction can be triggered by user operation, or can be a data processing instruction sent by other computer equipment, or can be triggered by a target instruction.
For example, a user may operate on the computer device to process target data of a target scene through the computer device, and trigger the data processing instruction, and the computer device receives the data processing instruction, i.e., may execute a data processing step in response to the data processing instruction.
For another example, if object data of an object scene is generated on another computer device and needs to be processed, the data of the object scene and a data processing instruction may be sent to the computer device, and the computer device may receive the object data of the object scene and the data processing instruction, and may process the object data in response to the data processing instruction.
For another example, the other computer device is configured to send a data processing instruction to the computer device, and the computer device acquires target data of a target scene from a target address indicated by the data processing instruction in response to the data processing instruction.
For another example, when the computer device generates target data of a target scene while processing other data, and further processing of the target data is required, the computer device triggers receiving and executing the data processing instruction.
Specifically, the data processing procedure may be: the computer equipment can acquire target data of a target scene, input the target data of the target scene into the data processing model, process the target data by the data processing model based on trained model parameters, and output a processing result. The data processing model may be different models for different scenes, for example, in a classification scene, the data processing model may be a random forest model or other classification models.
For the target scene, the target scene may be any kind of data processing scene, the target scene is different, and the processing performed on the data is also different. For example, the target scenario may be a resource delivery scenario, in the scenario, the data and the sample data may be resources to be delivered and users to be delivered, and the data processing model may be configured to determine a user set to be delivered from the users to be delivered according to the resources to be delivered, that is, the data processing model may determine a model for the user set, and the computer device is configured to determine a hyper-parameter value of the model and train the model with the hyper-parameter value, so that the trained model may be used to process the resources to be delivered and determine the user set to be delivered. In this scenario, the data processing model may also be configured to determine, according to the user to be launched, resources to be launched to the user to be launched from the resources to be launched, or rank the resources to be launched according to the user to be launched, and launch the resources according to the rank.
For another example, the data processing scene may be a target recognition scene, the data and the sample data may be an image or a video, and the data processing model may be a target recognition model, which is used to recognize a target in the image or the video and output a position of the target, or after recognizing the target, annotate the target and output the annotated image or video. Correspondingly, the target data and the sample data in the steps can be replaced by images or videos, and the data processing model can be replaced by a target recognition model.
For another example, the data processing scenario may be a classification and decision scenario, and the data processing model may be a classification and decision model, where the data processing model is used to make a decision on a target problem, for example, determine whether a user clicks to play a certain display resource according to personal information of the user. The data processing model may be a random forest model, and the target scene and the type of the data processing model are not specifically limited in the embodiments of the present disclosure. In this scenario, when processing target data, a decision tree may be used to perform feature extraction, and then classify features and output a classification result.
The above steps 301 to 314 are only described by taking steps of model training and data processing on a computer device as an example, specifically, the step of obtaining the search value of the hyper-parameter and determining the target range is performed by a first thread, the step of determining the candidate value of the hyper-parameter and determining the target candidate value are performed by a second thread, and data is transmitted between the first thread and the second thread through communication.
In another possible implementation, the above steps may also be performed by multiple computer devices in cooperation. In a possible implementation manner, the step of obtaining the search value of the Hyper-parameter and determining the target range is performed by a first device, the step of determining the candidate value of the Hyper-parameter and the step of determining the target candidate value are performed by a second device, and the first device and the second device communicate with each other through a Hyper Text Transfer Protocol (HTTP) or a Secure Hyper Text Transfer Protocol over Secure Socket Layer (HTTPs).
A specific example is provided below, in which, taking an example that a coordinate descent algorithm is used in a process of exploring a target range, a bayesian optimization algorithm is used in a process of determining target candidate values, and a data processing model is a random forest module, a data processing system is provided in the specific example, and the data processing system includes a plurality of service modules: the system comprises a flow control service module, a coordinate descent algorithm service module, a Bayesian optimization algorithm service module, a random forest model training service module and a database service module, wherein the flow control service module is used for controlling other modules to execute corresponding data processing and carrying out master control on a flow, the flow control service module can be connected with a database service module, sample data required by model training is extracted from the database service module, initial values of hyper-parameters required by parameter adjustment and the like can also be extracted, and the flow control service module can also store data processed by other modules into the database service module. The process control service module can firstly acquire sample data and initial values of hyper-parameters, and send the sample data and the initial values to the coordinate descent algorithm service module, the coordinate descent algorithm service module executes the steps of determining the target range in the same way as the steps 303 to 307, and then the target range is returned to the process control service module, the process control service module provides data service for the data processing system, the process control service module can send the target range to the Bayesian optimization algorithm service module, and the Bayesian optimization algorithm service module determines a target candidate value from the target range and returns the target candidate value to the process control service module. It should be noted that the coordinate descent algorithm service module can determine an exploration value, the process control service module sends the exploration value and sample data to the random forest model training service module for model training, and the coordinate descent algorithm service module continues exploration until a target range is determined based on a model training result. The Bayesian optimization algorithm service module can also determine a candidate value from the target range, the flow control service module forwards the candidate value to the random forest model training service module for model training, and the candidate value is continuously determined based on the model training result until the target candidate value is determined.
As shown in fig. 5, the method steps provided by the embodiment of the present disclosure may be as follows:
step 1, according to a parameter initial value set for a random forest model, a control module sends related data to a coordinate descent algorithm service module through an http request; communication means between different containers, threads and processes.
And 2, sequentially exploring the positive step length or the negative step length of each parameter by the coordinate descent algorithm service, keeping other parameters unchanged when exploring a certain parameter, and returning the exploration result to the control module through an http request.
Step 3, the control module writes the suggested values of the search result parameters obtained by the coordinate descent method into a coordinate descent search table, judges whether all the parameters are searched, and if yes, performs step 5; if not, the step 4 is circularly carried out.
And 4, transmitting the suggested parameters of the coordinate descent algorithm service to a random forest model training module by the control module for training, collecting indexes of the model training, writing the index results and corresponding parameters into a coordinate descent exploration table, transmitting the index results to the coordinate descent algorithm service through an http request, and executing the step 3.
And 5, when the optimization directions of all the parameters are found, the control module takes the range of the initial value, the initial value and the optimization direction step length of the parameters as the exploration range of the iteration of the Bayesian optimization algorithm, writes the corresponding data into a Bayesian optimization range table, and sends the data to the Bayesian algorithm service module.
And 6, calculating to obtain a group of new trial parameters by a Bayesian algorithm according to the exploration range and the exploration historical parameter information transmitted by the control module, and transmitting the new trial parameters back to the control module.
And 7, the control module transmits the suggested parameters of the Bayesian algorithm to a random forest model training module for training, collects indexes of model training and writes index results and corresponding parameters into a Bayesian optimization exploration historical parameter information table. And (4) judging whether the Bayes stopping condition is met, if the loop iteration times are met or the index is expected, if the loop iteration times are not met, sending the index result to a Bayes algorithm service through an http request, and executing the step 6.
Step 8, the control module judges whether the stopping condition of the parameter adjusting experiment is met, if the maximum iteration times of the parameter adjusting experiment or the index reaches the expectation, the optimal parameters and the corresponding model are saved; and if the experiment stopping condition is not met, transmitting the optimal parameter value generated by the Bayes to a coordinate descent algorithm service through an http request, and executing the step 2.
FIG. 6 is a block diagram illustrating a data processing apparatus according to an example embodiment. Referring to fig. 6, the apparatus includes:
an obtaining unit 601 configured to perform, in response to a parameter adjusting instruction, obtaining a plurality of sample data of a target scene indicated by the parameter adjusting instruction from a database;
the obtaining unit 601 is further configured to obtain an exploration value of the hyper-parameter according to an initial value, an exploration direction and a step length of the hyper-parameter;
a first determining unit 602, configured to perform a training result on an initial data processing model configured with the exploration value according to the plurality of sample data, and determine a target range of the hyper-parameter;
a second determining unit 603 configured to perform, based on the target range and the historical value information of the hyper-parameter, determining a candidate value of the hyper-parameter from the target range to configure the initial data processing model for training until a target candidate value of the hyper-parameter is obtained;
the obtaining unit 601, the first determining unit 602, and the second determining unit 603 are further configured to perform the steps of obtaining the search value, determining a target range, and determining a target candidate value, respectively, using the target candidate value as an initial value of the hyperparameter, and continuing to perform the steps of obtaining the search value, determining a target range, and determining a target candidate value until a first target condition is met, obtaining a target value of the hyperparameter, and training an initial data processing model configured with the target value to obtain a data processing model;
a processing unit 604 configured to perform processing of the target data of the target scene according to the data processing model in response to data processing instructions.
The device provided by the embodiment of the disclosure can automatically acquire sample data from a database in response to a parameter adjusting instruction, execute the parameter adjusting step to obtain a target value of a hyper-parameter and a data processing model obtained by training an initial data processing model configured with the target value, and execute the data processing step by using the data processing model if the data processing requirement exists. On the other hand, when the target value of the hyper-parameter is determined, the target range of the hyper-parameter is determined by searching through the initial value, the searching direction, the step length and the like of the hyper-parameter, and then the target candidate value is determined and then is used as the initial value to continue to determine the target range of the hyper-parameter.
Optionally, the obtaining unit 601 is configured to perform obtaining different exploration values of the hyper-parameter according to an initial value of the hyper-parameter, different exploration directions and step lengths;
the first determining unit 602 is configured to perform:
training an initial data processing model configured with the different exploration values based on the plurality of sample data to obtain a target function value corresponding to each exploration value;
taking the exploration direction corresponding to the exploration value of which the value of the objective function meets the condition as the target exploration direction of the hyper-parameter;
and determining the target range of the hyperparameter based on the initial value of the hyperparameter, the target exploration direction and the step length.
Optionally, the hyper-parameters comprise multi-dimensional hyper-parameters;
the obtaining unit 601 is configured to obtain different search values of a first dimensional hyper-parameter in the multi-dimensional hyper-parameters according to an initial value of the first dimensional hyper-parameter, different search directions and step lengths;
the first determining unit 602 is configured to perform:
training a first initial data processing model based on a plurality of sample data to obtain an objective function value corresponding to each exploration value, wherein the value of a first dimensional hyper-parameter in hyper-parameters configured by the first initial data processing model is an exploration value different from the first dimensional hyper-parameter, and the values of other dimensional hyper-parameters are initial values;
taking the exploration direction corresponding to the exploration value of which the value of the objective function meets the condition as the target exploration direction of the first dimensional hyper-parameter;
determining a target range of the first dimensional hyper-parameter based on the initial value of the first dimensional hyper-parameter, the target exploration direction and the step length;
the obtaining unit 601 and the first determining unit 602 are respectively configured to execute the exploration value obtaining and model training steps for other hyper-dimensional parameters in the multi-dimensional hyper-parameter continuously until all the hyper-dimensional parameters are obtained within a target range, and obtain the target range of the multi-dimensional hyper-parameter.
Optionally, the apparatus further comprises:
an adjusting unit configured to perform adjustment of the step size according to the step size attenuation coefficient;
the obtaining unit 601 and the first determining unit 602 are further configured to perform the step of continuing to perform the exploration value obtaining step, the target range determining step and the target candidate value determining step based on the adjusted step size, respectively.
Optionally, the second determining unit 603 is configured to perform:
acquiring a corresponding relation between the value of the hyper-parameter and the value of the objective function based on the target range and the historical value information of the hyper-parameter;
determining a candidate value of the hyperparameter from the target range according to the corresponding relation;
training an initial data processing model configured with the candidate value of the hyperparameter on the basis of the plurality of sample data to obtain a target function value corresponding to the candidate value;
updating the corresponding relation between the value of the hyper-parameter and the value of the objective function according to the value of the objective function;
and continuing to execute the steps of determining the candidate value and training the model based on the updated corresponding relation until the second target condition is met, and obtaining the target candidate value of the hyperparameter.
Optionally, the training process for training the initial data processing model includes:
randomly selecting a plurality of sample data from the plurality of sample data, inputting the plurality of sample data into the initial data processing model, classifying randomly selected features in a plurality of sample features in the plurality of sample data by the initial data processing model, and outputting a prediction result corresponding to the plurality of sample data;
determining a target function value of each sample data according to the prediction results corresponding to the plurality of sample data and the corresponding target results;
and adjusting the model parameters of the initial data processing model according to the value of the objective function until the model parameters meet a third objective condition.
Optionally, the step of obtaining the explored value of the hyper-parameter and determining the target range is performed by a first device, and the step of determining the candidate value of the hyper-parameter and determining the target candidate value are performed by a second device, and the first device and the second device communicate with each other through a hyper text transfer protocol HTTP or a secure hyper text transfer protocol HTTPs.
Optionally, the step of obtaining the exploratory value of the hyperparameter and determining the target range is performed by a first thread, and the step of determining the candidate value of the hyperparameter and determining the target candidate value are performed by a second thread, and data is communicated between the first thread and the second thread through communication.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 7 is a block diagram illustrating a terminal according to an example embodiment. The terminal 700 may be a portable mobile terminal such as: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. The terminal 800 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, etc.
In general, terminal 700 includes: one or more processors 701 and one or more memories 702.
The processor 701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 701 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 701 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 701 may be integrated with a GPU (Graphics Processing Unit, data recommender), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 701 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 702 may include one or more computer-readable storage media, which may be non-transitory. The memory 702 may also include volatile memory or non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 702 is used to store at least one instruction for being possessed by processor 701 to implement the data processing methods provided by the method embodiments of the present disclosure.
In some embodiments, the terminal 700 may further optionally include: a peripheral interface 703 and at least one peripheral. The processor 701, the memory 702, and the peripheral interface 703 may be connected by buses or signal lines. Various peripheral devices may be connected to peripheral interface 703 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 704, touch screen display 705, camera 706, audio circuitry 707, positioning components 708, and power source 709.
The peripheral interface 703 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 701 and the memory 702. In some embodiments, processor 701, memory 702, and peripheral interface 703 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 701, the memory 702, and the peripheral interface 703 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 704 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 704 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 704 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 704 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 704 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 704 may also include NFC (Near Field Communication) related circuits, which are not limited by this disclosure.
The display screen 705 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 705 is a touch display screen, the display screen 705 also has the ability to capture touch signals on or over the surface of the display screen 705. The touch signal may be input to the processor 701 as a control signal for processing. At this point, the display 705 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 705 may be one, providing the front panel of the terminal 700; in other embodiments, the display 705 can be at least two, respectively disposed on different surfaces of the terminal 700 or in a folded design; in still other embodiments, the display 705 may be a flexible display disposed on a curved surface or on a folded surface of the terminal 700. Even more, the display 705 may be arranged in a non-rectangular irregular pattern, i.e. a shaped screen. The Display 705 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), or the like.
The camera assembly 706 is used to capture images or video. Optionally, camera assembly 706 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 706 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuitry 707 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 701 for processing or inputting the electric signals to the radio frequency circuit 704 to realize voice communication. For the purpose of stereo sound collection or noise reduction, a plurality of microphones may be provided at different portions of the terminal 700. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 701 or the radio frequency circuit 704 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuitry 707 may also include a headphone jack.
The positioning component 708 is used to locate the current geographic Location of the terminal 700 for navigation or LBS (Location Based Service). The Positioning component 708 can be a Positioning component based on the GPS (Global Positioning System) in the united states, the beidou System in china, the graves System in russia, or the galileo System in the european union.
Power supply 709 is provided to supply power to various components of terminal 700. The power source 709 may be alternating current, direct current, disposable batteries, or rechargeable batteries. When power source 709 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 700 also includes one or more sensors 710. The one or more sensors 710 include, but are not limited to: acceleration sensor 711, gyro sensor 712, pressure sensor 713, fingerprint sensor 714, optical sensor 715, and proximity sensor 716.
The acceleration sensor 711 can detect the magnitude of acceleration in three coordinate axes of a coordinate system established with the terminal 700. For example, the acceleration sensor 711 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 701 may control the touch screen 705 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 711. The acceleration sensor 711 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 712 may detect a body direction and a rotation angle of the terminal 700, and the gyro sensor 712 may cooperate with the acceleration sensor 711 to acquire a 3D motion of the terminal 700 by the user. From the data collected by the gyro sensor 712, the processor 701 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensors 713 may be disposed on a side bezel of terminal 700 and/or an underlying layer of touch display 705. When the pressure sensor 713 is disposed on a side frame of the terminal 700, a user's grip signal on the terminal 700 may be detected, and the processor 701 performs right-left hand recognition or shortcut operation according to the grip signal collected by the pressure sensor 713. When the pressure sensor 713 is disposed at a lower layer of the touch display 705, the processor 701 controls the operability control on the UI interface according to the pressure operation of the user on the touch display 705. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 714 is used for collecting a fingerprint of a user, and the processor 701 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 714, or the fingerprint sensor 714 identifies the identity of the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the processor 701 authorizes the user to have relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 714 may be disposed on the front, back, or side of the terminal 700. When a physical button or a vendor Logo is provided on the terminal 700, the fingerprint sensor 714 may be integrated with the physical button or the vendor Logo.
The optical sensor 715 is used to collect the ambient light intensity. In one embodiment, the processor 701 may control the display brightness of the touch display 705 based on the ambient light intensity collected by the optical sensor 715. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 705 is increased; when the ambient light intensity is low, the display brightness of the touch display 705 is turned down. In another embodiment, processor 701 may also dynamically adjust the shooting parameters of camera assembly 706 based on the ambient light intensity collected by optical sensor 715.
A proximity sensor 716, also referred to as a distance sensor, is typically disposed on a front panel of the terminal 700. The proximity sensor 716 is used to collect the distance between the user and the front surface of the terminal 700. In one embodiment, when the proximity sensor 716 detects that the distance between the user and the front surface of the terminal 700 gradually decreases, the processor 701 controls the touch display 705 to switch from the bright screen state to the dark screen state; when the proximity sensor 716 detects that the distance between the user and the front surface of the terminal 700 gradually becomes larger, the processor 701 controls the touch display 705 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 7 is not intended to be limiting of terminal 700 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
Fig. 8 is a schematic structural diagram illustrating a server 800 according to an exemplary embodiment, where the server 800 may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 801 and one or more memories 802, where the memory 802 stores at least one instruction, and the at least one instruction is loaded and executed by the processors 801 to implement the methods provided by the method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input/output, and the server may also include other components for implementing the functions of the device, which are not described herein again.
The server 800 may be used to perform the steps performed by the server in the data processing method.
Fig. 9 is a schematic structural diagram illustrating a computer apparatus according to an exemplary embodiment, and referring to fig. 9, the computer apparatus includes: one or more processors 901, one or more memories 902, and a communication interface 903.
The processor 901 includes various types, for example, the processor is any combination of one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), an Accelerated Processing Unit (APU), a Tensor Processing Unit (TPU), an embedded Neural Network Processor (NPU), a Deep learning Processing Unit (DPU), a Microprocessor/microcontroller (Microprocessor/Micro controller Unit, MPU/MCU), and the like. Alternatively, if the processor 901 is implemented as any combination of various types of processors, the various types of processors are integrated in a single chip.
The communication interface 903 is used to connect the computer device to a network, so that the computer device can transmit data to the network through the communication interface 903, or so that the computer device can acquire data from the network through the communication interface 903. Wherein the communication interface 903 comprises a wired communication interface, and/or wherein the communication interface comprises a wireless communication interface. The communication interface 903 can support wired and/or wireless communication functions of the computer device.
Memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include volatile memory or non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 902 is used to store at least one instruction executable by the one or more processors 901, wherein the at least one instruction, when executed by the one or more processors 901, enables the computer device to perform the steps of:
responding to a parameter adjusting instruction, and acquiring a plurality of sample data of a target scene indicated by the parameter adjusting instruction from a database;
acquiring an exploration value of the hyper-parameter according to the initial value, the exploration direction and the step length of the hyper-parameter;
determining the target range of the hyper-parameter according to the training result of the initial data processing model configured with the exploration value by the plurality of sample data;
determining a candidate value of the hyper-parameter from the target range to configure the initial data processing model for training until obtaining a target candidate value of the hyper-parameter based on the target range and the historical value information of the hyper-parameter;
taking the target candidate value as an initial value of the hyperparameter, and continuing to execute the steps of acquiring the search value, determining a target range and determining a target candidate value until a first target condition is met, so as to obtain a target value of the hyperparameter and a data processing model obtained by training an initial data processing model configured with the target value;
and responding to a data processing instruction, and processing the target data of the target scene according to the data processing model.
Optionally, the computer device further comprises a communication bus for transferring messages between the processor, the memory and the communication interface.
Optionally, the computer device further comprises a power supply component for powering the various components of the computer device.
Optionally, the at least one instruction, when executed by the one or more processors 901, enables the computer device to perform the steps of:
acquiring different exploration values of the hyper-parameter according to the initial value of the hyper-parameter, different exploration directions and step lengths;
training an initial data processing model configured with the different exploration values based on the plurality of sample data to obtain a target function value corresponding to each exploration value;
taking the exploration direction corresponding to the exploration value of which the value of the objective function meets the condition as the target exploration direction of the hyper-parameter;
and determining the target range of the hyperparameter based on the initial value of the hyperparameter, the target exploration direction and the step length.
Optionally, the hyper-parameters comprise multi-dimensional hyper-parameters;
the at least one instruction, when executed by the one or more processors 901, enables the computer device to perform the steps of:
for a first dimensional hyper-parameter in the multi-dimensional hyper-parameters, acquiring different exploration values of the first dimensional hyper-parameter according to an initial value of the first dimensional hyper-parameter, different exploration directions and step lengths;
training a first initial data processing model based on a plurality of sample data to obtain an objective function value corresponding to each exploration value, wherein the value of a first dimensional hyper-parameter in hyper-parameters configured by the first initial data processing model is an exploration value different from the first dimensional hyper-parameter, and the values of other dimensional hyper-parameters are initial values;
taking the exploration direction corresponding to the exploration value of which the value of the objective function meets the condition as the target exploration direction of the first dimensional hyper-parameter;
determining a target range of the first dimensional hyper-parameter based on the initial value of the first dimensional hyper-parameter, the target exploration direction and the step length;
and continuing to execute the exploration value acquisition and model training steps on other dimensional hyper-parameters in the multi-dimensional hyper-parameters until the multi-dimensional hyper-parameters all acquire target ranges, and acquiring the target ranges of the multi-dimensional hyper-parameters.
Optionally, the at least one instruction, when executed by the one or more processors 901, enables the computer device to perform the steps of:
adjusting the step length according to the step length attenuation coefficient;
and continuing to execute the exploration value acquisition step, the target range determination step and the target candidate value determination step based on the adjusted step length.
Optionally, the at least one instruction, when executed by the one or more processors 901, enables the computer device to perform the steps of:
acquiring a corresponding relation between the value of the hyper-parameter and the value of the objective function based on the target range and the historical value information of the hyper-parameter;
determining a candidate value of the hyperparameter from the target range according to the corresponding relation;
training an initial data processing model configured with the candidate value of the hyperparameter on the basis of the plurality of sample data to obtain a target function value corresponding to the candidate value;
updating the corresponding relation between the value of the hyper-parameter and the value of the objective function according to the value of the objective function;
and continuing to execute the steps of determining the candidate value and training the model based on the updated corresponding relation until the second target condition is met, and obtaining the target candidate value of the hyperparameter.
Optionally, the training process for training the initial data processing model includes:
randomly selecting a plurality of sample data from the plurality of sample data, inputting the plurality of sample data into the initial data processing model, classifying randomly selected features in a plurality of sample features in the plurality of sample data by the initial data processing model, and outputting a prediction result corresponding to the plurality of sample data;
determining a target function value of each sample data according to the prediction results corresponding to the plurality of sample data and the corresponding target results;
and adjusting the model parameters of the initial data processing model according to the value of the objective function until the model parameters meet a third objective condition.
Optionally, the step of obtaining the explored value of the hyper-parameter and determining the target range is performed by a first device, and the step of determining the candidate value of the hyper-parameter and determining the target candidate value are performed by a second device, and the first device and the second device communicate with each other through a hyper text transfer protocol HTTP or a secure hyper text transfer protocol HTTPs.
Optionally, the step of obtaining the exploratory value of the hyperparameter and determining the target range is performed by a first thread, and the step of determining the candidate value of the hyperparameter and determining the target candidate value are performed by a second thread, and data is communicated between the first thread and the second thread through communication.
In an exemplary embodiment, there is also provided a storage medium comprising instructions, such as a memory comprising instructions, executable by a processor of an apparatus to perform the data processing method described above. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product is also provided, in which instructions, when executed by a processor of a computer device, enable the computer device to perform the data processing method as described above.
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 disclosure is intended to cover any variations, 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 will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A data processing method, comprising:
responding to a parameter adjusting instruction, and acquiring a plurality of sample data of a target scene indicated by the parameter adjusting instruction from a database;
acquiring an exploration value of the hyper-parameter according to the initial value, the exploration direction and the step length of the hyper-parameter;
determining a target range of the hyper-parameter according to a training result of the initial data processing model configured with the exploration value by the plurality of sample data;
determining a candidate value of the hyper-parameter from the target range to configure the initial data processing model for training until a target candidate value of the hyper-parameter is obtained based on the target range and the historical value information of the hyper-parameter;
taking the target candidate value as an initial value of the hyperparameter, and continuing to execute the steps of searching value acquisition, target range determination and target candidate value determination until a first target condition is met, so as to obtain a target value of the hyperparameter and a data processing model obtained by training an initial data processing model configured with the target value;
and responding to a data processing instruction, and processing the target data of the target scene according to the data processing model.
2. The data processing method according to claim 1, wherein the obtaining a search value of the hyper-parameter from an initial value, a search direction, and a step size of the hyper-parameter, and determining a target range of the hyper-parameter from a training result of the initial data processing model configured with the search value by the plurality of sample data comprises:
acquiring different exploration values of the hyper-parameters according to the initial values of the hyper-parameters, different exploration directions and step lengths;
training the initial data processing model configured with the different exploration values based on the plurality of sample data to obtain a target function value corresponding to each exploration value;
taking the exploration direction corresponding to the exploration value with the objective function value meeting the condition as the target exploration direction of the hyper-parameter;
and determining the target range of the hyper-parameter based on the initial value of the hyper-parameter, the target exploration direction and the step length.
3. The data processing method of claim 2, wherein the hyper-parameters comprise multi-dimensional hyper-parameters;
the step of obtaining different search values of the hyper-parameter according to the initial value of the hyper-parameter, different search directions and step lengths, and determining the target range of the hyper-parameter according to the training result of the initial data processing model configured with the search values by the plurality of sample data comprises the following steps:
for a first dimensional hyper-parameter in the multi-dimensional hyper-parameters, acquiring different exploration values of the first dimensional hyper-parameter according to an initial value of the first dimensional hyper-parameter, different exploration directions and step lengths;
training a first initial data processing model based on a plurality of sample data to obtain an objective function value corresponding to each exploration value, wherein the value of a first dimensional hyper-parameter in hyper-parameters configured by the first initial data processing model is an exploration value different from the first dimensional hyper-parameter, and the values of other dimensional hyper-parameters are initial values;
taking the exploration direction corresponding to the exploration value with the objective function value meeting the condition as the target exploration direction of the first dimensional hyper-parameter;
determining a target range of the first dimensional hyper-parameter based on the initial value of the first dimensional hyper-parameter, the target exploration direction and the step length;
and continuing to execute the exploration value acquisition and model training steps on other dimensional hyper-parameters in the multi-dimensional hyper-parameters until the multi-dimensional hyper-parameters all acquire target ranges, and acquiring the target ranges of the multi-dimensional hyper-parameters.
4. The data processing method according to claim 1, wherein the step of continuing to perform the search value acquisition, the target range determination, and the target candidate value determination with the target candidate value as the initial value of the hyperparameter includes:
adjusting the step length according to the step length attenuation coefficient;
and continuing to execute the exploration value acquisition step, the target range determination step and the target candidate value determination step based on the adjusted step length.
5. The data processing method according to claim 1, wherein the determining a candidate value of the hyper-parameter from the target range to configure the initial data processing model for training until obtaining the target candidate value of the hyper-parameter based on the target range and the historical value information of the hyper-parameter comprises:
acquiring a corresponding relation between the value of the hyper-parameter and the value of the objective function based on the target range and the historical value information of the hyper-parameter;
determining a candidate value of the hyperparameter from the target range according to the corresponding relation;
training an initial data processing model configured with the candidate values of the hyperparameters based on the plurality of sample data to obtain target function values corresponding to the candidate values;
updating the corresponding relation between the value of the hyper-parameter and the value of the objective function according to the value of the objective function;
and continuing to execute the steps of determining the candidate value and training the model based on the updated corresponding relation until a second target condition is met, and obtaining the target candidate value of the hyperparameter.
6. The data processing method of any of claims 1 to 5, wherein the training process for training the initial data processing model comprises:
randomly selecting a plurality of sample data from the plurality of sample data, inputting the plurality of sample data into the initial data processing model, classifying randomly selected features in a plurality of sample features in the plurality of sample data by the initial data processing model, and outputting a prediction result corresponding to the plurality of sample data;
determining a target function value of each sample data according to the prediction results corresponding to the plurality of sample data and the corresponding target results;
and adjusting the model parameters of the initial data processing model according to the value of the objective function until the model parameters meet a third objective condition.
7. The data processing method according to claim 1, wherein the steps of obtaining the heuristic value of the hyper-parameter and determining the target range are performed by a first device, the steps of determining the candidate value of the hyper-parameter and determining the target candidate value are performed by a second device, and the first device and the second device communicate with each other via a Hyper Text Transfer Protocol (HTTP) or a secure Hyper Text Transfer Protocol (HTTPS).
8. A data processing apparatus, comprising:
the obtaining unit is configured to execute responding to a parameter adjusting instruction, and obtain a plurality of sample data of a target scene indicated by the parameter adjusting instruction from a database;
the acquisition unit is further configured to acquire an exploration value of the hyper-parameter according to an initial value, an exploration direction and a step length of the hyper-parameter;
a first determining unit configured to perform a training result of an initial data processing model configured with the exploration value according to the plurality of sample data, and determine a target range of the hyper-parameter;
the second determining unit is configured to execute determination of candidate values of the hyper-parameters from the target range based on the target range and historical value information of the hyper-parameters so as to configure the initial data processing model for training until target candidate values of the hyper-parameters are obtained;
the acquiring unit, the first determining unit and the second determining unit are further configured to perform the steps of acquiring the search value, determining a target range and determining a target candidate value, with the target candidate value as an initial value of the hyper-parameter, until a first target condition is met, obtaining a target value of the hyper-parameter, and training an initial data processing model configured with the target value to obtain a data processing model;
a processing unit configured to perform processing of target data of the target scene according to the data processing model in response to a data processing instruction.
9. A computer device, comprising:
one or more processors;
volatile or non-volatile memory for storing the one or more processor-executable commands;
wherein the one or more processors are configured to execute to implement the data processing method of any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of a computer device, enable the computer device to perform the data processing method of any one of claims 1 to 7.
CN202010813935.7A 2020-08-13 2020-08-13 Data processing method, device, computer equipment and storage medium Active CN111931946B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010813935.7A CN111931946B (en) 2020-08-13 2020-08-13 Data processing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010813935.7A CN111931946B (en) 2020-08-13 2020-08-13 Data processing method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111931946A true CN111931946A (en) 2020-11-13
CN111931946B CN111931946B (en) 2024-04-16

Family

ID=73311859

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010813935.7A Active CN111931946B (en) 2020-08-13 2020-08-13 Data processing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111931946B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112862107A (en) * 2021-01-26 2021-05-28 贝式计算(天津)信息技术有限公司 Automatic modeling operation system and operation method
CN113807397A (en) * 2021-08-13 2021-12-17 北京百度网讯科技有限公司 Training method, device, equipment and storage medium of semantic representation model
CN114143183A (en) * 2021-12-01 2022-03-04 中国商用飞机有限责任公司 Network parameter configuration method and device, computer equipment and readable storage medium
WO2023097568A1 (en) * 2021-12-01 2023-06-08 中国科学院深圳先进技术研究院 Method for adjusting and optimizing configuration parameters of stream data processing system on basis of bayesian optimization
CN116705210A (en) * 2023-08-03 2023-09-05 宁德时代新能源科技股份有限公司 Construction method of battery cell aging model and battery cell full life cycle performance prediction method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180240041A1 (en) * 2017-02-22 2018-08-23 Sas Institute Inc. Distributed hyperparameter tuning system for machine learning
US20190095818A1 (en) * 2017-09-28 2019-03-28 Oracle International Corporation Gradient-based auto-tuning for machine learning and deep learning models
CN109816116A (en) * 2019-01-17 2019-05-28 腾讯科技(深圳)有限公司 The optimization method and device of hyper parameter in machine learning model
CN110008842A (en) * 2019-03-09 2019-07-12 同济大学 A kind of pedestrian's recognition methods again for more losing Fusion Model based on depth
JP2019159769A (en) * 2018-03-13 2019-09-19 富士通株式会社 Search program, search method, and search device
CN111353582A (en) * 2020-02-19 2020-06-30 四川大学 Particle swarm algorithm-based distributed deep learning parameter updating method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180240041A1 (en) * 2017-02-22 2018-08-23 Sas Institute Inc. Distributed hyperparameter tuning system for machine learning
US20190095818A1 (en) * 2017-09-28 2019-03-28 Oracle International Corporation Gradient-based auto-tuning for machine learning and deep learning models
JP2019159769A (en) * 2018-03-13 2019-09-19 富士通株式会社 Search program, search method, and search device
CN109816116A (en) * 2019-01-17 2019-05-28 腾讯科技(深圳)有限公司 The optimization method and device of hyper parameter in machine learning model
CN110008842A (en) * 2019-03-09 2019-07-12 同济大学 A kind of pedestrian's recognition methods again for more losing Fusion Model based on depth
CN111353582A (en) * 2020-02-19 2020-06-30 四川大学 Particle swarm algorithm-based distributed deep learning parameter updating method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112862107A (en) * 2021-01-26 2021-05-28 贝式计算(天津)信息技术有限公司 Automatic modeling operation system and operation method
CN113807397A (en) * 2021-08-13 2021-12-17 北京百度网讯科技有限公司 Training method, device, equipment and storage medium of semantic representation model
CN113807397B (en) * 2021-08-13 2024-01-23 北京百度网讯科技有限公司 Training method, training device, training equipment and training storage medium for semantic representation model
CN114143183A (en) * 2021-12-01 2022-03-04 中国商用飞机有限责任公司 Network parameter configuration method and device, computer equipment and readable storage medium
WO2023097568A1 (en) * 2021-12-01 2023-06-08 中国科学院深圳先进技术研究院 Method for adjusting and optimizing configuration parameters of stream data processing system on basis of bayesian optimization
CN116705210A (en) * 2023-08-03 2023-09-05 宁德时代新能源科技股份有限公司 Construction method of battery cell aging model and battery cell full life cycle performance prediction method

Also Published As

Publication number Publication date
CN111931946B (en) 2024-04-16

Similar Documents

Publication Publication Date Title
CN111931946B (en) Data processing method, device, computer equipment and storage medium
CN112907725B (en) Image generation, training of image processing model and image processing method and device
CN110650379B (en) Video abstract generation method and device, electronic equipment and storage medium
CN111104980B (en) Method, device, equipment and storage medium for determining classification result
CN110070143B (en) Method, device and equipment for acquiring training data and storage medium
CN110503160B (en) Image recognition method and device, electronic equipment and storage medium
CN110796248A (en) Data enhancement method, device, equipment and storage medium
CN111127509A (en) Target tracking method, device and computer readable storage medium
EP4040332A1 (en) Method and apparatus for upgrading an intelligent model and non-transitory computer readable storage medium
CN110942046A (en) Image retrieval method, device, equipment and storage medium
CN110705614A (en) Model training method and device, electronic equipment and storage medium
CN111613213A (en) Method, device, equipment and storage medium for audio classification
CN112100528A (en) Method, device, equipment and medium for training search result scoring model
CN111563201A (en) Content pushing method, device, server and storage medium
CN110837557A (en) Abstract generation method, device, equipment and medium
CN111488895A (en) Countermeasure data generation method, device, equipment and storage medium
CN111982293B (en) Body temperature measuring method and device, electronic equipment and storage medium
CN110853704B (en) Protein data acquisition method, protein data acquisition device, computer equipment and storage medium
CN112329909B (en) Method, apparatus and storage medium for generating neural network model
CN110414673B (en) Multimedia recognition method, device, equipment and storage medium
CN109388732B (en) Music map generating and displaying method, device and storage medium
CN110851435B (en) Data storage method and device
CN113139614A (en) Feature extraction method and device, electronic equipment and storage medium
CN111782767A (en) Question answering method, device, equipment and storage medium
CN111523876A (en) Payment mode display method, device and system and storage medium

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
GR01 Patent grant
GR01 Patent grant