CN107547429A - One kind load determines method, apparatus and electronic equipment - Google Patents

One kind load determines method, apparatus and electronic equipment Download PDF

Info

Publication number
CN107547429A
CN107547429A CN201710629813.0A CN201710629813A CN107547429A CN 107547429 A CN107547429 A CN 107547429A CN 201710629813 A CN201710629813 A CN 201710629813A CN 107547429 A CN107547429 A CN 107547429A
Authority
CN
China
Prior art keywords
mrow
attribute
equipment
value
performance
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.)
Pending
Application number
CN201710629813.0A
Other languages
Chinese (zh)
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.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies 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 New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN201710629813.0A priority Critical patent/CN107547429A/en
Publication of CN107547429A publication Critical patent/CN107547429A/en
Pending legal-status Critical Current

Links

Abstract

Loaded the embodiment of the invention discloses one kind and determine that method, apparatus and electronic equipment, method include:Obtain the multinomial performance property value of equipment, each attribute of performance value corresponds to an attribute thresholds respectively, the corresponding attribute thresholds of each attribute of performance value are compared, according to each comparative result and the weight of each attribute of performance value set in advance, combination property value is calculated, the combination property value is represented to the load of equipment;Compared to directly the load of equipment is represented with the current connection quantity of equipment in existing scheme, this programme is based on multinomial performance property value, determines combination property value, the load of equipment is represented with combination property value, the accuracy for determining load is improved, further, load balancing effect can be improved.

Description

