CN101594371A - The load balance optimization method of food safety trace back database - Google Patents

The load balance optimization method of food safety trace back database Download PDF

Info

Publication number
CN101594371A
CN101594371A CNA200810016386XA CN200810016386A CN101594371A CN 101594371 A CN101594371 A CN 101594371A CN A200810016386X A CNA200810016386X A CN A200810016386XA CN 200810016386 A CN200810016386 A CN 200810016386A CN 101594371 A CN101594371 A CN 101594371A
Authority
CN
China
Prior art keywords
load
server
service request
fitness
trace back
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
CNA200810016386XA
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.)
SHANDONG INSTITUTE OF STANDARDIZATION
Original Assignee
SHANDONG INSTITUTE OF STANDARDIZATION
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 SHANDONG INSTITUTE OF STANDARDIZATION filed Critical SHANDONG INSTITUTE OF STANDARDIZATION
Priority to CNA200810016386XA priority Critical patent/CN101594371A/en
Publication of CN101594371A publication Critical patent/CN101594371A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

A kind of food safety trace back database load balance optimization method is mainly used in the problem of load balancing that solves the multi-user concurrent visit.The technical scheme main points are as follows: 1. parameters such as time interval that load information gathers, load information weights are set; 2. by the user group service request is classified, and regulation priority; 3. the relational expression of server integrated load and average load difference is adopted in the calculating of variable fitness
Figure 200810016386.X_AB_0
Figure 200810016386.X_AB_1
, wherein
Figure 200810016386.X_AB_2
Integrated load for individual server; The probability parameter that variation is selected adopts formula τ ≈ 1+4/lnI (I is the server number), the load of separating each server in the expression service request allocative decision in the algorithm, and target function is
Figure 200810016386.X_AB_3
The present invention has considered the present load state of server, and equity service request to be allocated has been carried out resource use estimation, in loop iteration, utilize the extreme value optimization mechanism constantly to adjust request task on the bigger server of load difference, efficiently solve the problem of load balancing of server, improved the utilance of database resource.

Description

