Distributed server resource allocation method and system, electronic device and storage medium

By employing fast non-dominated sorting and dynamic congestion distance in distributed server resource allocation, a more uniform and superior solution is generated, solving the problem of unreasonable resource allocation in existing algorithms and improving the optimization effect of throughput and cost.

CN120762924BActive Publication Date: 2025-11-28CENT SOUTH UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511278370.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-09
Publication Date
2025-11-28
Estimated Expiration
2045-09-09

AI Technical Summary

Technical Problem

Existing multi-objective optimization algorithms such as NSGA2 perform poorly in distributed server resource allocation, resulting in unreasonable resource allocation and an inability to simultaneously optimize throughput and construction and maintenance costs.

Method used

By constructing a multi-objective optimization problem in the process of distributed server resource allocation, fast non-dominated sorting and dynamic crowding distance are adopted to generate a mutation pool containing multiple mutated parents. The new population and the current population are combined and iterated to generate a uniform and better solution.

Benefits of technology

It improves the rationality of distributed server resource allocation, takes into account throughput and construction and maintenance costs, generates a set of uniform and excellent solutions, and enhances the propagation of superior genes in the population and the uniformity of solution distribution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120762924B_ABST
    Figure CN120762924B_ABST
Patent Text Reader

Abstract

The application discloses a distributed server resource allocation method and system, electronic equipment and storage medium. The method determines a variation pool containing a plurality of variation parents; generates a new population containing a plurality of new individuals according to the plurality of variation parents in the variation pool and the sorting values in the first sorting result corresponding to each variation parent; combines the new population and the current population as a total population, performs fast non-dominated sorting on each individual in the total population to obtain a second sorting result; selects a plurality of individuals from the total population according to the sorting values in the second sorting result, calculates the second dynamic crowding distance of each individual corresponding to the maximum sorting value meeting the first preset condition in the plurality of individuals; selects a plurality of elite individuals from the plurality of individuals according to the second dynamic crowding distance to construct an elite population, and iterates the elite population as the current population until a preset iteration number is reached to obtain a target elite population. The application can improve the rationality of distributed server resource allocation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of resource allocation, in particular to a distributed server resource allocation method and system, electronic equipment and storage medium. BACKGROUND

[0002] With the development of Web technology, the distributed computing resources and servers have become the current mainstream trend. Generally, large Web projects will have server rooms in multiple regions, and limited server resources should be reasonably allocated in each region to achieve high throughput and low construction and maintenance costs. The developed regions have more requests than ordinary regions, and network requests are concentrated in a certain area, and network delay time is shorter. At the same time, the network facilities in the developed regions are more perfect, so the throughput of the server nodes in the developed regions is high. However, due to geographical location and economic development, the developed regions have higher infrastructure costs, electricity prices and rents than ordinary regions. Building a server cluster in the developed regions can achieve high throughput, but at the same time, it will also have a higher construction and maintenance cost. Building a server cluster in ordinary regions can achieve low construction and maintenance costs, but at the same time, it will also have a lower throughput. In summary, it can be seen that pursuing high throughput will inevitably lead to an increase in server construction and maintenance costs, and pursuing low construction and maintenance costs will inevitably lead to a decrease in server throughput. Therefore, the two optimization objectives are mutually restrictive and balanced, and a unique global optimal solution cannot be obtained.

[0003] Such a problem with multiple optimization objectives and mutual conflict between optimization objectives is called a multi-objective optimization problem. There is no globally unique best solution to the multi-objective optimization problem, and only a set of better solutions can be generated for decision makers to choose. Currently widely used multi-objective optimization algorithms include NSGA2, SPEA2, MOEA / D, PSO algorithm, etc. Among them, NSGA2 has been more widely used in industrial production. However, NSGA2 algorithm has strong limitations. For example, the fixed mutation coefficient leads to poor population diversity, and the crowding distance cannot well reflect the uniform distribution of solutions. These shortcomings lead to poor performance of the algorithm in server resource allocation optimization problems, resulting in unreasonable distributed server resource allocation. SUMMARY

[0004] The present application aims to provide a distributed server resource allocation method and system, electronic equipment and storage medium, which can generate a set of uniformly distributed and better solutions for the multi-objective optimization problem in the distributed server resource allocation process, to improve the rationality of the distributed server resource allocation.

[0005] In a first aspect, an embodiment of the present application provides a distributed server resource allocation method, which comprises:

[0006] Constructing constraint conditions corresponding to a multi-objective optimization problem in a distributed server resource allocation process;

[0007] Constructing a current population containing a plurality of individuals satisfying the constraint conditions, wherein each individual is a solution corresponding to the multi-objective optimization problem;

[0008] Performing fast non-dominated sorting on each individual in the current population to obtain a first sorting result, and calculating a first dynamic crowding distance of each individual in the current population;

[0009] According to the first sorting result and the first dynamic crowding distance, determining a mutation pool containing a plurality of mutation parents;

[0010] According to the plurality of mutation parents in the mutation pool and the sorting values in the first sorting result corresponding to each mutation parent, generating a new population containing a plurality of new individuals;

[0011] Combining the new population and the current population as a total population, performing fast non-dominated sorting on each individual in the total population to obtain a second sorting result;

[0012] Selecting a plurality of individuals from the total population according to the sorting values in the second sorting result, and calculating a second dynamic crowding distance of each individual corresponding to a maximum sorting value satisfying a first preset condition in the plurality of individuals;

[0013] According to the second dynamic crowding distance, selecting a plurality of elite individuals from the plurality of individuals to construct an elite population, and iterating the elite population as a current population until a preset iteration number is reached to obtain a target elite population, so as to perform distributed server resource allocation according to the target elite population.

[0014] Compared with the prior art, the first aspect of the present application has the following beneficial effects:

[0015] The method comprises the following steps: constructing constraint conditions corresponding to a multi-objective optimization problem in a distributed server resource allocation process; constructing a current population comprising a plurality of individuals satisfying the constraint conditions, wherein each individual is a solution to the multi-objective optimization problem; performing fast non-dominated sorting on each individual in the current population to obtain a first sorting result, and calculating a first dynamic crowding distance of each individual in the current population; determining a mutation pool comprising a plurality of mutation parents according to the first sorting result and the first dynamic crowding distance; generating a new population comprising a plurality of new individuals according to the plurality of mutation parents in the mutation pool and the ranking values in the first sorting result corresponding to each mutation parent; combining the new population and the current population as a total population, performing fast non-dominated sorting on each individual in the total population to obtain a second sorting result; selecting a plurality of individuals from the total population according to the ranking values in the second sorting result, calculating a second dynamic crowding distance of each individual corresponding to a maximum ranking value satisfying a first preset condition in the plurality of individuals; selecting a plurality of elite individuals from the plurality of individuals according to the second dynamic crowding distance to construct an elite population, and iterating the elite population as the current population until a preset iteration number is reached to obtain a target elite population, so as to perform distributed server resource allocation according to the target elite population. In this way, the calculated dynamic crowding distance can well reflect the uniform distribution of solutions (i.e. individuals), and the determination of the mutation pool comprising a plurality of mutation parents according to the first sorting result and the first dynamic crowding distance can enhance the propagation of excellent genes in the population. Then, the generation of the new population comprising a plurality of new individuals according to the plurality of mutation parents in the mutation pool and the ranking values in the first sorting result corresponding to each mutation parent can maintain convergence for better solutions and maintain diversity for worse solutions. Finally, a group of uniformly distributed and better solutions are generated by selecting a plurality of elite individuals from the plurality of individuals according to the second dynamic crowding distance and the fast non-dominated sorting to construct the elite population, which can improve the rationality of the distributed server resource allocation.

[0016] In some embodiments, the determining of the mutation pool comprising a plurality of mutation parents according to the first sorting result and the first dynamic crowding distance comprises:

[0017] generating a first random number in a dynamic adjustment range, and selecting a first individual from the current population according to the first random number;

[0018] calculating a selection degree of each first individual according to the first sorting result and the first dynamic crowding distance corresponding to each first individual;

[0019] The first individual with the minimum selection degree is added to the mutation pool as a mutation parent, if the number of mutation parents in the mutation pool is less than a preset number, then a first random number of first individuals are selected from the current population, the selection degree is calculated, the first individual with the minimum selection degree is added to the mutation pool as a mutation parent, until the number of mutation parents in the mutation pool reaches the preset number.

[0020] In some embodiments, the generating a new population containing a plurality of new individuals according to the plurality of mutation parents in the mutation pool and the ranking values in the first ranking results corresponding to each mutation parent comprises:

[0021] In the process of performing the mutation operation, a target mutation parent is selected from the mutation pool, wherein each target mutation parent in the mutation pool is selected once;

[0022] If the ranking value in the first ranking result corresponding to the target mutation parent is less than a first preset value, a polynomial mutation is used to generate a new individual, a second random number is generated for each decision variable in the target mutation parent, if the second random number corresponding to the decision variable is less than a mutation probability, the mutation operation is performed, if the new individual violates a strong constraint condition, the new individual is repaired to obtain a repaired new individual, and the repaired new individual is added to the first population, if the new individual does not violate the strong constraint condition, the new individual is added to the first population;

[0023] If the ranking value in the first ranking result corresponding to the target mutation parent is greater than or equal to the first preset value, a differential evolution is used to generate a new individual, if the new individual violates the strong constraint condition, the new individual is repaired to obtain a repaired new individual, and the repaired new individual is added to the first population, if the new individual does not violate the strong constraint condition, the new individual is added to the first population;

[0024] All individuals in the first population are grouped two by two to obtain a plurality of individual groups, a new individual is generated by performing a crossover operation on each individual group according to a preset probability, if the new individual violates the strong constraint condition, the new individual is repaired to obtain a repaired new individual, and the repaired new individual is returned to the first population, if the new individual does not violate the strong constraint condition, the new individual is returned to the first population, until a new population is obtained after the crossover operation is performed on all individual groups according to the preset probability.

[0025] In some embodiments, after the crossover operation is performed on any two individuals in the first population to generate a new individual, the method further comprises:

[0026] After the crossover operation is performed to generate a new individual, the decision variable in the new individual may be out of bounds;

[0027] The decision variable that crosses the boundary is repaired by using a Gaussian repair strategy to obtain a repaired decision variable, including:

[0028] ;

[0029] wherein, represents the repaired decision variable, represents a mutation lower bound of the decision variable, represents a Gaussian distribution random number with a mean of 1 and a variance of 0.4, represents a mutation upper bound of the decision variable, represents the decision variable.

[0030] In some embodiments, the selecting a plurality of individuals from the total population according to the ranking values in the second ranking result, calculating a second dynamic crowding distance of each individual corresponding to a maximum ranking value that meets a first preset condition in the plurality of individuals, includes:

[0031] selecting a plurality of individuals from the total population according to the ranking values in the second ranking result in ascending order;

[0032] When a plurality of individuals corresponding to the maximum ranking value in the plurality of individuals meet the first preset condition, calculating a second dynamic crowding distance of each individual corresponding to the maximum ranking value that meets the first preset condition in the plurality of individuals, includes:

[0033] constructing a first calculation formula for calculating the total throughput of the distributed server, and constructing a second calculation formula for calculating the total cost of the server cluster construction and maintenance;

[0034] calculating the total throughput of each individual in the plurality of individuals that meet the first preset condition by using the first calculation formula, and sorting the individuals in descending order according to the total throughput of each individual to obtain a first individual sequence;

[0035] calculating the total cost of each individual in the plurality of individuals that meet the first preset condition by using the second calculation formula, and sorting the individuals in ascending order according to the total cost of each individual to obtain a second individual sequence;

[0036] According to the first individual sequence and the second individual sequence, calculating the crowding window and the distribution coefficient of each individual;

[0037] According to the crowding window and the distribution coefficient of each individual, calculating a second dynamic crowding distance of each individual.

[0038] In some embodiments, the constructing a first calculation formula for calculating the total throughput of the distributed server, and constructing a second calculation formula for calculating the total cost of the server cluster construction and maintenance, includes:

[0039] The first formula for calculating the total throughput of a distributed server is:

[0040] ;

[0041] ;

[0042] The second formula for calculating the total cost of building and maintaining a server cluster is as follows:

[0043] ;

[0044] ;

[0045] ;

[0046] in, This represents the total throughput of the distributed server. The number of regions in a distributed server cluster. Indicates the first Total throughput of distributed servers in each region Indicates the first Server resource allocation ratio for each region This represents the total server resources. Indicates the first The throughput per node when the total throughput of servers in a region does not exceed the throughput threshold. Indicates the first The throughput threshold for servers in each region Indicates the first The throughput per node when the total throughput of servers in a region exceeds the throughput threshold. This represents the total cost of building and maintaining the server cluster. Indicates the first The construction and rental costs of server clusters in each region. Indicates the first The electricity cost required for a regional server cluster Indicates the first The cost of building a data center in a region Indicates the first The average rental cost per server space in a given region. Indicates the first The number of server resources managed by a single switch in a given region. Indicates the first Price of a single switch in a specific region Indicates the first The average electricity price per switch in a region an average electricity price of a first region unit server resource, an electricity price of a first region other facility.

[0047] In some embodiments, the selecting a plurality of elite individuals from the plurality of individuals according to the second dynamic crowding distance comprises:

[0048] removing an individual with a minimum second dynamic crowding distance from the plurality of individuals corresponding to the maximum ranking value in the plurality of individuals;

[0049] If the number of the remaining individuals does not satisfy a second preset condition, recalculating a new dynamic crowding distance of each individual in the remaining individuals, and removing an individual with a minimum new dynamic crowding distance until the number of the remaining individuals satisfies the second preset condition;

[0050] constructing an elite population by taking the remaining individuals satisfying the second preset condition and the individuals corresponding to all ranking values in front of the maximum ranking value in the plurality of individuals as elite individuals.

[0051] In a second aspect, the embodiments of the present application further provide a distributed server resource allocation system, the system comprising:

[0052] a first constructing unit configured to construct a constraint condition corresponding to a multi-objective optimization problem in a distributed server resource allocation process;

[0053] a second constructing unit configured to construct a current population comprising a plurality of individuals satisfying the constraint condition, wherein each individual is a solution corresponding to the multi-objective optimization problem;

[0054] a first calculating unit configured to perform fast non-dominated sorting on each individual in the current population to obtain a first ranking result, and calculate a first dynamic crowding distance of each individual in the current population;

[0055] a mutation pool determining unit configured to determine a mutation pool comprising a plurality of mutation parents according to the first ranking result and the first dynamic crowding distance;

[0056] a new population generating unit configured to generate a new population comprising a plurality of new individuals according to the plurality of mutation parents in the mutation pool and ranking values in the first ranking result corresponding to each mutation parent;

[0057] a non-dominated sorting unit configured to combine the new population and the current population as a total population, and perform fast non-dominated sorting on each individual in the total population to obtain a second ranking result;

[0058] a second computing unit, configured to select a plurality of individuals from the total population according to the ranking values in the second ranking result, and calculate a second dynamic crowding distance of each individual corresponding to a maximum ranking value meeting a first preset condition in the plurality of individuals;

[0059] a resource allocation unit, configured to select a plurality of elite individuals from the plurality of individuals according to the second dynamic crowding distance, construct an elite population with the plurality of elite individuals, and iterate the elite population as a current population until a preset iteration number is reached, to obtain a target elite population, so as to perform distributed server resource allocation according to the target elite population.

