Application program allocation method and device, electronic equipment and storage medium

By obtaining application information and server configuration information, and automatically determining application allocation information based on constraints, the resource imbalance caused by manual allocation in the prior art is solved, automatic allocation and resource balanced use are realized, human resources are saved and server operation risks are reduced.

CN120216111APending Publication Date: 2025-06-27SHENGDOUSHI SHANGHAI SCI & TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311833951.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-27
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

In the prior art, the server allocation of applications mainly relies on manual selection, resulting in unbalanced resource use, consumes a lot of human resources, and is unable to take into account multiple actual business needs, and there is a risk of unstable server operation or even downtime.

Method used

By obtaining application information and configuration information of available servers, determining application allocation information based on constraints, realizing automatic allocation of applications, saving human resources, and achieving balanced and reasonable allocation of server resources.

Benefits of technology

It realizes automatic allocation of applications, meets various actual business needs, improves the balance of server resources, reduces server operation risks, and saves human resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216111A_ABST
    Figure CN120216111A_ABST
Patent Text Reader

Abstract

The invention provides an application program allocation method and device, electronic equipment and a storage medium, and relates to the technical field of computers, in particular to the field of data processing. According to the implementation scheme, the method comprises the steps of obtaining application program information associated with an application program; obtaining configuration information of a plurality of available servers; and based on one or more of the application information, the configuration information, and constraint conditions associated with the application and a plurality of available servers, determining application allocation information indicating a target server of the plurality of available servers to which the application is to be allocated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and in particular, to the field of data processing. Specifically, it relates to an application program allocation method and apparatus, an electronic device, and a computer-readable storage medium. Background Art

[0002] With the continuous development of Internet technologies, an increasing number of application programs have emerged. These application programs usually need to be deployed on a large number of servers, and have different requirements for the memory and the number of processor cores of the servers. Currently, mainly through manual selection, a server on which each application program can be deployed is allocated for each application program.

[0003] The methods described in this section are not necessarily methods that have been previously conceived or adopted. Unless otherwise specified, any method described in this section should not be considered to be prior art merely because it is included in this section. Similarly, unless otherwise specified, the problems mentioned in this section should not be considered to have been recognized in any prior art. Summary of the Invention

[0004] The present disclosure provides an application program allocation method and apparatus, an electronic device, and a computer-readable storage medium.

[0005] According to one aspect of the present disclosure, there is provided an application program allocation method, including: obtaining application program information associated with an application program; obtaining configuration information of a plurality of available servers; and determining application program allocation information based on one or more of the application program information, the configuration information, and constraint conditions associated with the application program and the plurality of available servers, where the application program allocation information indicates a target server among the plurality of available servers to which the application program will be allocated.

[0006] According to another aspect of the present disclosure, there is provided an application program allocation apparatus, including: a first obtaining unit configured to obtain application program information associated with an application program; a second obtaining unit configured to obtain configuration information of a plurality of available servers; and a determining unit configured to determine application program allocation information based on one or more of the application program information, the configuration information, and constraint conditions associated with the application program and the plurality of available servers, where the application program allocation information indicates a target server among the plurality of available servers to which the application program will be allocated.

[0007] According to another aspect of the present disclosure, there is provided an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above application program allocation method.

[0008] According to another aspect of the present disclosure, there is provided a computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the above application program allocation method.

[0009] According to one or more embodiments of the present disclosure, automatic allocation of application programs can be achieved, such that the allocation results meet various actual business requirements.

[0010] According to another one or more embodiments of the present disclosure, more balanced and reasonable allocation and use of server resources can be achieved.

[0011] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The drawings exemplarily show embodiments and form a part of the description, and are used together with the written description of the description to explain the exemplary embodiments of the embodiments. The shown embodiments are for illustrative purposes only and do not limit the scope of the claims. In all the drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0013] Figure 1 The flowchart of the application program allocation method according to an exemplary embodiment of the present disclosure is shown;

[0014] Figure 2 The flowchart of the application program allocation method according to some other exemplary embodiments of the present disclosure is shown;

[0015] Figure 3 The flowchart of the application program allocation method according to still some other exemplary embodiments of the present disclosure is shown;

[0016] Figure 4 The block diagram of the application program allocation device according to an exemplary embodiment of the present disclosure is shown;

[0017] Figure 5 The block diagram of the electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0018] The following describes exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to facilitate understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0019] In the present disclosure, unless otherwise specified, the terms "first", "second", etc. are used to describe various elements and are not intended to limit the positional relationship, timing relationship, or importance relationship of these elements. Such terms are only used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of the element, and in certain cases, based on the context description, they may also refer to different instances.

[0020] The terms used in the description of various examples in the present disclosure are only for the purpose of describing specific examples and are not intended to be restrictive. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element may be one or more. In addition, the term "and / or" used in the present disclosure covers any one of the listed items and all possible combinations.

[0021] With the continuous development of Internet technology, more and more application programs have emerged. Correspondingly, these application programs need to be deployed on more servers. For example, the number of users of online food ordering application programs is increasing continuously, and the corresponding background requires more server resources to support the rapidly growing online services. The inventors have noticed that different application programs may involve a variety of virtual machine resources, and the requirements for resources such as the number of processor cores and memory required by these virtual machine resources are different. And in the related art, when allocating servers for application programs, it is mainly allocated manually according to the resources required by the application programs, the resource occupancy of the current servers, etc. This implementation method will result in a large consumption of human resources, and it is impossible to take into account a variety of actual business requirements, resulting in unreasonable allocation of application programs, thus causing uneven use of one or more resources of the server, different server loads, and the risk of unstable operation or even downtime of the machine.