One kind load determines method, apparatus and electronic equipment
Technical field
The present invention relates to load-balancing technique field, more particularly to a kind of load determines method, apparatus and electronic equipment.
Background technology
In some distributed systems, generally use load-balancing technique, individual device in system is scheduled, to carry The efficiency of high system processes data (such as connection request).In existing scheme, generally the current connection quantity of equipment is regard as this The load of equipment, when there is new connection request, the connection request is preferentially distributed into the less equipment of load, that is, connect Less equipment.
But the speed of equipment processing data and not only related to its current connection quantity, it is not currently to connect quantity Fewer equipment processing data is faster, and the load of equipment is determined using such scheme, does not consider to influence equipment processing speed The other factors of degree, the load determined is inaccurate, and then causes load balancing effect poor.
The content of the invention
The purpose of the embodiment of the present invention is that providing a kind of load determines method, apparatus and electronic equipment, determines to improve The accuracy of load.
To reach above-mentioned purpose, the embodiment of the invention discloses one kind to load determination method, including:
Obtain the multinomial performance property value of equipment;
The corresponding attribute thresholds of each attribute of performance value are compared respectively;
According to the comparative result of each attribute of performance value and the weight of each attribute of performance value set in advance, calculate For representing the combination property value of apparatus of load.
To reach above-mentioned purpose, the embodiment of the invention also discloses a kind of load determining device, including:
Acquisition module, for obtaining the multinomial performance property value of equipment;
Comparison module, each attribute of performance value for the acquisition module to be obtained distinguish corresponding attribute thresholds It is compared;
Computing module, for the comparative result according to each attribute of performance value and each attribute of performance set in advance The weight of value, calculate the combination property value for representing apparatus of load.
To reach above-mentioned purpose, the embodiment of the invention also discloses a kind of electronic equipment, including processor, communication interface, Memory and communication bus, wherein, processor, communication interface, memory completes mutual communication by communication bus;
Memory, for storing machine readable instructions;
Processor, for reading the machine readable instructions stored on the memory, to perform any of the above-described kind of load Determine method.
To reach above-mentioned purpose, the embodiment of the invention also discloses a kind of machinable medium, and being stored with machine can Execute instruction, when being called and being performed by processor, the machine-executable instruction promotes the processor:Realize any of the above-described Kind load determination method.
Using illustrated embodiment of the present invention, the multinomial performance property value of equipment is obtained, each attribute of performance value corresponds to respectively One attribute thresholds, the corresponding attribute thresholds of each attribute of performance value are compared, according to each comparative result and The weight of each attribute of performance value set in advance, combination property value is calculated, the combination property value is represented to the load of equipment;Phase Than directly representing the load of equipment with the current connection quantity of equipment in existing scheme, this programme is based on multinomial performance attribute Value, determines combination property value, the load of equipment is represented with combination property value, improves the accuracy for determining load, further, Load balancing effect can be improved.
Certainly, any product or method for implementing the present invention it is not absolutely required to reach all the above excellent simultaneously Point.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of structural representation of distributed system provided in an embodiment of the present invention;
Fig. 2 is the structural representation of another distributed system provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic flow sheet for loading determination method provided in an embodiment of the present invention;
Fig. 4 is a kind of structural representation of load determining device provided in an embodiment of the present invention;
Fig. 5 is the structural representation of a kind of electronic equipment provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made Embodiment, belong to the scope of protection of the invention.
In order to solve the above-mentioned technical problem, loaded the embodiments of the invention provide one kind and determine that method, apparatus and electronics are set Management equipment standby, that this method and device can apply in distributed system, or, it can also be applied in distributed system Processing equipment, or, any electronic equipment can also be applied to, do not limited specifically.
Distributed system can be with as shown in figure 1, include a management equipment and more processing equipments (processing equipment 1, processing Equipment 2 ... processing equipment N), or, more management equipments can also be included in distributed system, Fig. 1 is not to management equipment Quantity form limit.
Management equipment can use load-balancing technique, and each processing equipment in system is scheduled.For example, manage Equipment is managed after connection request is received, can be according to the load of each processing equipment, selecting processing equipment to handle the connection please Ask.Before this, management equipment can utilize load determination method provided in an embodiment of the present invention, determine each processing in system The load of equipment.
As a kind of embodiment, in a distributed system, it is possible to specify one or more processing equipment is set as management It is standby, that is to say, that management equipment can be both scheduled to processing equipment, can also handle connection request.
Or the processing equipment in distributed system can utilize load determination method provided in an embodiment of the present invention, really The fixed load of itself, and the load information of itself is sent to management equipment, management equipment is set according to each processing received Standby load information, each processing equipment is scheduled.
Or distributed system can also be as shown in Fig. 2 only include more processing equipments, that is to say, that is not set in system Put management equipment.In this case, processing equipment can utilize load determination method provided in an embodiment of the present invention, determine itself Load, and according to the load determined, to judge whether itself is handled connection request.
Or other electronic equipments such as mobile phone, computer can also utilize load determination method provided in an embodiment of the present invention, Determine the load of itself.The application scenarios of the embodiment of the present invention are without limiting.
Load determination method provided in an embodiment of the present invention is described in detail first below.
Fig. 3 is a kind of schematic flow sheet for loading determination method provided in an embodiment of the present invention, including:
S301:Obtain the multinomial performance property value of equipment.
Attribute of performance value can include following any two or three:CPU usage, memory usage, disk occupancy. Or other property values for being capable of consersion unit performance can also be included, do not limit specifically.
If this method application is in the system shown in figure 1, and the equipment for performing this method is the management in distributed system Equipment, then the equipment in S301 is the processing equipment in distributed system.
, can be by default between the management equipment and each processing equipment in distributed system as a kind of embodiment Management agreement carries out data interaction.For example, the default management agreement can be SNMP (SimpleNetwork Management Protocol, Simple Network Management Protocol), or, or other, do not limit specifically.
Processing equipment can preset management agreement by this, by the CPU usage of itself, committed memory capacity, internal memory Total capacity, the performance informations such as disk size, total amount of memory are taken and are sent to management equipment.Committed memory capacity and internal memory The ratio of total capacity, as memory usage, the ratio for having taken disk size and total amount of memory is disk occupancy, this Sample management equipment has just got the CPU usage of processing equipment, memory usage, disk occupancy.
Specifically, management equipment can send SNMP probe messages every predetermined period to processing equipment, processing equipment connects After receiving the SNMP probe messages, by self performance feedback of the information to management equipment.If management equipment is sending SNMP detections After the preset duration of message, the feedback of processing equipment is not received, can directly record the processing equipment as machine state of delaying;Or Person, SNMP probe messages can also be sent again, the anti-of processing equipment is all not received by repeatedly sending SNMP probe messages In the case of feedback, then the processing equipment is recorded as machine state of delaying.Follow-up management equipment receives connection request, to processing equipment When being scheduled, the processing equipment for the machine state that is registered as delaying is not involved in dispatching.
As another embodiment, plug-in unit can be installed in processing equipment, the plug-in unit can in real time or periodically The performance information of processing equipment is sent to management equipment by ground.
As described above, the performance information can the CPU usage comprising processing equipment, committed memory capacity, internal memory Total capacity, disk size, total amount of memory etc. are taken.Committed memory capacity and the ratio of total amount of memory, as internal memory Occupancy, the ratio for having taken disk size and total amount of memory is disk occupancy, and such management equipment is just got The CPU usage of processing equipment, memory usage, disk occupancy.
It should be noted that if the equipment in S301 is multi-core CPU equipment, the CPU usage can take multi-core CPU The average value or maximum or minimum value of occupancy, or, a CPU can also be specified, the occupancy of the CPU is made For the CPU usage of equipment.
If this method application is in the system shown in figure 1, and the equipment for performing this method is the processing in distributed system Equipment, then the equipment in S301 is the processing equipment itself, and the processing equipment can obtain the various attribute of performance values of itself.
If this method is applied in system shown in Figure 2, and the equipment for performing this method is the processing in distributed system Equipment, then the equipment in S301 is the processing equipment itself, and the processing equipment can obtain the various attribute of performance values of itself.
If the equipment for performing this programme is single electronic equipment, the equipment in S301 is the electronic equipment itself, Electronic equipment can obtain the various attribute of performance values of itself.
S302:The corresponding attribute thresholds of each attribute of performance value are compared respectively.
In embodiments of the present invention, its corresponding attribute thresholds can be set for each attribute of performance value.Such as CPU usage, corresponding CPU threshold values can be set, for memory usage, corresponding memory threshold can be set, for magnetic Disk occupancy, corresponding disk threshold value, etc. can be set, is not limited specifically.
Assuming that n item attribute of performance values are got, due to all carrying out same processing to each attribute of performance value, by each property Energy property value is referred to as i-th attribute of performance value, i=1 ... n.Therefore, S302 can include:By i-th attribute of performance value PiWith Its corresponding attribute thresholds PmiIt is compared, obtains i-th of comparative result Pi/Pmi
S303:According to the comparative result of each attribute of performance value and the weight of each attribute of performance value set in advance, Calculate the combination property value for representing apparatus of load.
In above-mentioned embodiment, i-th of comparative result P is obtainedi/Pmi, i=1 ... n, on this basis, calculated using following Formula, calculate the combination property value of every equipment:
Wherein, WfFor the combination property value of equipment, M is the first preset value, and a is the second preset value, WiFor set in advance I item attribute of performance values PiWeight, Pi/PmiFor above-mentioned i-th of comparative result.Properties property value PiWeight can basis Actual conditions are set.
In order that obtain 1-P in above formulai/PmiIt is not negative, if i-th attribute of performance value PiAttribute threshold corresponding more than its Value PmiWhen, can be according to Pi/Pmi=1 calculates.
As an example it is assumed that three attribute of performance values, CPU usage P are obtained in S3011, memory usage P2Accounted for disk With rate P3;By CPU usage P in S3021With corresponding CPU threshold values Pm1It is compared, obtains the first comparative result P1/Pm1, will Memory usage P2With corresponding memory threshold Pm2It is compared, obtains the second comparative result P2/Pm2, by disk occupancy P3With Corresponding disk threshold value Pm3It is compared, obtains the 3rd comparative result P3/Pm3;Following formula is utilized in S303, calculates combination property value:
Wherein, WfFor the combination property weight of equipment, M is the first preset value, and a is the second preset value, W1To be set in advance The weight of CPU usage, W2For the weight of memory usage set in advance, W3For the weight of disk occupancy set in advance, P1/Pm1For first comparative result, P2/Pm2For second comparative result, P3/Pm3For the 3rd comparative result.
Properties property value PiWeight can be set according to actual conditions.It is appreciated that at different data Consumption of the reason process for CPU, internal memory and disk is different, such as, some data handling procedures are computationally intensive, consumption CPU is more, then W1It can set relatively larger.
As a kind of embodiment, M=10, a=2, power truth of a matter M is 10, and power exponent is up to 2 so that combination property value Scope is before 1-100.Or combination property value scope can also be planned according to actual conditions, according to the scope, set M And a value.
The combination property value is used for representing apparatus of load, and combination property value is bigger, represents that apparatus of load is smaller.
Using embodiment illustrated in fig. 3 of the present invention, the multinomial performance property value of equipment is obtained, each attribute of performance value is right respectively Answer an attribute thresholds, the corresponding attribute thresholds of each attribute of performance value be compared, according to each comparative result, with And the weight of each attribute of performance value set in advance, combination property value is calculated, the combination property value is represented to the load of equipment; Compared to directly the load of equipment is represented with the current connection quantity of equipment in existing scheme, this programme is based on multinomial performance attribute Value, determines combination property value, the load of equipment is represented with combination property value, improves the accuracy for determining load, further, Load balancing effect can be improved.
If embodiment illustrated in fig. 3 application is in the system shown in figure 1, and executive agent sets for the management in distributed system Standby, after the combination property value for representing apparatus of load is calculated, management equipment can be with according to each processing equipment Load, select the connection request that receives of processing equipment processing.
Specifically, after S303, can include:Set with reference to default load balancing and be calculated each Standby combination property value, the connection request that the processing of selection target equipment receives.
As a kind of embodiment, management equipment can calculate the combination property of an individual device every predetermined period Value, after new connection request is received, determines the combination property value of individual device the last corresponding to the connection request, The company is handled with reference to default load balancing and the combination property value of the individual device of the last time, selection target equipment Connect request.
As another embodiment, management equipment can also utilize implementation shown in Fig. 3 after connection request is received Example, the combination property value of individual device is calculated, then in conjunction with default load balancing and the individual device being calculated Combination property value, selection target equipment handle the connection request.
The default load balancing can have it is a variety of, such as, it is (negative that the maximum equipment of combination property value can be directly selected Carry minimum equipment) as target device processing connection request.Or can also be according to the ratio of individual device combination property value Example, distributes the connection request received.Lift a simply example, it is assumed that there are four processing equipments A, B, C, D in distributed system, Wherein, A combination property value 60, B combination property value 40, C combination property value 80, D combination property value 20 is calculated, The ratio of this four processing equipment combination property values is:3:2:4:1;Assuming that management equipment receives 10 connection requests, then root According to the ratio, wherein device A will be distributed to handle by 3 connection requests, 2 connection requests distribute to equipment B to handle, 4 Connection request distributes to equipment C to handle, and 1 connection request distributes to equipment D to handle.
Or weighted least connections algorithm can be used.For every equipment, determine that its combination property value currently connects with it Several ratio is connect, the larger equipment of the management equipment prioritizing selection ratio handles connection request as target device.Lift a letter Single example, it is assumed that there are four processing equipments A, B, C, D in distributed system, wherein, A combination property value 60, B is calculated Combination property value 40, C combination property value 80, D combination property value 20, A current connection number is 3, B current connection number The current connection number that current connection number for 4, C is 2, D is 2;Determine that A combination property value is with the current ratio for being connected number The ratio that the ratio that 20, B ratio is 10, C is 40, D is 10., preferentially please by connection after management equipment receives connection request Ask and distribute to equipment C, it is assumed that be assigned with a connection request for C, then C current connection number is changed into 3, and ratio is changed into 27, still most Greatly;After management equipment receives connection request, connection request is preferentially still distributed into equipment C, it is assumed that be assigned with a connection for C Request, then C current connection number is changed into 4, and ratio is changed into 20, identical with A, then next connection request can preferentially give A or C ... by that analogy, is repeated no more.
Or weighted round robin can also be used.Lift a simply example, it is assumed that there are four processing in distributed system Device A, B, C, D, wherein, A combination property value 60, B combination property value 40, C combination property value 80, D is calculated Combination property value 20.After management equipment receives connection request, preceding 4 connection requests are arbitrarily assigned to this four equipment, and this four After platform equipment all treats a connection request, itself combination property value is cut 10, then A combination property value is the comprehensive of 50, B Conjunction performance number is 30, C combination property value is 70, D combination property value is 10;Then management equipment is again by 4 connection requests This four equipment are arbitrarily assigned to, after this four equipment all reprocessed a connection request, itself combination property value is subtracted again Fall 10, then A combination property value is 40, B combination property value is 20, C combination property value is 60, D combination property value is 0;The equipment that combination property value reduces to 0 does not reprocess connection request, during management equipment reallocation connection request, slave unit A, equipment B, selected ... until the combination property value of armamentarium is kept to 0, then be calculated again according to S303 each in equipment C The synthetic weights weight values of equipment, carry out the distribution of a new round.Or embodiment illustrated in fig. 3 can also be re-executed, obtain new comprehensive Weighted value is closed, according to new synthetic weights weight values, carries out the distribution of a new round.
It should be noted that each numeral in above-mentioned example, such as, " 4 connection requests ", " treated connection After request, itself combination property value is cut 10 " etc., all by way of example only, forecast scheme configuration not limited.
Default load balancing has a variety of, will not enumerate.
As a kind of embodiment, S302 can also include:Judge to whether there is in the multinomial performance property value and be more than The attribute of performance value of corresponding attribute thresholds;If it is, it is busy state by the device flag;Calculated described for representing After the combination property value of apparatus of load, with reference to the comprehensive of default load balancing and the individual device being calculated It can be worth, in the equipment of busy state is not labeled as, selection target equipment handles the connection request received.
In the present embodiment, in the multinomial performance property value for the equipment that S301 is got, if any one performance category Property value be more than its corresponding to attribute thresholds, then be busy state by the device flag, set in follow-up management equipment selection target During standby processing connection request, the equipment for being marked as busy state can not be considered, that is, be only not labeled as busy shape In the equipment of state, selection target equipment handles the connection request received.
Or user can be according to actual conditions, whether the equipment that setting is marked as busy state participates in processing connection Request.In the present embodiment, selection interface can be provided so that whether the equipment that user's selection is marked as busy state joins With handling connection request.
If user selects " being not involved in ", above-mentioned embodiment is performed, " is calculated described for representing apparatus of load After combination property value, with reference to default load balancing and the combination property value for the individual device being calculated, not by Labeled as the connection request that in the equipment of busy state, the processing of selection target equipment receives ";If user selects " participation ", Then can be without the mark of busy state, the target that management equipment selects to handle connection request in whole processing equipments is set It is standby, or, the mark of busy state can also be carried out, the mark only plays suggesting effect, and management equipment is still set in all processing Standby middle selection handles the target device of connection request.
Described according to content above (S303 parts), in order that obtaining the 1-P in formulai/PmiIt is not negative, if i-th Attribute of performance value PiAttribute thresholds P corresponding more than itsmiWhen, can be according to Pi/Pmi=1 calculates.That is, computing device Combination property value when, if the attribute of performance value of the equipment be more than its corresponding to attribute thresholds, the attribute of performance value is regarded For attribute thresholds corresponding equal to its.
Or as a kind of embodiment, if a certain item attribute of performance value of equipment is more than the attribute threshold corresponding to it Value, then can no longer calculate the combination property value of the equipment, this is also rational.
In the present embodiment, S302 includes:The corresponding attribute thresholds of each attribute of performance value are compared respectively Compared with, and judge to whether there is the attribute of performance value for being more than corresponding attribute thresholds in the multinomial performance property value;If it is, will The device flag is busy state;S303 can include:Equipment for being not labeled as busy state, according to the equipment The weight of the comparative result of each attribute of performance value and each attribute of performance value set in advance, calculate for representing that this sets The combination property value of standby load;After S303, with reference to the comprehensive of default load balancing and the individual device being calculated Performance number is closed, in the equipment of busy state is not labeled as, selection target equipment handles the connection request received.
Or user can set according to actual conditions and whether calculate the comprehensive of the equipment that is marked as busy state Can value.In the present embodiment, selection interface can be provided so that user, which chooses whether to calculate, is marked as setting for busy state Standby combination property value.
Corresponding with above method embodiment, the embodiment of the present invention also provides a kind of load determining device.
Fig. 4 is a kind of structural representation of load determining device provided in an embodiment of the present invention, including:
Acquisition module 401, for obtaining the multinomial performance property value of equipment;
Comparison module 402, each attribute of performance value for the acquisition module to be obtained distinguish corresponding attribute Threshold value is compared;
Computing module 403, for the comparative result according to each attribute of performance value and each performance category set in advance The weight of property value, calculates the combination property value for representing apparatus of load.
As a kind of embodiment, the attribute of performance value includes following any two or three:CPU usage, internal memory Occupancy, disk occupancy;
Acquisition module 401, specifically can be used for:
The multinomial performance property value that receiving device is sent by presetting management agreement;
Or the attribute of performance value that receiving device is sent by the plug-in unit in the equipment.
As a kind of embodiment, the multinomial performance property value is n item attribute of performance values;Comparison module 402, specifically may be used For:
By i-th attribute of performance value PiCorresponding attribute thresholds PmiIt is compared, obtains i-th of comparative result Pi/ Pmi, i=1 ... n;
Computing module 403, specifically can be used for:
Utilize following formula, the combination property value of calculating every equipment:
Wherein, WfFor the combination property value of equipment, M is the first preset value, and a is the second preset value, WiFor set in advance I item attribute of performance values PiWeight, Pi/PmiFor i-th of comparative result.
As a kind of embodiment, the M=10, the a=2.
As a kind of embodiment, described device can also include:
First load balancing module (not shown), for reference to default load balancing and the calculating mould The combination property value for the individual device that block is calculated, the connection request that the processing of selection target equipment receives.
As a kind of embodiment, described device can also include:Judge module, mark module and the second load balancing mould Block (not shown), wherein,
Judge module, for judging to whether there is the performance for being more than corresponding attribute thresholds in the multinomial performance property value Property value;If it is, triggered mark module;
Mark module, for being busy state by the device flag;
Second load balancing module, for combining the comprehensive of default load balancing and the individual device being calculated Performance number is closed, in the equipment of busy state is not labeled as, selection target equipment handles the connection request received.
Using embodiment illustrated in fig. 4 of the present invention, the multinomial performance property value of equipment is obtained, each attribute of performance value is right respectively Answer an attribute thresholds, the corresponding attribute thresholds of each attribute of performance value be compared, according to each comparative result, with And the weight of each attribute of performance value set in advance, combination property value is calculated, the combination property value is represented to the load of equipment; Compared to directly the load of equipment is represented with the current connection quantity of equipment in existing scheme, this programme is based on multinomial performance attribute Value, determines combination property value, the load of equipment is represented with combination property value, improves the accuracy for determining load, further, Load balancing effect can be improved.
Corresponding with above method embodiment, the embodiment of the present invention also provides a kind of electronic equipment, as shown in figure 5, including Processor 501, communication interface 502, memory 503 and communication bus 504, wherein, processor 501, communication interface 502, storage Device 503 completes mutual communication by communication bus 504;
Memory 503, for storing machine readable instructions;
Processor 501, for reading the machine readable instructions stored on memory 503, to perform following steps:
Obtain the multinomial performance property value of equipment;
The corresponding attribute thresholds of each attribute of performance value are compared respectively;
According to the comparative result of each attribute of performance value and the weight of each attribute of performance value set in advance, calculate For representing the combination property value of apparatus of load.
As a kind of embodiment, the attribute of performance value includes following any two or three:CPU usage, internal memory Occupancy, disk occupancy;
Processor 501 can also carry out following steps:
The multinomial performance property value that receiving device is sent by presetting management agreement;
Or the attribute of performance value that receiving device is sent by the plug-in unit in the equipment.
As a kind of embodiment, the multinomial performance property value is n item attribute of performance values;Processor 501 can also be held Row following steps:
By i-th attribute of performance value PiCorresponding attribute thresholds PmiIt is compared, obtains i-th of comparative result Pi/ Pmi, i=1 ... n;
Utilize following formula, the combination property value of calculating every equipment:
Wherein, WfFor the combination property value of equipment, M is the first preset value, and a is the second preset value, WiFor set in advance I item attribute of performance values PiWeight, Pi/PmiFor i-th of comparative result.
As a kind of embodiment, M=10, a=2.
As a kind of embodiment, processor 501 can also carry out following steps:
After calculating is used to represent the combination property value of apparatus of load, with reference to default load balancing, Yi Jiji The combination property value of obtained individual device, the connection request that the processing of selection target equipment receives.
As a kind of embodiment, processor 501 can also carry out following steps:
Judge to whether there is the attribute of performance value for being more than corresponding attribute thresholds in the multinomial performance property value;
If it is, it is busy state by the device flag;
After calculating is used to represent the combination property value of apparatus of load, with reference to default load balancing, Yi Jiji The combination property value of obtained individual device, in the equipment of busy state is not labeled as, the processing of selection target equipment connects The connection request received.
The communication bus that the above-mentioned network equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or EISA (Extended Industry Standard Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, controlling bus etc..For just Only represented in expression, figure with a thick line, it is not intended that an only bus or a type of bus.
The communication that communication interface is used between the above-mentioned network equipment and other equipment.
Memory can include random access memory (Random Access Memory, RAM), can also include non-easy The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also To be at least one storage device for being located remotely from aforementioned processor.
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 Processing, DSP), it is application specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other PLDs, discrete Door or transistor logic, discrete hardware components.
Using embodiment illustrated in fig. 5 of the present invention, the multinomial performance property value of equipment is obtained, each attribute of performance value is right respectively Answer an attribute thresholds, the corresponding attribute thresholds of each attribute of performance value be compared, according to each comparative result, with And the weight of each attribute of performance value set in advance, combination property value is calculated, the combination property value is represented to the load of equipment; Compared to directly the load of equipment is represented with the current connection quantity of equipment in existing scheme, this programme is based on multinomial performance attribute Value, determines combination property value, the load of equipment is represented with combination property value, improves the accuracy for determining load, further, Load balancing effect can be improved.
Corresponding with above method embodiment, the embodiment of the present invention also provides a kind of machinable medium, is stored with Machine-executable instruction, when being called and being performed by processor, the machine-executable instruction promotes the processor, realizes such as Lower method and step:
Obtain the multinomial performance property value of equipment;
The corresponding attribute thresholds of each attribute of performance value are compared respectively;
According to the comparative result of each attribute of performance value and the weight of each attribute of performance value set in advance, calculate For representing the combination property value of apparatus of load.
As a kind of embodiment, the attribute of performance value includes following any two or three:CPU usage, internal memory Occupancy, disk occupancy;
Processor can also realize following steps:
The multinomial performance property value that receiving device is sent by presetting management agreement;
Or the attribute of performance value that receiving device is sent by the plug-in unit in the equipment.
As a kind of embodiment, the multinomial performance property value is n item attribute of performance values;The machine-executable instruction Promote the processor, realize following method and step:
By i-th attribute of performance value PiCorresponding attribute thresholds PmiIt is compared, obtains i-th of comparative result Pi/ Pmi, i=1 ... n;
Utilize following formula, the combination property value of calculating every equipment:
Wherein, WfFor the combination property value of equipment, M is the first preset value, and a is the second preset value, WiFor set in advance I item attribute of performance values PiWeight, Pi/PmiFor i-th of comparative result.
As a kind of embodiment, M=10, a=2.
As a kind of embodiment, the machine-executable instruction promotes the processor, realizes following method and step:
After calculating is used to represent the combination property value of apparatus of load, with reference to default load balancing, Yi Jiji The combination property value of obtained individual device, the connection request that the processing of selection target equipment receives.
As a kind of embodiment, the machine-executable instruction promotes the processor, realizes following method and step:
Judge to whether there is the attribute of performance value for being more than corresponding attribute thresholds in the multinomial performance property value;
If it is, it is busy state by the device flag;
After calculating is used to represent the combination property value of apparatus of load, with reference to default load balancing, Yi Jiji The combination property value of obtained individual device, in the equipment of busy state is not labeled as, the processing of selection target equipment connects The connection request received.
Using illustrated embodiment of the present invention, the multinomial performance property value of equipment is obtained, each attribute of performance value corresponds to respectively One attribute thresholds, the corresponding attribute thresholds of each attribute of performance value are compared, according to each comparative result and The weight of each attribute of performance value set in advance, combination property value is calculated, the combination property value is represented to the load of equipment;Phase Than directly representing the load of equipment with the current connection quantity of equipment in existing scheme, this programme is based on multinomial performance attribute Value, determines combination property value, the load of equipment is represented with combination property value, improves the accuracy for determining load, further, Load balancing effect can be improved.
It should be noted that herein, such as first and second or the like relational terms are used merely to a reality Body or operation make a distinction with another entity or operation, and not necessarily require or imply and deposited between these entities or operation In any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant are intended to Nonexcludability includes, so that process, method, article or equipment including a series of elements not only will including those Element, but also the other element including being not expressly set out, or it is this process, method, article or equipment also to include Intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that Other identical element also be present in process, method, article or equipment including the key element.
Each embodiment in this specification is described by the way of related, identical similar portion between each embodiment Divide mutually referring to what each embodiment stressed is the difference with other embodiment.It is real especially for device For applying example, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method Part explanation.
Can one of ordinary skill in the art will appreciate that realizing that all or part of step in above method embodiment is To instruct the hardware of correlation to complete by program, described program can be stored in computer read/write memory medium, The storage medium designated herein obtained, such as:ROM/RAM, magnetic disc, CD etc..
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent substitution and improvements made within the spirit and principles in the present invention etc., are all contained in protection scope of the present invention It is interior.

