CN109783337A - Model service method, system, device and computer readable storage medium - Google Patents

Model service method, system, device and computer readable storage medium Download PDF

Info

Publication number
CN109783337A
CN109783337A CN201811557396.4A CN201811557396A CN109783337A CN 109783337 A CN109783337 A CN 109783337A CN 201811557396 A CN201811557396 A CN 201811557396A CN 109783337 A CN109783337 A CN 109783337A
Authority
CN
China
Prior art keywords
data characteristics
penalty values
data
discarding
performance indicator
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811557396.4A
Other languages
Chinese (zh)
Other versions
CN109783337B (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 CN201811557396.4A priority Critical patent/CN109783337B/en
Publication of CN109783337A publication Critical patent/CN109783337A/en
Application granted granted Critical
Publication of CN109783337B publication Critical patent/CN109783337B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application is about model service method, system, device and computer readable storage medium.Model service method includes: acquisition system performance index;Calculate the performance indicator and penalty values of at least one data characteristics;Performance indicator and penalty values based at least one data characteristics, which obtain, abandons feature list;And when system performance index meets and imposes a condition, prediction result is obtained according to remaining data characteristics according to the corresponding operating that discarding feature list ignores at least one data characteristics in discarding feature list.The embodiment of the present invention first calculates the penalty values and performance indicator of each data characteristics, and then it is generated according to penalty values and performance indicator and abandons feature list, ignore the operation for abandoning a part of data characteristics in feature list according to discarding feature list, under the premise of reducing service risk, while it ensure that the availability and precision of model.

Description

Model service method, system, device and computer readable storage medium
Technical field
The application belongs to computer software application field, especially model service method, system, device and computer-readable Storage medium.
Background technique
Widely applied current in AI and big data, model service is that machine learning algorithm is applied in practical business scene A kind of important way.Its Main Morphology is to research and develop mature neural network model, is encapsulated into online service (hereinafter referred to as mould Type service), interface (can be http or rpc etc.) is externally provided and receives real-time request of data, is extracted and is requested by model service In include data characteristics, and the extended data service of calling model service attachment to be to extract richer data characteristics, finally By algorithm model with these data for input, result of making a prediction simultaneously returns to requesting party.Typical case example such as internet hunt Sequence, the on-time models service such as ad click rate prediction.
Model service is a kind of service of limited capability, and service ability is generally indicated with respond request number per second.By It is fluctuated under practical business scene, servicing the request pressure received with various situations, such as period difference, product end updates, Operation activity etc., model service can cause response to be delayed due to requesting the surge of pressure, and machine resources overload is even delayed The serious conditions such as machine.And be to prevent model service total collapse, it can be more than generally certain threshold value in request pressure or service load When, starting degradation strategy, such as restricted part flow.
It is existing degrade strategy include two kinds: one is based on request of data from ip network segment, random drop part asks It asks, to limit visiting flow;Another kind is the http header information based on request of data, utilizes statistical model automatic Prediction flow Different degree, abandon the low flow of different degree.
Although having significant however, the existing two methods for degrading strategy can reach the target of limitation flow It is insufficient:
First method, since different flows may be different comprising data information, the load caused by model service is It is different, therefore the method for random drop component requests is not comprehensive enough and efficient;
Second method, since for internet 2C service, traffic source is each isolated user, is difficult to define some The access of user is important or inessential.
To sum up, existing model service needs to improve for the solution of flow restriction.
Summary of the invention
For problem present in the relevant technologies, the application discloses a kind of improved model service method, system, device And computer readable storage medium, to better solve flow restriction problem.
In a first aspect, the embodiment of the invention provides a kind of model service methods, comprising:
Obtain system performance index;
The performance indicator and penalty values of at least one data characteristics are calculated, the performance indicator characterization of the data characteristics is corresponding Data characteristics resource service condition, the penalty values of the data characteristics characterize corresponding data characteristics to prediction result precision Influence degree;
Performance indicator and penalty values based at least one data characteristics, which obtain, abandons feature list;And
When the system performance index, which meets, to impose a condition, the discarding feature is ignored according to the discarding feature list At least one data characteristics in list obtains prediction result based on model according to remaining data characteristics.
Optionally, the performance indicator for calculating at least one data characteristics includes:
At least one described data characteristics is recorded in the log of each processing links;
Log according at least one described data characteristics in each processing links carries out collect statistics, with obtain it is described extremely The performance indicator of a few data characteristics.
Optionally, the calculating penalty values include:
It is once predicted again after one data characteristics of random drop, obtains prediction result;And
Loss based on the data characteristics being dropped described in the prediction result calculating after the prediction result and discarding before discarding Value.
Optionally, the data being dropped described in the prediction result calculating after the prediction result and discarding based on before discarding The penalty values of feature include:
Based on the prediction result after the prediction result and the discarding before the discarding being repeatedly calculated, it is poor to calculate it Average value, using the average value as the penalty values for the data characteristics being dropped accordingly.
Optionally, further includes: special to adjust each data at least one described data characteristics by adjusting the sampling frequency The accounting of sign.
Optionally, performance indicator and penalty values the acquisition discarding feature list based on each data characteristics includes:
The performance indicator and penalty values of the degradation target of setting and at least one data characteristics are input to optimization In model, the discarding feature list is obtained, wherein the Optimized model is minimized with the loss of significance to the model service For target, the optimal solution of the condition of satisfaction is found out.
Optionally, further includes: the degradation target and at least one data characteristics that will be set performance indicator and Before penalty values are input in Optimized model, the performance indicator and penalty values of at least one data characteristics are normalized Processing.
Optionally, it includes each data characteristics that the performance indicator of each data characteristics, which includes: the performance indicator, Handle time and memory space, the Optimized model are as follows:
Wherein, n indicates n data characteristics, normalize (acc_lossi) indicate to the penalty values of i-th of data characteristics Normalized process, normalize (t_costi) indicate to do normalized to the processing time of i-th of data characteristics, normalize(c_costi) indicate to do the memory space of i-th of data characteristics normalized, the X% indicates setting Time degradation target in degradation target, the Y indicate the storage degradation target in the degradation target of setting.
Optionally, the system performance index includes: that CPU usage, storage utilization rate, IO utilization rate, network bandwidth make With rate, flow load and response time.
Second aspect, the embodiment of the present invention provide a kind of Model service system, comprising:
System index detection module, for obtaining system performance index;
Index and penalty values obtain module, described for calculating the performance indicator and penalty values of at least one data characteristics The performance indicator of data characteristics characterizes the resource service condition of corresponding data characteristics, and the penalty values of the data characteristics characterize phase Influence degree of the data characteristics answered to prediction result precision;
List Generating Module, for based at least one data characteristics performance indicator and penalty values obtain abandon it is special Levy list;
First prediction module, for when the system performance index be unsatisfactory for impose a condition when, according to all data characteristicses Obtain prediction result;
Second prediction module is used for when the system performance index meets and imposes a condition, according to the discarding characteristic series Table is ignored the relevant operation of at least one data characteristics in the discarding feature list and is obtained pre- according to remaining data characteristics Survey result.
Optionally, the index and penalty values obtain module, comprising:
Logging unit, for recording at least one described data characteristics in the log of each processing links;
Log collection unit, for being summarized according at least one described data characteristics in the log of each processing links Statistics, to obtain the performance indicator of at least one data characteristics.
Simulation and forecast unit obtains prediction knot for carrying out a model prediction again after one data characteristics of random drop Fruit;
Penalty values computing unit, for calculating described lost based on the prediction result after the prediction result and discarding before discarding The penalty values of the data characteristics of abandoning.
Optionally, the penalty values computing unit includes:
Based on the prediction result after the prediction result and the discarding before the discarding being repeatedly calculated, it is poor to calculate it Average value, using the average value as the penalty values for the data characteristics being dropped accordingly.
Optionally, further includes: sample frequency adjustment module, for adjusted by adjusting the sampling frequency it is described at least one The accounting of each data characteristics in data characteristics.
Optionally, the List Generating Module includes:
The performance indicator and penalty values of the degradation target of setting and at least one data characteristics are input to optimization In model, the discarding feature list is obtained, wherein the Optimized model is minimized with the loss of significance to the model service For target, the optimal solution of the condition of satisfaction is found out.
Optionally, further includes: the degradation target and at least one data characteristics that will be set performance indicator and Before penalty values are input in Optimized model, the performance indicator and penalty values of at least one data characteristics are normalized Processing.
Optionally, the performance indicator of each data characteristics includes: the processing that the performance indicator includes each data characteristics Time and memory space, the Optimized model are as follows:
Wherein, n indicates n data characteristics, normalize (acc_lossi) indicate to the penalty values of i-th of data characteristics Normalized process, normalize (t_costi) indicate to do normalized to the processing time of i-th of data characteristics, normalize(c_costi) indicate to do the memory space of i-th of data characteristics normalized, the X% indicates setting Time degradation target in degradation target, the Y indicate the storage degradation target in the degradation target of setting.
Optionally, the system performance index includes: that CPU usage, storage utilization rate, IO utilization rate, network bandwidth make With rate, flow load and response time.
The third aspect provides a kind of model service device, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to executing model service method described in above-mentioned any one.
Fourth aspect, provides a kind of computer readable storage medium, and the computer-readable recording medium storage has calculating Machine instruction, the computer instruction, which is performed, realizes model service method described in any of the above embodiments.
5th aspect, the embodiment of the present invention provide computer program product, including computer program product, the computer Program includes program instruction, when described program instruction is executed by model service device, executes the model service device State the monitoring method of any one.
The technical solution that embodiments herein provides can include the following benefits: the model service method first calculates The penalty values and performance indicator of each data characteristics, and then generated according to penalty values and performance indicator and abandon feature list, it is being When the performance indicator of system reaches setting condition, the processing of a part of data characteristics is ignored according to discarding feature list, is taken reducing Under the premise of risk of being engaged in, while it ensure that the availability and precision of model.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The application can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the application Example, and together with specification it is used to explain the principle of the application.
Fig. 1 show the flow diagram of an illustrative existing model service;
Fig. 2 show the flow chart of the model service method of the offer of embodiment one;
Fig. 3 show the flow chart of the model service method of the offer of embodiment two;
Fig. 4 show the structure chart of the Model service system of the offer of embodiment three;
The index and penalty values that Fig. 5 is shown in the Model service system of example IV offer obtain the specific of module 402 Structure chart;
Fig. 6 show a kind of structural block diagram of model service device of the offer of embodiment five;
Fig. 7 show the structural block diagram of another model service device of the offer of embodiment six.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the application.
Fig. 1 show the flow diagram of an illustrative existing model service.Model service 100 includes step S101- S104.S101 step receives real-time request of data by externally providing interface (can be http or rpc etc.) first, extracts simultaneously The current data feature for including in request of data is arranged, then the data service 200 of step S102 calling model service attachment, from Data service obtains richer growth data feature, and then step S103 merges current data feature and growth data feature obtains To fused data characteristics, finally in step S104, fused data characteristics is input to trained nerve In network model, obtains final prediction result and return to requesting party.
Based on above-mentioned model service, the embodiment of the present invention proposes a kind of technology that flow restriction is carried out based on data characteristics Scheme.The technical solution first calculates the penalty values and performance indicator of each data characteristics, and then according to penalty values and performance indicator Global alignment generate and abandon feature list, preferentially ignore the corresponding operating of a part of data characteristics according to feature list is abandoned, Under the premise of reducing service risk, while it ensure that the availability and precision of model.
Fig. 2 show the flow chart of the model service method of the offer of embodiment one.It is to be understood that in the present embodiment In, for some existing steps in Fig. 1, does not show that or describe in a relatively simple form.For example, in the present embodiment simultaneously It is not shown and obtains receiving real-time data request, and the step of therefrom extracting the current data feature for including in request of data, also not It shows for obtaining growth data feature from external data service 300, and merges current data feature and growth data feature The step of.But it will be appreciated by those skilled in the art that arriving, the present embodiment may include some or all of these corresponding steps. The model service method includes the following steps.
In step s 201, system performance index is obtained.
In step S202, the performance indicator and penalty values of at least one data characteristics are calculated.
In step S203, performance indicator and penalty values based at least one data characteristics, which obtain, abandons feature list.
In step S204, judges that system performance index meets and impose a condition.
In step S205, ignore at least one data characteristics in discarding feature list according to feature list is abandoned, according to Remaining data characteristics, obtains prediction result.
In step S206, according to all data characteristicses, prediction result is obtained.
In the embodiments of the present disclosure, real-time monitoring performance indicator, and the performance indicator of each data characteristics is calculated in real time And penalty values, wherein the performance indicator of data characteristics characterizes the resource service condition of corresponding data characteristics, and penalty values characterize phase The data characteristics answered passes through the performance indicator of data characteristics to the influence degree of the precision of neural network model output result It is generated with loss and abandons feature list.In the routine work of Model service system, calculated according to all data characteristics lists pre- It surveys as a result, according to feature list is abandoned, ignoring and abandoning at least one in feature list when system performance index reaches setting condition The corresponding operating of a data characteristics obtains prediction result according to remaining data characteristics.
Model service method provided in this embodiment, when system performance index meets and imposes a condition, in operation Ignore the corresponding operation for abandoning some data characteristicses in feature list is reduced by reducing data characteristics to be treated The service risk of system, and ensure that the availability and precision of model service to the maximum extent.
In some embodiments, the performance indicator for calculating at least one data characteristics includes:
At least one data characteristics is recorded in the log of each processing links;
Log according at least one data characteristics in each processing links carries out collect statistics, to obtain at least one number According to the performance indicator of feature.
In some embodiments, calculating penalty values includes:
It is once predicted again after one data characteristics of random drop, obtains prediction result;And
The penalty values for the data characteristics being dropped are calculated based on the prediction result after the prediction result and discarding before discarding.
In some embodiments, the data being dropped are calculated based on the prediction result after the prediction result and discarding before discarding The penalty values of feature include:
Based on the prediction result after the prediction result and discarding before the discarding being repeatedly calculated, being averaged for its difference is calculated Value, using average value as the penalty values for the data characteristics being dropped accordingly.
In some embodiments, above-mentioned model service method further include: by adjusting the sampling frequency to adjust at least one The accounting of each data characteristics in data characteristics.
In some embodiments, performance indicator and penalty values based on each data characteristics, which obtain, abandons feature list packet It includes:
The performance indicator and penalty values of the degradation target of setting and at least one data characteristics are input to Optimized model In, it obtains abandoning feature list, wherein Optimized model is minimised as target with the loss of significance to model service, finds out and meets item The optimal solution of part.
In some embodiments, further includes: refer to by the performance of the degradation target of setting and at least one data characteristics Before mark and penalty values are input in Optimized model, the performance indicator and penalty values of at least one data characteristics are normalized Processing.
Fig. 3 show the flow chart of the model service method of the offer of embodiment two.It is to be understood that in the present embodiment In, for some existing steps in Fig. 1, does not show that equally or describe in a relatively simple form.But the skill of this field Art personnel are it is understood that the present embodiment includes some or all of these corresponding steps.The present embodiment specifically includes following step Suddenly
In step S301, system performance index is obtained.
System performance index includes but is not limited to following performance indicator: response time, handling capacity, resource utilization and click Number.Response time is the system time spent for its service.Handling capacity can handle how many interior per unit time for system Affairs/request/unit data etc..Resource utilization includes CPU usage, memory usage, magnetic disc i/o, network I/O.It clicks Number is the quantity of system customer in response request in the unit time.
System performance index can be obtained based on the acquisition step of itself.The acquisition step is generally adopting for a cycle Collect step.For example, by a timer every 5 minutes or 1 hour acquisition primary system performance indicators.System performance index It can come from other acquisition systems.For example, disposing an acquisition system on node where itself, the acquisition system is periodically received The system performance index that system sends over.
In step s 302, at least one data characteristics is recorded in the log of each processing links.
In this step, model service links, such as receiving real-time data request, and therefrom extract in request of data The step of the step of current data feature for including, acquisition growth data feature, and fusion current data feature and spreading number The step of according to feature, records the processing log with one or more data characteristicses respectively.For example, when receiving in request of data, note Log is recorded, when extracting data characteristics from request of data, record log, when obtaining growth data from external data service When feature, record log, before and after being calculated using neural network model, also record log.
It is to be understood that if recording all request of data in the log of all processing links, to system performance pressure Power is too big.Therefore, generally, one or more data characteristicses are recorded in the log of each processing links based on the sampling frequency.Example Such as, every the request of data of sampling in 10 minutes, and the log of one or more data characteristicses that recorded at random is directed to. Since the request of data received every time is different, so it is also different to merge obtained data characteristics every time.Accordingly, it is possible to occur with Lower situation: the frequency of some data characteristics record logs is lower, and the frequency of some data characteristics record logs is higher.It can pass through Increase the sampling frequency and increase the frequency of occurrence of some data characteristicses, for example, one request of data of sampling in 10 minutes is revised as 5 points Clock samples a request of data, and the log of one or more data characteristicses that recorded at random is directed to.
In step S303, the log according at least one data characteristics in each processing links carries out collect statistics, with Obtain the performance indicator of at least one data characteristics.
By log obtained in step S302, some data characteristicses can be obtained, and then estimate wherein each data The occupied memory space of feature similarly according to the log recorded in step S302, can obtain wherein each data characteristics and exist At the beginning of each processing links and the end time, and then obtain the time used in each data characteristics of processing.It will be each Time used in the occupied memory space of data characteristics and/or each data characteristics of processing is as one data characteristics of characterization Resource service condition.
Certainly, the performance indicator of each data characteristics can also use other calculations, for example, an if data spy The frequency for levying appearance is higher, and the frequency that another data characteristics occurs is lower, then occupied only with each data characteristics Time used in memory space and/or each data characteristics of processing can not symbolize the resource of a data characteristics well Service condition, in such a case, it is possible to the frequency of data characteristics also be brought into the combination of performance indicator.
In step s 304, it is once predicted again after one data characteristics of random drop, prediction knot is obtained based on model Fruit.
As previously mentioned, when existing model service works normally, input data request is exported via neural network model and is predicted As a result.And in the present embodiment, when handling a request of data using neural network model, except through normal treatment process Obtain a prediction result, can also random drop at least one data characteristics obtain another and based on the data characteristics after discarding A prediction result.The prediction result is not exported to requesting party, but is stored into such as log.
In step S305, it is special that the data being dropped are calculated based on the prediction result after the prediction result and discarding before discarding The penalty values of sign.
In this step, the prediction result by the prediction result before discarding, i.e., after the prediction result and discarding that normally export Subtract each other, obtains penalty values of the numerical value as the data characteristics being dropped.
That is, the remainder data feature after all data characteristicses and discarding the latter data characteristics is inputted respectively Into trained neural network model, to obtain prediction result twice.In the process, since it is not necessary to modify neural network moulds The parameter and algorithm logic of type, therefore implement not difficult.Moreover, because neural network model is in general GPU (at figure Reason device) on execute, calculate influence of the prediction result to system load twice can be ignored.
For the penalty values of a data characteristics, preferably pass through difference during multiple data request processing Prediction result after calculating the prediction result and discarding before abandoning, the difference repeatedly subtracted each other is average again, using average value as The penalty values of the data characteristics.
It is understood that being sent to the data characteristics in the request of data of model service included not fully phase every time Together, thus obtained growth data feature is also not exactly the same, therefore, the damage for a specific data feature being once calculated The penalty values of mistake value and another data characteristics being calculated are potentially based on different data characteristics combinations.Therefore, it will put down Penalty values of the mean value as data characteristics are capable of the contingency fluctuation of smooth single calculation.For example, being based on feature set [x1, x2..., xi..., xn-1, xn] and [x1, x2..., xi..., xn-1] obtain xnA penalty values, be based on feature set [y1, y2..., xi..., xn-1, xn] and [y1, y2..., xi..., xn-1] obtain xnAnother penalty values, the x that will be obtained twicenDamage Mistake value is average, as xnPenalty values.
In step S306, performance indicator and penalty values based at least one data characteristics, which obtain, abandons feature list.
Abandoning feature list includes multiple data characteristicses.Arbitrary data feature in multiple data characteristics can come from counting According to request or come from growth data feature.As previously mentioned, performance indicator characterizes the resource service condition of a data characteristics, damage Mistake value characterizes corresponding data characteristics to the influence degree of prediction result precision, and the combination based on performance indicator and penalty values can be right All data characteristicses are ranked up.For example, the first weight of setting performance indicator, is arranged the second weight of penalty values, based on property Sequence sequence from big to small is carried out after the weight of energy index and penalty values, and corresponding according to several are chosen from big to small Data characteristics is placed on discarding feature list.It is of course also possible to directlying adopt the sum of performance indicator and penalty values obtains ranking results, And then it is obtained abandoning feature list according to ranking results.
In step S307, judges that system performance index meets and impose a condition.When system performance index, which meets, to impose a condition, Step S308 is executed, it is no to then follow the steps S309.
In step S308, according to abandon feature list ignore abandon feature list at least one data characteristics it is corresponding Operation, according to remaining data characteristics, obtains prediction result.
In step S309, according to all data characteristicses, prediction result is obtained.
It imposes a condition as in advance in configuration file or the condition configured based on configuration interface.Since performance indicator includes one A or multiple indexs, therefore impose a condition and can be the regular expression of index creation based on one or more.
It is to be appreciated that all data characteristicses in step S309, all data characteristicses include that data are asked here The data characteristics and growth data feature being drawn into asking pass through the data characteristics that fusion obtains.Correspondingly, step S308 is in office Meaning processing links ignore the corresponding operating for abandoning one or more data characteristicses in feature list.For example, when needing growth data When feature, do not extend the data characteristics, for another example when data characteristics is input to neural network model, the data characteristics not by Input.
In addition, abandoning feature list is based on list obtained in the treatment process of multiple request of data before.For working as Preceding request of data, the data characteristics that may relate to is not in abandoning feature list, then request of data ignores one again next time The corresponding operating of a or multiple data characteristicses.And so on.
For a better understanding of the present invention, above-described embodiment is specifically described using mathematic(al) representation below.
Hypothesized model input feature vector space is Rn, then each request of data is expressed as [x1, x2..., xi..., xn-1, xn], N indicates the quantity of data characteristics, and obtaining for the data characteristics can be by the extraction from request of data and the data from outside It is obtained in service.
A) performance indicator of data characteristics is defined as time cost and carrying cost
Time cost, (whole or stochastical sampling) records each feature extraction, processing, inquiry respectively in request of data It waits the entrance of functions and jumps out the time, the average time-consuming of every request of the data in nearest n times request can be counted, be recorded as t_ costi
Carrying cost can estimate out each data according to the type, value and storage organization of each characteristic in advance The carrying cost of feature, is recorded as s_costi
B) data characteristics precision impact evaluation
Each request of data, one feature x of sample decimationi, while calculating reservation and abandoning this feature, model predication value Deviation, when counting each feature nearest M times and being sampled, mean values that precision is influenced:
C) degrade strategy
When system performance index meets preset condition, according to degradation target, (e.g., memory space reduces 20%, processing consumption When reduce by 30% etc.), using Optimized model, the performance indicator of each data characteristics and penalty values are input in Optimized model, It is minimised as target with loss of significance, generates current optimal discarding feature list.
Time cost and carrying cost to each data characteristics being input in Optimized model, are normalized place Reason, each feature equally do normalized to the loss statistic of model accuracy;
Following Optimized model is solved by calculating, obtains current optimal discarding feature list.
Wherein, n indicates n data characteristics, normalize (acc_lossi) indicate to the penalty values of i-th of data characteristics It is normalized, normalize (t_costi) indicate to do normalized to the processing time of i-th of data characteristics, normalize(c_costi) indicate to do the memory space of i-th of data characteristics normalized, the X% indicates setting Time degradation target in degradation target, that is, want the time loss proportional numerical value being downgraded to, and the Y indicates the degradation mesh of setting Storage degradation target in mark wants the storage consumption proportional numerical value made a price reduction, vi∈ [0,1] is represented and is retained or give up this Feature.
D) degraded operation is executed
In the links of model service, ignores the operation for abandoning multiple data characteristicses in feature list, predicted As a result.
Fig. 4 show the structure chart of the Model service system of the offer of embodiment three.The Model service system 400 includes:
System index detection module 401 is for obtaining system performance index;
Index and penalty values obtain performance indicator and penalty values that module 402 is used to calculate at least one data characteristics, institute The performance indicator for stating data characteristics characterizes the resource service condition of corresponding data characteristics, the penalty values characterization of the data characteristics Influence degree of the corresponding data characteristics to prediction result precision;
List Generating Module 403 is for performance indicator and penalty values acquisition discarding feature based at least one data characteristics List;
First prediction module 404 is used to be obtained when system performance index is unsatisfactory for imposing a condition according to all data characteristicses To prediction result;
Second prediction module 405 is used for when system performance index meets and imposes a condition, according to the discarding feature list Ignore and abandons the relevant operation of at least one data characteristics in feature list prediction result obtained according to remainder data feature.
The index and penalty values that Fig. 5 is shown in the Model service system of example IV offer obtain the specific of module 402 Structure chart.The index and penalty values obtain module, comprising:
Logging unit, for recording at least one data characteristics in the log of each processing links;
Log collection unit, for carrying out summarizing system in the log of each processing links according at least one data characteristics Meter, to obtain the performance indicator of at least one data characteristics.
Simulation and forecast unit obtains prediction knot for carrying out a model prediction again after one data characteristics of random drop Fruit;
Penalty values computing unit, for what is be dropped based on the prediction result calculating after the prediction result and discarding before discarding The penalty values of data characteristics.
In some embodiments, the penalty values computing unit includes:
Based on the prediction result after the prediction result and discarding before the discarding being repeatedly calculated, being averaged for its difference is calculated Value, using average value as the penalty values for the data characteristics being dropped.
In some embodiments, further includes: sample frequency adjustment module, for by adjusting the sampling frequency to adjust at least The accounting of each data characteristics in one data characteristics.
In some embodiments, List Generating Module includes:
The performance indicator and penalty values of the degradation target of setting and at least one data characteristics are input to optimization In model, obtain abandoning feature list, wherein the Optimized model is minimised as target with loss of significance, finds out the condition of satisfaction Optimal solution.
In some embodiments, further includes: refer to by the performance of the degradation target of setting and at least one data characteristics Before mark and penalty values are input in Optimized model, the performance indicator and penalty values of at least one data characteristics are normalized Processing.
In some embodiments, it includes that each data are special that the performance indicator of each data characteristics, which includes: the performance indicator, The processing time of sign and memory space, the Optimized model are as follows:
Wherein, n indicates n data characteristics, normalize (acc_lossi) indicate to the penalty values of i-th of data characteristics Normalized process, normalize (t_costi) indicate to do normalized to the processing time of i-th of data characteristics, normalize(c_costi) indicate to do the memory space of i-th of data characteristics normalized, the X% indicates setting Time degradation target in degradation target, the Y indicate the storage degradation target in the degradation target of setting.
In some embodiments, the system performance index includes: CPU usage, storage utilization rate, IO utilization rate, net Network bandwidth utilization rate, flow load and response time.
About the Model service system in above-described embodiment, since the function of wherein modules is in above-mentioned interaction side It is described in detail in the embodiment of method, has thus carried out relatively simple description.
Fig. 5 is a kind of frame of model service device for executing model service method shown according to an exemplary embodiment Figure.The model service device includes processor and the memory for storage processor executable instruction;
Wherein, the processor is configured to executing model service method described in above-mentioned any one.
For example, model service device 1200 can be mobile phone, and computer, digital broadcasting terminal, messaging device, Game console, tablet device, Medical Devices, body-building equipment, personal digital assistant etc..
Referring to Fig. 6, model service device 1200 may include following one or more components: processing component 1202, storage Device 1204, electric power assembly 1206, multimedia component 1208, audio component 1210, the interface 1212 of input/output (I/O), sensing Device assembly 1214 and communication component 1216.
The integrated operation of the usual Controlling model service unit 1200 of processing component 1202, such as with display, call, number According to communication, camera operation and record operate associated operation.Processing component 1202 may include one or more processors 1220 execute instruction, to perform all or part of the steps of the methods described above.In addition, processing component 1202 may include one Or multiple modules, convenient for the interaction between processing component 1202 and other assemblies.For example, processing component 1202 may include more matchmakers Module, to facilitate the interaction between multimedia component 1208 and processing component 1202.
Memory 1204 is configured as storing various types of data to support the operation in equipment 1200.These data Example includes the instruction of any application or method for operating on model service device 1200, contact data, electricity Talk about book data, message, picture, video etc..Memory 1204 can be by any kind of volatibility or non-volatile memory device Or their combination is realized, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk or CD.
Power supply module 1206 provides electric power for the various assemblies of model service device 1200.Power supply module 1206 may include Power-supply management system, one or more power supplys and other are related to electric power is generated, managed, and distributed for model service device 1200 The component of connection.
Multimedia component 1208 includes the screen of one output interface of offer between model service device 1200 and user Curtain.In some embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touching Panel, screen may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touchings Sensor is touched to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or cunning The boundary of movement, but also detect duration and pressure associated with the touch or slide operation.In some embodiments In, multimedia component 1208 includes a front camera and/or rear camera.When equipment 1200 is in operation mode, such as When screening-mode or video mode, front camera and/or rear camera can receive external multi-medium data.Before each Setting camera and rear camera can be a fixed optical lens system or has focusing and optical zoom capabilities.
Audio component 1210 is configured as output and/or input audio signal.For example, audio component 1210 includes a wheat Gram wind (MIC), when model service device 1200 is in operation mode, when such as call mode, recording mode, and voice recognition mode, Microphone is configured as receiving external audio signal.The received audio signal can be further stored in memory 1204 or It is sent via communication component 1216.In some embodiments, audio component 1210 further includes a loudspeaker, for exporting audio Signal.
I/O interface 1212 provides interface, above-mentioned peripheral interface module between processing component 1202 and peripheral interface module It can be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, enable button and Locking press button.
Sensor module 1214 includes one or more sensors, for providing various aspects for model service device 1200 Status assessment.For example, sensor module 1214 can detecte the state that opens/closes of equipment 1200, component it is relatively fixed Position, such as the component are the display and keypad of model service device 1200, and sensor module 1214 can also detect mould The position change of 1,200 1 components of type service unit 1200 or model service device, user contact with model service device 1200 Existence or non-existence, the temperature change in 1200 orientation of model service device or acceleration/deceleration and model service device 1200.It passes Sensor component 1214 may include proximity sensor, be configured to detect neighbouring object without any physical contact In the presence of.Sensor module 1214 can also include that optical sensor is used in imaging applications such as CMOS or ccd image sensor It uses.In some embodiments, which can also include acceleration transducer, gyro sensor, magnetic biography Sensor, pressure sensor or temperature sensor.
Communication component 1216 is configured to facilitate wired or wireless way between model service device 1200 and other equipment Communication.Model service device 1200 can access the wireless network based on communication standard, such as WiFi, carrier network (such as 2G, 3G, 4G or 5G) or their combination.In one exemplary embodiment, communication component 1216 comes from via broadcast channel reception The broadcast singal or broadcast related information of external broadcasting management system.In one exemplary embodiment, the communication component 1216 further include near-field communication (NFC) module, to promote short range communication.For example, in NFC module radio frequency identification (RFID) can be based on Technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, model service device 1200 can be by one or more application specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), scene can It programs gate array (FPGA), controller, microcontroller, microprocessor or other electronic components to realize, for executing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided It such as include the memory 1204 of instruction, above-metioned instruction can be executed above-mentioned to complete by the processor 1220 of model service device 1200 Method.For example, the non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, Tape, floppy disk and optical data storage devices etc..
Fig. 7 is a kind of frame of model service device for executing model service method shown according to an exemplary embodiment Figure.For example, device 1300 may be provided as a server.Referring to Fig. 7, device 1300 includes processing component 1322, into one Step includes one or more processors, and the memory resource as representated by memory 1332, and being used to store can be by processing group The instruction of the execution of part 1322, such as application program.The application program stored in memory 1332 may include one or one Each above corresponds to the module of one group of instruction.In addition, processing component 1322 is configured as executing instruction, it is above-mentioned to execute Model service method.
Device 1300 can also include that a power supply module 1326 be configured as the power management of executive device 1300, and one Wired or wireless network interface 1350 is configured as device 1300 being connected to network and input and output (I/O) interface 1358.Device 1300 can be operated based on the operating system for being stored in memory 1332, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
In the exemplary embodiment, computer program product, including computer program product, the computer are additionally provided Program includes program instruction, when described program instruction is executed by model service device, executes the model service device State model service method.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the application Its embodiment.This application is intended to cover any variations, uses, or adaptations of the application, these modifications, purposes or Person's adaptive change follows the general principle of the application and including the undocumented common knowledge in the art of the application Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the application are by following Claim is pointed out.
It should be understood that the application is not limited to the precise structure that has been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.Scope of the present application is only limited by the accompanying claims.