[0022] To solve the above problems, the present disclosure provides an application program allocation method, which determines the correspondence between the application program and the server based on one or more of the application program information associated with the application program, the configuration information of multiple available servers, and the constraint conditions associated with the application program and multiple available servers, so as to realize the automatic allocation of the application program and save human resources. At the same time, this method can realize the rationality of application program allocation, so as to use server resources more evenly and reasonably.

[0023] Embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0024] Figure 1 A flowchart of an application program allocation method 100 according to an exemplary embodiment of the present disclosure is shown. As Figure 1 shown, the application program allocation method 100 may include: step S110, obtaining application program information associated with the application program; step S120, obtaining configuration information of a plurality of available servers; and step S130, determining application program allocation information based on one or more of the application program information, the configuration information, and constraint conditions associated with the application program and the plurality of available servers, where the application program allocation information indicates a target server among the plurality of available servers to which the application program will be allocated.

[0025] According to one or more of the application program information associated with the application program, the configuration information of the server, and the constraint conditions associated with the application program and the server, the resource requirements of the current application program and / or the server attribute information can be fully considered, which is conducive to realizing the rationality of application program allocation, so as to use server resources more evenly and reasonably (for example, allocating more application programs to servers with a large number of processor cores and large memory, and no longer allocating application programs to servers with relatively saturated resource occupancy, etc.). At the same time, automatic allocation of application programs can be realized, thus saving human resources.

[0026] According to some embodiments of the present disclosure, in step S110, the application program information may include one or more of the memory occupied by the application program, the number of processor cores occupied by the application program, and the number of application programs. In the present disclosure, the processor may include a Central Processing Unit (CPU). For example, for a certain application program, the associated application program information may include one or more of the number 100 of this application program, the memory occupied by each application program in this application program being 8G, and the number of CPU cores occupied being 8. It will be understood that the application program information may also include other information, such as the bandwidth occupied by each application program, the hard disk resources occupied, etc.

[0027] According to some embodiments of the present disclosure, in step S120, the configuration information may include one or more of the maximum memory and the maximum number of processor cores of each available server among a plurality of available servers. For example, the maximum memory and the maximum number of processor cores of each available server may be different. For example, the maximum memory of a certain server is 256G and the maximum number of processor cores is 64 cores, while the maximum memory of another server is 128G and the maximum number of processor cores is 32 cores, etc. It will be understood that the configuration information may indicate the attribute information of the server when it is unoccupied (i.e., no application is deployed on the server), or may also indicate the attribute information of the server after a certain allocation of the application is completed, such as the remaining memory and the remaining number of processor cores.

[0028] According to some embodiments of the present disclosure, in step S130, determining the application allocation information may include: constructing an integer programming model based on the input information, where the integer programming model includes an objective, decision variables, and constraints, and the input information includes one or more of the application information and the configuration information; and solving the integer programming model based on the objective and the constraints to obtain the value of the allocation variable in the decision variables as the application allocation information. Wherein, the input information may include the application information, or the configuration information, or both the application information and the configuration information.

[0029] According to some embodiments of the present disclosure, integer programming means that the variables (all or part) in the programming are restricted to integers. In one example, the integer programming may be a 0-1 programming, that is, the decision variables only take values of 0 or 1. In another example, the integer programming may also be a mixed integer programming model in which some variables are restricted to integers. By solving the integer programming model and thus obtaining the correspondence between the application and the server, the automatic allocation of the application can be realized, thereby saving human resources.

[0030] According to some embodiments of the present disclosure, solving the integer programming model may include any one of the following: solving the integer programming model through a solver; and solving the integer programming model through a heuristic algorithm.

[0031] In some examples, the solver may include commercial solvers such as Gurobi, Cplex, Xpress, etc., and may also include open-source solvers such as CBC, CLP, CGL, etc. By solving the integer programming model through the solver, the optimal solution of the integer programming model can be obtained.

[0032] In some other examples, the integer programming model can be solved by heuristic algorithms such as search trees, simulated annealing algorithms, genetic algorithms, ant colony algorithms, artificial neural networks, etc. By setting, for example, the number of iterative searches, the integer programming model can be solved via the heuristic algorithm to quickly obtain optimization results within a certain range.

[0033] It will be understood that the above examples are shown for illustrative purposes only, and a combination of, for example, multiple heuristic algorithms can also be used to solve the integer programming model according to actual requirements.

[0034] According to some embodiments of the present disclosure, the application program can include at least one type of application program, and the decision variables can include: the number of each type of application program assigned to each available server among a plurality of available servers. In one example, different types of application programs are application programs of different service providers in the same industry or different service providers in different industries, but the present disclosure is not limited thereto. In other examples, different types of application programs can be divided according to other classification criteria.

[0035] It will be understood that in each allocation, only one type of application program can be deployed on the server, or more than one type of application program can be deployed on the server at the same time.

[0036] It will also be understood that the number of each type of application program can be any suitable value preset according to actual requirements, such as 50, 70, 100, etc. For example, when the number of application programs of service provider A is 100, the decision variables can include the number 10 assigned to the first available server, the number 30 assigned to the second available server, the number 30 assigned to the third available server, the number 20 assigned to the fourth available server, and the number 10 assigned to the fifth available server.

[0037] It will also be understood that in the case where the application program includes at least one type of application program, the allocation variable value in the decision variables can indicate the target server to which each application program in the at least one type of application program will be assigned, and the allocation variable value is used as application program allocation information.