Claims (14)

1. one kind load determination method, it is characterised in that including:
Obtain the multinomial performance property value of equipment;
The corresponding attribute thresholds of each attribute of performance value are compared respectively;
According to the comparative result of each attribute of performance value and the weight of each attribute of performance value set in advance, calculate and be used for Represent the combination property value of apparatus of load.
2. according to the method for claim 1, it is characterised in that the attribute of performance value includes following any two or three :CPU usage, memory usage, disk occupancy;
The step of multinomial performance property value of the acquisition equipment, including:
The multinomial performance property value that receiving device is sent by presetting management agreement;
Or the attribute of performance value that receiving device is sent by the plug-in unit in the equipment.
3. according to the method for claim 1, it is characterised in that the multinomial performance property value is n item attribute of performance values;Institute The step of being respectively compared each attribute of performance value corresponding attribute thresholds is stated, including:
By i-th attribute of performance value PiCorresponding attribute thresholds PmiIt is compared, obtains i-th of comparative result Pi/Pmi, i =1 ... n;
It is described according to the comparative result of each attribute of performance value and the weight of each attribute of performance value set in advance, calculate The step of combination property value for representing apparatus of load, including:
Utilize following formula, the combination property value of calculating every equipment:
<mrow> <msub> <mi>W</mi> <mi>f</mi> </msub> <mo>=</mo> <msup> <mi>M</mi> <mrow> <mi>a</mi> <mrow> <mo>(</mo> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>i</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>n</mi> </munderover> <mfrac> <mrow> <mi>W</mi> <mi>i</mi> </mrow> <mrow> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>i</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>n</mi> </munderover> <mi>W</mi> <mi>i</mi> </mrow> </mfrac> <mo>(</mo> <mrow> <mn>1</mn> <mo>-</mo> <mfrac> <mrow> <mi>P</mi> <mi>i</mi> </mrow> <mrow> <mi>P</mi> <mi>m</mi> <mi>i</mi> </mrow> </mfrac> </mrow> <mo>)</mo> <mo>)</mo> </mrow> </mrow> </msup> <mo>;</mo> </mrow>
Wherein, WfFor the combination property value of equipment, M is the first preset value, and a is the second preset value, WiFor i-th set in advance Attribute of performance value PiWeight, Pi/PmiFor i-th of comparative result.
4. according to the method for claim 3, it is characterised in that the M=10, the a=2.
5. according to the method for claim 1, it is characterised in that in the combination property calculated for representing apparatus of load After the step of value, in addition to:
With reference to default load balancing and the combination property value for the individual device being calculated, the processing of selection target equipment The connection request received.
6. according to the method for claim 3, it is characterised in that described respectively by the corresponding category of each attribute of performance value The step of property threshold value is compared, in addition to:
Judge to whether there is the attribute of performance value for being more than corresponding attribute thresholds in the multinomial performance property value;
If it is, it is busy state by the device flag;
After the step of combination property value calculated for representing apparatus of load described, in addition to:
With reference to default load balancing and the combination property value for the individual device being calculated, be not labeled as it is busy In the equipment of state, selection target equipment handles the connection request received.
A kind of 7. load determining device, it is characterised in that including:
Acquisition module, for obtaining the multinomial performance property value of equipment;
Comparison module, each attribute of performance value for the acquisition module to be obtained are distinguished corresponding attribute thresholds and carried out Compare;
Computing module, for the comparative result according to each attribute of performance value and each attribute of performance value set in advance Weight, calculate the combination property value for representing apparatus of load.
8. device according to claim 7, it is characterised in that the attribute of performance value includes following any two or three :CPU usage, memory usage, disk occupancy;
The acquisition module, is specifically used for:
The multinomial performance property value that receiving device is sent by presetting management agreement;
Or the attribute of performance value that receiving device is sent by the plug-in unit in the equipment.
9. device according to claim 7, it is characterised in that the multinomial performance property value is n item attribute of performance values;Institute Comparison module is stated, is specifically used for:
By i-th attribute of performance value PiCorresponding attribute thresholds PmiIt is compared, obtains i-th of comparative result Pi/Pmi, i =1 ... n;
The computing module, is specifically used for:
Utilize following formula, the combination property value of calculating every equipment:
<mrow> <msub> <mi>W</mi> <mi>f</mi> </msub> <mo>=</mo> <msup> <mi>M</mi> <mrow> <mi>a</mi> <mrow> <mo>(</mo> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>i</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>n</mi> </munderover> <mfrac> <mrow> <mi>W</mi> <mi>i</mi> </mrow> <mrow> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>i</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>n</mi> </munderover> <mi>W</mi> <mi>i</mi> </mrow> </mfrac> <mo>(</mo> <mrow> <mn>1</mn> <mo>-</mo> <mfrac> <mrow> <mi>P</mi> <mi>i</mi> </mrow> <mrow> <mi>P</mi> <mi>m</mi> <mi>i</mi> </mrow> </mfrac> </mrow> <mo>)</mo> <mo>)</mo> </mrow> </mrow> </msup> <mo>;</mo> </mrow>
Wherein, WfFor the combination property value of equipment, M is the first preset value, and a is the second preset value, WiFor i-th set in advance Attribute of performance value PiWeight, Pi/PmiFor i-th of comparative result.
10. device according to claim 9, it is characterised in that the M=10, the a=2.
11. device according to claim 7, it is characterised in that described device also includes:
First load balancing module, for each be calculated with reference to default load balancing and the computing module The combination property value of equipment, the connection request that the processing of selection target equipment receives.
12. device according to claim 9, it is characterised in that described device also includes:
Judge module, for judging to whether there is the attribute of performance for being more than corresponding attribute thresholds in the multinomial performance property value Value;If it is, triggered mark module;
Mark module, for being busy state by the device flag;
Second load balancing module, for combining the comprehensive of default load balancing and the individual device being calculated It can be worth, in the equipment of busy state is not labeled as, selection target equipment handles the connection request received.
13. a kind of electronic equipment, it is characterised in that including processor, communication interface, memory and communication bus, wherein, processing Device, communication interface, memory complete mutual communication by communication bus;
Memory, for storing machine readable instructions;
Processor, for reading the machine readable instructions stored on the memory, require that 1-6 is any described with perform claim Method and step.
A kind of 14. machinable medium, it is characterised in that be stored with machine-executable instruction, by processor call and During execution, the machine-executable instruction promotes the processor:Realize any described method and steps of claim 1-6.
CN201710629813.0A 2017-07-28 2017-07-28 One kind load determines method, apparatus and electronic equipment Pending CN107547429A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710629813.0A CN107547429A (en) 2017-07-28 2017-07-28 One kind load determines method, apparatus and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710629813.0A CN107547429A (en) 2017-07-28 2017-07-28 One kind load determines method, apparatus and electronic equipment