[0060] In a third aspect, an embodiment of the present application further provides an electronic device, including at least one control processor and a memory connected with the at least one control processor in communication; the memory stores instructions executable by the at least one control processor, and the instructions are executed by the at least one control processor to enable the at least one control processor to perform the distributed server resource allocation method.

[0061] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium, which stores computer executable instructions for causing a computer to perform the distributed server resource allocation method.

[0062] It can be understood that the beneficial effects of the second aspect to the fourth aspect compared with the related art are the same as the beneficial effects of the first aspect compared with the related art, and reference can be made to the related description in the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0063] The above and / or additional aspects and advantages of the present application will become apparent and more readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:

[0064] Figure 1 is a flowchart of an embodiment of the distributed server resource allocation method provided by the present application;

[0065] Figure 2 is a structural schematic diagram of an embodiment of the distributed server resource allocation system provided by the present application;

[0066] Figure 3 is a structural schematic diagram of an embodiment of the electronic device provided by the present application. DETAILED DESCRIPTION

[0067] Embodiments of the present application are described below in detail, examples of which are shown in the drawings, wherein the same or similar notations represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by reference to the drawings are exemplary only, and are for the purpose of explanation only, and are not to be taken as limiting of the present application.

[0068] In the description of the present application, if there is a description to the first, second, etc. is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features or implicitly indicating the order of the indicated technical features.

[0069] In the description of the present application, it is to be understood that the orientation description, such as the orientation or position relationship indicated by up, down, etc. is based on the orientation or position relationship shown in the drawings, only for the purpose of describing the present application and simplifying the description, and is not to indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application.

[0070] In the description of the present application, it is to be understood that, unless otherwise explicitly limited, the words such as setting, installing, connecting, etc. should be broadly understood, and the person skilled in the art can reasonably determine the specific meaning of the above words in the present application in combination with the specific content of the technical solution.

[0071] Due to the strong limitations of existing multi-objective optimization algorithms. For example, the fixed mutation coefficient results in poor diversity of the population, and the crowding distance cannot well reflect the uniform distribution of solutions. These shortcomings result in poor performance of the algorithm in server resource allocation optimization problems, making the distributed server resource allocation unreasonable.

[0072] In order to solve the problem of unreasonable distributed server resource allocation in the prior art, the present application provides a distributed server resource allocation method, system, electronic device and storage medium.

[0073] Referring to Figure 1 The distributed server resource allocation method provided by the embodiments of the present application is shown in the flowchart. The distributed server resource allocation method is applied to an electronic device, which can be a server or a mobile terminal, etc. As Figure 1 shown, the distributed server resource allocation method can include the following steps:

[0074] Step S101, constructing constraint conditions corresponding to the multi-objective optimization problem in the distributed server resource allocation process;

[0075] Step S102, constructing a current population containing a plurality of individuals satisfying the constraint conditions, wherein each individual is a solution corresponding to the multi-objective optimization problem;

[0076] In step S103, a fast non-dominated sorting is performed on each individual in the current population to obtain a first sorting result, and a first dynamic crowding distance of each individual in the current population is calculated.

[0077] In step S104, a mutation pool containing multiple mutation parents is determined according to the first sorting result and the first dynamic crowding distance.

[0078] In step S105, a new population containing multiple new individuals is generated according to the multiple mutation parents in the mutation pool and the sorting values in the first sorting result corresponding to each mutation parent.

[0079] In step S106, the new population and the current population are combined as a total population, a fast non-dominated sorting is performed on each individual in the total population to obtain a second sorting result.

[0080] In step S107, a plurality of individuals are selected from the total population according to the sorting values in the second sorting result, and a second dynamic crowding distance of each individual corresponding to a maximum sorting value satisfying a first preset condition among the plurality of individuals is calculated.

[0081] In step S108, a plurality of elite individuals are selected from the plurality of individuals according to the second dynamic crowding distance to construct an elite population, and the elite population is taken as the current population for iteration until a preset iteration number is reached, to obtain a target elite population, so that distributed server resource allocation is performed according to the target elite population.

[0082] In the embodiment, the constraint condition corresponding to the multi-objective optimization problem in the distributed server resource allocation process is constructed; a current population containing a plurality of individuals satisfying the constraint condition is constructed, wherein each individual is a solution corresponding to the multi-objective optimization problem; a first sorting result is obtained by performing fast non-dominated sorting on each individual in the current population, and a first dynamic crowding distance of each individual in the current population is calculated; a mutation pool containing a plurality of mutation parents is determined according to the first sorting result and the first dynamic crowding distance; a new population containing a plurality of new individuals is generated according to the plurality of mutation parents in the mutation pool and the sorting values in the first sorting result corresponding to each mutation parent; the new population and the current population are combined as a total population, and a second sorting result is obtained by performing fast non-dominated sorting on each individual in the total population; a plurality of elite individuals are selected from the plurality of individuals according to the second dynamic crowding distance to construct an elite population, and the elite population is taken as the current population for iteration until a preset iteration number is reached, to obtain a target elite population, so as to perform distributed server resource allocation according to the target elite population. In this way, the calculated dynamic crowding distance can well reflect the uniform distribution of the solution (i.e. individual), and the mutation pool containing a plurality of mutation parents can be determined according to the first sorting result and the first dynamic crowding distance, which can enhance the propagation of excellent genes in the population. Then, a new population containing a plurality of new individuals is generated according to the plurality of mutation parents in the mutation pool and the sorting values in the first sorting result corresponding to each mutation parent, which can maintain convergence for better solutions and maintain diversity for poor solutions. Finally, a group of uniformly distributed and good solutions are generated by selecting a plurality of elite individuals from the plurality of individuals according to the second dynamic crowding distance and fast non-dominated sorting to construct an elite population, which can improve the rationality of distributed server resource allocation.

[0083] The constraint condition corresponding to the multi-objective optimization problem in the distributed server resource allocation process can be to optimize a plurality of objectives together in the distributed server resource allocation process, for example, to pursue high throughput and low construction and maintenance cost.

[0084] The fast non-dominated sorting can be to sort a group of solutions according to the non-dominated relationship, thereby helping the algorithm to quickly select high-quality solutions.

[0085] The preset iteration number can be an iteration number set by the embodiment according to actual conditions, which is not specifically limited in the embodiment.

[0086] In some embodiments, determining the mutation pool containing a plurality of mutation parents according to the first sorting result and the first dynamic crowding distance comprises:

[0087] generating a first random number in a dynamic adjustment range, and selecting a first individual from the current population according to the first random number;

[0088] calculating a selection degree of each first individual according to the first sorting result corresponding to each first individual and the first dynamic crowding distance;

[0089] adding the first individual with the minimum selection degree to a mutation pool as a mutation parent, and if the number of mutation parents in the mutation pool is less than a preset number, then reselecting a first individual from the current population according to the first random number, calculating the selection degree, adding the first individual with the minimum selection degree to the mutation pool as a mutation parent, and repeating the above operations until the number of mutation parents in the mutation pool reaches the preset number.

[0090] In the embodiment, the first individual with the minimum selection degree is added to the mutation pool as a mutation parent, and if the number of mutation parents in the mutation pool is less than a preset number, then reselecting a first individual from the current population according to the first random number, calculating the selection degree, adding the first individual with the minimum selection degree to the mutation pool as a mutation parent, and repeating the above operations until the number of mutation parents in the mutation pool reaches the preset number, which can enhance the propagation of excellent genes in the population and lay a good data foundation for selecting an optimal solution in the later stage.

[0091] In some embodiments, a new population containing a plurality of new individuals is generated according to the plurality of mutation parents in the mutation pool and the sorting values in the first sorting result corresponding to each mutation parent, including:

[0092] In the process of performing the mutation operation, a target mutation parent is selected from the mutation pool, wherein each target mutation parent in the mutation pool is selected once;

[0093] If the sorting value in the first sorting result corresponding to the target mutation parent is less than a first preset value, then a new individual is generated by using polynomial mutation, a second random number is generated for each decision variable in the target mutation parent, and if the second random number corresponding to the decision variable is less than a mutation probability, then the mutation operation is performed; if the new individual violates a strong constraint condition, then the new individual is repaired to obtain a repaired new individual, and the repaired new individual is added to the first population; and if the new individual does not violate the strong constraint condition, then the new individual is added to the first population.

[0094] If the sorting value in the first sorting result corresponding to the target mutation parent is greater than or equal to the first preset value, then a new individual is generated by using differential evolution, if the new individual violates the strong constraint condition, then the new individual is repaired to obtain a repaired new individual, and the repaired new individual is added to the first population; and if the new individual does not violate the strong constraint condition, then the new individual is added to the first population.

[0095] The method further includes: grouping all individuals in the first population two by two to obtain a plurality of individual groups; performing a crossover operation on each individual group according to a preset probability to generate a new individual; if the new individual violates the strong constraint condition, repairing the new individual to obtain a repaired new individual, and returning the repaired new individual to the first population; and if the new individual does not violate the strong constraint condition, returning the new individual to the first population, until all individual groups are subjected to the crossover operation according to the preset probability to obtain a new population.

[0096] In this embodiment, new individuals are generated by selecting appropriate mutation modes according to the ranking values in the first ranking result, which can maintain convergence for better solutions (i.e., individuals) and maintain diversity for worse solutions, and can balance convergence and diversity, thereby laying a good data foundation for generating a group of uniformly distributed and better solutions.

[0097] In some embodiments, after generating a new individual by performing a crossover operation on any two individuals in the first population, the method further includes:

[0098] After performing the crossover operation to generate the new individual, a decision variable in the new individual may be out of bounds;

[0099] The out-of-bounds decision variable is repaired by using a Gaussian repair strategy to obtain a repaired decision variable, including:

[0100] ;

[0101] wherein, represents the repaired decision variable, represents a lower mutation limit of the decision variable, represents a Gaussian distribution random number with a mean of 1 and a variance of 0.4, represents an upper mutation limit of the decision variable, represents the decision variable.

[0102] In this embodiment, the feasibility and stability of the solution (i.e., making the solution more reasonable) can be ensured by repairing the out-of-bounds decision variable using the Gaussian repair strategy.

[0103] In some embodiments, a plurality of individuals are selected from the total population according to the ranking values in the second ranking result, and a second dynamic crowding distance of each individual corresponding to a maximum ranking value that satisfies a first preset condition is calculated, including:

[0104] The plurality of individuals are selected from the total population according to the ranking values in the second ranking result in ascending order;

[0105] When a plurality of individuals corresponding to the maximum ranking value that satisfies the first preset condition are present in the plurality of individuals, the second dynamic crowding distance of each individual corresponding to the maximum ranking value that satisfies the first preset condition is calculated, including:

[0106] constructing a first calculation formula for calculating total throughput of the distributed server, and constructing a second calculation formula for calculating total cost of the server cluster construction and maintenance;

[0107] calculating total throughput of each individual in the plurality of individuals satisfying the first preset condition by using the first calculation formula, and performing descending order sorting on the individuals according to the total throughput of each individual, to obtain a first individual sequence;

[0108] calculating total cost of each individual in the plurality of individuals satisfying the first preset condition by using the second calculation formula, and performing ascending order sorting on the individuals according to the total cost of each individual, to obtain a second individual sequence;

[0109] calculating a crowded window and a distribution coefficient of each individual according to the first individual sequence and the second individual sequence;

[0110] calculating a second dynamic crowded distance of each individual according to the crowded window and the distribution coefficient of each individual.

[0111] In the embodiment, by constructing a first calculation formula for calculating total throughput of the distributed server, and constructing a second calculation formula for calculating total cost of the server cluster construction and maintenance; calculating total throughput of each individual in the plurality of individuals satisfying the first preset condition by using the first calculation formula, and performing descending order sorting on the individuals according to the total throughput of each individual, to obtain a first individual sequence; calculating total cost of each individual in the plurality of individuals satisfying the first preset condition by using the second calculation formula, and performing ascending order sorting on the individuals according to the total cost of each individual, to obtain a second individual sequence; calculating a crowded window and a distribution coefficient of each individual according to the first individual sequence and the second individual sequence; calculating a second dynamic crowded distance of each individual according to the crowded window and the distribution coefficient of each individual. In this way, the calculated dynamic crowded distance considers the distribution shape, can well reflect the distribution uniformity of the solution (i.e., the individual), can generate a group of solutions with uniform distribution and good performance, and thus improves the rationality of the distributed server resource allocation.

[0112] In some embodiments, constructing a first calculation formula for calculating total throughput of the distributed server, and constructing a second calculation formula for calculating total cost of the server cluster construction and maintenance, includes:

[0113] The first calculation formula for calculating total throughput of the distributed server is:

[0114] ;

[0115] ;

[0116] The second formula for calculating the total cost of building and maintaining a server cluster is as follows:

[0117] ;

[0118] ;

[0119] ;

[0120] in, This represents the total throughput of the distributed server. The number of regions in a distributed server cluster. Indicates the first Total throughput of distributed servers in each region Indicates the first Server resource allocation ratio for each region This represents the total server resources. Indicates the first The throughput per node when the total throughput of servers in a region does not exceed the throughput threshold. Indicates the first The throughput threshold for servers in each region Indicates the first The throughput per node when the total throughput of servers in a region exceeds the throughput threshold. This represents the total cost of building and maintaining the server cluster. Indicates the first The construction and rental costs of server clusters in each region. Indicates the first The electricity cost required for a regional server cluster Indicates the first The cost of building a data center in a region Indicates the first The average rental cost per server space in a given region. Indicates the first The number of server resources managed by a single switch in a given region. Indicates the first The price of a single switch in a given region. Indicates the first The average electricity price per switch in a region Indicates the first Average electricity price per unit of server resources in a region Indicates the first Electricity prices for other facilities in the region.

[0121] In some implementations, an elite population is constructed by selecting multiple elite individuals from a pool of individuals based on a second dynamic crowding distance, including:

[0122] eliminating the individual with the minimum second dynamic crowding distance from the multiple individuals corresponding to the maximum ranking value in the multiple individuals;

[0123] recomputing a new dynamic crowding distance of each individual in the remaining individuals, and eliminating the individual with the minimum new dynamic crowding distance, until the number of the remaining individuals satisfies the second preset condition;

[0124] constructing an elite population by taking the remaining individuals satisfying the second preset condition and the individuals corresponding to all ranking values in front of the maximum ranking value in the multiple individuals as elite individuals.

[0125] In the embodiment, the individual with the minimum second dynamic crowding distance from the multiple individuals corresponding to the maximum ranking value in the multiple individuals is eliminated; the new dynamic crowding distance of each individual in the remaining individuals is recomputed, and the individual with the minimum new dynamic crowding distance is eliminated, until the number of the remaining individuals satisfies the second preset condition; and the remaining individuals satisfying the second preset condition and the individuals corresponding to all ranking values in front of the maximum ranking value in the multiple individuals are taken as elite individuals to construct an elite population. In this way, the individual with the minimum second dynamic crowding distance is eliminated, which can better ensure uniform distribution of solutions (i.e., individuals), thereby improving the rationality of distributed server resource allocation.

[0126] For the convenience of those skilled in the art, a set of best embodiments is provided as follows:

[0127] With the development of Web technology, computing resources and server distribution have become the current mainstream trend. Compared with the previous single-point distribution of computing resources and servers, distribution has the following obvious advantages: (1) high availability and disaster recovery. When a server room in a region fails, the traffic of the failed server cluster can be redirected to the normal servers in other regions to achieve disaster recovery. (2) Just-in-time computing. Since all requests of a single server are routed to the IP in the region, when the request occurs far from the server, it will cause a large network delay, resulting in an increase in communication cost and reducing system throughput. Distributed clusters can route requests to the nearest server cluster according to certain strategies, reducing network communication delay and improving system throughput through just-in-time computing. (3) Improve resource response speed. When accessing some static resources, CDN technology can pre-cache resources in the Web to different regional server clusters, speeding up the request speed for static resources.

[0128] Generally, large Web projects have server rooms in multiple regions, and limited server resources should be reasonably allocated in each region to achieve high throughput and low construction and maintenance costs. Compared with ordinary regions, developed regions generate more requests, network requests are concentrated in a certain area, and network delay time is shorter. At the same time, the network facilities in developed regions are more perfect, so the throughput of a unit server node in developed regions is high. However, due to geographical location and economic development, the infrastructure cost, electricity price, and rent in developed regions are higher than those in ordinary regions. Building a server cluster in a developed region can achieve high throughput, but at the same time, the construction and maintenance costs are also high. Building a server cluster in an ordinary region can achieve low construction and maintenance costs, but at the same time, the throughput is also low. As can be seen from the above, pursuing high throughput will inevitably lead to an increase in server construction and maintenance costs, and pursuing low construction and maintenance costs will inevitably lead to a decrease in server throughput. Therefore, the two optimization objectives are mutually restrictive and balanced, and a unique global optimal solution cannot be obtained.

[0129] Such a problem with multiple optimization objectives and mutual conflict between optimization objectives is called a multi-objective optimization problem. There is no globally unique best solution to the multi-objective optimization problem, and only a set of better solutions can be generated for decision makers to choose. Currently widely used multi-objective optimization algorithms include NSGA2, SPEA2, MOEA / D, and PSO algorithm. Among them, NSGA2 has been more widely used in industrial production. However, NSGA2 has strong limitations. For example, the fixed mutation coefficient leads to poor population diversity, and the crowding distance cannot well reflect the uniform distribution of solutions. These shortcomings lead to poor performance of the algorithm in server resource allocation optimization problems. Therefore, an improved NSGA2 algorithm is proposed, which takes into account convergence and diversity, enhances the original NSGA2 algorithm without significantly increasing the computational time complexity, and obtains a set of solutions with stronger convergence and more uniform distribution.

[0130] The embodiment method takes into account that the crowding distance of the traditional NSGA2 algorithm cannot well reflect the uniform distribution of solutions, and therefore proposes a new solution distribution shape considering In step S3, a new parent selection method is proposed to enhance the propagation of excellent genes in the population. In step S4, a new mutation strategy is proposed, which performs corresponding mutation operations according to the iteration number and the fast non-dominated sorting level of the current solution. For better solutions, local search is biased to maintain convergence, and for poor solutions, global search is biased to maintain diversity. Therefore, the embodiment method takes into account convergence and diversity, enhances the original NSGA2 algorithm without significantly increasing the computational time complexity, and obtains a set of solutions with stronger convergence and more uniform distribution, thereby improving the rationality of distributed server resource allocation.

[0131] The method in this embodiment specifically includes the following steps:

[0132] Step S1: Randomly and uniformly generate samples containing... The current population of each solution Specifically:

[0133] (1) Given the constraints of distributed server resource allocation, define the current population. and set Given a solution Its chromosome (decision variable) composition is as follows Its constraints are:

[0134] (1);

[0135] (2);

[0136] in, For the total server resources in the th The proportion in each region For the total server resources in the th The minimum proportion in each region For the total server resources in the th The maximum proportion in each region This represents the number of regions where server clusters can be built.

[0137] (2) Generate within the constrained space of distributed server resource allocation For each individual, the generation strategy is as follows:

[0138] Generate a solution For each chromosome (region where server resources are allocated) generate:

[0139] (3);

[0140] in, It is a random number between 0 and 1.

[0141] make Modify various items .

[0142] Repeat the above steps Next, the generated individuals Introducing population until the population There is Individual.

[0143] Step S2, judge whether the current population meets the termination condition. If yes, stop iteration and return the result of the current solution; otherwise, continue to execute the next step. Specifically:

[0144] (1) if the iteration number of the current population reaches the set upper limit (i.e., the preset iteration number), the algorithm iteration terminates, and the target elite population is obtained (i.e., a set of better solutions for distributed server resource allocation); if the iteration number does not reach the upper limit, execute (2) in step S2;

[0145] (2) if the iteration number of the current population is less than the maximum iteration number of the population , perform fast non-dominated sorting on the individuals in the population and calculate their , and update , and execute step S3; if the iteration number of the current population is equal to the maximum iteration number of the population , directly update , and execute step S3.

[0146] Step S3, use the fast non-dominated sorting rank and the improved as the index for evaluating solutions, and use random competition selection to generate the parent population, specifically:

[0147] (1) generate a random number in the range of , where is a dynamically adjusted parameter, is calculated as follows:

[0148] (4);

[0149] where is rounded up if it is not an integer, is the current iteration number, is the maximum iteration number of the population, and are predefined parameters.

[0150] (2) randomly select individuals from the population , and use non-dominated sorting (i.e., obtain the first sorting result) and (i.e., the first dynamic crowding distance) to determine the mutation parent; the specific calculation is as follows:

[0151] 1) for any solution ​The selection degree of the first individual is defined is:

[0152] (5);

[0153] wherein, represents the number of optimization problems, in the present embodiment, .

[0154] 2) The selection degree of the selected solutions is calculated, and the solution with the minimum selection degree is selected as the mutation parent to be added to the mutation pool MatePool.

[0155] (3) If the number of individuals in the current mutation pool MatePool is less than (i.e., the preset number), step (2) in step S3 is repeated; if the number of individuals in the current mutation pool MatePool is equal to , step S4 is performed.

[0156] Step S4, according to the stage of mutation and the fast non-dominated sorting rank (i.e., the sorting value) of each individual, a corresponding mutation strategy is used to generate offspring solutions, specifically:

[0157] (1) A new solution is generated using a mutation operation. Wherein is the number of decision variables in the population (the number of server clusters in the distributed server resource allocation), and is defined is a new empty population.

[0158] (2) An individual (i.e., a mutation parent) is selected from the mutation pool MatePool, and is removed from MatePool. According to the fast non-dominated sorting rank (i.e., the sorting value in the first sorting result) of , a mutation method is selected. If the fast non-dominated sorting value of the current individual is , wherein is a dominance parameter, step (3) in step S4 is performed; otherwise (i.e., the fast non-dominated sorting value of the current individual is ), step (4) in step S4 is performed, and the newly generated individual is added to .

[0159] (3) A polynomial mutation is used, and the steps are as follows:

[0160] 1) The mutation distribution index is calculated, and the calculation formula is as follows:

[0161] (6);

[0162] where, is the maximum variation distribution index, is the minimum variation distribution index, is the maximum ranking value.

[0163] 2) Calculate the disturbance quantity using the polynomial distribution :

[0164] (7);

[0165] where, is a uniformly selected number in the interval [0, 1].

[0166] 3) Generate a new individual using the disturbance quantity variation , where the variation probability of each decision variable is During the variation operation, a random number (between 0 and 1) will be generated for each decision variable, and only if the random number corresponding to the decision variable is less than will the variation operation be performed. Let the decision variable that has undergone variation be , and the decision variable after variation be , then:

[0167] (8);