[0038] By setting the above decision variables, the resource occupancy of each available server can be reasonably controlled, which is beneficial to realizing the balanced deployment of application programs on different servers and ensuring the efficient operation of each application program at the same time.

[0039] According to some embodiments of the present disclosure, in this scenario, the constraint condition can include: the total occupied memory of the application programs assigned to each available server does not exceed the maximum memory of the available server. In one instance, it can be represented by the following formula (1):

[0040]

[0041] Among them, i represents the i-th type of application program, I represents the set of application program categories, j represents the j-th available server, and J represents the set of available servers. represents the memory occupied by each application program in the i-th type of application program, z ij represents the decision variable - the number of the i-th type of application programs allocated to the j-th available server, and represents the maximum memory of the j-th available server.

[0042] According to some other embodiments of the present disclosure, in this scenario, the constraint conditions may further include: the total number of occupied processor cores of the application programs allocated to each available server does not exceed the maximum number of processor cores of the available server. For example, it can be represented by the following formula (2):

[0043]

[0044] Among them, represents the number of occupied processor cores of each application program in the i-th type of application program, and represents the maximum number of processor cores of the j-th available server.

[0045] It will be understood that although steps S110 - S130 are depicted in Figure 1 in a specific order, it is not required that these steps must be executed in the specific order shown or in sequential order. For example, step S120 may be executed in parallel with step S110 or before step S110.

[0046] Figure 2 shows a flowchart of an application program allocation method 200 according to some other exemplary embodiments of the present disclosure. As Figure 2 shown, the application program allocation method 200 may include: steps S210 - S230 that are the same as or similar to the implementation manners of steps S110 - S130 in Figure 1 ; and step S240, determining the target occupied memory of each available server among a plurality of available servers, where the input information may further include the target occupied memory of each available server.

[0047] As described above, it is desired to achieve a balanced distribution of different applications across different servers. Therefore, the target occupied memory can, for example, indicate the memory allocated to each server after the current allocation of the application. For another example, any suitable period can be set as the preset time period (such as one month, one quarter, half a year, etc.), and the target occupied memory can indicate the memory allocated to each server after the allocation of all applications is completed within the preset time period.

[0048] According to some embodiments of the present disclosure, the target occupied memory can include a target memory share indicating the ratio of the memory required by the application to the total memory of multiple available servers. For example, when allocating 100 applications of service provider A and 50 applications of service provider B, first calculate the total memory expected to be occupied by these 150 applications (e.g., 100G), and then obtain the total memory of all available servers (e.g., 1000G). Then the target memory share is 100G / 1000G, that is, 10%. Next, multiply this target memory share (10%) by the maximum memory of each available server to determine the target occupied memory of the service. In one example, it can be represented by the following formula (3):

[0049]

[0050] where MEM target represents the target memory share of each available server; C allVMMem represents the total memory expected to be occupied by all applications, and C allServerMem represents the total memory of all available servers.

[0051] In this embodiment, the decision variable can further include the actual occupied memory of each available server. The actual occupied memory can, for example, include an actual memory share indicating the ratio of the memory already occupied by each available server to the total memory after the application is allocated to the target server. In one example, it can be represented by the following formula (4):

[0052]

[0053] where represents the actual memory share of the j-th available server after the allocation of the application is completed; represents the maximum memory of the j-th available server.

[0054] Compared with the more common method of calculating the average target occupied memory of each available server based on the total memory expected to be occupied by the application and the number of available servers, by setting the target memory share and the actual memory share, the bearing capacity of each server (i.e., memory resources, processor resources, etc.) is fully considered, avoiding overloading the servers with relatively weak bearing capacity. This is conducive to the balanced use of server resources by the servers, avoiding downtime caused by resource tension on a certain server or certain servers.

[0055] Continuing with the above embodiment, the goal may include reducing the sum of the differences between the actual occupied memory of each available server and the target occupied memory respectively. When the target occupied memory is the target memory share as described above and the actual occupied memory is the actual memory share as described above, this goal may include reducing the sum of the differences between the actual memory shares of each available server and the target memory share respectively. For example, minimizing the sum of the absolute values of the differences between the actual memory share and the target memory share of each available server, as shown in the following formula (5):

[0056]

[0057] where, represents the absolute value of the difference between the actual memory share and the target memory share of the jth available server.

[0058] Thus, when allocating the application, the target memory requirements of each server can be taken into account, which is conducive to allocating more suitable servers for the application, making the memory occupied on each server more balanced, and thus realizing the rationality of the application allocation.

[0059] According to some embodiments of the present disclosure, referring to Figure 2 , step S240 may further include determining the target occupied number of processor cores of each available server among the multiple available servers, where the input information may further include the target occupied number of processor cores of each available server.

[0060] Similar to the target occupied memory, the target occupied number of processor cores may, for example, indicate the requirement for the number of processor cores of each server after performing the current allocation of the application. Again, for example, any suitable period may be set as the preset time period (such as one month, one quarter, half a year, etc.), and the target occupied number of processor cores may indicate the requirement for the number of processor cores of each server after completing the allocation of all applications within the preset time period.