Publications (1)

Publication Number Publication Date
CN107547429A true CN107547429A (en) 2018-01-05

Family

ID=60971086

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710629813.0A Pending CN107547429A (en) 2017-07-28 2017-07-28 One kind load determines method, apparatus and electronic equipment

Country Status (1)

Country Link
CN (1) CN107547429A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108259603A (en) * 2018-01-17 2018-07-06 新华三技术有限公司 A kind of load-balancing method and device
CN109120715A (en) * 2018-09-21 2019-01-01 华南理工大学 Dynamic load balancing method under a kind of cloud environment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102143507A (en) * 2010-11-23 2011-08-03 北京中创信测科技股份有限公司 Method and system for monitoring service quality, and analytical method and system therefor
CN103036979A (en) * 2012-12-12 2013-04-10 广州尚融网络科技有限公司 Server loading balancing method and loading balancer
CN103246546A (en) * 2013-05-07 2013-08-14 山东大学 Open power system numerical simulation system and method based on cloud technology
CN104683186A (en) * 2015-03-11 2015-06-03 杭州华三通信技术有限公司 Network resource scheduling method and device
US20150365335A1 (en) * 2012-12-31 2015-12-17 Emulex Corporation Adaptive Receive Path Learning To Facilitate Combining TCP Offloading And Network Device Teaming
CN105577756A (en) * 2015-12-12 2016-05-11 天津南大通用数据技术股份有限公司 Distributed database log collection and load regulation system adopting cross backup and method thereof
CN105871983A (en) * 2015-12-10 2016-08-17 乐视云计算有限公司 Method and device for selecting servers
CN106209665A (en) * 2015-04-30 2016-12-07 中兴通讯股份有限公司 A kind of realize the method for load sharing, interface message processor (IMP), service processor and system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102143507A (en) * 2010-11-23 2011-08-03 北京中创信测科技股份有限公司 Method and system for monitoring service quality, and analytical method and system therefor
CN103036979A (en) * 2012-12-12 2013-04-10 广州尚融网络科技有限公司 Server loading balancing method and loading balancer
US20150365335A1 (en) * 2012-12-31 2015-12-17 Emulex Corporation Adaptive Receive Path Learning To Facilitate Combining TCP Offloading And Network Device Teaming
CN103246546A (en) * 2013-05-07 2013-08-14 山东大学 Open power system numerical simulation system and method based on cloud technology
CN104683186A (en) * 2015-03-11 2015-06-03 杭州华三通信技术有限公司 Network resource scheduling method and device
CN106209665A (en) * 2015-04-30 2016-12-07 中兴通讯股份有限公司 A kind of realize the method for load sharing, interface message processor (IMP), service processor and system
CN105871983A (en) * 2015-12-10 2016-08-17 乐视云计算有限公司 Method and device for selecting servers
CN105577756A (en) * 2015-12-12 2016-05-11 天津南大通用数据技术股份有限公司 Distributed database log collection and load regulation system adopting cross backup and method thereof

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108259603A (en) * 2018-01-17 2018-07-06 新华三技术有限公司 A kind of load-balancing method and device
CN109120715A (en) * 2018-09-21 2019-01-01 华南理工大学 Dynamic load balancing method under a kind of cloud environment

