Application migration method, device, electronic device and storage medium
By optimizing the application container migration method for colocation servers, the problem of resource waste during server upgrades was resolved, achieving efficient and low-cost application migration.
Patent Information
- Application Number
- CN202211567230.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-07
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2042-12-07
AI Technical Summary
In the existing technology, colocation servers cannot effectively migrate application containers during upgrades, resulting in resource waste.
By identifying the applications to be migrated, candidate servers, migration constraints, and business constraints, you can optimize the application container migration process and ensure that the migration meets the preset requirements.
It reduces application migration costs, meets resource and business constraints, and improves migration efficiency.
Smart Images

Figure CN116185576B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and in particular to a method, device, electronic device, and storage medium for application migration. Background Art
[0002] Currently, colocation technology can deploy different applications on the same server to fully utilize the server's idle resources. It can also reduce equipment procurement costs and protect user privacy data.
[0003] In actual applications, when a server that uses colocation technology needs to be upgraded, the application containers running the applications on the server need to be migrated to other servers to clear the server. However, in existing technologies, server migration is often not effective, which may result in waste of resources.
[0004] Therefore, how to more reasonably migrate containers for colocation servers is an urgent problem that needs to be solved. Summary of the Invention
[0005] This specification provides a method, apparatus, electronic device, and storage medium for application migration to ensure the rationality of application migration on colocation servers.
[0006] This manual adopts the following technical solutions:
[0007] This document provides a method for application migration, including:
[0008] Determining applications to be migrated included in the server to be maintained and candidate servers to receive the applications to be migrated;
[0009] For each application to be migrated, determine an application container for maintaining the application to be migrated;
[0010] Determining migration constraints between each application to be migrated and each candidate server;
[0011] Under the conditions that the migration constraints are met and the number of servers used to receive the applications to be migrated meets the preset requirements, a server to receive each application to be migrated is determined from the candidate servers, and for each application to be migrated, the application container of the application to be migrated is migrated to the server corresponding to the application to be migrated.
[0012] Optionally, determining candidate servers for receiving the application to be migrated includes:
[0013] A server that matches the server configuration of the server to be maintained is determined as a candidate server for receiving the application to be migrated.
[0014] Optionally, determining the migration constraints between each application to be migrated and each candidate server includes:
[0015] For each application to be migrated, determining, based on the configuration information of each candidate server, a candidate server that is not compatible with the application to be migrated as a mutually exclusive server corresponding to the application to be migrated;
[0016] Migration constraints between each application to be migrated and the candidate server are determined according to mutually exclusive servers corresponding to each application to be migrated.
[0017] Optionally, under the condition that the migration constraint is satisfied and the number of servers for receiving the applications to be migrated meets a preset requirement, before determining a server to receive each application to be migrated from the candidate servers, the method further includes:
[0018] Determining the business constraints between the applications to be migrated;
[0019] Under the condition that the migration constraint is satisfied and the number of servers for receiving the applications to be migrated meets a preset requirement, determining a server to receive each application to be migrated from the candidate servers includes:
[0020] Under the conditions that the migration constraints, the business constraints and the number of servers used to receive the applications to be migrated meet the preset requirements, a server to receive each application to be migrated is determined from the candidate servers, and a server to receive each application to be migrated is determined from the candidate servers.
[0021] Optionally, determining the business constraints between the applications to be migrated includes:
[0022] Determine the peak business period for each application to be migrated;
[0023] For each application to be migrated, determine the mutually exclusive applications corresponding to the application to be migrated based on the business peak period corresponding to the application to be migrated;
[0024] Business constraints between the applications to be migrated are determined based on mutually exclusive applications corresponding to the applications to be migrated.
[0025] Optionally, under the condition that the migration constraints are satisfied and the number of servers for receiving the applications to be migrated meets a preset requirement, determining a server to receive each application to be migrated from the candidate servers, and migrating, for each application to be migrated, an application container of the application to be migrated to a server corresponding to the application to be migrated, includes:
[0026] Determine some applications to be migrated from among the applications to be migrated as target applications;
[0027] With the goal of minimizing the number of servers for receiving the application to be migrated, and subject to the migration constraints, determining a candidate server for receiving the target application, and migrating the application container maintaining the target application to the candidate server corresponding to the target application;
[0028] From the remaining applications to be migrated, continue to determine some applications to be migrated and use them as target applications again. With the goal of minimizing the number of servers used to receive the applications to be migrated, and under the condition of satisfying the migration constraints, determine the candidate servers for receiving the target applications, and migrate the application containers of the target applications to the candidate servers corresponding to the target applications until all the applications to be migrated are migrated to the candidate servers.
[0029] This specification provides an apparatus for application migration, including:
[0030] A server determination module, configured to determine the applications to be migrated contained in the server to be maintained and candidate servers for receiving the applications to be migrated;
[0031] A container determination module, configured to determine, for each application to be migrated, an application container for maintaining the application to be migrated;
[0032] A constraint determination module, configured to determine migration constraints between each application to be migrated and each candidate server;
[0033] The migration module is used to determine the server that receives each application to be migrated from the candidate servers, under the condition that the migration constraints are met and the number of servers used to receive the applications to be migrated meets the preset requirements, and for each application to be migrated, migrate the application container of the application to be migrated to the server corresponding to the application to be migrated.
[0034] Optionally, the server determination module is specifically configured to determine a server that matches the server configuration of the server to be maintained as a candidate server for receiving the application to be migrated.
[0035] Optionally, the constraint determination module is specifically used to, for each application to be migrated, determine a candidate server that is not compatible with the application to be migrated according to the configuration information of each candidate server, as the mutually exclusive server corresponding to the application to be migrated; and determine the migration constraints between each application to be migrated and the candidate server according to the mutually exclusive servers corresponding to each application to be migrated.
[0036] Optionally, under the condition that the migration constraint is satisfied and the number of servers for receiving the applications to be migrated meets a preset requirement, before determining the server to receive each application to be migrated from the candidate servers, the constraint determination module is further configured to determine business constraints existing between the applications to be migrated;
[0037] The migration module is specifically configured to determine a server to receive each application to be migrated from the candidate servers under the conditions that the migration constraint, the business constraint and the number of servers for receiving the application to be migrated meet preset requirements.
[0038] Optionally, the constraint determination module is also used to determine the business peak period corresponding to each application to be migrated; for each application to be migrated, determine the mutually exclusive application corresponding to the application to be migrated based on the business peak period corresponding to each application to be migrated; and determine the business constraints between the applications to be migrated based on the mutually exclusive applications corresponding to each application to be migrated.
[0039] Optionally, the migration module is specifically used to determine some applications to be migrated from the applications to be migrated as target applications; with the goal of minimizing the number of servers used to receive the target applications, under the condition that the migration constraints are satisfied, determine the candidate servers for receiving the target applications, and migrate the application container that maintains the target application to the candidate server corresponding to the target application; continue to determine some applications to be migrated from the remaining applications to be migrated and use them as target applications again, and with the goal of minimizing the number of servers used to receive the target applications, under the condition that the migration constraints are satisfied, determine the candidate servers for receiving the target applications, and migrate the application container of the target application to the candidate server corresponding to the target application, until all the applications to be migrated are migrated to the candidate servers.
[0040] This specification provides a computer-readable storage medium storing a computer application. When the computer application is executed by a processor, the computer application implements the above-mentioned application migration method.
[0041] This specification provides an electronic device, including a memory, a processor, and a computer application stored in the memory and executable on the processor, wherein the processor implements the above-mentioned application migration method when executing the application.
[0042] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:
[0043] In the application migration method provided in this specification, the applications to be migrated contained in the server to be maintained and the candidate servers for receiving the applications to be migrated can be determined, and for each application to be migrated, the application container for maintaining the application to be migrated is determined, and the migration constraints between each application to be migrated and each candidate server are determined. Finally, under the conditions that the migration constraints are met and the number of servers for receiving the applications to be migrated meets the preset requirements, the server for receiving each application to be migrated is determined from the candidate servers, and for each application to be migrated, the application container of the application to be migrated is migrated to the server corresponding to the application to be migrated.
[0044] As can be seen from the above content, when there are applications to be migrated that need to be migrated, the business platform can determine the migration constraints between the applications to be migrated and each candidate server, and use the migration constraints as constraints, and make the number of candidate servers used to migrate the applications to be migrated meet certain requirements (such as as few as possible) as the goal, to calculate how to allocate the applications to be migrated to the candidate servers, thereby reducing the cost of application migration and satisfying the constraints required by resources or business in application migration. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The exemplary embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation of this specification. In the drawings:
[0046] Figure 1 A flowchart of an application migration method in this specification;
[0047] Figure 2 This is a flowchart of a multi-round migration process for applications to be migrated provided in this manual;
[0048] Figure 3 A schematic diagram of a process for determining candidate servers for applications to be migrated in a single round provided in this specification;
[0049] Figure 4 A schematic diagram of an application migration device provided in this manual;
[0050] Figure 5 This manual provides a corresponding Figure 1 Schematic diagram of electronic equipment. DETAILED DESCRIPTION
[0051] To make the objectives, technical solutions, and advantages of this specification more clear, the following will clearly and completely describe the technical solutions of this specification in conjunction with the specific embodiments of this specification and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this specification.
[0052] The technical solutions provided by the embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0053] Figure 1 This is a flowchart of a method for application migration in this specification, which specifically includes the following steps:
[0054] S100: Determine applications to be migrated included in a server to be maintained and candidate servers to receive the applications to be migrated.
[0055] In real-world applications, servers using colocation technology often run multiple applications corresponding to different services. Each application is maintained by its corresponding application container. When a server needs to be upgraded, the application containers within the server must be cleared.
[0056] Based on this, the service platform needs to determine the applications to be migrated contained in the servers to be maintained and the candidate servers to receive these applications to be migrated. There may be multiple servers to be maintained, each of which may contain multiple applications to be migrated, that is, each server to be maintained may contain multiple application containers. The application containers contained in each server to be maintained need to be cleared, that is, the application containers in each server to be maintained need to be migrated to the candidate servers. Therefore, it is necessary to determine the optimal solution for allocating the application containers in each server to be maintained to the candidate servers.
[0057] Among them, in order to avoid security risks (such as incompatibility) that may arise during the application migration process, a server that matches the server configuration of the server to be maintained can be determined as a candidate server for receiving the application to be migrated. The server configuration matching mentioned here can mean that the server configuration is not inferior to that of the server to be maintained. Specifically, the server configuration can be consistent, or the server configuration can be higher than that of the server to be maintained. For example, a server that is consistent with the server model of the server to be maintained can be used as a candidate server.
[0058] It should be noted that in actual application migration, there may be many servers to be maintained, and the configurations (or models) of these servers to be maintained are different. In this case, the servers to be maintained and the candidate servers can be grouped according to the model. The servers to be maintained and the candidate servers of the same model are in the same group. When determining the candidate servers corresponding to the applications to be migrated in the servers to be maintained, the determination is made among the candidate servers in the same group, that is, the applications to be migrated in the servers to be maintained will be migrated to the candidate servers in the same group.
[0059] In actual applications, when determining which servers to be maintained and applications to be migrated, the business platform can obtain the identification information corresponding to the servers to be maintained (such as IP addresses) and the identification information of the candidate servers (such as IP addresses), as well as the online server information, container information (which can be understood as the container information corresponding to each application) and the distribution information of each application to be migrated deployed in each server (indicating the status of the application containers deployed in each server).
[0060] Then, using the identification information of the server to be maintained and the identification information of each candidate server, the information required for the application migration can be filtered from the server information, container information, and the distribution information of each application to be migrated deployed on each server. Specifically, this information may include: relevant information about the server to be maintained (such as configuration information, security level, etc.), the applications to be migrated deployed on each server to be maintained, and related information about the applications to be migrated. This information can be used to subsequently determine which application to migrate to which candidate server.
[0061] S102: For each application to be migrated, determine an application container for maintaining the application to be migrated.
[0062] S104: Determine migration constraints between each application to be migrated and each candidate server.
[0063] S106: Under the conditions that the migration constraints are satisfied and the number of servers used to receive the applications to be migrated meets the preset requirements, determine the server that receives each application to be migrated from the candidate servers, and for each application to be migrated, migrate the application container of the application to be migrated to the server corresponding to the application to be migrated.
[0064] After determining the candidate servers, for each application to be migrated, an application container for maintaining the application to be migrated can be determined, and the migration constraints between each application to be migrated and each candidate server can be determined. Thus, under the conditions that the migration constraints are satisfied and the number of servers for receiving the application to be migrated meets the preset requirements, the server to receive each application to be migrated can be determined from each candidate server, and for each application to be migrated, the application container of the application to be migrated can be migrated to the server corresponding to the application to be migrated.
[0065] The aforementioned preset requirements may be of various types, and may include minimizing the number of servers receiving each application to be migrated. Alternatively, the preset requirements may include ensuring that the number of servers receiving the application to be migrated falls within a preset range, where the preset range may be manually set in advance.
[0066] In this specification, the migration constraints mentioned above, as well as the resource constraint of satisfying the preset requirement of the number of servers used to receive the application to be migrated (such as minimizing the number of servers used to receive each application to be migrated), and the business constraints between the applications to be migrated mentioned later, can all be expressed as integer linear programming problems, and can be solved by the branch and bound method to determine the candidate server corresponding to each application to be migrated.
[0067] It should be noted that the migration constraints between the applications to be migrated and the candidate servers mentioned here may refer to constraints that the applications to be migrated can or cannot be migrated to certain servers. There may be multiple ways to specifically determine the migration constraints. For example, for each application to be migrated, based on the configuration information of each candidate server, a candidate server that is not compatible with the application to be migrated can be determined as the mutually exclusive server corresponding to the application to be migrated, and the migration constraints between each application to be migrated and the candidate server can be determined based on the mutually exclusive servers corresponding to each application to be migrated.
[0068] In other words, based on the configuration of each candidate server, a candidate server that is unsuitable for the application to be migrated can be identified, and thus used as a mutually exclusive server for the application to be migrated. The migration constraints between each application to be migrated and the candidate server are determined using the mutually exclusive servers corresponding to each application to be migrated. This can mean defining in the migration constraints that the application container of the application to be migrated should not be migrated to the mutually exclusive server of the application to be migrated.
[0069] For another example, for each application to be migrated, the mutually exclusive server corresponding to the application to be migrated can be determined based on the security level of each candidate server and the security requirements corresponding to the application to be migrated, and the migration constraints between each application to be migrated and the candidate server can be determined based on the mutually exclusive servers corresponding to each application to be migrated.
[0070] For example, different applications to be migrated may need to be deployed in candidate servers with different security levels. Therefore, when migrating, it is also possible to determine mutually exclusive servers to which the applications to be migrated cannot be migrated according to the security requirements of the applications to be migrated and the security levels of each candidate server, thereby establishing migration constraints between the applications to be migrated and the candidate servers.
[0071] In addition to the aforementioned constraints, business constraints between the applications to be migrated can also be introduced. Specifically, the business constraints between the applications to be migrated can be determined. A server to receive each application to be migrated can be determined from the candidate servers, provided that the migration constraints, the business constraints, and the number of servers receiving the applications to be migrated meet preset requirements. The business constraints mentioned here can represent constraints on applications to be migrated that should not be migrated to the same server.
[0072] Specifically, there may be multiple ways to determine business constraints.
[0073] Specifically, the business peak period corresponding to each application to be migrated can be determined, and for each application to be migrated, the mutually exclusive applications corresponding to the application to be migrated can be determined based on the business peak period corresponding to each application to be migrated. Furthermore, the business constraints between the applications to be migrated can be determined based on the mutually exclusive applications corresponding to each application to be migrated.
[0074] That is, applications to be migrated that have conflicting business peaks, such as those with simultaneous or close business peaks, can be considered mutually exclusive applications, and should not be migrated to the same server.
[0075] For another example, if there is a resource conflict between the applications to be migrated, these applications to be migrated may be treated as mutually exclusive applications. That is, if two applications to be migrated need support from the same resource in the server during their operation, these two applications to be migrated may be treated as mutually exclusive applications.
[0076] As mentioned above, the above migration constraints, business constraints, and resource constraints (i.e., minimizing the number of servers used to receive applications to be migrated) can all be expressed as integer linear programming problems, which can be specifically expressed as the following formula (which can be solved by the branch and bound method).
[0077] 1. Resource constraints:
[0078]
[0079]
[0080] Among them, X ij and Y jare variables with values of 0 or 1, X ij It is used to indicate whether the i-th application to be migrated has been migrated to the j-th candidate server, Y j It is used to indicate whether the jth candidate server is enabled, that is, whether the jth candidate server is used for application migration. The above resource constraints mean that the Y corresponding to each candidate server is j The goal is to minimize the sum of the values of ij , and for each X ij The constraint is that for any application to be migrated, the X corresponding to the application to be migrated ij The sum of the values should be 1, that is, the application to be migrated can only be migrated to one candidate server.
[0081] There may be various conditions for enabling a candidate server. For example, when it is determined that the applications to be migrated to the candidate server reach the preset allowed number of the server, the candidate server can be enabled as a server. For another example, when it is determined that the applications to be migrated to the server occupy the preset size or preset type of resources of the candidate server, the server to be migrated can be enabled as a server.
[0082] 2. Migration Constraints
[0083] X ij =0
[0084] It can be seen that if there are migration constraints between the application to be migrated and the candidate server, X ij Set to 0.
[0085] 3. Business Constraints:
[0086] When determining business constraints, you can model the business constraints as the following formula:
[0087]
[0088] Where M is a set of mutually exclusive application pairs, that is, the set M includes multiple pairs of mutually exclusive applications. The above formula can be expressed as follows: when a pair of applications to be migrated (application to be migrated i, application to be migrated j) is in M, then for the kth candidate server, the X corresponding to the application to be migrated is ik and X jk cannot be 1 at the same time, that is, the above formula is intended to express a pair of applications to be migrated (application to be migrated i, application to be migrated j) as mutually exclusive applications. These applications to be migrated will not be migrated to the same candidate server.
[0089] However, it can be seen that the above formula has V ijkThis contains variables in three dimensions. Therefore, it takes too long to solve and is inefficient. Therefore, in practical applications, the business constraints can be converted into the following formula:
[0090]
[0091] Among them, A j is a variable with a value of 0 or 1. C represents a set of applications to be migrated. Applications to be migrated in this set can be migrated to the same candidate server. Applications to be migrated that do not belong to this set cannot be migrated to the same candidate server as applications to be migrated in this set.
[0092] Each candidate server has an A j Applications to be migrated that are in the C set can be migrated to A j Among the candidate servers with a value of 1, A j Candidate servers with a value of 0 only allow applications that are not in the C set to be migrated to be migrated. So, the above business constraints want to express that applications that are in the C set can be migrated to A. j The candidate server with the value 1, but the application to be migrated does not belong to the C set, cannot be migrated to A j The candidate server is 1.
[0093] It should be noted that the application migration process in this method can be carried out in multiple rounds. That is, the above description only illustrates that the application migration method can determine how to allocate candidate servers to the applications to be migrated through several constraints. In actual applications, in order to improve computing efficiency and reduce computing difficulty, how to allocate candidate servers to the applications to be migrated can be calculated in batches.
[0094] Specifically, some applications to be migrated can be determined from the applications to be migrated as target applications, and with the goal of satisfying the above-mentioned migration constraints (and business constraints) and minimizing the number of servers used to receive the target applications, candidate servers for receiving the target applications can be determined, and the application container maintaining the target application can be migrated to the candidate server corresponding to the target application. Then, some applications to be migrated can be further determined from the remaining applications to be migrated and used as target applications again. With the goal of satisfying the migration constraints and minimizing the number of servers used to receive the target applications, candidate servers for receiving the target application can be determined, and the application container of the target application can be migrated to the candidate server corresponding to the target application, until all applications to be migrated are migrated to the candidate servers.
[0095] That is to say, the process of determining how to migrate each application to be migrated to each candidate server can be carried out in multiple rounds. First, a part of the applications to be migrated is determined, and according to the above three constraints, the candidate servers to which these applications to be migrated should be migrated are determined. After the migration, the part of the applications to be migrated that has not been migrated is determined, and the candidate servers to which these applications to be migrated should be migrated are further determined until all the applications to be migrated are migrated. Figure 2 shown.
[0096] Figure 2 This document provides a flowchart for performing multiple rounds of migration on applications to be migrated.
[0097] from Figure 2 It can be seen that in multiple rounds of migration, it is possible to first determine whether there are servers to be maintained that have not been cleared of applications to be migrated. Then, if so, a round of process of determining candidate servers corresponding to target applications (these target applications are part of the applications to be migrated, and a specified number of applications can be determined from the applications to be migrated as applications to be migrated, or part of the applications to be migrated can be randomly determined as target applications) is carried out. In addition, the servers to be maintained that have been cleared of applications to be migrated in this round can be upgraded and maintained. The servers to be maintained after the upgrade and maintenance can be used as candidate servers for receiving applications to be migrated in the future. The above process is then repeated to determine whether there are servers to be maintained that have not been cleared of applications to be migrated. If so, a new round of process of determining candidate servers corresponding to the target applications is entered. If not, the application migration is terminated.
[0098] It should be noted that since the number of candidate servers may be small and the number of servers to be maintained may be large, when the application migration of a part of the applications to be migrated in a round is completed, there may be some servers to be maintained whose applications to be migrated are cleared. At this time, these servers to be maintained can be upgraded and maintained, and the servers to be maintained after the upgrade and maintenance can be used as candidate servers. In the next round, they can be used to receive the applications to be migrated in the remaining servers to be maintained.
[0099] The method of determining the candidate servers for applications to be migrated in each round is unified, such as Figure 3 shown.
[0100] Figure 3 This is a flowchart of determining candidate servers for applications to be migrated in a single round provided in this specification.
[0101] from Figure 3It can be seen that in the process of determining the candidate servers for applications to be migrated in one round, the above resource constraints, business constraints, and migration constraints can be converted into an integer linear programming problem according to the servers to be maintained for application migration and the candidate servers for receiving applications to be migrated. The candidate servers corresponding to each application to be migrated can then be solved using the branch and bound method.
[0102] As can be seen from the above content, when there are applications to be migrated that need to be migrated, the business platform can determine the migration constraints between the applications to be migrated and each candidate server, and the business constraints between the applications to be migrated, and use the migration constraints and business constraints as constraints, and reduce the number of candidate servers used to migrate the applications to be migrated as the goal, to calculate how to allocate the applications to be migrated to the candidate servers, thereby reducing the cost of application migration and satisfying the constraints required by resources or business in application migration.
[0103] The above is a method for application migration provided in one or more embodiments of this specification. Based on the same idea, this specification also provides an apparatus for application migration, such as Figure 4 shown.
[0104] Figure 4 A schematic diagram of an application migration device provided in this specification specifically includes:
[0105] The server determination module 401 is configured to determine the applications to be migrated contained in the server to be maintained and candidate servers for receiving the applications to be migrated;
[0106] A container determination module 402 is configured to determine, for each application to be migrated, an application container for maintaining the application to be migrated;
[0107] The constraint determination module 403 is used to determine the migration constraints between each application to be migrated and each candidate server;
[0108] The migration module 404 is used to determine the server that receives each application to be migrated from the candidate servers, under the condition that the migration constraints are met and the number of servers used to receive the application to be migrated meets the preset requirements, and for each application to be migrated, migrate the application container of the application to be migrated to the server corresponding to the application to be migrated.
[0109] Optionally, the server determination module 401 is specifically configured to determine a server that matches the server configuration of the server to be maintained as a candidate server for receiving the application to be migrated.
[0110] Optionally, the constraint determination module 403 is specifically used to, for each application to be migrated, determine a candidate server that is not compatible with the application to be migrated according to the configuration information of each candidate server, as the mutually exclusive server corresponding to the application to be migrated; and determine the migration constraints between each application to be migrated and the candidate server according to the mutually exclusive servers corresponding to each application to be migrated.
[0111] Optionally, before determining the server to receive each application to be migrated from the candidate servers, the constraint determination module 403 is also used to determine the business constraints between the applications to be migrated, under the condition that the migration constraints are satisfied and the number of servers used to receive the applications to be migrated meets the preset requirements; the migration module 404 is specifically used to determine the server to receive each application to be migrated from the candidate servers, under the condition that the migration constraints, the business constraints and the number of servers used to receive the applications to be migrated meet the preset requirements, and determine the server to receive each application to be migrated from the candidate servers.
[0112] Optionally, the constraint determination module 403 is also used to determine the business peak period corresponding to each application to be migrated; for each application to be migrated, determine the mutually exclusive application corresponding to the application to be migrated based on the business peak period corresponding to each application to be migrated; and determine the business constraints between the applications to be migrated based on the mutually exclusive applications corresponding to each application to be migrated.
[0113] Optionally, the migration module 404 is specifically used to determine some applications to be migrated from the applications to be migrated as target applications; with the goal of minimizing the number of servers used to receive the target applications, under the condition that the migration constraints are satisfied, determine the candidate servers that receive the target applications, and migrate the application container that maintains the target application to the candidate server corresponding to the target application; continue to determine some applications to be migrated from the remaining applications to be migrated and use them as target applications again, and with the goal of minimizing the number of servers used to receive the target applications, under the condition that the migration constraints are satisfied, determine the candidate servers that receive the target applications, and migrate the application container of the target application to the candidate server corresponding to the target application, until all the applications to be migrated are migrated to the candidate servers.
[0114] This specification also provides a computer-readable storage medium, which stores a computer application. The computer application can be used to execute the above-mentioned application migration method.
[0115] This manual also provides Figure 5 The schematic structure diagram of the electronic device shown in FIG. Figure 5As mentioned above, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and of course may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the above-mentioned application migration method. Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0116] In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures like diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD through their own programming, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly done using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that by simply programming the method flow in one of these hardware description languages and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.
[0117] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to implementing the controller in a purely computer-readable program code format, the controller can be implemented in the form of logic gates, switches, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the means for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the means for implementing various functions can be considered as both a software module implementing the method and a structure within the hardware component.
[0118] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0119] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0120] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0121] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0122] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0123] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0124] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0125] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0126] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0127] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0128] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Thus, this specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0129] This specification may be described in the general context of computer-executable instructions, such as program modules, executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing nodes connected via a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage nodes.
[0130] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.
[0131] The foregoing is merely an example of the present invention and is not intended to limit the present invention. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.
Claims
1. A method for application migration, comprising: Determining applications to be migrated included in the server to be maintained and candidate servers to receive the applications to be migrated; For each application to be migrated, determine an application container for maintaining the application to be migrated; Determining migration constraints between each application to be migrated and each candidate server; the migration constraints are used to characterize the matching relationship between different servers and different applications to be migrated in terms of configuration information and security level; as well as Determine the business constraints existing between the applications to be migrated; the business constraints are used to characterize the conflicts between the business peak periods corresponding to the different applications to be migrated; Under the conditions that the migration constraints, the business constraints and the number of servers used to receive the applications to be migrated meet the preset requirements, a server to receive each application to be migrated is determined from the candidate servers, and for each application to be migrated, the application container of the application to be migrated is migrated to the server corresponding to the application to be migrated.
2. The method of claim 1, wherein determining candidate servers for receiving the application to be migrated comprises: A server that matches the server configuration of the server to be maintained is determined as a candidate server for receiving the application to be migrated.
3. The method according to claim 1, wherein determining the migration constraints between each application to be migrated and each candidate server comprises: For each application to be migrated, determining, based on the configuration information of each candidate server, a candidate server that is not compatible with the application to be migrated as a mutually exclusive server corresponding to the application to be migrated; Migration constraints between each application to be migrated and the candidate server are determined according to mutually exclusive servers corresponding to each application to be migrated.
4. The method according to claim 1, wherein determining the business constraints existing between the applications to be migrated comprises: Determine the peak business period for each application to be migrated; For each application to be migrated, determine the mutually exclusive applications corresponding to the application to be migrated based on the business peak period corresponding to the application to be migrated; Business constraints between the applications to be migrated are determined based on mutually exclusive applications corresponding to the applications to be migrated.
5. The method of claim 1 , wherein, under the conditions that the migration constraint, the business constraint, and the number of servers receiving the applications to be migrated meet a preset requirement, determining a server to receive each application to be migrated from the candidate servers, and migrating, for each application to be migrated, the application container of the application to be migrated to the server corresponding to the application to be migrated, comprises: Determine some applications to be migrated from among the applications to be migrated as target applications; With the goal of minimizing the number of servers used to receive the target application, and subject to the migration constraints and the business constraints, determining candidate servers for receiving the target application, and migrating the application container containing the target application to the candidate server corresponding to the target application; From the remaining applications to be migrated, continue to determine some applications to be migrated and use them as target applications again, and with the goal of minimizing the number of servers used to receive the target applications, determine the candidate servers for receiving the target applications under the condition that the migration constraints and the business constraints are met, and migrate the application container of the target application to the candidate server corresponding to the target application until all the applications to be migrated are migrated to the candidate server.
6. An apparatus for application migration, comprising: A server determination module, configured to determine the applications to be migrated contained in the server to be maintained and candidate servers for receiving the applications to be migrated; A container determination module, configured to determine, for each application to be migrated, an application container for maintaining the application to be migrated; A constraint determination module, configured to determine migration constraints between each application to be migrated and each candidate server; and determining the business constraints existing between the applications to be migrated; the migration constraints are used to characterize the matching relationship between different servers and different applications to be migrated in terms of configuration information and security levels; The business constraint is used to represent the conflict between business peak periods corresponding to different applications to be migrated; The migration module is used to determine the server that receives each application to be migrated from the candidate servers, under the conditions that the migration constraints, the business constraints and the number of servers used to receive the applications to be migrated meet the preset requirements, and for each application to be migrated, migrate the application container of the application to be migrated to the server corresponding to the application to be migrated. 7 . The apparatus according to claim 6 , wherein the server determination module is specifically configured to determine a server that matches a server configuration of the server to be maintained as a candidate server for receiving the application to be migrated.
8. In the device as described in claim 6, the constraint determination module is specifically used to, for each application to be migrated, determine a candidate server that is not compatible with the application to be migrated according to the configuration information of each candidate server, as the mutually exclusive server corresponding to the application to be migrated; and determine the migration constraints between each application to be migrated and the candidate server according to the mutually exclusive servers corresponding to each application to be migrated.
9. In the device as described in claim 6, the constraint determination module is also used to determine the business peak period corresponding to each application to be migrated; for each application to be migrated, determine the mutually exclusive application corresponding to the application to be migrated based on the business peak period corresponding to each application to be migrated; and determine the business constraints between the applications to be migrated based on the mutually exclusive applications corresponding to each application to be migrated.
10. The device as described in claim 6, wherein the migration module is specifically used to determine some applications to be migrated from various applications to be migrated as target applications; with the goal of minimizing the number of servers used to receive the target applications, under the condition that the migration constraints and the business constraints are satisfied, determine the candidate servers for receiving the target applications, and migrate the application container that maintains the target application to the candidate server corresponding to the target application; continue to determine some applications to be migrated from the remaining applications to be migrated and use them as target applications again, and with the goal of minimizing the number of servers used to receive the target applications, under the condition that the migration constraints and the business constraints are satisfied, determine the candidate servers for receiving the target applications, and migrate the application container of the target application to the candidate server corresponding to the target application, until all applications to be migrated are migrated to the candidate servers.
11. A computer-readable storage medium storing a computer application, wherein the computer application implements the method according to any one of claims 1 to 5 when executed by a processor.
12. An electronic device comprising a memory, a processor, and a computer application stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 5 when executing the application.
Citation Information
Patent Citations
Method for migrating application in mobile edge system, and related device and system
CN109076357A