[0061] According to some embodiments of the present disclosure, the target number of occupied processor cores may include a target processor core number share indicating the ratio of the number of processor cores required by an application to the total number of processor cores of multiple available servers. Continuing with the above example, when allocating 100 applications of service provider A and 50 applications of service provider B, first calculate the total number of processor cores expected to be occupied by these 150 applications (e.g., 800 cores), and then obtain the total number of processor cores of all available servers (e.g., 10,000 cores). Then the target processor core number share is 800 cores / 10,000 cores, that is, 8%. Next, multiply this target processor core number share (8%) by the maximum number of processor cores of each available server to determine the target number of occupied processor cores for this service. In one example, it can be represented by the following formula (6):

[0062]

[0063] where Core target represents the target processor core number share of each available server; C allVMCpu represents the total number of processor cores expected to be occupied by all applications, and C allServerCpu represents the total number of processor cores of all available servers.

[0064] In this embodiment, the decision variable may further include the actual number of occupied processor cores of each available server. The actual number of occupied processor cores may, for example, include an actual processor core number share indicating the ratio of the number of processor cores already occupied by each available server to the total number of processor cores after the application is allocated to the target server. In one example, it can be represented by the following formula (7):

[0065]

[0066] where represents the actual processor core number share of the j-th available server after the allocation of the application is completed; represents the maximum number of processor cores of the j-th available server.

[0067] Compared with calculating the average target number of occupied processor cores of each available server based on the total number of processor cores expected to be occupied by the application and the number of available servers, by setting the target processor core number share and the actual processor core number share, the bearing capacity of each server (i.e., memory resources, processor resources, etc.) is fully considered, avoiding overloading of servers with relatively weak bearing capacity. This is beneficial for the servers to evenly utilize server resources and avoid downtime caused by resource tension on a certain server or certain servers.

[0068] Continuing with the above embodiments, the objective may include reducing the sum of the differences between the actual number of processor cores occupied by each available server and the target number of processor cores. When the target number of processor cores is the target processor core number share as described above and the actual number of processor cores is the actual processor core number share as described above, this objective may include reducing the sum of the differences between the actual processor core number shares of each available server and the target processor core number share. For example, minimizing the sum of the absolute values of the differences between the actual processor core number share of each available server and the target processor core number share, as shown in the following formula (8):

[0069]

[0070] wherein, represents the absolute value of the difference between the actual processor core number share of the j-th available server and the target processor core number share.

[0071] Similarly, when allocating applications, the target processor core number requirements of each server can be taken into account, which is beneficial to allocating more suitable servers for the applications, making the number of processor cores occupied on each server more balanced, and thus realizing the rationality of application allocation.

[0072] It will be understood that although in the above embodiments, the objective of reducing the difference between the actual occupied memory and the target occupied memory and the objective of reducing the difference between the actual occupied number of processor cores and the target occupied number of processor cores are listed separately, the target memory requirements and the target processor core number requirements of each server can also be considered simultaneously. Thus, the balanced allocation of the two resources can be achieved simultaneously, avoiding the situation where some servers have a high occupancy of processor cores and a low occupancy of memory, thereby effectively improving the utilization rate of the servers. In this case, the objective can be represented by the following formula (9):

[0073]

[0074] Although steps S210 - S240 are depicted in Figure 2 as being in a specific order, this should not be construed as requiring these steps to be executed in the specific order shown or in sequential order. For example, step S240 can be executed in parallel with step S210 and step S220.

[0075] According to some embodiments of the present disclosure, in the above reference Figure 1 and Figure 2In the described application allocation methods 100 and 200, the constraint conditions may include: allocating one server for each application. In one example, this constraint condition may be represented by the following formula (10):

[0076]

[0077] wherein, represents the total number of applications of the i-th type.

[0078] By setting the constraint condition of allocating one server for each application, it is possible to avoid the occurrence of missed allocation of applications and also avoid resource call conflicts, that is, allocating a certain application to multiple available servers simultaneously, thereby alleviating the situation of resource waste and uneven use, and at the same time ensuring that each application can run smoothly. Under this constraint condition, different applications can also be allocated to the same server.

[0079] According to some embodiments of the present disclosure, the above-mentioned reference Figure 1 and Figure 2 The described job task allocation methods 100 and 200 may further include: determining the maximum capacity of each available server among multiple available servers, wherein the input information may further include the maximum capacity of each available server, and wherein the constraint condition may include: the number of applications allocated to each available server does not exceed the maximum capacity of each available server itself.

[0080] In some examples, the maximum capacity of each available server may be a default preset value or a value that changes after each execution of the application allocation. This maximum capacity may be any suitable value set by the user according to actual scenario requirements or server load capacity, such as 20, 50, 70, etc. For example, the maximum capacity of each server may be based on bandwidth. Another example is that the maximum capacity of each server may be based on hard disk capacity. The scope of protection claimed in the present disclosure is not limited in this regard.

[0081] In this embodiment, the above-mentioned constraint condition that the number of applications allocated to each available server does not exceed the maximum capacity of each available server itself may be represented by the following formula (11):

[0082]

[0083] wherein, represents the maximum capacity of the j-th available server.

[0084] By setting a constraint of a maximum capacity for each available server, efficient operation of the server can be achieved without exceeding the server's carrying capacity. This is because each server will neither be idle nor always operate at high load.

[0085] According to some embodiments of the present disclosure, the above reference Figure 1 and Figure 2 The described job task allocation methods 100 and 200 may also include: determining the total number of each type of application and / or a first quantity threshold for each type of application, wherein the input information may also include the total number of each type of application and / or the first quantity threshold, and wherein the constraint conditions may include: the number of each type of application allocated to each available server does not exceed a first proportion of the total number of each type of application and / or a first quantity threshold.

