Specific embodiment
Existing operation system is in the multiple service configuration cut-off currents provided for it, it is contemplated that in practical application scene,
Operation system usually externally provides multiple services rather than single service in the same time, and therefore, the cut-off current of configuration is usually
For the mixing application scenarios under multiple services.Wherein, since the resource of operation system is limited, operation system is in mixing applied field
It is the cut-off current of multiple service configuration under scape, operation system will be less than, the maximum data that can receive when single service is externally provided
The maximum data request amount that request amount, the i.e. single service can permit.
For example, operation system externally provides two service A and B, when individually externally providing service A, service A allows most
Big data request amount is a, and when individually externally providing service B, the maximum data request amount that service B can permit is b.Business system
System is when configuring cut-off current for service A and service B, and under mixed application scenarios, the cut-off current that can configure service A is a1,
The cut-off current for servicing B is b1, wherein a1 is less than a, and b1 is less than b.
In general, can be carried out according to the resource of operation system when configuration mixes the cut-off current respectively serviced under application scenarios
Configuration, guarantees that system resource can be made full use of, and operation system will not when the data request amount of each service reaches cut-off current
There is delay machine.
However, in practical applications, the data request amount of difference service will not usually reach cut-off current simultaneously, in this way, working as
The data request amount of some service has reached cut-off current, when the data request amount of other services is not up to cut-off current, operation system
There are also idling-resources, and for the service for having reached cut-off current, theoretically operation system can also receive the data of the service
Request, still, due to the effect of current limliting, operation system will actually reject the request of data of the service, in this way, will go out
Existing operation system leads to the waste of system resource there are the phenomenon that externally providing the service is refused when idling-resource.
Still by taking above-mentioned service A and service B as an example, it is assumed that a1 300, a2 600, if service A current request of data
Amount is 400, and service B current data request amount is 300, then, operation system will carry out current limliting to service A.
However, since the data request amount of service B reaches cut-off current not yet, operation system there are idling-resource,
Theoretically after 300 request of data for receiving service A, the request of data for receiving service A can also continue to, still, due to industry
Business system has carried out current limliting to service A, and therefore, operation system actually will no longer receive other request of data of service A, this
Sample just will appear the phenomenon that operation system provides service A there are refusal when idling-resource, cause the waste of system resource.
In addition, operation system is after for multiple service configuration cut-off currents, the cut-off current be usually fixed it is constant, in this way,
When carrying out current limliting to multiple services based on changeless cut-off current, it will lead to prolonged system resource waste.
It can be seen that carrying out current limliting to multiple services that operation system provides in the cut-off current configured using existing method
When, system resource cannot be made full use of, the waste of system resource is caused.
In order to solve the above-mentioned technical problem, the embodiment of the present application provides the determination of a kind of limitation of data traffic, cut-off current
Method and apparatus, the method for limiting of the data traffic include: the data request amount for acquiring multiple services;It obtains for determining current limliting
The model of value, the model are based on sample data request amount and the multiple service permission under the sample data request amount
Maximum data request amount training obtain;According to the data request amount and the model, the limit of the multiple service is determined
Flow valuve;Based on the cut-off current, current limliting is carried out to the multiple service.
The embodiment of the present application is when multiple services carry out current limliting, since the data request amount of collected multiple services is real
Shi Bianhua's, therefore, determine that obtained cut-off current can be adjusted adaptively based on data request amount, flexibility is preferable;In addition, by
In in model training, being using multiple maximum data request amounts for can allow under sample data request amount of servicing as sample
Data, maximum data request amount is premised on utilizing system resource to greatest extent, therefore, obtains in determination based on this model
When cut-off current carries out current limliting, system resource can be made full use of on the basis of current limliting, avoid the waste of system resource.
In order to make those skilled in the art better understand the technical solutions in the application, below in conjunction with the application reality
The attached drawing in example is applied, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described implementation
Example is merely a part but not all of the embodiments of the present application.Based on the embodiment in the application, this field is common
The application protection all should belong in technical staff's every other embodiment obtained without creative efforts
Range.
Technical solution provided by the embodiments of the present application can be used for operation system and determine that it externally provides the limit of multiple services
Flow valuve, and current limliting is carried out to multiple services based on the cut-off current, wherein the cut-off current of multiple services can be adjusted adaptively, spirit
It is active preferable, current limliting is being carried out to multiple services based on cut-off current, system resource can be made full use of, avoid the wave of system resource
Take.
Below in conjunction with attached drawing, the technical scheme provided by various embodiments of the present application will be described in detail.
Fig. 1 is the flow diagram of the method for limiting of one embodiment data traffic of the application.The execution of the method
Main body, which can be, externally provides the operation system of multiple services, the described method comprises the following steps.
S102: the data request amount of multiple services is acquired.
In S102, operation system can acquire multiple respective data of service when externally providing multiple services in real time
Request amount.By taking one of service as an example, the data request amount of the service can characterize operation system within the current one time
The amount of the request of data of the service received can specifically be indicated by QPS (query rate per second, Query Per Second).
After collecting multiple respective data request amounts of service, S104 can be executed.
S104: the model for determining cut-off current is obtained.
In the present embodiment, the model can be linear regression model (LRM), may include multiple equations of linear regression, wherein
The number of the multiple equation of linear regression can with operation system provide the number of multiple services it is identical, and with multiple services
Between there are one-to-one relationships, and for determining the cut-off currents of multiple services.It, should by taking one of equation of linear regression as an example
Equation of linear regression is determined for the cut-off current of service corresponding with the linear regression method.
The model can be trained in advance and be obtained, in this way, can obtain after the data request amount for collecting multiple services
Take the model of training in advance.
In the present embodiment, the model can be trained in the following manner and be obtained, comprising:
Sample data request amount is obtained, the sample data request amount includes the historical data request of the multiple service
Amount;
Determine the maximum data request amount that the multiple service allows under the sample data request amount;
The sample data request amount and the maximum data request amount are trained using linear regression algorithm, obtained
To the model.
Specifically, it is possible, firstly, to obtain the historical data request amount of multiple services from operation system, each clothes are being got
It, can be using these historical data request amounts as the sample data request amount of model training after the historical data request amount of business.
Secondly, can be determined under sample data request amount according to sample data request amount, operation system is provided multiple
Service the maximum data request amount that respectively can allow for, wherein the maximum data request amount of multiple services is for multiple services
Mixing application scenarios for.
The present embodiment can be asked when determining multiple maximum data request amounts for servicing and respectively allowing in the sample data
Under conditions of the amount of asking, pressure test is carried out to the operation system under mixing application scenarios, obtains test result.Wherein, it is carrying out
When pressure test, the resource of operation system can be made full use of to be tested in the case where operation system not delay machine, it is specific real
The specific implementation that now may refer to existing method for testing pressure, is no longer described in detail here.
After obtaining test result, it can be determined according to test result in the case where mixing application scenarios, what operation system provided
The maximum data request amount that each service can permit.Since the maximum data request amount is to maximally utilise business system
Premised on the resource of system, therefore, after subsequent training obtains model, determining that obtained cut-off current carries out current limliting using model
When, it can guarantee to make full use of system resource, avoid the waste of system resource.
Finally, linear regression algorithm can be used, sample data request amount above-mentioned and multiple services are allowed most
Big data request amount carries out learning training, obtains the model.
In the present embodiment, the process of learning training is carried out using linear regression algorithm, can be to sample data request amount
And the maximum data request amount of multiple services carries out the process of linear fit.M service is externally provided with operation system below
For, illustrate the whole process of model training.
Assuming that the sample data request amount obtained is n group, then, sample data request amount can indicate are as follows:
After carrying out pressure test based on sample data request amount, the maximum data request amount of available m service, specifically
It can indicate are as follows:
Wherein, y1n, y2n... ..., ymnIt is m service in sample data request amount xn1, xn2... ..., xnmLower operation is most
Big data request amount.
When carrying out model training, it can be based on above-mentioned sample data request amount and maximum data request amount, for every
A service is respectively trained to obtain an equation of linear regression, and then obtains the model.Specific implementation is as follows:
It is possible, firstly, to divide maximum data request amount according to different services, obtain corresponding with m service
M group maximum data request amount, can specifically indicate are as follows:
Secondly, m group maximum data request amount is combined with above-mentioned sample data request amount respectively, m group sample is obtained
Data can specifically indicate are as follows:
Finally, being trained every group of sample data respectively, obtain linearly returning with m group sample data one-to-one m
Return equation.
With above-mentioned first group of sample dataFor, it include n row in this group of sample data
Data are based on this n row data, can be fitted a multiple linear regression equations y using linear regression algorithm1=ω10+ω11x1+
ω12x2+……+ω1mxm, and obtain the weights omega in the equationi(i=1,2 ... ..., m), so it is available with more than one
First equation of linear regression.
According to identical method, available to service one-to-one m equation of linear regression with m, the m are linearly returned
Returning equation is the model.Wherein, m equation of linear regression can indicate are as follows:
In S104, after getting model trained in advance, S106 can be executed.
S106: according to the data request amount and the model, the cut-off current of the multiple service is determined.
In S106, it can be obtained according in the respective data request amount of multiple services and S104 of the acquisition in S102
The model taken determines and obtains the multiple respective cut-off current of service.
By taking the service (for the ease of distinguishing, can be indicated below by destination service) in the multiple service as an example,
In the cut-off current for determining destination service, may comprise steps of:
It is possible, firstly, to determine that corresponding with destination service equation of linear regression (here can be by from the model
Target equation of linear regression indicates).Wherein, destination service is corresponding with target equation of linear regression, can characterize target and linearly return
Return equation for determining the cut-off current of the destination service.
Secondly, score can be obtained using the data request amount of destination service as the input of target equation of linear regression
The output of property regression equation, which is the cut-off current of destination service.
In this way, identical method can be based on, the multiple respective cut-off current of service is obtained.
It should be noted that since S102 can acquire the data request amount of multiple services in real time, it is determined in S106
The cut-off currents of multiple services can adaptively be adjusted according to the data request amount in S102, there is considerable flexibility.
After obtaining multiple respective cut-off currents of service, S108 can be executed.
S108: being based on the cut-off current, carries out current limliting to the multiple service.
In S108, current limliting can be carried out to multiple services based on multiple service respective cut-off currents.
It should be noted that, when carrying out current limliting to multiple services, can at least be divided into two kinds of situations in the present embodiment,
One is being limited according to the cut-off current data request amount current to multiple services, another kind is according to cut-off current to multiple clothes
The data request amount being engaged in the next unit time is limited.
For the first situation, since before carrying out current limliting to service, the operation system currently reception without current limliting should
Therefore the request of data of service leads to operation system delay machine, therefore, business in order to avoid the data request amount received is excessive
A buffer can also be arranged in system, the case where data request amount is uprushed occur to avoid operation system.
The present embodiment is when carrying out current limliting to multiple services, by taking above-mentioned first situation as an example, for one in multiple services
A destination service, it can be determined that whether the current data request amount of the destination service is greater than the cut-off current of the destination service, if so,
It can be said that bright, the data request amount of the destination service is more than cut-off current, and operation system can be triggered to the destination service at this time
Current-limiting operation, and in the request of data for currently rejecting the destination service.
If the current data request amount of the destination service is not more than the cut-off current of the destination service, it can be said that the bright target
The data request amount of service is not above cut-off current, and operation system can normally receive the request of data of the destination service at this time,
And externally provide the destination service.
In the present embodiment, since the cut-off current of the multiple services determined in S106 can follow the number of multiple services in S102
Adaptively adjusted according to request amount, therefore, in S108, can according to the cut-off current adaptively adjusted neatly to it is multiple service into
Row current limliting.Simultaneously as cut-off current is obtained based on model determination, it is to be requested with multiple services in sample data when model training
The maximum data request amount that can allow under amount is as sample data, and maximum data request amount to utilize system to provide to greatest extent
Premised on source, therefore, when determining that obtained cut-off current carries out current limliting based on this model, business can be avoided not influencing business
In the case where system failure, system resource is made full use of, avoids the waste of system resource.
Entire technical solution in order to facilitate understanding, may refer to Fig. 2.Fig. 2 is one embodiment data traffic of the application
Method for limiting flow diagram.Embodiment shown in Fig. 2 and embodiment shown in FIG. 1 belong to identical inventive concept, have
Body may comprise steps of.
S201: the data request amount of multiple services is acquired.
In S201, request of data of the available multiple services that it is provided of operation system within the current one time
Amount specifically can be and obtain the current QPS of multiple services.
S202: model trained in advance is obtained.
The model is used to determine the cut-off current of the multiple service, can specifically include multiple equations of linear regression, institute
It states multiple equations of linear regression and the multiple service corresponds, an equation of linear regression is for determining corresponding service
Cut-off current.
The specific training process of the model may refer to the related content recorded in embodiment illustrated in fig. 1, here no longer
Repeated description.
S203: according to the data request amount and the model, the cut-off current of the multiple service is determined.
In S203, each service can be determined respectively according to the multiple linear regression methods for including in the model
Cut-off current.Specific implementation may refer to the related content recorded in embodiment illustrated in fig. 1, also be not repeated to describe here.
S204: judge whether the data request amount of destination service is greater than the cut-off current of the destination service.
The destination service is a service in multiple services, if the data request amount of destination service is greater than destination service
Cut-off current, then can execute S205;Conversely, can then execute S206.
S205: the request of data of the destination service is rejected.
In S205, operation system can trigger current-limiting operation, and reject the request of data of the destination service.
S206: the request of data for the destination service provides service.
In S206, operation system can be in the case where the data request amount of destination service be less than cut-off current, normally
The request of data of ground reception destination service.
It should be noted that in practical applications, above-mentioned S201 to S206 can recycle execution, i.e., execute S205 or
After S206, S201 can be continued to execute, can to obtain the data request amount in next unit time, and then determine it is described under
The cut-off current of multiple services in one unit time, and then current limliting is carried out to multiple services.
Technical solution provided by the embodiments of the present application, previously according to sample data request amount and multiple services in sample number
According under request amount can received maximum data request amount, training obtains model, can be in this way, when to multiple service current limlitings
The data request amount for acquiring multiple services determines the cut-off current of multiple services according to model trained in advance, and is based on the current limliting
Value carries out current limliting.Since the data request amount of collected multiple services is real-time change, it is true based on data request amount
Surely the cut-off current obtained can be adjusted adaptively, and flexibility is preferable;Further, since in model training being existed with multiple services
The maximum data request amount that can allow under sample data request amount is as sample data, and maximum data request amount is with to greatest extent
Utilization system resource premised on, therefore, can be in current limliting when determining that obtained cut-off current carries out current limliting based on this model
On the basis of make full use of system resource, avoid the waste of system resource.
Fig. 3 is the flow diagram of the determination method of one embodiment cut-off current of the application.The execution master of the present embodiment
Body can be and externally provide the operation system of multiple services, and the determination method of the cut-off current may comprise steps of.
S302: the data request amount of multiple services is acquired.
S304: the model for determining cut-off current is obtained.
The model is based on sample data request amount and the multiple service permission under the sample data request amount
Maximum data request amount training obtain.
The model includes multiple equations of linear regression, and the multiple equation of linear regression and the multiple service one are a pair of
It answers, an equation of linear regression is used to determine the cut-off current of corresponding service.
S306: according to the data request amount and the model, the cut-off current of the multiple service is determined.
In the present embodiment, since the data request amount of multiple services can be acquired in S302 in real time, determined in S306
The cut-off currents of multiple services can adaptively be adjusted according to the data request amount in S302, flexibility is more preferable.
The specific implementation of above-mentioned S302 to S306 can refer to the specific implementation that step is corresponded in embodiment illustrated in fig. 1, this theory
Bright book one or more embodiment is not repeated to describe herein.
In the present embodiment, after the cut-off current for determining multiple services, it is also based on the cut-off current of multiple services, to described
Multiple services carry out current limliting.By taking one of service as an example, when the data request amount of the service is greater than cut-off current, operation system
The current-limiting operation to the service can be triggered;When the data request amount of the service is not more than cut-off current, operation system can be just
The service is externally often provided, and receives the request of data of the service.Specifically implementation may refer in embodiment illustrated in fig. 1
The content that S108 is recorded, is not repeated herein explanation.
Technical solution provided by the embodiments of the present application, previously according to sample data request amount and multiple services in sample number
According under request amount can received maximum data request amount, training obtain model, in this way, in the cut-off current for determining multiple services
When, the data request amount of multiple services can be acquired, and the cut-off current of multiple services is determined according to model trained in advance.Due to
The data request amount of collected multiple services is real-time change, therefore, obtained cut-off current is determined based on data request amount
It can adaptively adjust, flexibility is preferable;Further, since being with multiple services in sample data request amount in model training
Under the maximum data request amount that can allow for as sample data, maximum data request amount to utilize system resource to greatest extent
Premised on, therefore, the demand for making full use of system resource is more in line with based on the determining obtained cut-off current of model, thus being based on
When cut-off current carries out current limliting, the waste of system resource can be avoided.
It is above-mentioned that the application specific embodiment is described.Other embodiments are within the scope of the appended claims.
In some cases, the movement recorded in detail in the claims or step can be executed according to the sequence being different from embodiment
And desired result still may be implemented.In addition, process depicted in the drawing not necessarily require the particular order shown or
Person's consecutive order is just able to achieve desired result.In some embodiments, multitasking and parallel processing are also possible
Or it may be advantageous.
Fig. 4 is the structural schematic diagram of one embodiment electronic equipment of the application.Referring to FIG. 4, in hardware view, the electricity
Sub- equipment includes processor, optionally further comprising internal bus, network interface, memory.Wherein, memory may be comprising interior
It deposits, such as high-speed random access memory (Random-Access Memory, RAM), it is also possible to further include non-volatile memories
Device (non-volatile memory), for example, at least 1 magnetic disk storage etc..Certainly, which is also possible that other
Hardware required for business.
Processor, network interface and memory can be connected with each other by internal bus, which can be ISA
(Industry Standard Architecture, industry standard architecture) bus, PCI (Peripheral
Component Interconnect, Peripheral Component Interconnect standard) bus or EISA (Extended Industry Standard
Architecture, expanding the industrial standard structure) bus etc..The bus can be divided into address bus, data/address bus, control always
Line etc..Only to be indicated with a four-headed arrow in Fig. 4, it is not intended that an only bus or a type of convenient for indicating
Bus.
Memory, for storing program.Specifically, program may include program code, and said program code includes calculating
Machine operational order.Memory may include memory and nonvolatile memory, and provide instruction and data to processor.
Processor is from the then operation into memory of corresponding computer program is read in nonvolatile memory, in logical layer
The limits device of data traffic is formed on face.Processor executes the program that memory is stored, and is specifically used for executing following behaviour
Make:
Acquire the data request amount of multiple services;
The model for determining cut-off current is obtained, the model is based on sample data request amount and in the sample data
The maximum data request amount training that the multiple service allows under request amount obtains;
According to the data request amount and the model, the cut-off current of the multiple service is determined;
Based on the cut-off current, current limliting is carried out to the multiple service.
The method that the limits device of data traffic disclosed in the above-mentioned embodiment illustrated in fig. 4 such as the application executes can be applied to
In processor, or realized by processor.Processor may be a kind of IC chip, the processing capacity with signal.?
During realization, each step of the above method can pass through the integrated logic circuit of the hardware in processor or software form
Instruction is completed.Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit,
CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal
Processor, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing
Field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device are divided
Vertical door or transistor logic, discrete hardware components.It may be implemented or execute and is in the embodiment of the present application disclosed each
Method, step and logic diagram.General processor can be microprocessor or the processor is also possible to any conventional place
Manage device etc..The step of method in conjunction with disclosed in the embodiment of the present application, can be embodied directly in hardware decoding processor and execute
At, or in decoding processor hardware and software module combination execute completion.Software module can be located at random access memory,
This fields such as flash memory, read-only memory, programmable read only memory or electrically erasable programmable memory, register maturation
In storage medium.The storage medium is located at memory, and processor reads the information in memory, completes above-mentioned side in conjunction with its hardware
The step of method.
The method that the electronic equipment can also carry out Fig. 1 and Fig. 2, and realize the limits device of data traffic in Fig. 1 and Fig. 2 institute
Show the function in embodiment, details are not described herein for the embodiment of the present application.
Certainly, other than software realization mode, other implementations are not precluded in the electronic equipment of the application, for example patrol
Collect device or the mode of software and hardware combining etc., that is to say, that the executing subject of following process flow is not limited to each patrol
Unit is collected, hardware or logical device are also possible to.
The embodiment of the present application also proposed a kind of computer readable storage medium, the computer-readable recording medium storage one
A or multiple programs, the one or more program include instruction, and the instruction is when by the portable electronic including multiple application programs
When equipment executes, the method that the portable electronic device can be made to execute Fig. 1 and embodiment illustrated in fig. 2, and be specifically used for executing
It operates below:
Acquire the data request amount of multiple services;
The model for determining cut-off current is obtained, the model is based on sample data request amount and in the sample data
The maximum data request amount training that the multiple service allows under request amount obtains;
According to the data request amount and the model, the cut-off current of the multiple service is determined;
Based on the cut-off current, current limliting is carried out to the multiple service.
Fig. 5 is the structural schematic diagram of the limits device 50 of one embodiment data traffic of the application.Referring to FIG. 5,
In a kind of Software Implementation, the limits device 50 of the data traffic can include: acquisition unit 51, determines acquiring unit 52
Unit 53 and current limiting unit 54, in which:
Acquisition unit 51 acquires the data request amount of multiple services;
Acquiring unit 52, obtains the model for determining cut-off current, the model be based on sample data request amount and
The maximum data request amount training that the multiple service allows under the sample data request amount obtains;
Determination unit 53 determines the cut-off current of the multiple service according to the data request amount and the model;
Current limiting unit 54 is based on the cut-off current, carries out current limliting to the multiple service.
Optionally, training obtains the model to the acquiring unit 52 in the following manner:
Sample data request amount is obtained, the sample data request amount includes the historical data request of the multiple service
Amount;
Determine the maximum data request amount that the multiple service allows under the sample data request amount;
The sample data request amount and the maximum data request amount are trained using linear regression algorithm, obtained
To the model.
Optionally, the acquiring unit 52 determines that the multiple service allows most under the sample data request amount
Big data request amount, comprising:
Obtain the test result for carrying out pressure test to operation system under the sample data request amount, the business system
System is to provide the system of the multiple service;
According to the test result, the maximum data request amount that the multiple service allows is determined.
Optionally, the model includes multiple equations of linear regression, the multiple equation of linear regression and the multiple clothes
Business corresponds, and an equation of linear regression is used to determine the cut-off current of corresponding service.
Optionally, the determination unit 53 determines the multiple service according to the data request amount and the model
Cut-off current, comprising:
For one of destination service, following operation is executed:
Target equation of linear regression corresponding with the destination service is determined from the model;
According to the data request amount of the destination service and the target equation of linear regression, the destination service is determined
Cut-off current.
Optionally, the current limiting unit 53 is based on the cut-off current, carries out current limliting to the multiple service, comprising:
For one of destination service, following operation is executed:
Judge whether the data request amount of the destination service is greater than the cut-off current of the destination service;
If so, rejecting the request of data of the destination service.
The method that the limits device 50 of data traffic provided by the embodiments of the present application can also carry out Fig. 1 and Fig. 2, and realize number
According to the limits device 50 of flow in the function of Fig. 1 and embodiment illustrated in fig. 2, details are not described herein for the embodiment of the present application.
Fig. 6 is the structural schematic diagram of one embodiment electronic equipment of the application.Referring to FIG. 6, in hardware view, the electricity
Sub- equipment includes processor, optionally further comprising internal bus, network interface, memory.Wherein, memory may be comprising interior
It deposits, such as high-speed random access memory (Random-Access Memory, RAM), it is also possible to further include non-volatile memories
Device (non-volatile memory), for example, at least 1 magnetic disk storage etc..Certainly, which is also possible that other
Hardware required for business.
Processor, network interface and memory can be connected with each other by internal bus, which can be ISA
(Industry Standard Architecture, industry standard architecture) bus, PCI (Peripheral
Component Interconnect, Peripheral Component Interconnect standard) bus or EISA (Extended Industry Standard
Architecture, expanding the industrial standard structure) bus etc..The bus can be divided into address bus, data/address bus, control always
Line etc..Only to be indicated with a four-headed arrow in Fig. 6, it is not intended that an only bus or a type of convenient for indicating
Bus.
Memory, for storing program.Specifically, program may include program code, and said program code includes calculating
Machine operational order.Memory may include memory and nonvolatile memory, and provide instruction and data to processor.
Processor is from the then operation into memory of corresponding computer program is read in nonvolatile memory, in logical layer
The determining device of cut-off current is formed on face.Processor executes the program that memory is stored, and is specifically used for executing following behaviour
Make:
Acquire the data request amount of multiple services;
The model for determining cut-off current is obtained, the model is based on sample data request amount and in the sample data
The maximum data request amount training that the multiple service allows under request amount obtains;
According to the data request amount and the model, the cut-off current of the multiple service is determined.
The method that the determining device of cut-off current disclosed in the above-mentioned embodiment illustrated in fig. 6 such as the application executes can be applied to locate
It manages in device, or realized by processor.Processor may be a kind of IC chip, the processing capacity with signal.In reality
During now, each step of the above method can pass through the integrated logic circuit of the hardware in processor or the finger of software form
It enables and completing.Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit,
CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal
Processor, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing
Field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device are divided
Vertical door or transistor logic, discrete hardware components.It may be implemented or execute and is in the embodiment of the present application disclosed each
Method, step and logic diagram.General processor can be microprocessor or the processor is also possible to any conventional place
Manage device etc..The step of method in conjunction with disclosed in the embodiment of the present application, can be embodied directly in hardware decoding processor and execute
At, or in decoding processor hardware and software module combination execute completion.Software module can be located at random access memory,
This fields such as flash memory, read-only memory, programmable read only memory or electrically erasable programmable memory, register maturation
In storage medium.The storage medium is located at memory, and processor reads the information in memory, completes above-mentioned side in conjunction with its hardware
The step of method.
The method that the electronic equipment can also carry out Fig. 3, and realize the determining device of cut-off current in the embodiment shown in fig. 3
Function, details are not described herein for the embodiment of the present application.
Certainly, other than software realization mode, other implementations are not precluded in the electronic equipment of the application, for example patrol
Collect device or the mode of software and hardware combining etc., that is to say, that the executing subject of following process flow is not limited to each patrol
Unit is collected, hardware or logical device are also possible to.
The embodiment of the present application also proposed a kind of computer readable storage medium, the computer-readable recording medium storage one
A or multiple programs, the one or more program include instruction, and the instruction is when by the portable electronic including multiple application programs
When equipment executes, the method that the portable electronic device can be made to execute Fig. 1 and embodiment illustrated in fig. 2, and be specifically used for executing
It operates below:
Acquire the data request amount of multiple services;
The model for determining cut-off current is obtained, the model is based on sample data request amount and in the sample data
The maximum data request amount training that the multiple service allows under request amount obtains;
According to the data request amount and the model, the cut-off current of the multiple service is determined.
Fig. 7 is the structural schematic diagram of the determining device 70 of one embodiment cut-off current of the application.Referring to FIG. 7, one
In kind Software Implementation, the determining device 70 of the cut-off current can include: acquisition unit 71, acquiring unit 72 and determination unit
73, in which:
Acquisition unit 71 acquires the data request amount of multiple services;
Acquiring unit 72, obtains the model for determining cut-off current, the model be based on sample data request amount and
The maximum data request amount training that the multiple service allows under the sample data request amount obtains;
Determination unit 73 determines the cut-off current of the multiple service according to the data request amount and the model.
Optionally, the determining device 70 of the cut-off current further include: current limiting unit 74, in which:
The current limiting unit 74, after the cut-off current that the determination unit 73 determines the multiple service, based on described more
The cut-off current of a service carries out current limliting to the multiple service.
The method that the determining device 70 of cut-off current provided by the embodiments of the present application can also carry out Fig. 3, and realize cut-off current
The function of the embodiment shown in Fig. 3 of determining device 70, details are not described herein for the embodiment of the present application.
In short, being not intended to limit the protection scope of the application the foregoing is merely the preferred embodiment of the application.
Within the spirit and principles of this application, any modification, equivalent replacement, improvement and so on should be included in the application's
Within protection scope.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used
Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment
The combination of equipment.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want
There is also other identical elements in the process, method of element, commodity or equipment.
Various embodiments are described in a progressive manner in the application, same and similar part between each embodiment
It may refer to each other, each embodiment focuses on the differences from other embodiments.Implement especially for system
For example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method
Part illustrates.