[0168] (9);

[0169] where, is the upper limit of the variation of the decision variable , and is the lower limit of the variation of the decision variable , and the new individual is .

[0170] (4) Use differential evolution to select individuals with value of 1 as the reference , and add the new solution generated by variation to , and the differential evolution operator formula is:

[0171] (10);

[0172] where, is selected from the individuals of the first ranking level to guide the current solution to approach the superior solution, is the current solution, is the same A solution randomly selected from the values. is the differential evolution coefficient.

[0173] Differential evolution may produce out-of-bounds solutions; a Gaussian patching strategy is used instead.

[0174] Suppose a certain decision variable for the new individual If the boundary is exceeded, then the corrected decision variables are... as follows:

[0175] (11);

[0176] in, This represents a Gaussian distributed random number with a mean of 1 and a variance of 0.4. For this decision variable The upper bound of the mutation can be set to 1. For this decision variable The lower bound of the mutation can be set to 0. The upper bound and lower bound of the mutation are parameters input during the execution of the method in this embodiment. They are preset values ​​and can be changed according to the actual situation. This embodiment does not impose specific limitations on them.

[0177] (5) The new solutions generated in steps (3) and (4) may violate Due to the strong constraints, the newly generated solution needs to be repaired. Let's assume the newly generated solution... Its decision variables are and The repair steps are as follows:

[0178] (12);

[0179] The repaired solution for , This indicates the number of decision variables; the solution consists of multiple decision variables.

[0180] (6) The solutions are grouped pairwise to generate (Round down) groups of individuals, select one group of individuals. and For this group of individuals Probability (i.e., the preset probability, this) The probability is a preset value and can be changed according to the actual situation (this embodiment does not impose specific limitations). A new solution is generated through cross-operation. and and put it back In, until all individual groups are in The crossover operation is performed probabilistically. The crossover operation uses simulated binary crossover (SBX), with a mutation exponent... The calculation is as follows:

[0181] (13);

[0182] in, This is the cross-distribution index.

[0183] Mutation generates offspring and They are respectively:

[0184] (14);

[0185] Cross operations can produce out-of-bounds solutions, so a Gaussian patching strategy is used:

[0186] Suppose a certain decision variable for the new individual If the boundary is exceeded, then the corrected decision variables are... as follows:

[0187] (15);

[0188] in, This represents a Gaussian distributed random number with a mean of 1 and a variance of 0.4. For this decision variable The upper bound of the variation, For this decision variable The lower bound of the variation.

[0189] Correcting out-of-bounds solutions can ensure the feasibility and stability of the solution (even if the obtained solution is more reasonable).

[0190] The solutions generated by crossover may violate Due to the strong constraints, the newly generated solution needs to be repaired. Let's assume the newly generated solution... Its decision variables are and The repair steps are as follows:

[0191] (16);

[0192] The repaired solution for .

[0193] Step S5: Combine the new population with the original population to generate the total population. ,right Using an elitist strategy, employing fast non-dominated sorting and improved... The selection criteria for elite individuals are as follows:

[0194] (1) Definition To define a new empty total population, merge the newly generated population with the previous original population to generate a total population .

[0195] (2) Fast non-dominated sorting of the newly generated individuals in the population , and generating a corresponding value for each individual (i.e., the ranking value in the second sorting result).

[0196] (3) Define the elite population as a new empty population.

[0197] (4) Select individuals from the population according to the value from small to large, add them to the elite population , and remove them from .

[0198] If the value of the current individual satisfies and (i.e., the first preset condition, where is the number of individuals with value ), execute step S5 (5), if the value of the current individual does not satisfy the first preset condition, determine the number of individuals in the current is equal to , if it is, execute step S5 (8), otherwise, repeat step S5 (4).

[0199] (5) Select all current individuals with value according to (i.e., the second dynamic crowding distance); wherein is calculated as follows:

[0200] 1) This embodiment focuses on maximizing throughput and minimizing construction and maintenance costs of distributed server resource allocation. The calculation formula is as follows:

[0201] Let represent the server throughput of a certain area , then is calculated as follows:​​

[0202] (17);

[0203] wherein, represents the server resource allocation ratio of the i-th region, represents the total server resource, represents the throughput per node when the total throughput of the server of the i-th region does not exceed the throughput threshold value, represents the throughput threshold value of the server of the i-th region, represents the throughput per node when the total throughput of the server of the i-th region exceeds the throughput threshold value. represents the throughput threshold value of the server of the i-th region, represents the throughput per node when the total throughput of the server of the i-th region exceeds the throughput threshold value. Let the total throughput of the distributed server be :

[0204]

[0205] (18);

[0206] wherein, represents the number of regions in which the distributed server cluster can be built.

[0207] Let the construction and region rental cost of building a server cluster in a region be :

[0208] (19);

[0209] wherein, represents the cost of building a computer room in the i-th region, represents the average rental cost required for a single server in the i-th region, represents the number of server resources managed by a single switch in the i-th region, represents the price of a single switch in the i-th region. Let the electricity price required for a server cluster in a region be :

[0210]

[0211] (20);

[0212] wherein, represents the average electricity price required for a single switch in the i-th region, represents the average electricity price required for a single switch in the i-th region, represents the average electricity price required for a single switch in the i-th region, ​​​​​​The average electricity price required per unit of server resources in a given region Indicates the first The electricity price required for other facilities in the region (such as lighting, security and surveillance).

[0213] The cost required to build and maintain a server cluster in a certain region is :

[0214] (twenty one);

[0215] in, To maximize the goal, To minimize the objective.

[0216] 2) According to respectively and For all in the population Value Sort the individuals according to, assuming according to The sequence of individuals generated by descending order (i.e., the first individual sequence) is: ;according to The sequence of individuals generated by ascending sorting (i.e., the second individual sequence) is: ;

[0217] 3) Settings of ( To optimize the number of targets, in this embodiment... (2).

[0218] for set up ;for set up ,in, Indicates the first Individual, , , , as well as Indicates based on the first in the population The or the first individual or individual The corresponding decision variables (including the allocation ratio of server resources in each region) are calculated according to formulas (18) and (21).

[0219] , (twenty two);

[0220] , (twenty three);

[0221] 4) Definition The calculation method is as follows:

[0222] (twenty four);

[0223] 5) Define the distribution coefficient for:

[0224] (25);

[0225] in, The function is the standard deviation function.

[0226] 6) Definition The calculation method is as follows:

[0227] (26);

[0228] in, Pick .

[0229] (6) Select the current for Of all solutions Remove the smallest individual and determine the current situation. for Is the number of individuals equal to (i.e., the second preset condition), if the condition (i.e., the current condition) is met. for The number of individuals equals ), will the current remaining for If all individuals are added to the elite population T, proceed to step 8); otherwise, continue to step 7.

[0230] (7) Calculate the removal of the previous selection The smallest individual after the others for The remaining individuals (i.e., the remaining individuals) (i.e., the new dynamic congestion distance), repeat step (6);

[0231] (8) Elite population As the current population At the same time middle Not for individual Set it to 0 and continue to step S2.

[0232] Reference Figure 2The embodiment of the application further provides a distributed server resource allocation system, which comprises a first construction unit 201, a second construction unit 202, a first calculation unit 203, a mutation pool determination unit 204, a new population generation unit 205, a non-dominated sorting unit 206, a second calculation unit 207 and a resource allocation unit 208, wherein:

[0233] The first construction unit 201 is configured to construct constraint conditions corresponding to a multi-objective optimization problem in a distributed server resource allocation process.

[0234] The second construction unit 202 is configured to construct a current population comprising a plurality of individuals satisfying the constraint conditions, wherein each individual is a solution corresponding to the multi-objective optimization problem.