Claims (10)

1. a kind of model service method characterized by comprising
Obtain system performance index;
Calculate the performance indicator and penalty values of at least one data characteristics, the corresponding number of performance indicator characterization of the data characteristics According to the resource service condition of feature, the penalty values of the data characteristics characterize corresponding data characteristics to the shadow of prediction result precision The degree of sound;
Performance indicator and penalty values based at least one data characteristics, which obtain, abandons feature list;And
When the system performance index, which meets, to impose a condition, the discarding feature list is ignored according to the discarding feature list In the corresponding operating of at least one data characteristics prediction result is obtained based on model according to remaining data characteristics.
2. control method according to claim 1, which is characterized in that the performance for calculating at least one data characteristics refers to Mark includes:
At least one described data characteristics is recorded in the log of each processing links;
Log according at least one described data characteristics in each processing links carries out collect statistics, to obtain described at least one The performance indicator of a data characteristics.
3. control method according to claim 1, which is characterized in that the calculating penalty values include:
It is once predicted again after one data characteristics of random drop, obtains prediction result;And
Penalty values based on the data characteristics being dropped described in the prediction result calculating after the prediction result and discarding before discarding.
4. control method according to claim 3, which is characterized in that after the prediction result and discarding based on before discarding Prediction result calculate described in the penalty values of data characteristics that are dropped include:
Based on the prediction result after the prediction result and the discarding before the discarding being repeatedly calculated, the flat of its difference is calculated Mean value, using the average value as the penalty values for the data characteristics being dropped accordingly.
5. control method according to claim 1, which is characterized in that further include: by adjusting the sampling frequency to adjust State the accounting of each data characteristics at least one data characteristics.
6. control method according to claim 1, which is characterized in that the performance indicator based on each data characteristics and Penalty values obtain discarding feature list
The performance indicator and penalty values of the degradation target of setting and at least one data characteristics are input to Optimized model In, obtain the discarding feature list, wherein the Optimized model is minimised as target with loss of significance, finds out the condition of satisfaction Optimal solution.
7. monitoring method according to claim 6, which is characterized in that further include: in the degradation target and institute that will be set It is special at least one described data before the performance indicator and penalty values for stating at least one data characteristics are input in Optimized model The performance indicator and penalty values of sign are normalized.
8. a kind of Model service system characterized by comprising
System index detection module, for obtaining system performance index;
Index and penalty values obtain module, for calculating the performance indicator and penalty values of at least one data characteristics, the data The performance indicator of feature characterizes the resource service condition of corresponding data characteristics, and the penalty values characterization of the data characteristics is corresponding Influence degree of the data characteristics to prediction result precision;
List Generating Module, for performance indicator and penalty values acquisition discarding characteristic series based at least one data characteristics Table;
First prediction module, for being obtained according to all data characteristicses when the system performance index is unsatisfactory for imposing a condition Prediction result;
Second prediction module, for being neglected according to the discarding feature list when the system performance index meets and imposes a condition The slightly described corresponding operating for abandoning at least one data characteristics in feature list obtains prediction knot according to remaining data characteristics Fruit.
9. a kind of model service device characterized by comprising
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to executing model service method described in 1 to 9 any one of the claims.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer to refer to It enables, the computer instruction, which is performed, realizes model service method as described in any one of claim 1 to 9.
CN201811557396.4A 2018-12-19 2018-12-19 Model service method, system, apparatus and computer readable storage medium Active CN109783337B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811557396.4A CN109783337B (en) 2018-12-19 2018-12-19 Model service method, system, apparatus and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811557396.4A CN109783337B (en) 2018-12-19 2018-12-19 Model service method, system, apparatus and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109783337A true CN109783337A (en) 2019-05-21
CN109783337B CN109783337B (en) 2022-08-30