The load balance optimization method of food safety trace back database
Technical field
The present invention relates to information technology and database technical field, particularly, the load-balancing method that relates to database server, the load dispatch of the multiserver when this algorithm is used for the concurrent visit food safety trace back of a large number of users system, solved the problem of load balancing of multiserver effectively, provided convenience for the expansion of database simultaneously.
Background technology
Along with development economic and society, people's living standard improves constantly, and is also more and more higher to the quality and the safety requirements of food.Because the awakening of the frequent generation of food security crisis and consumer's consciousness; food-safety problem has caused the extensive concern of country and society as a public safety problem, and food is reviewed the attention that obtains country day by day in order to the management tool that guarantees food security as a kind of.Reviewing is source, purposes and the position of recalling certain entity by the method for record identification, and food safety trace back is by to the connection and the record of each link information of food, history that can true reappearance food whole life.
Because the food supply chain is longer, the data volume that the food safety trace back system platform relates to is huge, and platform database comprises various samplings and combined data information such as various spatial datas, report form statistics data, literal, sound, image.The visiting demand traceability system of numerous users' such as consumers in general, government regulation mechanism, inspection and quarantine and third party testing agency inquiry, statistics, analysis and extraction data can be handled a large amount of concurrent requests timely and effectively, how apace the balance dispatching of fulfillment database server load becomes one of key technology that the traceability system successful implementation need solve.
The load capacity of separate unit server is limited, in the face of user capture quantity and the flowing of access that increases day by day, can't meet the demands by the performance that improves server hardware merely, in network, use multiple servers that service is provided jointly at present usually, by certain mechanism system load is assigned on the different servers and handles, for a large number of users provides concurrent access services, load balancing that Here it is.Load balancing is to realize the means of multiple servers collaborative work and parallel processing, can make full use of Internet resources.
Realize load balancing, key is reasonably to dispatch by different load balancing schemes, a large amount of requests of user is assigned on the different servers handles.Extensive problem of load balancing is a NP difficult problem, is difficult to find in polynomial time optimal scheduling, and along with the rapid increase of load requests, scheduling performance can descend rapidly usually.At present the server load balancing algorithms most in use has: round-robin scheduling, the scheduling of (weighting) weighted round robin, (weighting) minimum linking number scheduling, fastest response scheduling, the scheduling of destination address hash, Source Hashing Scheduling, based on the scheduling of probability statistics, estimate service time and dispatch or the like.These algorithms can be realized the load balance scheduling of server effectively, but pay attention to the speed that scheduling rates is promptly selected server, pay attention to the balanced intensity of scheduling and but ignored speed, also have algorithm to consider the load condition of server, but lack effective balancing method of loads.The introducing of intelligent optimization algorithm such as genetic algorithm is for load balance scheduling provides a feasible effective way.
When larger, the search volume of optimization problem become complexity, most intelligent algorithms usually can find near-optimum solution soon, but because the search mechanisms that algorithm keeps according to qualifications, and operations such as later stage variation, intersection are to the destruction of optimal solution constituent, algorithm vibrates near near-optimum solution, but can't arrive optimal solution in for a long time, or be limited to local extremum and can't carry out the search of wider scope.And, do not have effective selection mechanism because algorithm parameter is often set by rule of thumb, make algorithm be subjected to considerable restraint in the performance of finding the solution the actual optimization problem.Therefore, need improve or seek new search mechanisms, improve optimization efficiency, effectively settlement server load balance scheduling problem intelligent algorithm.
Summary of the invention
The objective of the invention is problem of load balancing at a large amount of concurrent visits of database server, and the deficiency of existing intelligent optimization algorithm search mechanisms and efficient, a kind of load balance optimization method of optimizing based on extreme value is proposed.Consider the present load state of server in the algorithm, by in network, arranging the SNMP acquisition server, employing is based on the MRTG monitoring tools of SNMP, gather the load data of multiple servers at interval with reasonable time, dispatch according to the server load state, realize the load balancing of multiple servers.Algorithm parameter has best value foundation, has bigger superiority than other intelligent optimization algorithms such as genetic algorithm.
The extreme value optimized Algorithm is a kind of novel bionical searching algorithm, and some np hard problem for general algorithm is difficult to find the solution also has preferable performance.At occurring in nature, when the most invalid element is optionally ordered about in extinction, the structure of high complexity just appears through regular meeting.Extremal process promptly is meant constantly removes the poorest element of adaptability in the evolution process of system, be critical (Self-Organized Criticality, SOC) the common process principle that relies on of model of self-organizing.Be subjected to the inspiration of occurring in nature process of self-organization, Boettcher etc. designed the extreme value optimized Algorithm (Extremal Optimization, EO).Be different from the excellent modes of operation of separating of breeding such as genetic algorithm, the extreme value optimized Algorithm is constantly with the power function probability P k∝ k (wherein k is a variable by the ordering of fitness number, and τ is a designated parameter, and its general estimation formulas τ is arranged to select the relatively poor variable of adaptability to make a variation Opt≈ 1+4/lnn (n → ∞), n is the variable number) progressively removes the relatively poor composition that formation is separated, thereby soon near near-optimum solution, and have the very strong ability of jumping out locally optimal solution.
Here the mechanism that extreme value is optimized is introduced in the load-balancing algorithm, user's characteristics in conjunction with the food trace back database, at monitor server present load state and predict on the basis of service request resource requirement, target function, variable and the fitness of separating at problem definition thereof, the variation rule of variable have improved the optimization efficiency of load balancing and the utilance of database resource.
The inventive method is specific as follows:
Step 1: the time interval that different time sections server load information gathering is set; The load information of each server is set: the weight of cpu load, memory usage and network traffics respectively;
Step 2: consider the time requirement of different user request responding, access request is classified, the priority parameters of different requests is set;
Step 3: the fitness that the defined variable fitness is conciliate is provided with the probability parameter of selecting the variable that makes a variation;
Step 4: algorithm initialization, the variation rule of defined variable, the record initial solution is for preferably separating;
Step 5: iteration: the variation rule of four definition is upgraded set by step, calculates and separates corresponding target function; Separating with preferably separating of keeping after the variation compared, keep better solutions for preferably separating.
Step 6: judge whether iteration finishes.If the target function of preferably separating that keeps after continuous 10 iteration does not have obvious improvement, the optimization result output of represented scheme as load allocating will be separated preferably.Otherwise returning execution in step five continues to carry out.
Flow process as shown in drawings.
The inventive method is on the basis of considering current each server load, the estimation and the extreme value optimization mechanism of resources such as required cpu load, internal memory, network traffics finished in utilization to service request, finish the distribution of service request task on each server, thereby make full use of server resource, the load of each server of balance improves the access efficiency of user's request.
Description of drawings
Accompanying drawing is a schematic flow sheet of the present invention.
Embodiment
According to the characteristics of food traceability system, for the acquisition time of load information at interval and the load threshold of load information weight, server formulate corresponding following rule:
1, the time interval of load information collection, the user according to different time sections every day estimated to produce, and each time period is adopted the different time intervals.As on weekdays, enterprise, government, detection architecture user are in the majority, and the service request data processing amount is big, and the acquisition time of load information can be provided with slightly larger at interval; And reach weekend at night, and it is in the majority that the consumer who buys food inquires about, the having relatively high expectations of the time response of inquiry, and data processing amount is little, the time interval that the load information of database server is gathered is provided with slightly little.
2, according to the classification difference of customer group, different priority is set in inhomogeneous request.The consumer to food product to review inquiry priority the highest, secondly be enterprise customer, inspection and quarantine structure and third party testing agency, be government regulator then.
3, to collapse for avoiding the database server excess load, the predetermined server load threshold is as the constraints of load allocating.Than Web server and ftp server height, so cpu load is than the weights height of network traffics and memory usage to the requirement of internal memory for database server in the practical application; The integrated load threshold value of server can be set to 80% according to relative theory.
Below concrete enforcement of the present invention is further described:
Step 1:, be set the time interval of server load information gathering according to the customer group type of food traceability system in the different time sections; Obtain the load information of server by configuration based on the MRTG monitoring software of SNMP: cpu load, memory usage and network traffics are provided with the weight of each load information;
Step 2: access request is classified,, the priority parameters of different requests is set according to the classification difference of customer group.It is one-level that the consumer inquires about priority to reviewing of food product, and enterprise customer, inspection and quarantine structure and third party testing agency are secondary, and government regulator is three grades.
Step 3: defined variable and fitness thereof, provide the fitness of separating (target function), be provided with and select probability parameter τ;
(1) supposing to have the I station server can use, and J service request need be assigned on this I station server and handle, if j service request is assigned on the i station server, the load that server is formed is cpu load l j c, EMS memory occupation l j r, network traffics l j n, its weight coefficient is respectively α j c, β j r, γ j n, defining I variable and be respectively the expression formula relevant with the integrated load of every station server, its fitness is:
λ i = L i - 1 I Σ i I L i 1 I Σ i = 1 I L i = I · L i Σ i = 1 I L i - 1 , λ i∈[-1,1] (1)
L wherein iBe the integrated load of i station server:
L i = Σ j = 1 J ( α j c l j c + β j r l j r + γ j n l j n ) , i∈{1,2,…,I},j∈{1,2,…,J} (2)
The load of server and average load difference are big more, illustrate that load is unbalanced more, and the absolute value of the fitness of the variable of this server representative is just big more.
(2) separating of algorithm is the allocative decision of service request on each server, and therefore the target function of separating is taken all factors into consideration the request distribution on each server, equally loaded as far as possible.The target function of separating is defined as integrated load on the Servers-all and average load difference and with the ratio of server number:
f = Σ i = 1 I | λ i - λ Ave | I = Σ i = 1 I | λ i - Σ i = 1 I λ i / I | I , - - - ( 3 )
(3) according to power rate choice function τ Opt≈ 1+4/lnI (I → ∞), calculate and select probability P k∝ k The best value of parameter τ.
Step 4: algorithm initialization of population, the variation rule of defined variable;
(1) initialization:, adopt heuristic to produce initial solution in order to improve optimization Algorithm speed.Calculate the load of current each server, sort by load is ascending, priority (the service request picked at random that priority is identical is distributed) according to service request, every station server distributes a request, circulation successively, request is assigned on each server, forms initiating task and distribute, calculate the integrated load of each server according to formula (2).
(2) variation rule: each server is divided into two groups according to the positive and negative of fitness: just organizing and bear group, fitness is that writing down less group of interior number of elements of server number was MIM in 0 server was assigned randomly to wherein one group.According to the ascending ordering of fitness, the variable with identical λ value is randomly ordered with the server in the negative group, forms grade k = 1 ( λ i k = min { λ i } ) , K=2 ...,
Figure A20081001638600065
Arrangement, the server in just organizing forms grade according to the descending ordering of fitness k = 1 ( λ i k = max { λ i } ) , K=2 ...,
Figure A20081001638600067
Arrangement; Press distribution probability function P (k) the ∝ k of grade k respectively From positive and negative two group selection two-servers, the required server comprehensive resources of finishing wherein that takies of each service request (CPU, internal memory, network traffics) is estimated, and, from the task of two-server, select two tasks to exchange respectively by the power function probability by taking resource the first five service request that sorts from more to less.So circulation is MIM time.
(when the request number in the server surpasses five, only be ordered into the 5th, this is because the power function probability P k∝ k To be distributed in the later value of k=5 very little, the selected probability of variable is very little, so can improve algorithm speed, reduces amount of calculation.)
Step 5: iteration.The variation rules of four definition are upgraded separating set by step, calculate and to separate corresponding target function, and it is compared with preferably separating, and keep preferably one for preferably separating.
Step 6: judge whether iteration finishes.If the target function of preferably separating after continuous 10 iteration does not have obvious improvement, will preferably separate represented load allocating scheme as optimizing result's output.Otherwise returning execution in step five continues to carry out.
The inventive method has feasibility and high efficiency, can solve the problem of load balancing of multiserver, thereby utilizes database resource better, finishes the load allocating of multi-user concurrent request.Particularly the extreme value optimized Algorithm has been used for reference the thought of nature removal inferior position element, effectively avoided sinking into the danger of local extremum, task on variation rule the server that load difference is big is adjusted, improved the efficient of service request task balance, for the multiserver load balancing provides new method.