[0235] The first calculation unit 203 is configured to perform fast non-dominated sorting on each individual in the current population to obtain a first sorting result, and calculate a first dynamic crowding distance of each individual in the current population.

[0236] The mutation pool determination unit 204 is configured to determine a mutation pool comprising a plurality of mutation parents according to the first sorting result and the first dynamic crowding distance.

[0237] The new population generation unit 205 is configured to generate a new population comprising a plurality of new individuals according to the plurality of mutation parents in the mutation pool and the sorting values in the first sorting result corresponding to each mutation parent.

[0238] The non-dominated sorting unit 206 is configured to combine the new population and the current population as a total population, perform fast non-dominated sorting on each individual in the total population to obtain a second sorting result.

[0239] The second calculation unit 207 is configured to select a plurality of individuals from the total population according to the sorting values in the second sorting result, and calculate a second dynamic crowding distance of each individual corresponding to a maximum sorting value satisfying a first preset condition in the plurality of individuals.

[0240] The resource allocation unit 208 is configured to select a plurality of elite individuals from the plurality of individuals according to the second dynamic crowding distance to construct an elite population, and iterate the elite population as the current population until a preset iteration number is reached to obtain a target elite population, so as to perform distributed server resource allocation according to the target elite population.

[0241] It should be noted that, since the distributed server resource allocation system in the embodiment and the distributed server resource allocation method described above are based on the same inventive concept, the corresponding contents in the method embodiment are also applicable to the system embodiment, which will not be described in detail here.

[0242] Reference Figure 3The embodiment of the application further provides an electronic device, and the electronic device comprises:

[0243] at least one memory;

[0244] at least one processor;

[0245] at least one program;

[0246] The program is stored in the memory, and the processor executes the at least one program to implement the distributed server resource allocation method provided in the present disclosure.

[0247] The electronic device can be any intelligent terminal, such as a mobile phone, a tablet computer, a personal digital assistant (PDA), a vehicle-mounted computer, and the like.

[0248] The electronic device of the embodiment of the application is described in detail below.

[0249] The processor 1600 can be implemented in the form of a general central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.

[0250] The memory 1700 can be implemented in the form of a read only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1700 can store an operating system and other application programs. When the technical solutions provided in the embodiments of the present disclosure are implemented by software or firmware, the related program codes are stored in the memory 1700 and are called and executed by the processor 1600 to implement the distributed server resource allocation method of the embodiments of the present disclosure.

[0251] The input / output interface 1800 is used to realize information input and output.

[0252] The communication interface 1900 is used to realize the communication interaction between the device and other devices. The communication can be realized by a wired manner (for example, a USB, a network cable, and the like) or a wireless manner (for example, a mobile network, WIFI, Bluetooth, and the like).

[0253] The bus 2000 is used to transmit information between various components (for example, the processor 1600, the memory 1700, the input / output interface 1800, and the communication interface 1900) of the device.

[0254] The processor 1600, the memory 1700, the input / output interface 1800, and the communication interface 1900 are communicatively connected to each other within the device through the bus 2000.

[0255] The disclosure also provides a storage medium, which is a computer-readable storage medium, and stores computer executable instructions for causing a computer to execute the distributed server resource allocation method.

[0256] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory remotely arranged relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0257] The embodiments described in the disclosure are used to more clearly illustrate the technical solutions of the disclosure, and do not constitute a limitation on the technical solutions provided by the disclosure. Those skilled in the art can know that, as technology evolves and new application scenarios appear, the technical solutions provided by the disclosure are also applicable to similar technical problems.

[0258] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the disclosure, and can include more or fewer steps than the figures, or combine certain steps, or different steps.

[0259] The device embodiments described above are only schematic, and the units described as separate components can or can not be physically separated, that is, they can be located in one place, or distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments.

[0260] Those skilled in the art can understand that all or some steps in the above disclosed method, the functional modules / units in the system and the device can be implemented as software, firmware, hardware, and appropriate combinations thereof.

[0261] The terms "first", "second", "third", "fourth", and the like in the description of this application and in the claims hereof, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so termed herein is solely for the convenience of the reader and does not limit the scope of the application. It is also to be understood that the description and examples in this application are intended to cover all possible combinations where any of the several elements can represent one or more elements.

[0262] It should be understood that, in the application, "at least one" means one or more, "multiple" means two or more. "And / or" is used to describe the relationship between associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0263] In several embodiments provided in the application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of units is only a logical function division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0264] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed on multiple network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment of the application.

[0265] In addition, each of the functional units in the various embodiments of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0266] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in other words, the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions for causing an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the various embodiments of the method of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media. The embodiments of the present application are described in detail above in combination with the drawings, but the present application is not limited to the above embodiments, and various changes can be made within the knowledge range of those skilled in the art without departing from the purpose of the present application.

[0267] The embodiments of the present application are described in detail above in combination with the drawings, but the present application is not limited to the above embodiments, and various changes can be made within the knowledge range of those skilled in the art without departing from the purpose of the present application.

Claims

1. A method for distributed server resource allocation, the method comprising: The method comprises: constructing constraint conditions corresponding to a multi-objective optimization problem in a distributed server resource allocation process; constructing a current population comprising a plurality of individuals satisfying the constraint conditions, wherein each individual is a solution corresponding to the multi-objective optimization problem; performing fast non-dominated sorting on each individual in the current population to obtain a first sorting result, and calculating a first dynamic crowding distance of each individual in the current population; determining a mutation pool comprising a plurality of mutation parents according to the first sorting result and the first dynamic crowding distance; generating a new population comprising a plurality of new individuals according to the plurality of mutation parents in the mutation pool and the ranking values in the first sorting result corresponding to each mutation parent; combining the new population and the current population as a total population, performing fast non-dominated sorting on each individual in the total population to obtain a second sorting result; selecting a plurality of individuals from the total population according to the ranking values in the second sorting result, calculating a second dynamic crowding distance of each individual corresponding to the maximum ranking value satisfying a first preset condition in the plurality of individuals, comprising: selecting a plurality of individuals from the total population according to the ranking values in the second sorting result in ascending order; when the plurality of individuals corresponding to the maximum ranking value in the plurality of individuals satisfy the first preset condition, calculating the second dynamic crowding distance of each individual corresponding to the maximum ranking value satisfying the first preset condition in the plurality of individuals, comprising: constructing a first calculation formula for calculating the total throughput of the distributed server, and constructing a second calculation formula for calculating the total cost of the server cluster construction and maintenance, comprising: the first calculation formula for calculating the total throughput of the distributed server is: ; ; the second calculation formula for calculating the total cost of the server cluster construction and maintenance is: ; ; ; wherein, represents the total throughput of the distributed servers, represents the number of regions of the distributed server cluster, represents the total throughput of the distributed servers in the th region, represents the server resource allocation ratio in the th region, represents the total server resource, represents the throughput per node when the total throughput of the servers in the th region does not exceed the throughput threshold value, represents the throughput threshold value of the servers in the th region, represents the throughput per node when the total throughput of the servers in the th region exceeds the throughput threshold value, represents the total cost of the server cluster construction and maintenance, represents the construction and regional rental cost of the server cluster in the th region, represents the electricity price required for the server cluster in the th region, represents the cost of constructing the machine room in the th region, represents the average rental required for a single server in the th region, represents the number of server resources managed by a single switch in the th region, represents the price of a single switch in the th region, represents the average electricity price of a single switch in the th region, represents the average electricity price per server resource in the th region, represents the electricity price of other facilities in the th region. calculating the total throughput of each individual in the plurality of individuals satisfying the first preset condition using the first calculation formula, and sorting the individuals in descending order according to the total throughput of each individual, to obtain a first individual sequence; calculating the total cost of each individual in the plurality of individuals satisfying the first preset condition using the second calculation formula, and sorting the individuals in ascending order according to the total cost of each individual, to obtain a second individual sequence; calculating the crowding window and distribution coefficient of each individual according to the first individual sequence and the second individual sequence; calculating the second dynamic crowding distance of each individual according to the crowding window and distribution coefficient of each individual; selecting a plurality of elite individuals from the plurality of individuals to construct an elite population according to the second dynamic crowding distance, and iterating the elite population as the current population until a preset iteration number is reached to obtain a target elite population, so as to allocate resources of the distributed server according to the target elite population.