[0086] In some examples, the total number of each type of application can be a preset value based on scenario requirements. As described above, the total number of each type of application can be set based on geographic area and / or city area, for example, the total number of applications of service provider A can be set to 5, the total number of applications of service provider B can be set to 50, etc.

[0087] Similarly, the first ratio may also be a value preset according to scenario requirements or experience, wherein the preset value may be the same for each type of application. For example, the value of the first ratio may be set to 0.2. Accordingly, the constraint condition may be that the number of each type of application allocated to each available server does not exceed 20% of the total number of each type of application. In an example, the constraint condition may be expressed by the following formula (12):

[0088]

[0089] in, Represents the total number of applications in the i-th category.

[0090] In other examples, similarly, the first quantity threshold may also be a value preset according to scenario requirements, wherein the preset value may be the same for each type of application, or may be different for different types of applications. For example, the first quantity threshold for applications of service provider A may be set to 10, and the first quantity threshold for applications of service provider B may be set to 15, etc. Accordingly, the constraint condition may be expressed as the number of applications of service provider A allocated to each available server does not exceed 10, and the number of applications of service provider B allocated to each available server does not exceed 15. In one example, the constraint condition may be expressed by the following formula (13):

[0091]

[0092] wherein, represents the first quantity threshold for the i-th type of application program.

[0093] It will be understood that when solving the integer programming model in the present disclosure, it can be based solely on the constraint conditions such as formula (12) or (13), or both constraint conditions can be given simultaneously. By setting the server quantity constraint (i.e., server availability constraint) for each type of application program, it is possible to further avoid the server from operating beyond its carrying capacity and achieve more optimal use of the server.

[0094] It should be noted that the available servers according to the present disclosure can be deployed in one or more clusters. Among them, each of the one or more clusters includes an aggregation switch (AGG), and multiple top-of-rack (TOR) switches are deployed under each AGG, and multiple available servers are deployed under each TOR. For example, 10 - 12 TOR switches can be deployed under each AGG, and 10 - 15 available servers can be deployed under each of them.

[0095] When multiple available servers are deployed on one or more top-of-rack (TOR) switches, the constraint condition can further include: the quantity of each type of application program assigned to the available servers deployed on the same TOR does not exceed the second ratio of the total quantity of each type of application program.

[0096] The setting of the value of the second ratio can be similar to the setting of the value of the first ratio above, so it will not be elaborated here. It will be understood that the value of the second ratio can be greater than the value of the first ratio, for example, it can be 0.6. Correspondingly, this constraint condition can be represented by the following formula (14):

[0097]

[0098] where S TOR represents the set of available servers deployed on the same TOR. In this example, the set includes n servers.

[0099] When the one or more TOR switches are deployed on one or more aggregation switches (AGG), the constraint condition can further include: the quantity of each type of application program assigned to the available servers deployed on the same AGG does not exceed the third ratio of the total quantity of each type of application program.

[0100] The setting of the value of the third ratio can be similar to the setting of the values of the first ratio and the second ratio described above, so it will not be elaborated here. It will be understood that the value of the third ratio can be less than the value of the second ratio, for example, it can be 0.5. Accordingly, this constraint condition can be represented by the following formula (15):

[0101]

[0102] where S AGG represents the set of available servers deployed on the same AGG. In this example, this set includes p servers.

[0103] Since servers are usually not deployed individually but in clusters as described above, by comprehensively considering the limit on the number of the same type of application programs allocated on the same TOR and the limit on the number of the same type of application programs allocated on the same AGG, it is possible to avoid the phenomenon that although the resources on the servers in a certain cluster or some clusters are relatively evenly distributed, the overall load is relatively high, and further achieve a more reasonable allocation of server resources.

[0104] According to some embodiments of the present disclosure, the above-mentioned reference Figure 1 and Figure 2 The job task allocation methods 100 and 200 described may further include: determining whether there are two or more types of application programs in the application program that occupy memory and / or the number of processor cores exceeds a preset threshold, where the constraint condition includes: in response to determining that there are two or more types of application programs in the application program that occupy memory and / or the number of processor cores exceeds a preset threshold, allocating different available servers to the two or more types of application programs.

[0105] During the process of allocating application programs, there may be a situation where two or more types of application programs have high resource requirements for the server. If any two of these two or more types of application programs are allocated to the same server, it may lead to a relatively large workload on the server during the simultaneous operation of these application programs, resulting in a system crash. To avoid this situation, before allocating application programs, it is possible to first determine the types of these application programs and their resource requirements for resources such as server memory and the number of processor cores (wherein, the resource requirements of application programs belonging to a certain type can be the same). When these requirements do not exceed the preset threshold, allowing these application programs to be allocated to the same server; while in the case where there are two or more types of application programs among the application programs whose memory requirements and / or the number of processor core requirements for the server exceed the preset threshold, it is not allowed to allocate these two or more types of application programs to the same server. Thus, problems such as mutual exclusion during the operation between different types of application programs can be effectively avoided. In one example, this constraint condition can be represented by the following formula (16):

[0106]

[0107] Wherein, And respectively represent whether the i1-th type of application program and the i2-th type of application program are allocated to the j-th available server, and K represents the set of two or more types of application programs whose memory requirements and / or the number of processor core requirements for the server exceed the preset threshold. It will be understood that the preset threshold can be set to any suitable value, and the scope claimed in the present disclosure is not limited in this regard.

