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

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

Info

Publication number
CN111931946B
CN111931946B CN202010813935.7A CN202010813935A CN111931946B CN 111931946 B CN111931946 B CN 111931946B CN 202010813935 A CN202010813935 A CN 202010813935A CN 111931946 B CN111931946 B CN 111931946B
Authority
CN
China
Prior art keywords
value
target
super
data processing
exploration
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.)
Active
Application number
CN202010813935.7A
Other languages
Chinese (zh)
Other versions
CN111931946A (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

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)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Geophysics And Detection Of Objects (AREA)

Abstract

The embodiment of the disclosure relates to a data processing method, a device, computer equipment and a storage medium, and relates to the technical field of computers. On the other hand, the initial value, the exploration direction, the step length and the like of the super parameter are utilized to explore, 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 super parameter is expanded, the process of searching the optimal super parameter exploration direction is quickened, the condition that the optimal super parameter cannot be found due to improper exploration boundary setting is avoided, parameter adjustment accuracy and efficiency are improved, and accuracy and efficiency of overall data processing are improved.

Description

Data processing method, 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, a data processing device, a computer device, and a storage medium.
Background
Along with the development of computer technology, more and more data processing processes of scenes adopt a data processing model to process data, the training process of the data processing model is determined by a plurality of super parameters, such as network depth, learning rate, convolution kernel size and the like, and better super parameters are configured for the model, so that the training efficiency of the model and the performance of the model can be effectively improved.
At present, in the data processing method, a technician generally configures super parameters for an initial data processing model, then trains the model, the technician manually adjusts the super parameters according to a training result, then trains the model, finally obtains better super parameters, trains the data processing model, and uses the trained data processing model to process data. The method is a manual parameter adjustment mode and also comprises some automatic parameter adjustment modes. For example, the bayesian parameter tuning method is to set an exploration boundary for the super-parameters by human, that is, set an exploration range for the super-parameters, and then select the super-parameters from the exploration range for model training to find the optimal super-parameters.
The manual parameter adjustment method has the advantages that a large amount of manpower is required to be consumed, parameter adjustment efficiency is low, the efficiency of the whole data processing method is low, the manual parameter adjustment depends on professional experience of technicians, errors can occur, and the accuracy of data processing of the finally obtained data processing model is low. In the automatic parameter adjustment mode, an exploration boundary needs to be set manually, and when the exploration boundary is set too small, the optimal super-parameters may be out of the boundary range, so that the optimal super-parameters cannot be found; when the exploration boundary is set too large, the number of times of choosing parameters to try can be large, and the time consumed by parameter adjustment can be large, so that the data processing efficiency is low and the accuracy is low.
Disclosure of Invention
The disclosure provides a data processing method, a data processing device, computer equipment and a storage medium, which can improve the efficiency and accuracy of data processing. The technical scheme of the present disclosure is as follows:
According to a first aspect of an embodiment of the present disclosure, there is provided a 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 the exploration value of the super parameter according to the initial value, the exploration direction and the step length of the super parameter;
Determining a target range of the super-parameters according to training results of the plurality of sample data on an initial data processing model configured with the exploration values;
Determining candidate values of the super parameters from the target range based on the target range and the historical value information of the super parameters so as to configure the initial data processing model for training until the target candidate values of the super parameters are obtained;
Taking the target candidate value as an initial value of the super parameter, continuing to execute the steps of acquiring the exploration value, determining the target range and determining the target candidate value until the first target condition is met, obtaining a target value of the super parameter, and training an initial data processing model configured with the target value to obtain a data processing model;
and responding to the data processing instruction, and processing the target data of the target scene according to the data processing model.
Optionally, the acquiring the exploration value of the super parameter according to the initial value, the exploration direction and the step length of the super parameter, and determining the target range of the super parameter according to the training result of the plurality of sample data on the initial data processing model configured with the exploration value, includes:
Acquiring different exploration values of the super parameters according to the initial values of the super parameters, different exploration directions and different step sizes;
Training an initial data processing model configured with the different exploration values based on the plurality of sample data to obtain target function values corresponding to each exploration value;
Taking the exploration direction corresponding to the exploration value of which the objective function value meets the condition as the objective exploration direction of the super parameter;
And determining a target range of the super parameter based on the initial value of the super parameter, the target exploration direction and the step length.
Optionally, the super-parameters include multi-dimensional super-parameters;
acquiring different exploration values of the super parameter according to the initial value, different exploration directions and step sizes of the super parameter, and determining a target range of the super parameter according to training results of the plurality of sample data on an initial data processing model configured with the exploration values, wherein the method comprises the following steps:
For a first dimension super parameter in the multi-dimension super parameters, acquiring different exploration values of the first dimension super parameter according to an initial value of the first dimension super parameter, different exploration directions and different step sizes;
Training a first initial data processing model based on a plurality of sample data to obtain objective function values corresponding to each exploration value, wherein the values of the first dimension super parameters in super parameters configured by the first initial data processing model are exploration values with different first dimension super parameters, and the values of other dimension super parameters are initial values;
taking the exploration direction corresponding to the exploration value of which the objective function value meets the condition as the objective exploration direction of the first dimension super parameter;
determining a target range of the first dimension super parameter based on the initial value of the first dimension super parameter, the target exploration direction and the step length;
And continuing to acquire the exploring value and model training steps for other dimension super parameters in the multi-dimension super parameters until the multi-dimension super parameters acquire the target range, and stopping to acquire the target range of the multi-dimension super parameters.
Optionally, the step of using the target candidate value as the initial value of the super parameter and continuing to perform the search value acquisition, target range determination and target candidate value determination includes:
Adjusting the step length according to the step length attenuation coefficient;
And continuously executing the exploring 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 super parameter, the candidate value of the super parameter from the target range to configure the initial data processing model for training until obtaining the target candidate value of the super parameter includes:
acquiring a corresponding relation between the value of the super parameter and the value of the objective function based on the target range and the historical value information of the super parameter;
according to the corresponding relation, determining candidate values of the super parameters from the target range;
training an initial data processing model configured with candidate values of the super parameters 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 super parameter and the value of the objective function according to the value of the objective function;
And continuously executing the steps of determining candidate values and training the model based on the updated corresponding relation until the second target condition is met, and stopping to obtain the target candidate values of the super parameters.
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 characteristics in a plurality of sample characteristics 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 the objective function value of each sample data according to the prediction results and the corresponding objective results corresponding to the plurality of sample data;
And adjusting the model parameters of the initial data processing model according to the target function value until the model parameters meet a third target condition.
Optionally, the steps of acquiring the exploration value of the super parameter and determining the target range are performed by a first device, the steps of determining the candidate value of the super parameter and determining the target candidate value are performed by a second device, and communication is performed between the first device and the second device through a hypertext transfer protocol HTTP or a secure hypertext transfer protocol HTTPs.
Optionally, the steps of acquiring the exploration value of the super parameter and determining the target range are performed by a first thread, the steps of determining the candidate value of the super parameter and determining the target candidate value are performed by a second thread, and data is transferred between the first thread and the second thread through communication.
According to a second aspect of embodiments of the present disclosure, there is provided a data processing apparatus comprising:
an acquisition unit configured to execute a response to a parameter tuning instruction, and acquire a plurality of sample data of a target scene indicated by the parameter tuning instruction from a database;
The acquisition unit is further configured to perform acquisition of the exploration value of the super parameter according to the initial value, the exploration direction and the step length of the super parameter;
a first determination unit configured to determine a target range of the super parameter from training results of the plurality of sample data on an initial data processing model configured with the exploration value;
a second determining unit configured to perform training by determining candidate values of the super parameter from the target range based on the target range and the historical value information of the super parameter, to configure the initial data processing model until the target candidate values of the super parameter are obtained;
The acquiring unit, the first determining unit and the second determining unit are further configured to perform the steps of taking the target candidate value as an initial value of the super parameter, continuing to perform the acquisition of the exploration value, the determination of the target range and the determination of the target candidate value until a first target condition is met, obtaining a target value of the super parameter, and training an initial data processing model configured with the target value to obtain a data processing model;
And the processing unit is configured to execute a response data processing instruction and process the target data of the target scene according to the data processing model.
Optionally, the acquiring unit is configured to acquire different exploration values of the super parameter according to an initial value of the super parameter, different exploration directions and different step sizes;
The first determination unit 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 target function values corresponding to each exploration value;
Taking the exploration direction corresponding to the exploration value of which the objective function value meets the condition as the objective exploration direction of the super parameter;
And determining a target range of the super parameter based on the initial value of the super parameter, the target exploration direction and the step length.
Optionally, the super-parameters include multi-dimensional super-parameters;
The acquisition unit is configured to execute the acquisition of different exploration values of a first dimension super parameter in the multi-dimension super parameters according to the initial value of the first dimension super parameter, different exploration directions and different step sizes;
The first determination unit is configured to perform:
Training a first initial data processing model based on a plurality of sample data to obtain objective function values corresponding to each exploration value, wherein the values of the first dimension super parameters in super parameters configured by the first initial data processing model are exploration values with different first dimension super parameters, and the values of other dimension super parameters are initial values;
taking the exploration direction corresponding to the exploration value of which the objective function value meets the condition as the objective exploration direction of the first dimension super parameter;
determining a target range of the first dimension super parameter based on the initial value of the first dimension super parameter, the target exploration direction and the step length;
the acquisition unit and the first determination unit are respectively configured to execute the steps of continuing to acquire the exploration value and training the model for other dimension super parameters in the multi-dimension super parameters until the multi-dimension super parameters acquire the target range, and stop the steps until the multi-dimension super parameters acquire the target range, so as to acquire the target range of the multi-dimension super parameters.
Optionally, the apparatus further comprises:
An adjustment unit configured to perform adjustment of the step size according to a step size attenuation coefficient;
the acquisition unit and the first determination unit are further configured to perform the step of continuing to perform the search value acquisition step, and the target range determination and the target candidate value determination based on the adjusted step size, respectively.
Optionally, the second determining unit is configured to perform:
acquiring a corresponding relation between the value of the super parameter and the value of the objective function based on the target range and the historical value information of the super parameter;
according to the corresponding relation, determining candidate values of the super parameters from the target range;
training an initial data processing model configured with candidate values of the super parameters 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 super parameter and the value of the objective function according to the value of the objective function;
And continuously executing the steps of determining candidate values and training the model based on the updated corresponding relation until the second target condition is met, and stopping to obtain the target candidate values of the super parameters.
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 characteristics in a plurality of sample characteristics 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 the objective function value of each sample data according to the prediction results and the corresponding objective results corresponding to the plurality of sample data;
And adjusting the model parameters of the initial data processing model according to the target function value until the model parameters meet a third target condition.
Optionally, the steps of acquiring the exploration value of the super parameter and determining the target range are performed by a first device, the steps of determining the candidate value of the super parameter and determining the target candidate value are performed by a second device, and communication is performed between the first device and the second device through a hypertext transfer protocol HTTP or a secure hypertext transfer protocol HTTPs.
Optionally, the steps of acquiring the exploration value of the super parameter and determining the target range are performed by a first thread, the steps of determining the candidate value of the super parameter and determining the target candidate value are performed by a second thread, and data is transferred 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 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 perform the data processing method as described in 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, which when executed by a processor of a computer device, causes the computer device to perform the data processing method as described in the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product, which when executed by a processor of a computer device, enables the computer device to perform the data processing method as described in the first aspect.
According to a sixth aspect of embodiments of the present disclosure, there is provided a 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, the one or more memories being 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, causes 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 the exploration value of the super parameter according to the initial value, the exploration direction and the step length of the super parameter;
Determining a target range of the super-parameters according to training results of the plurality of sample data on an initial data processing model configured with the exploration values;
Determining candidate values of the super parameters from the target range based on the target range and the historical value information of the super parameters so as to configure the initial data processing model for training until the target candidate values of the super parameters are obtained;
Taking the target candidate value as an initial value of the super parameter, continuing to execute the steps of acquiring the exploration value, determining the target range and determining the target candidate value until the first target condition is met, obtaining a target value of the super parameter, and training an initial data processing model configured with the target value to obtain a data processing model;
and responding to the 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, memory and 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, causes the computer device to perform the steps of:
Acquiring different exploration values of the super parameters according to the initial values of the super parameters, different exploration directions and different step sizes;
Training an initial data processing model configured with the different exploration values based on the plurality of sample data to obtain target function values corresponding to each exploration value;
Taking the exploration direction corresponding to the exploration value of which the objective function value meets the condition as the objective exploration direction of the super parameter;
And determining a target range of the super parameter based on the initial value of the super parameter, the target exploration direction and the step length.
Optionally, the super-parameters include multi-dimensional super-parameters;
The at least one instruction, when executed by one or more processors, causes the computer device to perform the steps of:
For a first dimension super parameter in the multi-dimension super parameters, acquiring different exploration values of the first dimension super parameter according to an initial value of the first dimension super parameter, different exploration directions and different step sizes;
Training a first initial data processing model based on a plurality of sample data to obtain objective function values corresponding to each exploration value, wherein the values of the first dimension super parameters in super parameters configured by the first initial data processing model are exploration values with different first dimension super parameters, and the values of other dimension super parameters are initial values;
taking the exploration direction corresponding to the exploration value of which the objective function value meets the condition as the objective exploration direction of the first dimension super parameter;
determining a target range of the first dimension super parameter based on the initial value of the first dimension super parameter, the target exploration direction and the step length;
And continuing to acquire the exploring value and model training steps for other dimension super parameters in the multi-dimension super parameters until the multi-dimension super parameters acquire the target range, and stopping to acquire the target range of the multi-dimension super parameters.
Optionally, the at least one instruction, when executed by the one or more processors, causes the computer device to perform the steps of:
Adjusting the step length according to the step length attenuation coefficient;
And continuously executing the exploring 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, causes the computer device to perform the steps of:
acquiring a corresponding relation between the value of the super parameter and the value of the objective function based on the target range and the historical value information of the super parameter;
according to the corresponding relation, determining candidate values of the super parameters from the target range;
training an initial data processing model configured with candidate values of the super parameters 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 super parameter and the value of the objective function according to the value of the objective function;
And continuously executing the steps of determining candidate values and training the model based on the updated corresponding relation until the second target condition is met, and stopping to obtain the target candidate values of the super parameters.
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 characteristics in a plurality of sample characteristics 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 the objective function value of each sample data according to the prediction results and the corresponding objective results corresponding to the plurality of sample data;
And adjusting the model parameters of the initial data processing model according to the target function value until the model parameters meet a third target condition.
Optionally, the steps of acquiring the exploration value of the super parameter and determining the target range are performed by a first device, the steps of determining the candidate value of the super parameter and determining the target candidate value are performed by a second device, and communication is performed between the first device and the second device through a hypertext transfer protocol HTTP or a secure hypertext transfer protocol HTTPs.
Optionally, the steps of acquiring the exploration value of the super parameter and determining the target range are performed by a first thread, the steps of determining the candidate value of the super parameter and determining the target candidate value are performed by a second thread, and data is transferred 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 tuning instruction, sample data can be automatically acquired from a database, a parameter tuning step is performed to obtain a target value of a super parameter and a data processing model obtained by training an initial data processing model configured with the target value, and if data processing requirements exist, the data processing step can be performed by using the data processing model. On the other hand, when the target value of the super parameter is determined, the target range of the super parameter is determined by searching through the initial value, the searching direction, the step length and the like of the super parameter, the target candidate value is determined and then used as the initial value to continuously determine the target range of the super parameter, compared with the process of manually setting the searching boundary, the searching range of the super parameter can be expanded, the process of searching the optimal super parameter searching direction is quickened, the situation that the optimal super parameter cannot be found due to improper setting of the searching boundary can be avoided, the parameter adjusting accuracy and efficiency are improved, and the accuracy and the efficiency of overall data processing are further improved.
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 disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
FIG. 1 is a schematic diagram of an implementation environment for a data processing method, according to an exemplary embodiment;
FIG. 2 is a flowchart illustrating a method of data processing according to an exemplary embodiment;
FIG. 3 is a flowchart illustrating a method of data processing according to an exemplary embodiment;
FIG. 4 is a flowchart of a data processing system, shown in accordance with an illustrative embodiment;
FIG. 5 is a flowchart illustrating a method of data processing according to an exemplary embodiment;
FIG. 6 is a block diagram of a data processing apparatus according to an exemplary embodiment;
FIG. 7 is a block diagram of a terminal shown in accordance with an exemplary embodiment;
FIG. 8 is a schematic diagram of a server according to an exemplary embodiment;
Fig. 9 is a schematic diagram of a computer device, according to an example embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The user information referred to in the present disclosure 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 capable of data interaction through a wired or wireless connection.
Wherein the at least one computer device 101 has computing capabilities and is capable of processing data. In the disclosed embodiment, the at least one computer device 102 is capable of obtaining sample data, training the initial data processing model based on the sample data, and obtaining a data processing model, so that when there is a data processing requirement, the data is processed using the trained data processing model. Wherein the superparameter of the initial data processing model set prior to training may 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, which database 102 is used for storing and managing data.
The data may be data of various data processing scenarios, for example, the data processing scenario may be a resource release scenario, in which the data and the sample data may be a resource to be released and a user to be released, and the data processing model may be used to determine a user set to be released from the users to be released according to the resource to be released, that is, the data processing model may be a model determined for the user set, and the at least one computer device 101 is used to determine a super parameter value of the model and give the super parameter value to the model for training, so that the trained model can be used to process the resource to be released and determine the user set to be released. In this scenario, the data processing model may also be used to determine, from the resources to be released, resources to be released to the user to be released according to the user to be released, or to sort the resources to be released according to the user to be released, and to release according to the sorting.
For another example, the data processing scene may be a target recognition scene, the data and the sample data may be images or videos, and the data processing model may be a target recognition model, where the target recognition model is used for recognizing a target in the images or videos, outputting a position of the target, or labeling the target after recognizing the target, and outputting the labeled images or videos.
For another example, the data processing scenario may be a classification, decision-making scenario, and the data processing model may be a classification, decision-making model that is used to make decisions on the target problem, e.g., determine whether the user will click to play a presentation resource based on the user's personal information.
The above provides a centralized data processing scenario, and the data processing method provided in the embodiments of the present disclosure may also be applied to other scenarios, where the data processing scenario is not limited in the embodiments of the present disclosure.
FIG. 2 is a flowchart illustrating a data processing method that may be applied to a computer device, as shown in FIG. 2, according to an exemplary embodiment, which may include the following steps.
201. In response to the parameter tuning instruction, the computer device obtains a plurality of sample data of a target scene indicated by the parameter tuning instruction from a database.
202. The computer equipment obtains the exploration value of the super parameter according to the initial value, the exploration direction and the step length of the super parameter.
203. The computer device determines a target range of the hyper-parameter based on training results of the plurality of sample data on the initial data processing model configured with the exploration value.
204. Based on the target range and the historical value information of the super parameter, the computer equipment determines the candidate value of the super parameter from the target range to configure the initial data processing model for training until the target candidate value of the super parameter is obtained.
205. The computer device uses the target candidate value as an initial value of the super parameter, continues to execute the steps of obtaining the exploring value, determining the target range and determining the target candidate value until the first target condition is met, obtains a target value of the super parameter, and trains the obtained data processing model to the initial data processing model configured with the target value.
206. The computer device processes the target data of the target scene according to the data processing model in response to the data processing instructions.
In the embodiment of the disclosure, in response to a parameter tuning instruction, sample data can be automatically acquired from a database, a parameter tuning step is performed to obtain a target value of a super parameter and a data processing model obtained by training an initial data processing model configured with the target value, and if data processing requirements exist, the data processing step can be performed by using the data processing model. On the other hand, when the target value of the super parameter is determined, the target range of the super parameter is determined by searching through the initial value, the searching direction, the step length and the like of the super parameter, the target candidate value is determined and then used as the initial value to continuously determine the target range of the super parameter, compared with the process of manually setting the searching boundary, the searching range of the super parameter can be expanded, the process of searching the optimal super parameter searching direction is quickened, the situation that the optimal super parameter cannot be found due to improper setting of the searching boundary can be avoided, the parameter adjusting accuracy and efficiency are improved, and the accuracy and the efficiency of overall data processing are further improved.
Optionally, the acquiring the search value of the super parameter according to the initial value, the search direction and the step length of the super parameter, and determining the target range of the super parameter according to the training result of the plurality of sample data on the initial data processing model configured with the search value, includes:
Acquiring different exploration values of the super parameter according to the initial value of the super parameter, different exploration directions and different step sizes;
training an initial data processing model configured with the different exploration values based on the plurality of sample data to obtain target function values corresponding to each exploration value;
taking the exploration direction corresponding to the exploration value of which the objective function value meets the condition as the objective exploration direction of the super parameter;
And determining a target range of the super parameter based on the initial value of the super parameter, the target exploration direction and the step length.
Optionally, the superparameter comprises a multidimensional superparameter;
Acquiring different exploration values of the super parameter according to the initial value of the super parameter, different exploration directions and step sizes, and determining a target range of the super parameter according to training results of the plurality of sample data on an initial data processing model configured with the exploration values, wherein the method comprises the following steps:
for a first dimension super parameter in the multi-dimension super parameters, acquiring different exploration values of the first dimension super parameter according to an initial value of the first dimension super parameter, different exploration directions and different step sizes;
Training a first initial data processing model based on a plurality of sample data to obtain objective function values corresponding to each exploration value, wherein the values of the first dimension super parameters in super parameters configured by the first initial data processing model are exploration values with different first dimension super parameters, and the values of other dimension super parameters are initial values;
Taking the exploration direction corresponding to the exploration value of which the objective function value meets the condition as the objective exploration direction of the first dimension super parameter;
determining a target range of the first dimension super parameter based on the initial value of the first dimension super parameter, the target exploration direction and the step length;
And continuing to acquire the exploring value and model training steps for other dimension super parameters in the multi-dimension super parameters until the multi-dimension super parameters acquire the target range, and stopping to acquire the target range of the multi-dimension super parameters.
Optionally, the step of using the target candidate value as the initial value of the super parameter and continuing to perform the search value acquisition, target range determination and target candidate value determination includes:
Adjusting the step length according to the step length attenuation coefficient;
and continuing to execute the exploring value acquisition step, the target range determination step and the target candidate determination step based on the adjusted step length.
Optionally, the determining the candidate value of the super parameter from the target range based on the target range and the historical value information of the super parameter to configure the initial data processing model for training until obtaining the target candidate value of the super parameter includes:
Acquiring a corresponding relation between the value of the super parameter and the value of the objective function based on the target range and the historical value information of the super parameter;
According to the corresponding relation, determining candidate values of the super parameters from the target range;
training an initial data processing model configured with the candidate value of the super parameter based on the plurality of sample data to obtain an objective function value corresponding to the candidate value;
Updating the corresponding relation between the value of the super parameter and the value of the objective function according to the value of the objective function;
And based on the updated corresponding relation, continuing to execute the steps of determining the candidate value and training the model until the second target condition is met, and stopping to obtain the target candidate value of the super parameter.
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 characteristics in a plurality of sample characteristics 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 the objective function value of each sample data according to the prediction results and the corresponding objective results corresponding to the plurality of sample data;
And adjusting the model parameters of the initial data processing model according to the target function value until the model parameters meet a third target condition.
Optionally, the steps of obtaining the exploring value of the super parameter and determining the target range are performed by a first device, the steps of determining the candidate value of the super parameter and determining the target candidate value are performed by a second device, and communication is performed between the first device and the second device through a hypertext transfer protocol HTTP or a secure hypertext transfer protocol HTTPs.
Optionally, the steps of obtaining the explored value of the super parameter and determining the target range are performed by a first thread, the steps of determining the candidate value of the super parameter and determining the target candidate value are performed by a second thread, and data is transferred between the first thread and the second thread through communication.
Fig. 3 is a flow chart of a data processing method according to an exemplary embodiment, as shown in fig. 3, for use in a computer device, the method may include the following steps.
301. In response to the parameter tuning instruction, the computer device obtains a plurality of sample data of a target scene indicated by the parameter tuning instruction from a database.
The parameter adjusting instruction is used for instructing the computer equipment to acquire sample data, adjusting the value of the super parameter of the initial data processing model based on the sample data, determining a target value, configuring the initial data processing model, and training the configured initial data processing model to obtain the data processing model. If the computer device has data processing requirements, the data can be processed based on the trained data processing model.
The database may store and manage data from which relevant data may be extracted if other devices have a need for data acquisition. In embodiments of the present disclosure, the database may include stored sample data required for model training. Of course, other data may be included in the database, for example, initial values for the hyper-parameters of the initial data processing model may be stored in the database, which may be preset by the relevant technician. For another example, the database may also store a step attenuation coefficient, etc., which is not limited by the embodiments of the present disclosure.
In one possible implementation, the database may store sample data of multiple scenes, and the computer device may obtain sample data of a required scene according to its own requirement. Accordingly, in step 301, the computer device may respond to the parameter tuning instruction, and obtain, from the database, a plurality of sample data corresponding to the identification information according to the identification information of the target scene in the parameter tuning instruction. Of course, the computer device may also acquire other data, such as initial values of the hyper-parameters of the initial data processing model described above, or step attenuation coefficients, or both.
302. The computer device obtains an initial value of the super parameter, and the super parameter is a multidimensional super parameter.
The initial value of the super parameter can be set by the related technician according to the requirement, and the initial value can be set in the computer equipment or can be stored in the database. The super parameter may be a multi-dimensional super parameter, and the initial value of the super parameter includes the initial value of each dimension of the super parameter.
When the computer device needs to perform parameter adjustment (i.e. parameter optimization), the initial value of the super parameter may be extracted from the stored data, or the initial value of the super parameter may be extracted from the database, which is not limited in the embodiment of the present disclosure.
303. For a first dimension super parameter in the multi-dimension super parameters, the computer equipment obtains different exploration values of the first dimension super parameter according to the initial value of the first dimension super parameter, different exploration directions and different step sizes.
The computer device may explore the hyper-parameters from different exploration directions and perform the model training steps shown below in step 304 for each exploration result to determine the target exploration direction for the hyper-parameters. The super-parameters are multi-dimensional super-parameters, and the computer equipment can explore each dimension of the super-parameters from different exploration directions to determine the target exploration direction of each dimension of the super-parameters.
In the step 303, the first dimension super parameter is any dimension super parameter in the multi-dimension super parameters, the computer device may obtain the exploration value of the first dimension super parameter to execute the subsequent steps 304, 305 and 306, and may execute the steps similar to the step 303 on the other dimension super parameters in the multi-dimension super parameters to obtain the exploration value of the other dimension super parameters, and continue to execute the subsequent steps 304, 305 and 306 until all dimension super parameters determine the target range.
For example, the multi-dimensional super parameters are N-dimensional super parameters, which are super parameter 1, super parameter 2, , super parameter N, respectively, wherein N is an integer greater than 1. In step 303, the computer device obtains different search values of the super parameter 1 according to the initial value, different search directions and different step sizes of the super parameter 1. Subsequently, when this step 303 is performed again, the computer device may obtain different exploration values of the superparameter 2 until different exploration values of the superparameter N are obtained.
The search direction (also referred to as a coordinate direction) may include various types, such as a forward search direction (also referred to as a forward search direction) and a reverse search direction. Specifically, in the step 303, the computer device may obtain the first exploration value and the second exploration value of the first dimension super parameter according to the initial value, the forward exploration direction, the reverse exploration direction and the step length of the first dimension super parameter. That is, the computer device may obtain a first search value of the first dimension super parameter according to the initial value, the forward search direction, and the step length of the first dimension super parameter, and obtain a second search value of the first dimension super parameter according to the initial value, the reverse search direction, and the step length of the first dimension super parameter. Furthermore, the two exploration values can be respectively configured to the initial data processing model for model training, which exploration direction to explore can be determined, and the performance of the initial data processing model is improved.
In a specific possible embodiment, the computer device may obtain the product of the direction vector and the step size of different exploration directions, obtain the sum of the product and the initial value of the first dimension super parameter, and take the sum as the exploration value of the first dimension super parameter.
304. The computer equipment trains a first initial data processing model based on a plurality of sample data to obtain the value of an objective function corresponding to each exploration value, wherein the value of a first dimension super parameter in super parameters configured by the first initial data processing model is an exploration value with different first dimension super parameters, and the values of other dimension super parameters are initial values.
After the computer equipment obtains the exploration values of the first dimension super parameters, the values of other super parameters can be kept unchanged as initial values, the initial values are used as different groups of super parameters, super parameter configuration is carried out on the initial data processing model, the configured initial data processing model is trained based on a plurality of obtained sample data, and the objective function values of the initial data processing model configured with each group of current values are determined.
The objective function value is used to indicate the data processing capability of the current initial data processing model, and the objective function can be set by the relevant technicians according to requirements, which is not limited by 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 to process the data, or the error of the current initial data processing model to process the data, or the speed of the current initial data processing model to process the data, etc.
The data processing model may be any model, in one 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, the super parameters of the random forest may include parameters of an RF framework and parameters of an RF decision tree, and the parameter adjustment manner provided by the embodiment of the present disclosure may be applied to optimize any one or more super parameters, which is not limited. Specifically, taking the data processing model as a random forest model for illustration, 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.
Step one, computer equipment randomly selects a plurality of sample data from the plurality of sample data, inputs the plurality of sample data into the initial data processing model, classifies randomly selected characteristics in a plurality of sample characteristics in the plurality of sample data by the initial data processing model, and outputs a prediction result corresponding to the plurality of sample data.
In the first step, the process of randomly selecting the plurality of sample data by the computer device may be a replaced extraction process, 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 N sample data into the initial data processing model to classify the N sample data to obtain the prediction result, and then may randomly select one sample data from the N sample data to perform model training, where the sample data randomly selected again may be the same as or different from the sample data randomly selected previously. The computer device may proceed with the selection process an additional N-2 times, N being a positive integer greater than 1.
Each sample data may have a plurality of sample features, and when classifying, the computer device may randomly select one or more sample features from the plurality of sample features to classify, for example, the number of sample features may be M, the computer device may randomly select M sample features from the M sample features to classify, where M is less than or equal to M, and M and N are both positive integers.
When the computer equipment selects one or more sample characteristics for classification, one sample characteristic can be selected randomly for classification, and then the next sample characteristic is selected randomly for classification based on the classification result, and the like.
And step two, the computer equipment determines the objective function value of each sample data according to the prediction results and the corresponding objective results corresponding to the plurality of sample data.
Each sample data carries a corresponding target result, the target result is a real and accurate result, and the accuracy or error of the predicted result can be determined through the predicted result and the target result, so that whether the model parameters need to be adjusted or not is determined, and the data processing capacity of the model is improved.
The objective function is used for measuring the data processing capacity of the current initial data processing model. The target function value is determined by the prediction result and the target result, and the target function value can be used for measuring the accuracy or the error of the prediction result, or the target 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 other functions, and the embodiments of the present disclosure do not limit the objective function and the objective function value.
And thirdly, the computer equipment adjusts the model parameters of the initial data processing model according to the target function value until the model parameters meet a third target condition.
After the data processing capacity of the initial data processing model in the current iteration is known through the objective function value, whether the model parameters are required to be adjusted or not can be determined according to the objective function value, and how to adjust 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 can determine the time when the training is finished through a third target condition. The third target condition may be set by a related technician according to a requirement, for example, the target function value may be converged, or the target function value is greater than a target threshold, or the iteration number reaches a target number of times, which is not limited in the embodiments of the present disclosure.
305. 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 dimension super parameter.
The search values of the first dimension super parameters are obtained based on different search directions, and the target function is used for taking the values, so that which search direction can improve the data processing capability of the initial data processing model can be determined, and the search direction can be used as a target search direction, and the target search direction is a forward or better search direction.
The target search direction can be selected by setting a condition for the objective function value, and when the objective function value meets the condition, for example, the accuracy is improved or higher than a certain value, or the loss value is reduced or lowered, and the like, the search direction can improve the data processing capability of the initial data processing model.
The objective function value meeting condition can comprise various conditions, and can be set by related technicians according to requirements. For example, if the objective function value is accuracy, the objective function value compliance condition may be that the accuracy is greater than an accuracy threshold, or may also be that the objective function value of one of the exploration values is greater than the objective function value of the other exploration value; if the objective function value is a loss value, the loss may be less than a loss value threshold, or the objective function value of one of the exploration values may also be less than the objective function value of the other exploration value, which is not limited by the embodiments of the present disclosure.
By this step 305, the hyper-parameter search direction having positive feedback on the processing performance of the initial data processing model is determined as the target search direction, that is, the accuracy of the initial data processing model processing data can be improved, the error can be reduced, and the efficiency can be improved after changing the hyper-parameter value to the search value.
306. The computer device determines a target range for the first dimension super parameter based on the initial value of the first dimension super parameter, the target exploration direction, and the step size.
After the computer equipment determines the target exploration direction of the first dimension super parameter, the target range of the first dimension super parameter can be determined, and the target range is the exploration range of the first dimension super parameter. The computer equipment can select the value of the first dimension super parameter in the target range, carry out the subsequent model configuration and training process and further determine the optimal value of the first dimension super parameter.
The exploration process can extend the initial value by setting the step length and the exploration direction to obtain the target range. Specifically, the computer device may determine a boundary of the target range of the first dimension super parameter according to the initial value of the first dimension super parameter, the target exploration direction, and the step size.
In one possible implementation, the computer device may take as the target range a range between a product of an initial value of the first dimension super parameter and a direction vector and a step size of the target exploration direction and a sum of the initial values. The boundary of the target range is an initial value, and the sum of the product of the direction vector of the target exploration direction and the step length and the initial value is respectively. That is, [ initial value, initial value+direction vector x step size of target search direction ]. That is, the computer device may acquire the initial value as a first boundary of a target range, and obtain the target range by taking a sum of a product of a direction vector of the target search direction and a step size 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 dimension super parameters in the multi-dimension super parameters until the multi-dimension super parameters all obtain the target range, and stops to obtain the target range of the multi-dimension super parameters.
The computer device may determine the target ranges of other dimension super parameters by adopting the same process as the above, so as to obtain the target ranges of all dimension super parameters, which will not be described herein.
The steps 303 to 307 are processes of obtaining the exploration value of the super parameter according to the initial value, the exploration direction and the step length of the super parameter, determining the target range of the super parameter according to the training result of the plurality of sample data on the initial data processing model configured with the exploration value, and exploring the super parameter to obtain the exploration range through the initial value and the step length in the process, so as to perform the subsequent optimal super parameter determination process.
The steps 303 to 307 are processes of obtaining different search values of the super parameter according to the initial value, different search directions and step sizes of the super parameter, training the initial data processing model configured with the different search values based on the plurality of sample data to obtain an objective function value corresponding to each search value, taking the search direction corresponding to the search value with the objective function value meeting the condition as the target search direction of the super parameter, and determining the target range of the super parameter based on the initial value of the super parameter, the target search direction and the step sizes, where the super parameter may be a multi-dimensional super parameter, that is, the processes shown in the steps 303 to 307. Of course, the super parameter may be a one-dimensional super parameter, and the processing is the same as that of the above steps 303 to 307, and will not be described herein.
308. The computer equipment obtains the corresponding relation between the value of the super parameter and the value of the objective function based on the target range and the historical value information of the super parameter.
The historical value information may also be referred to as historical exploration information of the super parameter, and a correspondence relationship between the value of the super parameter and the value of the objective function may be determined from the historical value information. Through the correspondence, the following steps can be further executed, and when the super parameter is analyzed to be valued in the target range, the corresponding prediction objective function is valued, so that candidate values are selected from the target range to try.
Optionally, the obtaining process of the correspondence may be a process of creating a probability model, and specifically, the computer device may establish a probability model based on the target range and the historical value information of the hyper-parameter, where the probability model is used to reflect the correspondence 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, the corresponding relation between the value of the hyper-parameter and the value of the objective function is obtained by fitting, and the corresponding relation is the probability model or may be called a function.
309. And the computer equipment determines the candidate value of the super parameter from the target range according to the corresponding relation.
The computer equipment determines the corresponding relation between the value of the super parameter and the value of the objective function, so that the value of the objective function corresponding to various value combinations of the super parameter in the objective range can be analyzed, and then candidate values with the objective function value meeting the condition can be selected from the values.
In one possible implementation, this step 309 may be implemented based on a pick function (ACquisition function, AC function). The AC functions may include a variety of, for example, probability of Improvement (PI), excepted Improvement (EI), GP Upper Confidence Bound (GP-UCB), and may also include other types of AC functions. The embodiments of the present disclosure are not limited as to which AC function is specifically employed.
310. Based on the plurality of sample data, the computer equipment trains an initial data processing model configured with the candidate value of the super parameter to obtain the objective function value corresponding to the candidate value.
After determining the candidate values of the hyper-parameters, the computer device may perform the hyper-parameter configuration and model training process for the initial data processing model, which is the same as the above step 304, and will not be described in detail herein.
311. And the computer equipment updates the corresponding relation between the value of the super parameter and the value of the objective function according to the value of the objective function.
After the computer device obtains the objective function value, the candidate value of the super parameter in the current model training process may also be used as the historical value information, so as to update the corresponding relationship between the super parameter value and the objective function value, where it can be understood that the corresponding relationship is updated, and the selected candidate value may 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 the second target condition is met, and the target candidate value of the super parameter is obtained.
The second target condition may be set by a related technician according to a requirement, for example, the target function value may be converged, or the target function value is greater than a second target threshold, or the iteration number reaches a second target number, which is not limited in the embodiments of the present disclosure. The second target threshold and the second target number of times may be set by a person of ordinary skill in the art as desired, which is not limited by the embodiments of the present disclosure.
Based on the target range and the historical value information of the super parameter, the steps 308 to 312 determine the candidate value of the super parameter from the target range to configure the initial data processing model for training until the process of obtaining the target candidate value of the super parameter is achieved. On the other hand, when the target value of the super parameter is determined, the target range of the super parameter is determined by searching through the initial value, the searching direction, the step length and the like of the super parameter, the target candidate value is determined and then used as the initial value to continuously determine the target range of the super parameter, compared with the process of manually setting the searching boundary, the searching range of the super parameter can be expanded, the process of searching the optimal super parameter searching direction is quickened, the situation that the optimal super parameter cannot be found due to improper setting of the searching boundary can be avoided, the parameter adjusting accuracy and efficiency are improved, and the accuracy and the efficiency of overall data processing are further improved.
313. The computer device continues to execute steps 303 to 312 with the target candidate value as an initial value of the super parameter until the first target condition is met, obtains a target value of the super parameter, and trains the obtained data processing model to the initial data processing model configured with the target value.
Through the steps 308 to 312, an optimal super-parameter value is determined from the target range, that is, the target candidate value is the optimal value of the super-parameter value within the target range, and the computer device may further expand the exploration range (that is, the target range) to further determine the optimal super-parameter value, so that obtaining of a local optimal value can be avoided, and obtaining of a more accurate value can be avoided. 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 above steps 303 to 312, which are not repeated here in the embodiments of the present disclosure.
The target range is obtained through exploration, the optimal solution is solved in the target range, the exploration range is further enlarged, a new target range is explored, the optimal solution is solved in the new target range, each exploration and each optimal solution solving process can be regarded as one iteration, and more accurate super-parameter values can be obtained through multiple iterations.
Under this multiple iteration, a first target condition may be set for it as a condition for the end of the iteration. The first target condition may be set by a related technician according to a requirement, for example, the target function value may be converged, or the target function value is greater than a first target threshold, or the iteration number reaches a first target number, which is not limited in the embodiments of the present disclosure. The first target threshold or first target number may be set by a person of ordinary skill in the art as desired, and embodiments of the present disclosure are not limited in this regard.
In one possible implementation, in order to avoid too long a search time, or to avoid too much meaningless search, or to perform more accurate search, a step attenuation coefficient may be set, and when the above steps are repeatedly performed, that is, when the next iteration is performed, the step may be adjusted by the step attenuation coefficient, so that the step is attenuated gradually. 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 exploring value obtaining step, and the target range determining and the target candidate determining steps.
Through steps 301 to 313, the computer device trains to obtain a data processing model, and when there is a data processing requirement, the computer device can call the data processing model to process data by using the data processing model. The steps 303 to 307 may be implemented using a coordinate descent algorithm, and the steps 308 to 312 may be implemented using a bayesian optimization method.
314. The computer device processes the target data of the target scene according to the data processing model in response to the data processing instructions.
The data processing instruction can be triggered by user operation, can be a data processing instruction sent by other computer equipment, and can be a target instruction.
For example, a user may want to process target data of a target scene by the computer device, may operate on the computer device, trigger the data processing instruction, and the computer device may receive the data processing instruction, i.e. may perform a data processing step in response to the data processing instruction.
For another example, if the target data of the target scene is generated on another computer device and needs to be processed, the data of the target scene and the data processing instruction may be sent to the computer device, and the computer device receives the target data of the target scene and the data processing instruction, and may respond to the data processing instruction to process the target data.
For another example, other computer devices are configured to send data processing instructions to the computer device, where the computer device, in response to the data processing instructions, obtains target data for a target scene from a target address indicated by the data processing instructions.
For another example, the computer device generates target data of the target scene when processing other data, and further processing of the target data is required, so that the receiving and executing of the data processing instruction can be triggered.
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 classified scene, the data processing model may be a random forest model or other classified models.
For the target scene, the target scene may be any data processing scene, and the target scene is different, and the processing of the data is different. For example, the target scenario may be a resource release scenario, in which the data and the sample data may be a resource to be released and a user to be released, and the data processing model may be used to determine a user set to be released from the user to be released according to the resource to be released, that is, the data processing model may be a model determined for the user set, and the computer device is used to determine a super parameter value of the model and give the super parameter value to the model to train, so that the trained model can be used to process the resource to be released and determine the user set to be released. In this scenario, the data processing model may also be used to determine, from the resources to be released, resources to be released to the user to be released according to the user to be released, or to sort the resources to be released according to the user to be released, and to release according to the sorting.
For another example, the data processing scene may be a target recognition scene, the data and the sample data may be images or videos, and the data processing model may be a target recognition model, where the target recognition model is used for recognizing a target in the images or videos, outputting a position of the target, or labeling the target after recognizing the target, and outputting the labeled images or videos. Accordingly, 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 the target recognition model.
For another example, the data processing scenario may be a classification, decision-making scenario, and the data processing model may be a classification, decision-making model that is used to make decisions on the target problem, e.g., determine whether the user will click to play a presentation resource based on the user's personal information. The data processing model may be a random forest model, and the types of the target scene and the data processing model are not particularly limited in the embodiments of the present disclosure. In this scenario, when processing the target data, a decision tree may be used to extract features, then classify the features, and output a classification result.
The above steps 301 to 314 are only described by taking steps such as model training and data processing on a computer device as an example, specifically, the steps of obtaining the search value of the super parameter and determining the target range are performed by a first thread, the steps of determining the candidate value of the super parameter and determining the target candidate value are performed by a second thread, and data is transferred between the first thread and the second thread through communication.
In another possible implementation, the above steps may also be performed cooperatively by a plurality of computer devices. In one possible implementation, the steps of obtaining the explored value of the super parameter and determining the target range are performed by a first device, the steps of determining the candidate value of the super parameter and determining the target candidate value are performed by a second device, and communication is performed between the first device and the second device via a hypertext transfer protocol (Hyper Text Transfer Protocol, HTTP) or a secure hypertext transfer protocol (Hyper Text Transfer Protocol over Secure Socket Layer, HTTPS).
In the following, a specific example is provided, in which a coordinate descent algorithm is adopted in the process of exploring the target range, a bayesian optimization algorithm is adopted in the process of determining the target candidate value, and a data processing model is exemplified by a random forest module, and in this specific example, a data processing system is provided, and 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 performing overall control on the flow, the flow control service module can be connected with the database service, sample data required by model training can be extracted from the database service module, initial values of super parameters required by parameter adjustment and the like, and the flow control service module can also store the data processed by other modules into the database service module. The flow control service module may acquire initial values of the sample data and the super parameters, send the initial values to the coordinate descent algorithm service module, execute the target range determining step of the steps 303 to 307 by the coordinate descent algorithm service module, return the target range to the flow control service module, provide data service for the data processing system by the flow control service module, send the target range to the bayesian optimization algorithm service module, determine the target candidate value from the target range by the bayesian optimization algorithm service module, and return the target candidate value to the flow control service module. The coordinate descent algorithm service module can determine the exploration value, the flow control service module sends the exploration value and the sample data to the random forest model training service module for model training, and the coordinate descent algorithm service module continues to explore until the target range is determined based on the model training result. The Bayesian optimization algorithm service module can also determine candidate values from the target range, and the flow control service module forwards the candidate values to the random forest model training service module for model training, and continues to determine the candidate values based on the model training result until the target candidate values are determined.
As shown in fig. 5, the method steps provided by the embodiments 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, the coordinate descent algorithm service sequentially explores each parameter in positive or negative step length, keeps other parameters unchanged when exploring a certain parameter, and returns the explored result to the control module through an http request.
Step 3, the control module writes the suggested value of the exploration result parameter obtained by the coordinate descent method into a coordinate descent exploration table, judges whether all parameters have been explored, and if yes, carries out step 5; if not, the process loops to step 4.
And 4, transmitting the suggested parameters of the coordinate descent algorithm service to a random forest model training module for training, collecting indexes of model training, writing 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, after the optimization directions of all the parameters are found, the control module takes the [ initial value, initial value+optimization direction step length ] range of the parameters as the exploration range of one Bayesian optimization algorithm iteration, writes 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 try parameters by the Bayesian algorithm according to the exploration range and the exploration historical parameter information transmitted by the control module, and transmitting the new try parameters back to the control module.
And 7, transmitting suggested parameters of the Bayesian algorithm to a random forest model training module by the control module for training, collecting indexes of model training, and writing index results and corresponding parameters into a Bayesian optimization exploration historical parameter information table. And judging whether a Bayesian stopping condition is met, if the number of loop iterations is reached or the index reaches the expectation, if not, sending an index result to Bayesian algorithm service through an http request, and executing the step 6.
Step 8, the control module judges whether the stopping condition of the parameter adjustment experiment is met, if the maximum iteration number of the parameter adjustment experiment is reached or the index reaches the expected value, the optimal parameters and the corresponding models are stored; 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 of a data processing apparatus according to an example embodiment. Referring to fig. 6, the apparatus includes:
an obtaining unit 601 configured to perform obtaining, in response to a parameter tuning instruction, a plurality of sample data of a target scene indicated by the parameter tuning instruction from a database;
The obtaining unit 601 is further configured to obtain an exploration value of the super parameter according to an initial value, an exploration direction and a step size of the super parameter;
A first determining unit 602 configured to determine a target range of the super parameter based on training results of the plurality of sample data on the initial data processing model configured with the exploration value;
A second determining unit 603 configured to perform a training based on the target range and the historical value information of the super parameter, and determine a candidate value of the super parameter from the target range to configure the initial data processing model until a target candidate value of the super parameter is obtained;
The acquiring unit 601, the first determining unit 602, and the second determining unit 603 are further configured to perform the steps of taking the target candidate value as an initial value of the super parameter, continuing to perform the acquisition of the search value, the determination of the target range, and the determination of the target candidate value until a first target condition is met, obtaining a target value of the super parameter, and training the obtained data processing model with respect to the initial data processing model configured with the target value, respectively;
a processing unit 604 configured to execute processing of the target data of the target scene according to the data processing model in response to the data processing instructions.
According to the device provided by the embodiment of the disclosure, the sample data can be automatically acquired from the database in response to the parameter adjustment instruction, the parameter adjustment step is executed to obtain the target value of the super parameter and the data processing model obtained by training the initial data processing model configured with the target value, and if the 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 super parameter is determined, the target range of the super parameter is determined by searching through the initial value, the searching direction, the step length and the like of the super parameter, the target candidate value is determined and then used as the initial value to continuously determine the target range of the super parameter, compared with the process of manually setting the searching boundary, the searching range of the super parameter can be expanded, the process of searching the optimal super parameter searching direction is quickened, the situation that the optimal super parameter cannot be found due to improper setting of the searching boundary can be avoided, the parameter adjusting accuracy and efficiency are improved, and the accuracy and the efficiency of overall data processing are further improved.
Optionally, the obtaining unit 601 is configured to obtain different exploration values of the super parameter according to an initial value of the super parameter, different exploration directions and step sizes;
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 target function values corresponding to each exploration value;
taking the exploration direction corresponding to the exploration value of which the objective function value meets the condition as the objective exploration direction of the super parameter;
And determining a target range of the super parameter based on the initial value of the super parameter, the target exploration direction and the step length.
Optionally, the superparameter comprises a multidimensional superparameter;
The obtaining unit 601 is configured to obtain, for a first dimension super parameter of the multi-dimension super parameters, different search values of the first dimension super parameter according to an initial value of the first dimension super parameter, different search directions and step sizes;
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 objective function values corresponding to each exploration value, wherein the values of the first dimension super parameters in super parameters configured by the first initial data processing model are exploration values with different first dimension super parameters, and the values of other dimension super parameters are initial values;
Taking the exploration direction corresponding to the exploration value of which the objective function value meets the condition as the objective exploration direction of the first dimension super parameter;
determining a target range of the first dimension super parameter based on the initial value of the first dimension super parameter, the target exploration direction and the step length;
The acquiring unit 601 and the first determining unit 602 are respectively configured to perform the steps of continuing to acquire the exploring value and training the model for other dimension super parameters in the multi-dimension super parameters, and stopping until the multi-dimension super parameters acquire the target range, thereby acquiring the target range of the multi-dimension super parameters.
Optionally, the apparatus further comprises:
An adjusting unit configured to perform adjustment of the step size according to the step size attenuation coefficient;
The acquisition unit 601 and the first determination unit 602 are further configured to perform the step of continuing to perform the search value acquisition step, and the target range determination and the target candidate determination 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 super parameter and the value of the objective function based on the target range and the historical value information of the super parameter;
According to the corresponding relation, determining candidate values of the super parameters from the target range;
training an initial data processing model configured with the candidate value of the super parameter based on the plurality of sample data to obtain an objective function value corresponding to the candidate value;
Updating the corresponding relation between the value of the super parameter and the value of the objective function according to the value of the objective function;
And based on the updated corresponding relation, continuing to execute the steps of determining the candidate value and training the model until the second target condition is met, and stopping to obtain the target candidate value of the super parameter.
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 characteristics in a plurality of sample characteristics 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 the objective function value of each sample data according to the prediction results and the corresponding objective results corresponding to the plurality of sample data;
And adjusting the model parameters of the initial data processing model according to the target function value until the model parameters meet a third target condition.
Optionally, the steps of obtaining the exploring value of the super parameter and determining the target range are performed by a first device, the steps of determining the candidate value of the super parameter and determining the target candidate value are performed by a second device, and communication is performed between the first device and the second device through a hypertext transfer protocol HTTP or a secure hypertext transfer protocol HTTPs.
Optionally, the steps of obtaining the explored value of the super parameter and determining the target range are performed by a first thread, the steps of determining the candidate value of the super parameter and determining the target candidate value are performed by a second thread, and data is transferred between the first thread and the second thread through communication.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 7 is a block diagram of a terminal according to an exemplary 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 picture expert compression standard audio plane 3), an MP4 (Moving Picture Experts Group Audio Layer IV, motion picture expert compression standard audio plane 4) player, a notebook computer, or a desktop computer. Terminal 800 may also be referred to by other names of user devices, portable terminals, laptop terminals, desktop terminals, and the like.
In general, the terminal 700 includes: one or more processors 701, and one or more memories 702.
Processor 701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 701 may be implemented in at least one hardware form of DSP (DIGITAL SIGNAL processing), FPGA (field-programmable gate array), PLA (Programmable Logic Array ). The processor 701 may also include a main processor and a coprocessor, wherein the main processor is a processor for processing data in an awake state, and is also called a CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 701 may integrate a GPU (Graphics Processing Unit, data recommender) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 701 may also 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 a bus or signal lines. The individual peripheral devices may be connected to the peripheral device interface 703 via buses, signal lines or a circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 704, touch display 705, camera 706, audio circuitry 707, positioning component 708, and power supply 709.
A peripheral interface 703 may be used to connect I/O (Input/Output) related at least one peripheral device to the processor 701 and memory 702. In some embodiments, the processor 701, memory 702, and peripheral interface 703 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 701, the memory 702, and the peripheral interface 703 may be implemented on separate chips or circuit boards, which is not limited in this embodiment.
The Radio Frequency circuit 704 is configured to receive and transmit RF (Radio Frequency) signals, also referred to as electromagnetic signals. The radio frequency circuitry 704 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 704 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 704 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. The radio frequency circuitry 704 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (WIRELESS FIDELITY ) networks. In some embodiments, the radio frequency circuitry 704 may also include NFC (NEAR FIELD Communication) related circuitry, which is not limited by the present 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 705 is a touch display, the display 705 also has the ability to collect touch signals at or above the surface of the display 705. The touch signal may be input to the processor 701 as a control signal for processing. At this time, the display 705 may also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, the display 705 may be one, providing a front panel of the terminal 700; in other embodiments, the display 705 may 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 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 other materials.
The camera assembly 706 is used to capture images or video. Optionally, the camera assembly 706 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal and the rear camera is disposed on the rear surface of the terminal. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and Virtual Reality (VR) shooting function or other fusion shooting functions. In some embodiments, camera assembly 706 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
The audio circuit 707 may include a microphone and a speaker. The microphone is used for collecting sound waves of users and environments, 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 for voice communication. For the purpose of stereo acquisition or noise reduction, a plurality of microphones may be respectively disposed at different portions of the terminal 700. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is used to convert electrical signals from the processor 701 or the radio frequency circuit 704 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, the audio circuit 707 may also include a headphone jack.
The location component 708 is operative to locate the current geographic location of the terminal 700 for navigation or LBS (Location Based Service, location-based services). The positioning component 708 may be a positioning component based on the United states GPS (Global Positioning System ), the Beidou system of China, the Granati system of Russia, or the Galileo system of the European Union.
A power supply 709 is used to power the various components in the terminal 700. The power supply 709 may be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 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, the terminal 700 further includes one or more sensors 710. The one or more sensors 710 include, but are not limited to: acceleration sensor 711, gyroscope sensor 712, pressure sensor 713, fingerprint sensor 714, optical sensor 715, and proximity sensor 716.
The acceleration sensor 711 can detect the magnitudes of accelerations on three coordinate axes of the coordinate system established with the terminal 700. For example, the acceleration sensor 711 may be used to detect the components of the gravitational acceleration in three coordinate axes. The processor 701 may control the touch display screen 705 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signal acquired by the acceleration sensor 711. The acceleration sensor 711 may also be used for the 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 collect a 3D motion of the user to the terminal 700 in cooperation with the acceleration sensor 711. The processor 701 may implement the following functions based on the data collected by the gyro sensor 712: motion sensing (e.g., changing UI according to a tilting operation by a user), image stabilization at shooting, game control, and inertial navigation.
The pressure sensor 713 may be disposed at a side frame of the terminal 700 and/or at a lower layer of the touch display screen 705. When the pressure sensor 713 is disposed at a side frame of the terminal 700, a grip signal of the user to the terminal 700 may be detected, and the processor 701 performs left-right hand recognition or quick operation according to the grip signal collected by the pressure sensor 713. When the pressure sensor 713 is disposed at the lower layer of the touch display screen 705, the processor 701 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 705. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
The fingerprint sensor 714 is used to collect a fingerprint of the user, and the processor 701 identifies the identity of the user based on the fingerprint collected by the fingerprint sensor 714, or the fingerprint sensor 714 identifies the identity of the user based on the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the user is authorized by the processor 701 to have associated sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. The fingerprint sensor 714 may be provided on the front, back or side of the terminal 700. When a physical key or vendor Logo is provided on the terminal 700, the fingerprint sensor 714 may be integrated with the physical key or 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 intensity of the ambient light is high, the display brightness of the touch display screen 705 is turned up; when the ambient light intensity is low, the display brightness of the touch display screen 705 is turned down. In another embodiment, the processor 701 may also dynamically adjust the shooting parameters of the camera assembly 706 based on the ambient light intensity collected by the optical sensor 715.
A proximity sensor 716, also referred to as a distance sensor, is typically provided on the front panel of the terminal 700. The proximity sensor 716 is used to collect the distance between the user and the front of the terminal 700. In one embodiment, when the proximity sensor 716 detects that the distance between the user and the front face of the terminal 700 gradually decreases, the processor 701 controls the touch display 705 to switch from the bright screen state to the off screen state; when the proximity sensor 716 detects that the distance between the user and the front surface of the terminal 700 gradually increases, the processor 701 controls the touch display screen 705 to switch from the off-screen state to the on-screen state.
Those skilled in the art will appreciate that the structure shown in fig. 7 is not limiting of the terminal 700 and may include more or fewer components than shown, or may combine certain components, or may employ a different arrangement of components.
8 fig. 8 is a schematic diagram of a server according to an exemplary embodiment, where the server 800 may have a relatively large difference between configurations or performances, and may include one or more processors (Central Processing Units, CPU) 801 and one or more memories 802, where at least one instruction is stored in the memories 802, and at least one instruction is loaded and executed by the processor 801 to implement the methods provided in the foregoing method embodiments. Of course, the server may also have a wired or wireless network interface, a keyboard, an input/output interface, and other components for implementing the functions of the device, which are not described herein.
Server 800 may be used to perform the steps performed by the server in the data processing method.
Fig. 9 is a schematic structural view of a computer device shown according to an exemplary embodiment, see fig. 9, the computer device comprising: one or more processors 901, one or more memories 902, and a communication interface 903.
The processor 901 includes any combination of one or more of a variety of processors, for example, a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU), an acceleration processor (ACCELERATED PROCESSING UNIT, APU), a tensor processing unit (Tensor Processing Unit, TPU), an embedded neural network processor (Neural-Network Processing Units, NPU), a deep learning processor (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 processors, the processors are integrated in one chip.
The communication interface 903 is used to connect the computer device to a network, to enable the computer device to send data to the network through the communication interface 903, or to enable the computer device to obtain data from the network through the communication interface 903. Wherein the communication interface 903 comprises a wired communication interface and/or the communication interface comprises a wireless communication interface. The communication interface 903 can support the functionality of wired and/or wireless communication of the computer device.
The 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 nonvolatile 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 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, causes 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 the exploration value of the super parameter according to the initial value, the exploration direction and the step length of the super parameter;
Determining a target range of the super parameter according to training results of the plurality of sample data on an initial data processing model configured with the exploration value;
Determining candidate values of the super parameters from the target range based on the target range and the historical value information of the super parameters so as to configure the initial data processing model for training until the target candidate values of the super parameters are obtained;
Taking the target candidate value as an initial value of the super parameter, continuing to execute the steps of acquiring the exploring value, determining the target range and determining the target candidate value until the first target condition is met, obtaining a target value of the super parameter, and training an initial data processing model configured with the target value to obtain a data processing model;
And responding to the data processing instruction, and processing target data of the target scene according to the data processing model.
Optionally, the computer device further comprises a communication bus for communicating messages between the processor, memory and 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 super parameter according to the initial value of the super parameter, different exploration directions and different step sizes;
training an initial data processing model configured with the different exploration values based on the plurality of sample data to obtain target function values corresponding to each exploration value;
taking the exploration direction corresponding to the exploration value of which the objective function value meets the condition as the objective exploration direction of the super parameter;
And determining a target range of the super parameter based on the initial value of the super parameter, the target exploration direction and the step length.
Optionally, the superparameter comprises a multidimensional superparameter;
The at least one instruction, when executed by the one or more processors 901, cause the computer device to perform the steps of:
for a first dimension super parameter in the multi-dimension super parameters, acquiring different exploration values of the first dimension super parameter according to an initial value of the first dimension super parameter, different exploration directions and different step sizes;
Training a first initial data processing model based on a plurality of sample data to obtain objective function values corresponding to each exploration value, wherein the values of the first dimension super parameters in super parameters configured by the first initial data processing model are exploration values with different first dimension super parameters, and the values of other dimension super parameters are initial values;
Taking the exploration direction corresponding to the exploration value of which the objective function value meets the condition as the objective exploration direction of the first dimension super parameter;
determining a target range of the first dimension super parameter based on the initial value of the first dimension super parameter, the target exploration direction and the step length;
And continuing to acquire the exploring value and model training steps for other dimension super parameters in the multi-dimension super parameters until the multi-dimension super parameters acquire the target range, and stopping to acquire the target range of the multi-dimension super 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 exploring value acquisition step, the target range determination step and the target candidate 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 super parameter and the value of the objective function based on the target range and the historical value information of the super parameter;
According to the corresponding relation, determining candidate values of the super parameters from the target range;
training an initial data processing model configured with the candidate value of the super parameter based on the plurality of sample data to obtain an objective function value corresponding to the candidate value;
Updating the corresponding relation between the value of the super parameter and the value of the objective function according to the value of the objective function;
And based on the updated corresponding relation, continuing to execute the steps of determining the candidate value and training the model until the second target condition is met, and stopping to obtain the target candidate value of the super parameter.
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 characteristics in a plurality of sample characteristics 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 the objective function value of each sample data according to the prediction results and the corresponding objective results corresponding to the plurality of sample data;
And adjusting the model parameters of the initial data processing model according to the target function value until the model parameters meet a third target condition.
Optionally, the steps of obtaining the exploring value of the super parameter and determining the target range are performed by a first device, the steps of determining the candidate value of the super parameter and determining the target candidate value are performed by a second device, and communication is performed between the first device and the second device through a hypertext transfer protocol HTTP or a secure hypertext transfer protocol HTTPs.
Optionally, the steps of obtaining the explored value of the super parameter and determining the target range are performed by a first thread, the steps of determining the candidate value of the super parameter and determining the target candidate value are performed by a second thread, and data is transferred between the first thread and the second thread through communication.
In an exemplary embodiment, a storage medium is also provided, e.g. a memory, comprising instructions executable by a processor of an apparatus to perform the above-described data processing method. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
In an exemplary embodiment, a computer program product is also provided, which, when executed by a processor of a computer device, enables the computer device to perform a 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 adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (16)

1. A method of data processing, 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 different exploration values of the super parameters according to the initial values of the super parameters, different exploration directions and step sizes;
training an initial data processing model configured with the different exploration values according to the plurality of sample data to obtain target function values corresponding to each exploration value; taking the exploration direction corresponding to the exploration value of which the objective function value meets the condition as the objective exploration direction of the super parameter; determining a target range of the super parameter based on the initial value of the super parameter, the target exploration direction and the step length;
Determining candidate values of the super parameters from the target range based on the target range and the historical value information of the super parameters so as to configure the initial data processing model for training until the target candidate values of the super parameters are obtained;
Taking the target candidate value as an initial value of the super parameter, continuing to execute the steps of acquiring the exploration value, determining the target range and determining the target candidate value until the first target condition is met, obtaining a target value of the super parameter, and training an initial data processing model configured with the target value to obtain a data processing model;
responding to a data processing instruction, and processing target data of the target scene according to the data processing model;
The target scene is a target identification scene, the target data is an image or a video, and the sample data is an image or a video.
2. The data processing method of claim 1, wherein the super-parameters comprise multi-dimensional super-parameters;
Acquiring different exploration values of the super parameters according to the initial values of the super parameters, different exploration directions and step sizes; training an initial data processing model configured with the different exploration values according to the plurality of sample data to obtain target function values corresponding to each exploration value; taking the exploration direction corresponding to the exploration value of which the objective function value meets the condition as the objective exploration direction of the super parameter; determining a target range of the super parameter based on the initial value of the super parameter, the target exploration direction and the step size, including:
For a first dimension super parameter in the multi-dimension super parameters, acquiring different exploration values of the first dimension super parameter according to an initial value of the first dimension super parameter, different exploration directions and different step sizes;
Training a first initial data processing model based on a plurality of sample data to obtain objective function values corresponding to each exploration value, wherein the values of the first dimension super parameters in super parameters configured by the first initial data processing model are exploration values with different first dimension super parameters, and the values of other dimension super parameters are initial values;
taking the exploration direction corresponding to the exploration value of which the objective function value meets the condition as the objective exploration direction of the first dimension super parameter;
determining a target range of the first dimension super parameter based on the initial value of the first dimension super parameter, the target exploration direction and the step length;
And continuing to acquire the exploring value and model training steps for other dimension super parameters in the multi-dimension super parameters until the multi-dimension super parameters acquire the target range, and stopping to acquire the target range of the multi-dimension super parameters.
3. The data processing method according to claim 1, wherein the step of continuing the search value acquisition, target range determination, and target candidate value determination with the target candidate value as the initial value of the super parameter includes:
Adjusting the step length according to the step length attenuation coefficient;
And continuously executing the exploring value acquisition step, the target range determination step and the target candidate value determination step based on the adjusted step length.
4. The data processing method according to claim 1, wherein the determining the candidate value of the super parameter from the target range based on the target range and the historical value information of the super parameter to configure the initial data processing model for training until the target candidate value of the super parameter is obtained includes:
acquiring a corresponding relation between the value of the super parameter and the value of the objective function based on the target range and the historical value information of the super parameter;
according to the corresponding relation, determining candidate values of the super parameters from the target range;
training an initial data processing model configured with candidate values of the super parameters 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 super parameter and the value of the objective function according to the value of the objective function;
And continuously executing the steps of determining candidate values and training the model based on the updated corresponding relation until the second target condition is met, and stopping to obtain the target candidate values of the super parameters.
5. The data processing method according to any one of claims 1 to 4, wherein 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 characteristics in a plurality of sample characteristics 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 the objective function value of each sample data according to the prediction results and the corresponding objective results corresponding to the plurality of sample data;
And adjusting the model parameters of the initial data processing model according to the target function value until the model parameters meet a third target condition.
6. The data processing method according to claim 1, wherein the steps of obtaining the search value of the super parameter and determining the target range are performed by a first device, and the steps of determining the candidate value of the super parameter and determining the target candidate value are performed by a second device, and communication is performed between the first device and the second device through hypertext transfer protocol HTTP or secure hypertext transfer protocol HTTPs.
7. The data processing method according to claim 1, wherein the steps of acquiring the search value of the super parameter and determining the target range are performed by a first thread, and the steps of determining the candidate value of the super parameter and determining the target candidate value are performed by a second thread, and the first thread and the second thread communicate data therebetween.
8. A data processing apparatus, comprising:
an acquisition unit configured to execute a response to a parameter tuning instruction, and acquire a plurality of sample data of a target scene indicated by the parameter tuning instruction from a database;
The acquisition unit is further configured to perform acquisition of different exploration values of the super parameter according to the initial value of the super parameter, different exploration directions and different step sizes;
The first determining unit is configured to perform training on an initial data processing model configured with the different exploration values according to the plurality of sample data to obtain target function values corresponding to each exploration value; taking the exploration direction corresponding to the exploration value of which the objective function value meets the condition as the objective exploration direction of the super parameter; determining a target range of the super parameter based on the initial value of the super parameter, the target exploration direction and the step length;
a second determining unit configured to perform training by determining candidate values of the super parameter from the target range based on the target range and the historical value information of the super parameter, to configure the initial data processing model until the target candidate values of the super parameter are obtained;
The acquiring unit, the first determining unit and the second determining unit are further configured to perform the steps of taking the target candidate value as an initial value of the super parameter, continuing to perform the acquisition of the exploration value, the determination of the target range and the determination of the target candidate value until a first target condition is met, obtaining a target value of the super parameter, and training an initial data processing model configured with the target value to obtain a data processing model;
A processing unit configured to execute processing of target data of the target scene according to the data processing model in response to data processing instructions;
The target scene is a target identification scene, the target data is an image or a video, and the sample data is an image or a video.
9. The data processing apparatus of claim 8, wherein the super-parameters comprise multi-dimensional super-parameters;
The acquisition unit is configured to execute the acquisition of different exploration values of a first dimension super parameter in the multi-dimension super parameters according to the initial value of the first dimension super parameter, different exploration directions and different step sizes;
The first determination unit is configured to perform:
Training a first initial data processing model based on a plurality of sample data to obtain objective function values corresponding to each exploration value, wherein the values of the first dimension super parameters in super parameters configured by the first initial data processing model are exploration values with different first dimension super parameters, and the values of other dimension super parameters are initial values;
taking the exploration direction corresponding to the exploration value of which the objective function value meets the condition as the objective exploration direction of the first dimension super parameter;
determining a target range of the first dimension super parameter based on the initial value of the first dimension super parameter, the target exploration direction and the step length;
the acquisition unit and the first determination unit are respectively configured to execute the steps of continuing to acquire the exploration value and training the model for other dimension super parameters in the multi-dimension super parameters until the multi-dimension super parameters acquire the target range, and stop the steps until the multi-dimension super parameters acquire the target range, so as to acquire the target range of the multi-dimension super parameters.
10. The data processing apparatus of claim 8, wherein the apparatus further comprises:
An adjustment unit configured to perform adjustment of the step size according to a step size attenuation coefficient;
the acquisition unit and the first determination unit are further configured to perform the step of continuing to perform the search value acquisition step, and the target range determination and the target candidate value determination based on the adjusted step size, respectively.
11. The data processing apparatus according to claim 8, wherein the second determination unit is configured to perform:
acquiring a corresponding relation between the value of the super parameter and the value of the objective function based on the target range and the historical value information of the super parameter;
according to the corresponding relation, determining candidate values of the super parameters from the target range;
training an initial data processing model configured with candidate values of the super parameters 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 super parameter and the value of the objective function according to the value of the objective function;
And continuously executing the steps of determining candidate values and training the model based on the updated corresponding relation until the second target condition is met, and stopping to obtain the target candidate values of the super parameters.
12. The data processing apparatus according to any one of claims 8 to 11, 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 characteristics in a plurality of sample characteristics 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 the objective function value of each sample data according to the prediction results and the corresponding objective results corresponding to the plurality of sample data;
And adjusting the model parameters of the initial data processing model according to the target function value until the model parameters meet a third target condition.
13. The data processing apparatus of claim 8, wherein the steps of obtaining the search value of the super parameter and determining the target range are performed by a first device, and wherein the steps of determining the candidate value of the super parameter and determining the target candidate value are performed by a second device, and wherein the first device and the second device communicate via hypertext transfer protocol HTTP or secured hypertext transfer protocol HTTPs.
14. The data processing apparatus of claim 8, wherein the steps of obtaining the search value of the super parameter and determining the target range are performed by a first thread, and the steps of determining the candidate value of the super parameter and determining the target candidate value are performed by a second thread, and the first thread and the second thread communicate data therebetween.
15. 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 of claims 1 to 7.
16. A non-transitory computer readable storage medium, characterized in that 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 CN111931946A (en) 2020-11-13
CN111931946B true 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)