2. The method of claim 1, wherein, The determination of the mutation pool comprising a plurality of mutation parents according to the first sorting result and the first dynamic crowding distance comprises: generating a first random number in a dynamically adjusted range, and selecting a first individual from the current population in the number of the first random number; According to the first sorting result corresponding to each of the first individuals and the first dynamic crowded distance, a selection degree of each of the first individuals is calculated; The first individual with the minimum selection degree is added to the mutation pool as a mutation parent, and if the number of mutation parents in the mutation pool is less than a preset number, a first random number of first individuals are selected from the current population again, the selection degrees are calculated, and the first individual with the minimum selection degree is added to the mutation pool as a mutation parent, until the number of mutation parents in the mutation pool reaches the preset number.

3. The method of claim 1, wherein, The method further comprises: In the process of performing the mutation operation, a target mutation parent is selected from the mutation pool, wherein each target mutation parent in the mutation pool is selected once; If the sorting value in the first sorting result corresponding to the target mutation parent is less than a first preset value, a new individual is generated by using polynomial mutation, a second random number is generated for each decision variable in the target mutation parent, and if the second random number corresponding to the decision variable is less than a mutation probability, the mutation operation is performed; if the new individual violates a strong constraint condition, the new individual is repaired to obtain a repaired new individual, and the repaired new individual is added to the first population; if the new individual does not violate the strong constraint condition, the new individual is added to the first population; If the sorting value in the first sorting result corresponding to the target mutation parent is greater than or equal to the first preset value, a new individual is generated by using differential evolution, if the new individual violates the strong constraint condition, the new individual is repaired to obtain a repaired new individual, and the repaired new individual is added to the first population; if the new individual does not violate the strong constraint condition, the new individual is added to the first population; All individuals in the first population are grouped in pairs to obtain a plurality of individual groups, a new individual is generated by performing a crossover operation on each individual group according to a preset probability, if the new individual violates the strong constraint condition, the new individual is repaired to obtain a repaired new individual, and the repaired new individual is returned to the first population; if the new individual does not violate the strong constraint condition, the new individual is returned to the first population, and the process is repeated until a new population is obtained after the crossover operation is performed on all individual groups according to the preset probability.

4. The method of claim 3, wherein, After the crossover operation is performed on any two individuals in the first population to generate a new individual, the method further comprises: After the crossover operation is performed to generate a new individual, a decision variable in the new individual may exceed a boundary; The decision variable that exceeds the boundary is repaired by using a Gaussian repair strategy to obtain a repaired decision variable, including: ; wherein, denotes the repaired decision variable, denotes the lower variation bound of the decision variable, denotes a Gaussian distributed random number with mean 1 and variance 0.4, denotes the upper variation bound of the decision variable, denotes the decision variable.

5. The method of claim 1, wherein, The second dynamic crowded distance is used to select a plurality of elite individuals from the plurality of individuals to construct an elite population, including: The individual with the minimum second dynamic crowded distance is removed from the plurality of individuals corresponding to the maximum sorting value; If the number of remaining individuals does not satisfy a second preset condition, a new dynamic crowded distance of each individual in the remaining individuals is recalculated, and the individual with the minimum new dynamic crowded distance is removed, until the number of remaining individuals satisfies the second preset condition. The remaining individuals satisfying the second preset condition and the individuals corresponding to all ordering values in front of the maximum ordering value in the several individuals are taken as elite individuals, and an elite population is constructed.

6. A distributed server resource allocation system, characterized by, The system comprises: A first construction unit configured to construct constraint conditions corresponding to a multi-objective optimization problem in a distributed server resource allocation process; A second construction unit configured to construct a current population comprising a plurality of individuals satisfying the constraint conditions, wherein each individual is a solution corresponding to the multi-objective optimization problem; A first calculation unit configured to perform fast non-dominated sorting on each individual in the current population to obtain a first sorting result, and calculate a first dynamic crowding distance of each individual in the current population; A mutation pool determination unit configured to determine a mutation pool comprising a plurality of mutation parents according to the first sorting result and the first dynamic crowding distance; A new population generation unit configured to generate a new population comprising a plurality of new individuals according to the plurality of mutation parents in the mutation pool and ordering values in the first sorting result corresponding to each mutation parent; A non-dominated sorting unit configured to combine the new population and the current population as a total population, and perform fast non-dominated sorting on each individual in the total population to obtain a second sorting result; A second calculation unit configured to select a plurality of individuals from the total population according to ordering values in the second sorting result, and calculate a second dynamic crowding distance of each individual corresponding to a maximum ordering value satisfying a first preset condition in the plurality of individuals, comprising: selecting a plurality of individuals from the total population according to ordering values in the second sorting result in ascending order; when a plurality of individuals corresponding to the maximum ordering value in the plurality of individuals satisfy the first preset condition, calculating the second dynamic crowding distance of each individual corresponding to the maximum ordering value satisfying the first preset condition in the plurality of individuals, comprising: constructing a first calculation formula for calculating a total throughput of the distributed server, and constructing a second calculation formula for calculating a total cost of construction and maintenance of the server cluster, comprising: the first calculation formula for calculating the total throughput of the distributed server is: ; ; the second calculation formula for calculating the total cost of construction and maintenance of the server cluster is: ; ; ; wherein, represents the total throughput of the distributed servers, represents the number of regions of the distributed server cluster, represents the total throughput of the distributed servers in the th region, represents the server resource allocation ratio in the th region, represents the total server resource, represents the throughput per node when the total throughput of the servers in the th region does not exceed the throughput threshold value, represents the throughput threshold value of the servers in the th region, represents the throughput per node when the total throughput of the servers in the th region exceeds the throughput threshold value, represents the total cost of the construction and maintenance of the server cluster, represents the construction and regional rental cost of the server cluster in the th region, represents the electricity price required for the server cluster in the th region, represents the cost of constructing the machine room in the th region, represents the average rental cost required for a single server in the th region, represents the number of server resources managed by a single switch in the th region, represents the price of a single switch in the th region, represents the average electricity price of a single switch in the th region, represents the average electricity price per server resource in the th region, represents the electricity price of other facilities in the th region. calculating the total throughput of each individual in the plurality of individuals satisfying the first preset condition by using the first calculation formula, and performing descending order sorting on the individuals according to the total throughput of each individual to obtain a first individual sequence; calculating the total cost of each individual in the plurality of individuals satisfying the first preset condition by using the second calculation formula, and performing ascending order sorting on the individuals according to the total cost of each individual to obtain a second individual sequence; calculating a crowding window and a distribution coefficient of each individual according to the first individual sequence and the second individual sequence; calculating the second dynamic crowding distance of each individual according to the crowding window and the distribution coefficient of each individual; A resource allocation unit is configured to select a plurality of elite individuals from the second dynamic crowded distance to form an elite population, and iterate the elite population as a current population until a preset iteration number is reached to obtain a target elite population, so as to allocate resources of the distributed server according to the target elite population.

7. An electronic device, comprising: The computer readable storage medium stores computer executable instructions for causing a computer to perform the distributed server resource allocation method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer executable instructions for causing a computer to perform the distributed server resource allocation method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Routing frequency slot allocation method based on evolutionary multiple objectives in elastic optical network

    CN106130931A