Claims (4)

1. the load balance optimization method of a food safety trace back database, it is characterized in that it realizes as follows: (1) is provided with the time interval that different time sections database server load information is gathered, and the weight of the load information (cpu load, memory usage and network traffics) of each database server is set; (2) consider the time requirement of different user request responding, access request is classified, the priority parameters of different requests is set; (3) fitness of defined variable fitness reconciliation is provided with the probability parameter of selecting the variation variable; (4) algorithm initialization, the variation rule of defined variable, the record initial solution is for preferably separating; (5) iteration: the variation rule by definition is upgraded, and calculates and to separate corresponding target function, and it is compared with preferably separating, and keeps preferably one for preferably separating; (6) judge whether iteration finishes.If the target function of preferably separating that keeps after continuous 10 iteration does not have obvious improvement, will preferably separate represented load allocating scheme as optimizing result's output.Otherwise returning execution in step five continues to carry out.
2. the load balance optimization method of food safety trace back database according to claim 1, it is characterized in that having considered in step (1), (2) and the step (3) the load condition that each server is current and the response time requirement of inhomogeneity service request, is the relational expression of difference between server load and the average load according to the characterizing definition variable fitness of problem λ i = L i - 1 I Σ i I L i 1 I Σ i = 1 I L i = I · L i Σ i = 1 I L i - 1 , Wherein L i = Σ j = 1 J ( α j c l j c + β j r l j r + γ j n l j n ) Be the integrated load of individual server, the absolute value of fitness is big more, and the load of server departs from average load more, and load is unbalanced more.This definition more tallies with the actual situation, and can improve the utilance of server resource; The Variables Selection probability that morphs is τ Opt≈ 1+4/lnI (I is a server platform number) has avoided parameter adjustment to expend a large amount of computing times.
3. the load balance optimization method of food safety trace back database according to claim 1, it is characterized in that in the step (4) characteristics according to food traceability system user, employing is based on the heuristic of server present load state, consideration service request User Priority, the initial solution of generating algorithm improves optimization Algorithm efficient.
4. the load balance optimization method of food safety trace back database according to claim 1, the present load state that it is characterized in that the variation rule consideration server of step (4), and equity service request to be allocated carries out resource and use to estimate, utilizes the extreme value optimization mechanism to ask the distribution adjustment of task.Particularly, each server is divided into two groups according to the positive and negative of fitness, presses distribution probability function P (k) the ∝ k of fitness grade k respectively From positive and negative two group selection two-servers, the required server comprehensive resources of finishing wherein that takies of each service request (CPU, internal memory, network traffics) is estimated, and from more to less service request is sorted by taking resource, from the task of two-server, select two tasks to exchange respectively by the power function probability, and cycling MIM time, task on the server that load difference is big is carried out complementation adjustment, thereby realizes the load balancingization of each server fast.
CNA200810016386XA 2008-05-28 2008-05-28 The load balance optimization method of food safety trace back database Pending CN101594371A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA200810016386XA CN101594371A (en) 2008-05-28 2008-05-28 The load balance optimization method of food safety trace back database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA200810016386XA CN101594371A (en) 2008-05-28 2008-05-28 The load balance optimization method of food safety trace back database