Families Citing this family (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
CN113807397B (en) * 2021-08-13 2024-01-23 北京百度网讯科技有限公司 Training method, training device, training equipment and training storage medium for semantic representation model
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
CN114143183B (en) * 2021-12-01 2023-02-03 中国商用飞机有限责任公司 Network parameter configuration method and device, computer equipment and readable storage medium
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 (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10360517B2 (en) * 2017-02-22 2019-07-23 Sas Institute Inc. Distributed hyperparameter tuning system for machine learning
US11176487B2 (en) * 2017-09-28 2021-11-16 Oracle International Corporation Gradient-based auto-tuning for machine learning and deep learning models

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN111931946A (en) 2020-11-13

Similar Documents

Publication Publication Date Title
CN111931946B (en) Data processing method, device, computer equipment and storage medium
CN109299315B (en) Multimedia resource classification method and device, computer equipment and storage medium
CN110163380B (en) Data analysis method, model training method, device, equipment and storage medium
CN110471858B (en) Application program testing method, device and storage medium
CN112907725B (en) Image generation, training of image processing model and image processing method and device
CN110059652B (en) Face image processing method, device and storage medium
CN111127509B (en) Target tracking method, apparatus and computer readable storage medium
CN111027490B (en) Face attribute identification method and device and storage medium
CN111104980B (en) Method, device, equipment and storage medium for determining classification result
CN110942046B (en) Image retrieval method, device, equipment 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
CN111738365B (en) Image classification model training method and device, computer equipment and storage medium
US20220230645A1 (en) Sound quality detection method and device for homologous audio and storage medium
CN110705614A (en) Model training method and device, electronic equipment and storage medium
CN110070143B (en) Method, device and equipment for acquiring training data and storage medium
CN111753606A (en) Intelligent model upgrading method and device
CN112036492B (en) Sample set processing method, device, equipment and storage medium
CN112100528A (en) Method, device, equipment and medium for training search result scoring model
CN114143280B (en) Session display method and device, electronic equipment and storage medium
CN114817709A (en) Sorting method, device, equipment and computer readable storage medium
CN112329909B (en) Method, apparatus and storage medium for generating neural network model
CN110853704B (en) Protein data acquisition method, protein data acquisition device, computer equipment and storage medium
CN114283310A (en) Image recognition model acquisition method, image recognition device and medium
CN111488895B (en) Countermeasure data generation method, device, equipment 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