[0108] Continuing the above embodiment, alternatively, the constraint condition may include: in response to determining that there are two or more types of application programs in the application programs that occupy memory and / or the number of occupied processor cores exceeding the preset threshold, the number of these two or more types of application programs allocated to each available server does not exceed a second quantity threshold for these two or more types of application programs.

[0109] As described above, if two or more types of application programs with high resource requirements for the server are allocated to the same server, it may lead to a relatively large workload on the server during the simultaneous operation of these application programs, resulting in a system crash. To avoid this situation, when allocating these two or more types of application programs to the same server, a second quantity threshold for each available server can be set (for example, it can be 2, 5, 7, etc.), so as to ensure that the number of any two of these two or more types of application programs deployed on each available server is within the limit range, effectively avoiding the mutual influence between high-resource-requirement application programs and enabling the server to operate stably. In one example, this constraint condition can be represented by the following formula (17):

[0110]

[0111] Among them, and respectively represent the numbers of the i1 - type application programs and the i2 - type application programs allocated to the j - th available server, represents the second quantity threshold for the i1 - type application programs and the i2 - type application programs.

[0112] Figure 3 shows a flowchart of an application program allocation method 300 according to still some exemplary embodiments of the present disclosure. As Figure 3 shown, the application program allocation method 300 may include: steps S310, S320, S330 - 1, and S330 - 2 that are the same as or similar to the implementation manners of steps S110 - S130 in Figure 1 or steps S210 - S230 in Figure 2 ; and step S340, performing a linearization operation on the objective of the integer programming model, where the integer programming model may include a mixed - integer linear programming model.

[0113] Since the linearized function relationship is easier to solve, therefore, by performing a linearization operation on the objective of the integer programming model, the efficiency of solving the integer programming model can be improved, and the solving speed can be accelerated.

[0114] In some examples, a linearization operation may be performed on the difference between the target memory share and the actual memory share of multiple available servers. For example, the above formula (5) may be transformed into the linear function relationship in the following formula (18):

[0115]

[0116] And the above formula (8) may be transformed into the linear function relationship in the following formula (19)

[0117]

[0118] It should be understood that the above examples of the linearization operation are only shown for illustrative purposes, and any other suitable way may also be used to perform a linearization operation on one or more variables in the integer programming model, and the scope of the subject matter claimed in the present disclosure is not limited in this regard.

[0119] According to another aspect of the present disclosure, an application program allocation device is also provided. Figure 4 shows a result block diagram of an application program allocation device 400 according to an exemplary embodiment of the present disclosure. As Figure 4As shown, the application allocation device 400 may include: a first acquisition unit 410 configured to acquire application information associated with an application; a second acquisition unit 420 configured to acquire configuration information of multiple available servers; and a determination unit 430 configured to determine application allocation information based on one or more of the application information, the configuration information, and constraint conditions associated with the application and the multiple available servers, where the application allocation information indicates a target server among the multiple available servers to which the application will be allocated.

[0120] According to some embodiments of the present disclosure, the determination unit 430 may include: an integer programming model construction unit configured to construct an integer programming model based on input information, where the integer programming model includes an objective, decision variables, and constraint conditions, and the input information includes one or more of the application information and the configuration information; and a solution unit configured to solve the integer programming model based on the objective and the constraint conditions to obtain the value of the allocation variable in the decision variables as the application allocation information.

[0121] According to some embodiments of the present disclosure, the application allocation device 400 may further include a unit configured to determine the target occupied memory of each available server among the multiple available servers, where the input information may further include the target occupied memory of each available server; where the decision variables may further include the actual occupied memory of each available server, and where the objective may include reducing the sum of the differences between the actual occupied memory of each available server and the target occupied memory.

[0122] According to some embodiments of the present disclosure, the target occupied memory may include a target memory share, where the target memory share indicates the ratio of the memory to be occupied by the application to the total memory of the multiple available servers; where the actual occupied memory may include an actual memory share, where the actual memory share indicates the ratio of the memory already occupied by each available server to the total memory after the application is allocated to the target server; and where the objective may include reducing the sum of the differences between the actual memory shares of each available server and the target memory share.

[0123] According to some embodiments of the present disclosure, the application allocation device 400 may further include a unit configured to determine the target occupied number of processor cores of each available server among the multiple available servers, where the input information may further include the target occupied number of processor cores of each available server; where the decision variables may further include the actual occupied number of processor cores of each available server, and where the objective may include reducing the sum of the differences between the actual occupied number of processor cores of each available server and the target occupied number of processor cores.

[0124] According to some embodiments of the present disclosure, the target number of occupied processor cores may include a target processor core number share, where the target processor core number share indicates the ratio of the number of processor cores required to be occupied by an application to the total number of processor cores of multiple available servers; the actual number of occupied processor cores may include an actual processor core number share, where the actual processor core number share indicates the ratio of the number of processor cores already occupied by each available server after the application is allocated to the target server to the total number of processor cores; and the target may include reducing the sum of the differences between the actual processor core number shares of each available server and the target processor core number share respectively.

[0125] According to some embodiments of the present disclosure, the application information may include one or more of the memory occupied by the application, the number of occupied processor cores, and the number of applications; the configuration information may include one or more of the maximum memory and the maximum number of processor cores of each available server among multiple available servers; and the application may include at least one type of application, and the decision variable may include: the number of each type of application allocated to each available server among multiple available servers.

[0126] According to some embodiments of the present disclosure, the constraint condition may include: allocating one server to each application.