Family

ID=66497342

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811557396.4A Active CN109783337B (en) 2018-12-19 2018-12-19 Model service method, system, apparatus and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109783337B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113537387A (en) * 2021-08-04 2021-10-22 北京思特奇信息技术股份有限公司 Model design method and device for Internet online operation activities and computer equipment
CN114026837A (en) * 2019-07-05 2022-02-08 维萨国际服务协会 Method and system for prediction and caching using AI calls
CN114556246A (en) * 2019-10-14 2022-05-27 西门子股份公司 Hierarchical optimization of a modular technical installation

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160292318A1 (en) * 2015-03-31 2016-10-06 Ca, Inc. Capacity planning for systems with multiprocessor boards
EP3077949A1 (en) * 2013-12-06 2016-10-12 Qualcomm Incorporated Methods and systems of generating application-specific models for the targeted protection of vital applications
CN107360026A (en) * 2017-07-07 2017-11-17 西安电子科技大学 Distributed message performance of middle piece is predicted and modeling method
CN108021984A (en) * 2016-11-01 2018-05-11 第四范式(北京)技术有限公司 Determine the method and system of the feature importance of machine learning sample
CN108038040A (en) * 2017-12-08 2018-05-15 上海市信息网络有限公司 Computer cluster performance indicator detection method, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3077949A1 (en) * 2013-12-06 2016-10-12 Qualcomm Incorporated Methods and systems of generating application-specific models for the targeted protection of vital applications
US20160292318A1 (en) * 2015-03-31 2016-10-06 Ca, Inc. Capacity planning for systems with multiprocessor boards
CN108021984A (en) * 2016-11-01 2018-05-11 第四范式(北京)技术有限公司 Determine the method and system of the feature importance of machine learning sample
CN107360026A (en) * 2017-07-07 2017-11-17 西安电子科技大学 Distributed message performance of middle piece is predicted and modeling method
CN108038040A (en) * 2017-12-08 2018-05-15 上海市信息网络有限公司 Computer cluster performance indicator detection method, electronic equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114026837A (en) * 2019-07-05 2022-02-08 维萨国际服务协会 Method and system for prediction and caching using AI calls
CN114556246A (en) * 2019-10-14 2022-05-27 西门子股份公司 Hierarchical optimization of a modular technical installation
CN113537387A (en) * 2021-08-04 2021-10-22 北京思特奇信息技术股份有限公司 Model design method and device for Internet online operation activities and computer equipment