Publications (1)

Publication Number Publication Date
CN101594371A true CN101594371A (en) 2009-12-02

Family

ID=41408810

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA200810016386XA Pending CN101594371A (en) 2008-05-28 2008-05-28 The load balance optimization method of food safety trace back database

Country Status (1)

Country Link
CN (1) CN101594371A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103347062A (en) * 2013-06-24 2013-10-09 北京汉柏科技有限公司 Virtual computing resource distribution method
CN103944927A (en) * 2013-01-17 2014-07-23 深圳市腾讯计算机系统有限公司 Server stretching processing method and device
CN105516369A (en) * 2016-02-04 2016-04-20 城云科技(杭州)有限公司 Video cloud platform load balancing method and video cloud platform load balancing dispatcher
CN105530311A (en) * 2015-12-25 2016-04-27 北京奇虎科技有限公司 Load distribution method and device
CN105744006A (en) * 2016-05-10 2016-07-06 中国民航大学 Particle swarm optimization user request dispatching method facing multi-type service
WO2016134646A1 (en) * 2015-02-25 2016-09-01 Huawei Technologies Co., Ltd. Query optimization adaptive to system memory load for parallel database systems
CN106326252A (en) * 2015-06-24 2017-01-11 中兴通讯股份有限公司 Data processing method and apparatus for database
CN106790409A (en) * 2016-11-30 2017-05-31 哈尔滨学院 Load-balancing method and its system based on the treatment of electric business platform user historical data
CN113676347A (en) * 2021-07-23 2021-11-19 青岛海尔科技有限公司 Server load prediction method and device, storage medium and electronic device

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103944927A (en) * 2013-01-17 2014-07-23 深圳市腾讯计算机系统有限公司 Server stretching processing method and device
CN103944927B (en) * 2013-01-17 2018-07-17 深圳市腾讯计算机系统有限公司 Server stretch-processing method and device
CN103347062A (en) * 2013-06-24 2013-10-09 北京汉柏科技有限公司 Virtual computing resource distribution method
WO2016134646A1 (en) * 2015-02-25 2016-09-01 Huawei Technologies Co., Ltd. Query optimization adaptive to system memory load for parallel database systems
CN107111653A (en) * 2015-02-25 2017-08-29 华为技术有限公司 The query optimization that Installed System Memory suitable for parallel database system is loaded
CN106326252A (en) * 2015-06-24 2017-01-11 中兴通讯股份有限公司 Data processing method and apparatus for database
CN106326252B (en) * 2015-06-24 2020-05-22 中兴通讯股份有限公司 Data processing method and device for database
CN105530311A (en) * 2015-12-25 2016-04-27 北京奇虎科技有限公司 Load distribution method and device
CN105530311B (en) * 2015-12-25 2019-05-31 北京奇虎科技有限公司 Load allocation method and equipment
CN105516369A (en) * 2016-02-04 2016-04-20 城云科技(杭州)有限公司 Video cloud platform load balancing method and video cloud platform load balancing dispatcher
CN105744006A (en) * 2016-05-10 2016-07-06 中国民航大学 Particle swarm optimization user request dispatching method facing multi-type service
CN106790409A (en) * 2016-11-30 2017-05-31 哈尔滨学院 Load-balancing method and its system based on the treatment of electric business platform user historical data
CN113676347A (en) * 2021-07-23 2021-11-19 青岛海尔科技有限公司 Server load prediction method and device, storage medium and electronic device
CN113676347B (en) * 2021-07-23 2024-03-26 青岛海尔科技有限公司 Load prediction method and device of server, storage medium and electronic device