[0127] According to some embodiments of the present disclosure, the application allocation device 400 may further include a unit configured to determine the maximum capacity of each available server among multiple available servers, where the input information may further include the maximum capacity of each available server; and the constraint condition may include: the number of applications allocated to each available server does not exceed the respective maximum capacity of each available server.

[0128] According to some embodiments of the present disclosure, the application allocation device 400 may further include a unit configured to determine the total number of each type of application and / or a first quantity threshold for each type of application, where the input information may include the total number of each type of application and / or the first quantity threshold; and the constraint condition may include: the number of each type of application allocated to each available server does not exceed the first ratio of the total number of each type of application and / or the first quantity threshold.

[0129] According to some embodiments of the present disclosure, multiple available servers may be deployed on one or more top-of-rack (TOR) switches, and the constraint condition may further include: the number of each type of application allocated to the available servers deployed on the same TOR does not exceed the second ratio of the total number of each type of application.

[0130] According to some embodiments of the present disclosure, one or more TORs may be deployed on one or more aggregation switches AGG, and the constraints may further include: the number of each type of application assigned to the available servers deployed on the same AGG does not exceed a third ratio of the total number of each type of application.

[0131] According to some embodiments of the present disclosure, the application allocation device 400 may further include a unit configured to determine whether there are two or more types of applications in the application that occupy memory and / or the number of occupied processor cores exceeds a preset threshold. The constraints may include: in response to determining that there are two or more types of applications in the application that occupy memory and / or the number of occupied processor cores exceeds a preset threshold: allocating different available servers to the two or more types of applications; or the number of the two or more types of applications allocated to each available server does not exceed a second quantity threshold for the two or more types of applications.

[0132] According to some embodiments of the present disclosure, the application allocation device 400 may further include a linearization unit configured to perform a linearization operation on the objective of the integer programming model, where the integer programming model includes a mixed integer linear programming model.

[0133] According to some embodiments of the present disclosure, the solving unit may include any one of the following: a unit configured to solve the integer programming model through a solver; and a unit configured to solve the integer programming model through a heuristic algorithm.

[0134] It should be understood that Figure 4 each unit 410-430 of the device 400 shown in Figure 1 may correspond to each step S110-S130 in the method 100 described with reference to Figure 2 each step S210-S230 in the method 200 described with reference to Figure 3 each step S310, S320, S330-1 and S330-2 in the method 300 described with reference to

[0135] Accordingly, the operations, features and advantages described above for the method 100, method 200 and method 300 also apply to the device 400 and the units included therein. For the sake of brevity, certain operations, features and advantages are not described herein again.

[0136] According to another aspect of the present disclosure, there is also provided a computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the above application program allocation method.

[0137] According to another aspect of the present disclosure, there is also provided a computer program product including a computer program, wherein the computer program implements the above application program allocation method when executed by a processor.

[0138] Refer to Figure 5 , the block diagram of an electronic device 500 that can be used in the present disclosure will now be described. It is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device can be different types of computer devices, such as a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0139] Figure 5 The block diagram of an electronic device according to an embodiment of the present disclosure is shown. As Figure 5 shown, the electronic device 500 may include at least one processor 501, a working memory 502, an I / O device 504, a display device 505, a storage device 506, and a communication interface 507 that can communicate with each other through a system bus 503.

[0140] The processor 501 may be a single processing unit or multiple processing units, and all processing units may include a single or multiple computing units or multiple cores. The processor 501 may be implemented as one or more microprocessors, microcomputers, microcontrollers, digital signal processors, central processing units, state machines, logic circuits, and / or any device that manipulates signals based on operation instructions. The processor 501 may be configured to obtain and execute computer-readable instructions stored in the working memory 502, the storage device 506, or other computer-readable media, such as the program code of an operating system 502a, the program code of an application 502b, etc.

[0141] The working memory 502 and the storage device 506 are examples of computer-readable storage media for storing instructions that are executed by the processor 501 to implement the various functions described above. The working memory 502 may include both volatile and non-volatile memory (e.g., RAM, ROM, etc.). In addition, the storage device 506 may include a hard disk drive, a solid-state drive, removable media, including external and removable drives, memory cards, flash memory, floppy disks, optical discs (e.g., CD, DVD), storage arrays, network-attached storage, storage area networks, and so on. The working memory 502 and the storage device 506 may both be collectively referred to herein as memory or computer-readable storage media, and may be non-transitory media capable of storing computer-readable, processor-executable program instructions as computer program code that can be executed by the processor 501 as a particular machine configured to implement the operations and functions described in the examples herein.

[0142] The I / O device 504 may include input devices and / or output devices. The input devices may be any type of device capable of inputting information into the electronic device 500 and may include, but are not limited to, a mouse, a keyboard, a touch screen, a trackpad, a trackball, a joystick, a microphone, and / or a remote control. The output devices may be any type of device capable of presenting information and may include, but are not limited to, a video / audio output terminal, a vibrator, and / or a printer.

[0143] The communication interface 507 allows the electronic device 500 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks, and may include, but are not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a BluetoothTM device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0144] The application 502b in the working register 502 may be loaded and executed to perform the various methods and processes described above, such as Figure 1 the steps S110 - S130 in. In some embodiments, part or all of the computer program may be loaded and / or installed onto the electronic device 500 via the storage device 506 and / or the communication interface 507. When the computer program is loaded and executed by the processor 501, one or more steps of the application distribution method described above may be performed.

[0145] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which may be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.

[0146] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine, or entirely on the remote machine or server.

[0147] In the context of the present disclosure, a machine-readable medium may be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0148] To provide for interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0149] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.