Also Published As

Publication number Publication date
CN109783337B (en) 2022-08-30

Similar Documents

Publication Publication Date Title
CN110166371B (en) Flow control method and device, electronic equipment and storage medium
US9357084B2 (en) Method and apparatus for monitoring service usage of a mobile terminal
CN106713734B (en) Automatic focusing method and device
CN109783337A (en) Model service method, system, device and computer readable storage medium
CN109920418A (en) Adjust the method and device of wakeup sensitivity
CN110995810B (en) Object identification method based on artificial intelligence and related device
CN105303361B (en) Alarm clock adjusting method and device and terminal
CN112333556B (en) Control method for monitoring video transmission bandwidth, terminal equipment and readable storage medium
WO2019062405A1 (en) Application program processing method and apparatus, storage medium, and electronic device
CN109978606B (en) Method and device for processing advertisement click rate data and computer readable storage medium
CN108196482B (en) Power consumption control method and device, storage medium and electronic equipment
CN110120896A (en) Network delay control method, device, electronic equipment and storage medium
CN110446079A (en) Obtain method, apparatus, electronic equipment and the storage medium of viewing duration
CN112199260A (en) Application monitoring method, device, system, terminal equipment and storage medium
WO2019062404A1 (en) Application program processing method and apparatus, storage medium, and electronic device
CN110069207B (en) Zxfoom zxfoom , zxfoom the method is Mobile terminal and mobile terminal read storage medium
CN109086101A (en) Terminal application software starts method, terminal and computer readable storage medium
CN110032439A (en) Method for managing resource, device, mobile terminal and computer readable storage medium
CN105611074A (en) Method and system for optimizing information pushing time according to alarm clock
CN106951333A (en) A kind of broadcast controlling method, device and mobile terminal
CN112600897B (en) Multi-user access control method and device for intelligent equipment
CN114518959A (en) Distributed node resource load balancing method and device and electronic equipment
CN112487664A (en) Endurance model establishing method and device and computer readable storage medium
CN108377162A (en) Method of controlling antenna, device, storage medium and electronic equipment
CN114189719A (en) Video information extraction method and device, electronic 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