Similar Documents

Publication Publication Date Title
CN110837410B (en) Task scheduling method and device, electronic equipment and computer readable storage medium
CN107333292B (en) A kind of SIM card state judging method and device
CN103927230B (en) A kind of feedback method and device of internal memory behaviour in service
WO2020119426A1 (en) Gray scale testing method, server and computer readable storage medium
CN104182282B (en) A kind of server overload protects system and method
CN110389822A (en) The node scheduling method, apparatus and server of execution task
CN106648557A (en) Application programming interface API sharing method and device
CN108959399A (en) Distributed data deletes flow control method, device, electronic equipment and storage medium
CN108762686A (en) Consistency verification of data flow control method, device, electronic equipment and storage medium
CN107547429A (en) One kind load determines method, apparatus and electronic equipment
CN104243531A (en) Data processing method, device and system
CN106982441A (en) A kind of determination method and device of cell capacity-enlarging
CN109145651A (en) A kind of data processing method and device
CN110061924A (en) A kind of message forwarding method, device and Related product
CN107704317A (en) Smart machine and its application management method and the device with store function
CN109948803A (en) Algorithm model optimization method, device and equipment
CN113890842A (en) Information transmission delay upper bound calculation method, system, equipment and storage medium
US9674064B1 (en) Techniques for server transaction processing
CN114461384A (en) Task execution method and device, computer equipment and storage medium
CN111124439B (en) Intelligent dynamic unloading algorithm with cloud edge cooperation
CN104281587B (en) A kind of method and device for establishing connection
CN112333246A (en) ABtest experiment method and device, intelligent terminal and storage medium
CN112596985A (en) IT asset detection method, device, equipment and medium
CN107659982B (en) Wireless network access point classification method and device
CN114979282B (en) Task scheduling method, device, storage medium and electronic equipment

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180105