Similar Documents

Publication Publication Date Title
CN101594371A (en) The load balance optimization method of food safety trace back database
CN1956457B (en) Method and apparatus for arranging mesh work in mesh computing system
CN104283946B (en) The resource-adaptive adjustment system and method for multi-dummy machine under a kind of single physical machine
William et al. Analysis of data aggregation and clustering protocol in wireless sensor networks using machine learning
CN106161525B (en) A kind of more cluster management methods and equipment
CN106844051A (en) The loading commissions migration algorithm of optimised power consumption in a kind of edge calculations environment
Tang et al. Congestion-balanced and welfare-maximized charging strategies for electric vehicles
Zhou et al. Energy-efficient scheduling of a single batch processing machine with dynamic job arrival times
CN105005570A (en) Method and apparatus for mining massive intelligent power consumption data based on cloud computing
CN103957261A (en) Cloud computing resource distributing method based on energy consumption optimization
CN111752678A (en) Low-power-consumption container placement method for distributed collaborative learning in edge computing
CN115220900B (en) Energy-saving scheduling method and system based on operation power consumption prediction
CN106528804A (en) User grouping method based on fuzzy clustering
CN112633762A (en) Building energy efficiency obtaining method and equipment
Alboaneen et al. Metaheuristic approaches to virtual machine placement in cloud computing: a review
CN111105129A (en) Detection task intelligent allocation method based on detection mechanism evaluation
Von Lucken et al. Pump scheduling optimization using asynchronous parallel evolutionary algorithms
Kumar et al. A Hybrid Eagle’s Web Swarm Optimization (EWSO) technique for effective cloud resource management
Rawas et al. Power and Cost-aware Virtual Machine Placement in Geo-distributed Data Centers.
CN108133394A (en) Consider the controllable burden demand response menu pricing method of consumer's risk preference
CN111915113B (en) Method for evaluating load characteristic index system of user participating in power grid interaction capability
CN107155215B (en) Distribution method and device of application home service cluster
CN108256131A (en) Distributed energy multidimensional Optimization Seeking Design method and apparatus
Zhao et al. On minimizing energy cost in internet-scale systems with dynamic data
CN109889573A (en) Based on the Replica placement method of NGSA multiple target in mixed cloud

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20091202