[0150] A computing system can include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client - server relationship is created by computer programs running on respective computers and having a client - server relationship to each other.

[0151] It should be understood that the various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0152] Although embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above methods, systems, and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but is only defined by the authorized claims and their equivalent scope. Various elements in the embodiments or examples may be omitted or replaced by their equivalent elements. In addition, the steps may be executed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples may be combined in various ways. Importantly, with the evolution of technology, many of the elements described herein may be replaced by equivalent elements that emerge after the present disclosure.

Claims

1. An application allocation method, comprising: Obtaining application information associated with an application; Obtaining configuration information of a plurality of available servers; And Based on one or more of the application information, the configuration information, and constraint conditions associated with the application and the plurality of available servers, determining application allocation information, the application allocation information indicating a target server among the plurality of available servers to which the application will be allocated.

2. The method according to claim 1, wherein, Determining the application allocation information includes: Constructing an integer programming model based on input information, the integer programming model including an objective, decision variables, and the constraint conditions, the input information including one or more of the application information and the configuration information; and Solving the integer programming model based on the objective and the constraint conditions to obtain an allocation variable value in the decision variables as the application allocation information.

3. The method according to claim 2, further comprising: Determining a target occupied memory of each available server among the plurality of available servers; Wherein, the input information further includes the target occupied memory of each available server; Wherein, the decision variables further include an actual occupied memory of each available server, and Wherein, the objective includes reducing the sum of differences between the actual occupied memory of each available server and the target occupied memory.

4. The method according to claim 3, Among them, The target occupied memory includes a target memory share, the target memory share indicating a ratio of the memory required to be occupied by the application to the total memory of the plurality of available servers; Wherein, the actual occupied memory includes an actual memory share, the actual memory share indicating a ratio of the memory already occupied by each available server to the total memory after the application is allocated to the target server; and Wherein, the objective includes reducing the sum of differences between the actual memory shares of each available server and the target memory share.

5. The method according to claim 2, further comprising: Determining a target occupied number of processor cores of each available server among the plurality of available servers; Wherein, the input information further includes the target occupied number of processor cores of each available server; Wherein, the decision variables further include an actual occupied number of processor cores of each available server, and Wherein, the objective includes reducing the sum of differences between the actual occupied number of processor cores of each available server and the target occupied number of processor cores.

6. The method according to claim 5, Among them, The target occupied number of processor cores includes a target processor core number share, the target processor core number share indicating a ratio of the number of processor cores required to be occupied by the application to the total number of processor cores of the plurality of available servers; Wherein, the actual number of occupied processor cores includes the actual processor core number share, and the actual processor core number share indicates the ratio of the number of occupied processor cores of each available server to the total number of processor cores after the application is allocated to the target server; and Wherein, the goal is to reduce the sum of the differences between the actual processor core number shares of each available server and the target processor core number share respectively.

7. The method according to any one of claims 2-6,[[]]END]] Among them, The application information includes one or more of the memory occupied by the application, the number of occupied processor cores, and the number of the applications; Wherein, the configuration information includes one or more of the maximum memory and the maximum number of processor cores of each available server among the multiple available servers; and Wherein, the application includes at least one type of application, and the decision variables include: the number of each type of application allocated to each available server among the multiple available servers.

8. The method according to claim 7, wherein The constraint conditions include: Allocate one server to each application.

9. The method according to claim 7, further comprising determining the maximum capacity of each available server among the multiple available servers; Among them, The input information further includes the maximum capacity of each available server; And Wherein, the constraint conditions include: the number of applications allocated to each available server does not exceed the respective maximum capacity of each available server.

10. The method according to claim 7, further comprising: Determining the total number of each type of application and / or a first quantity threshold for each type of application, Wherein, the input information includes the total number of each type of application and / or the first quantity threshold; and Wherein, the constraint conditions include: the number of each type of application allocated to each available server does not exceed the first ratio of the total number of each type of application and / or the first quantity threshold.

11. The method according to claim 10, wherein, The multiple available servers are deployed on one or more Top of Rack (TOR) switches, and wherein, the constraint conditions further include: the number of each type of application allocated to the available servers deployed on the same TOR does not exceed the second ratio of the total number of each type of application.

12. The method according to claim 11, wherein, The one or more TOR switches are deployed on one or more Aggregation (AGG) switches, and wherein, the constraint conditions further include: the number of each type of application allocated to the available servers deployed on the same AGG does not exceed the third ratio of the total number of each type of application.

13. The method according to claim 7, further comprising: Determining whether there are two or more types of applications in the application that occupy memory and / or the number of occupied processor cores exceeds a preset threshold; Wherein, the constraint conditions include: in response to determining that there are two or more types of applications in the application that occupy memory and / or the number of occupied processor cores exceeds a preset threshold: Allocate different available servers for the two or more types of application programs; or The number of the two or more types of application programs allocated to each of the available servers does not exceed a second quantity threshold for the two or more types of application programs.

14. An application program allocation apparatus, comprising: A first acquisition unit configured to acquire application program information associated with an application program; A second acquisition unit configured to acquire configuration information of a plurality of available servers; And A determination unit configured to determine application program allocation information based on one or more of the application program information, the configuration information, and constraint conditions associated with the application program and the plurality of available servers, the application program allocation information indicating a target server among the plurality of available servers to which the application program is to be allocated.

15. An electronic device, comprising: At least one processor; And A memory communicatively connected to the at least one processor; Wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method according to any one of claims 1-13.

16. A computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the method according to any one of claims 1-13.