Information recovery method and related equipment

By creating a VMA list corresponding to the previous migration on the destination server and adjusting the container recovery method, the problem of recovery method mismatch during container migration is solved, and the speed of container migration and user experience are improved.

CN120723367APending Publication Date: 2025-09-30CHENGDU HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410381724.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-30
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

During the container migration process, the destination server cannot adaptively adjust the recovery method, resulting in a mismatch between container recovery and container information obtained at different times, reducing the migration effect and possibly causing the migration time and downtime to be too long.

Method used

The destination server receives the memory data from the source server and creates a VMA list corresponding to the last migration. It then adaptively adjusts the container recovery method based on the VMA list relationship, including copying dirty memory pages and releasing unnecessary memory data, to optimize the container migration process.

Benefits of technology

It improves the speed and efficiency of container migration, shortens container recovery time, optimizes user experience, and avoids problems with excessive migration time and downtime.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120723367A_ABST
    Figure CN120723367A_ABST
Patent Text Reader

Abstract

The invention provides an information recovery method and related equipment, relates to the technical field of communication, and can adaptively adjust a mode of recovering a container. In the method, a target server receives first memory data of a first container, and the first memory data comprises a first virtual memory address (VMA) list; the target server creates a second VMA list in memory data of a second container based on the first VMA list, wherein the content of the second VMA list is the same as that of the first VMA list; the target server restores the first container to the second container according to the relation between the second VMA list and a third VMA list on the basis of the first memory data, and the third VMA list is carried in the memory data, received last time, of the first container.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and in particular to an information recovery method and related equipment. Background Art

[0002] With the development of cloud-native technologies, containers are no longer just stateless microservice containers; they can also be used to execute database services and other tasks. Currently, server upgrades, maintenance, and load balancing require server restarts, and container information on the server must be migrated to other servers through container migration. Furthermore, when server resource allocation is uneven, container migration can be used to adjust resource allocation and ensure resource balance. During container migration, the source server sends information about the containers to be migrated, while the destination server receives it. The destination server then restores its own container information based on the received container information.

[0003] Because new information is generated in the source server's container during the migration process, the destination server can migrate the container information multiple times. This involves repeatedly obtaining container information from the source server and then restoring its own container based on that information. However, if the relationship between the container information obtained at different times differs, the destination server cannot adjust its container recovery method. This can cause the container recovery method used by the destination server to mismatch the relationship between the container information obtained at different times, thereby reducing the effectiveness of the container migration.

[0004] Therefore, how the destination server adaptively adjusts the way to restore the container is a technical problem that needs to be solved urgently. Summary of the Invention

[0005] The embodiments of the present application provide an information recovery method and related devices, which can adaptively adjust the method of recovering a container, thereby improving the effect of container migration.

[0006] In a first aspect, the present application provides an information recovery method, which is executed by a destination server, or the method is executed by some components (such as a processor, chip, or chip system) in the destination server, or the method can also be implemented by a logic module or software that can implement all or part of the functions of the destination server. In the first aspect and its possible implementation, the information recovery method is described as being executed by the destination server. The destination server receives first memory data of a first container, and the first memory data includes: a first virtual memory address VMA list; the destination server creates a second VMA list in the memory data of a second container based on the first VMA list, and the content of the second VMA list is the same as the content of the first VMA list; the destination server restores the first container to the second container based on the first memory data and the relationship between the second VMA list and the third VMA list, wherein the third VMA list is carried in the memory data of the first container received last time.

[0007] Based on the above technical solution, in cases where the source server is upgraded and maintained, the container in the source server cannot run the related processes normally. At this time, in order to avoid process interruption, it is necessary to migrate the memory data and other information of the container in the source server to the destination server so that the destination server can run the process. Since the source server will continue to generate new memory data, multiple container migrations are required. In this solution, during this migration process, the destination server receives memory data. For example, the memory data can be the memory data of the container that needs to be migrated on the source server, that is, the memory data of the source container. The memory data includes VMA list 1 for this container migration. The destination server creates VMA list 2 with the same content as VMA list 1 in the memory data of the destination container. During the previous container migration process adjacent to this migration, the destination server also received memory data, and the memory data included VMA list 3. At this time, the destination server can adaptively adjust the way to restore the source container to the destination container based on the relationship between VMA List 2 and VMA List 3. The process of restoring the source container to the destination container is an important process of container migration. Therefore, this solution can avoid the situation where the container recovery process takes too long due to an inappropriate container recovery method, thereby improving the speed of container migration. For example, by determining whether there is an intersection between VMA List 1 and VMA List 2, it is possible to determine the relationship between the current memory data and the previous memory data, for example, whether the current memory data is a dirty memory page relative to the previous memory data. Based on the relationship between the current memory data and the previous memory data, the appropriate method for restoring the current memory data can be quickly determined, thereby saving time for memory data recovery. The recovery of memory data is an important process for container recovery and an important process for container migration, thus saving time for container migration.

[0008] In a specific design, the source server and the destination server can be virtual servers or physical servers.

[0009] In a specific design, the first VMA list is used to indicate a mapping relationship between the first memory data and the physical memory of the first container.

[0010] In a specific design, the first VMA list and the VMAs in the first VMA list include: private file mapping VMAs or anonymous private VMAs.

[0011] In a specific design, the destination server receives the first memory data of the first container, creates the second VMA list, and restores the first container to the second container, which constitutes this container migration. In a more specific design, this container migration includes: the source server copies (dumps) the container information to a mirror file, and the container information includes: the first memory data and the first process number information; the source server sends the mirror file to the destination server, and the destination server receives the mirror file accordingly. At this time, since the mirror file includes the first memory data, the destination server also receives the first memory data, and the destination server creates the second VMA list in the second container according to the first VMA list in the first memory data; the destination server restores the first container to the second container based on the first memory data and the relationship between the second VMA list and the third VMA list.

[0012] In a specific design, the source server can send the mirror file to the destination server in a shared storage manner.

[0013] In one specific design, multiple container migrations are sorted chronologically, with the previous container migration being the one that occurred before and most recently after the current migration. For example, if the current container migration is the third of multiple container migrations, the previous container migration is the second.

[0014] In one specific design, the processes for the previous container migration and the current container migration are the same, but the migrated container information is different. The container information for the previous container migration includes memory data and second process count information. The container information for the previous container migration is the container information of the first container at the time of the previous dump. Accordingly, the memory data received by the destination server at the previous dump was the memory data of the first container at the time of the previous dump. The container information for the current container migration is the container information of the first container at the time of the current dump. Therefore, the memory data received by the destination server this time is the memory data of the first container at the time of the current dump.

[0015] In a specific design, container migration can be divided into full migration and incremental migration. When performing the first container migration among multiple container migrations, a full migration can be performed, that is, all container information of the first container of the source server at the dump time can be migrated to the destination server. In a specific design, the above-mentioned adjacent previous container migration can be a full migration. After the first migration, an incremental migration can be performed, that is, the container information added at the time of this dump compared to the time of the previous dump can be migrated. In a specific design, this container migration can be an incremental migration. In a specific design, the above-mentioned adjacent previous container migration can also be an incremental migration.

[0016] In a specific design, the destination server creates a second VMA list in the memory data of the second container based on the first VMA list by re-memory mapping (mmap) function.

[0017] In one specific design, during a previous container migration, the destination server receives memory data including a third VMA list. The destination server creates a fourth VMA list based on the third VMA list. In a more specific design, the destination server may also restore the first container to the second container based on the first memory data and the relationship between the second VMA list and the fourth VMA list.

[0018] In a specific design, the first VMA list and the VMAs in the first VMA list include: private file mapping VMAs or anonymous private VMAs.

[0019] In a possible implementation of the first aspect, the destination server restores the first container to the second container based on the first memory data and according to whether there is an intersection between the second VMA list and the third VMA list.

[0020] Based on the above technical solution, the destination server can quickly determine a suitable method for restoring the first container to the second container based on whether there is an intersection between the second VMA list and the third VMA list. By selecting an appropriate recovery method, the time required for container recovery can be shortened. For example, the destination server can determine whether the first memory data is a dirty memory page based on whether there is an intersection between the second VMA list and the third VMA list. If it is a dirty memory page, the corresponding recovery method is to copy the dirty memory page to the second container. If it is not a dirty memory page, the corresponding recovery method is to reuse the memory data of the previous adjacent container migration. In this case, the memory data of the previous container migration does not need to be copied to the second container, thereby saving time for container recovery.

[0021] In a specific design, the destination server restores the process number information of the second container based on the relationship between the first process number information and the second process number information.

[0022] In a specific design, the destination server determines the newly added process number information, reduced process number information, and unchanged process number information of the first process number information compared to the second process number information. For the newly added process number information, the process number information is copied. For the reduced process number information, that is, the process number information that exists in the second process number information but does not exist in the first process number information, and for the unchanged process number information, the process number information in the second process number information that is the same as that in the first process number information is retained.

[0023] In a possible implementation of the first aspect, when the second VMA list includes the first VMA and there is no intersection between the first VMA and the third VMA list, the destination server copies the second memory data to the memory data corresponding to the second container, and the second memory data is the memory data in the first memory data corresponding to the first VMA.

[0024] The above technical solution uses the first VMA as an example. This solution can search for all VMAs in the second VMA list that do not intersect with any VMAs in the third VMA list, thereby quickly locating dirty pages and copying them to restore the memory data. Locating dirty pages is a crucial component of incremental migration in container migration. This solution shortens the time required to locate dirty pages in memory data, and to a certain extent, also shortens the time required for container migration.

[0025] In a specific design, the destination server can traverse the third VMA list based on the first VMA to determine whether there is a VMA identical to the first VMA in the third VMA list. If not, it can be determined that the first memory data is a dirty memory page.

[0026] In a possible implementation manner of the first aspect, when the third VMA list includes the second VMA and the second VMA has no intersection with the first VMA list, the destination server releases the second VMA.

[0027] Based on the above technical solution, compared with the solution of determining whether memory data needs to be released based on process-related information, this solution can quickly determine whether the second VMA needs to be released based on the relationship between the second VMA and the second VMA list. When the VMA is released, the corresponding memory data is also released. In this way, the VMA that needs to be released can be quickly found, thereby releasing the memory data that is not needed this time. For example, the released memory data may be memory data that was not received this time but was received last time. This type of memory data is memory data that is not needed this time.

[0028] In a specific design, the destination server can traverse the second VMA list and the third VMA list at the same time, so as to determine which VMAs in the second VMA list correspond to memory data that are memory increments, and which VMAs in the third VMA list are VMAs that need to be released.

[0029] In a specific design, the destination server can release the third VMA through the munmap function.

[0030] In a possible implementation of the first aspect, when the second VMA list includes a third VMA, and the third VMA and the third VMA list have an intersection, the destination server establishes a mapping relationship between the physical page information corresponding to the intersection and the third VMA, and the physical page information is carried in the memory data of the first container received last time.

[0031] Based on the above technical solution, when the first VMA contains the second VMA, this solution can establish the relationship between the previous memory data and this time by pre-mapping the physical page information, that is, pre-mapping the previous physical page information, that is, establishing an index of the previous memory data in this time. Since the previous memory data already exists in the destination server, by establishing the index, the destination server can call the previous memory data this time.

[0032] In a specific design, the physical page information includes: a flag, which is used to indicate whether the memory data corresponding to the VMA has changed. The destination server can further determine whether the first memory data is a dirty memory page based on the flag.

[0033] In a specific design, the intersection between the third VMA and the third VMA list includes: the fourth VMA in the third VMA list is identical to the third VMA. The fourth VMA and the third VMA are identical when the first VMA is unchanged from the previous VMA, i.e., the same VMA is used both this time and the previous time, or the source server mmaps the VMA in the original virtual address range after unmapping the memory (munmap) function, i.e., the fourth VMA and the third VMA share the same virtual address range. In a specific design, the destination server can pre-map physical page information to the first VMA through mremap, i.e., establish a mapping relationship between the physical page information and the first VMA.

[0034] In a possible implementation of the first aspect, the destination server determines whether the third memory data is a dirty memory page based on the physical page information, and the third memory data is the memory data corresponding to the third VMA in the first memory data; when the third memory data is a dirty memory page, the destination server copies the third memory data to the memory data corresponding to the second container.

[0035] Based on the above technical solution, when the third VMA and the third VMA list intersect, this solution further determines whether the memory data has changed based on the VMA information and the physical page information, thereby determining whether the first memory data is a dirty page. This solution is applicable when the VMA portion of the intersection has not changed, that is, the mapping relationship between the VMA and the virtual memory has not changed, but the stored memory data may have changed. This improves the accuracy of dirty page determination and avoids the situation where dirty pages generated by the first container during container migration are not migrated to the second container.

[0036] In a specific design, the destination server may first establish a relationship between the physical page information and the third VMA, and then determine whether the first memory data is a dirty memory page based on the physical page information. Alternatively, the destination server may first determine whether the first memory data is a dirty memory page based on the physical page information, and determine whether the memory data included in the first memory data is the same as the current memory data, and then establish a mapping relationship between the physical page information corresponding to the same memory data and the third VMA.

[0037] The second aspect of the present application provides an information processing method, which is executed by a source server, or the method is executed by some components in the source server (such as a processor, a chip or a chip system, etc.), or the method can also be implemented by a logic module or software that can realize all or part of the source server functions. In the second aspect and its possible implementation, the information recovery method is described as being executed by the source server as an example, the source server obtains the first memory data of the first container; the source server determines whether the first condition is met based on the first memory data, and the first condition includes: a total migration time constraint, a dirty page rate constraint or a downtime constraint; when the first condition is met, the source server obtains the second memory data of the first container; the source server copies the second memory data and sends the copied second memory data to the destination server, wherein the second memory data includes: a first VMA list, a first process is in a downtime state during the copying process and the sending process, and the first process is the process that generates the first memory data.

[0038] In the above technical solution, a first condition is introduced, and whether the first condition is met is determined based on the first memory data. Only when the condition is met is the last container migration executed, that is, the migration of the second memory data mentioned above. During the last container migration, the process is in a shutdown state. The time when the last container migration is started is correlated with the total migration duration, etc. For example, the earlier the last container migration is started, the fewer the number of container migrations, and accordingly, the shorter the total migration duration. Therefore, controlling the time when the last container migration is executed can control the total migration duration during the container migration process. The earlier the last container migration is started, the smaller the number of container information iterations, and the higher the dirty page rate of the memory data. It can be seen that controlling the time when the last container migration is executed can control the dirty page rate; the earlier the last container migration is started, the smaller the number of container information iterations, and the larger the size of the memory dirty pages of the memory data. Accordingly, the time used to recover the memory dirty pages during the last migration will be longer, and the shutdown time is equal to the time of the last migration. Therefore, controlling the time when the last container migration is executed can control the shutdown time. This solution introduces the first constraint to control the start time of the last container migration, thereby controlling the total migration duration, dirty page rate, and downtime. This avoids problems such as excessive total migration duration, excessive dirty page rate, and excessive downtime, and optimizes the user experience during container migration.

[0039] In a specific design, the first condition can be a factory default configuration or user-defined. For example, user-defined constraints include: the total migration time does not exceed 1 second, the dirty page rate does not exceed 2%, and the downtime does not exceed 0.5 seconds.

[0040] In a possible implementation of the second aspect, the source server obtains third memory data of the first container at a current moment; the source server determines whether the first condition is met based on the first memory data, including: the source server determines whether the first condition is met based on a relationship between the first memory data and the third memory data.

[0041] In a possible implementation manner of the second aspect, the source server determines a memory dirty page of the third memory data relative to the first memory data; and the source server determines whether the first condition is satisfied based on the memory dirty page.

[0042] Based on the above technical solution, by determining the memory dirty pages of the third memory data relative to the first memory data, the memory data increment, that is, the memory dirty pages, can be obtained. According to the memory dirty pages, the migration time or downtime required for the last container migration can be predicted. The so-called last migration refers to the container migration in which the process needs to be frozen. Based on this prediction, it can be determined whether the first condition is met, thereby determining whether the current moment is suitable for executing the last migration.

[0043] In a possible implementation of the second aspect, the first condition is the total migration duration constraint, and the source server determines the first duration required to migrate the dirty memory page based on the size of the dirty memory page; the source server takes the sum of the second duration and the first duration as the first total migration duration, and the second duration is the duration consumed for migrating the information of the first container to the second container; the source server determines whether the first total migration duration meets the total migration duration constraint.

[0044] Based on the above technical solution, the source server combines the predicted duration of dirty memory page migration with the duration already consumed by container migration as the total duration of the first migration, and determines whether the first total migration duration meets the total migration duration constraint. Therefore, if the user requires a limited total migration duration, the final container migration can be initiated promptly when the migration duration approaches the user-set total migration duration constraint, ensuring that the total migration duration remains manageable.

[0045] In a possible implementation of the second aspect, the first condition is the downtime constraint, and the source server determines the first time required to migrate the dirty memory page based on the size of the dirty memory page; the source server uses the first time as the first downtime; the source server determines whether the first downtime satisfies the downtime constraint.

[0046] Based on the above technical solution, the source server uses the predicted duration of the migration of dirty memory pages as the downtime duration, achieving downtime estimation. Therefore, if the user requires a limited downtime, the last container migration can be started only when the downtime approaches the user-set downtime constraint. This avoids the problem of the last migration being delayed due to excessive dirty memory pages, shortening downtime and improving the user experience.

[0047] In a specific design, the source server receives the third memory data and restores the second container according to the third memory data. During this restoration process, the second container is in a suspended state.

[0048] In a specific design, after the source server completes recovery of the second container based on the third memory data, the source server can start the process of the second container.

[0049] The third aspect of the present application provides an information processing system, the method comprising: a source server and a destination server, wherein the source server can execute the method described in the second aspect and any possible implementation or design thereof, and the destination server can execute the method described in the first aspect and any possible implementation or design thereof. When the source server executes the method described in the second aspect, the source server can send the second memory data to the destination server, and the destination server accordingly receives the second memory data; the destination server creates a second VMA list in the memory data of the second container based on the first VMA list, the content of the second VMA list being the same as the content of the first VMA list; the destination server restores the first container to the second container based on the second memory data and according to the relationship between the second VMA list and the third VMA list, wherein the third VMA list is carried in the memory data of the first container received the previous time.

[0050] In a fourth aspect of the present application, a communication device is provided, which includes a transceiver unit and a processing unit, and is used to perform all or part of the operations described in the first or second aspects. The communication device can be a terminal device such as a computer, or a component of the terminal device for performing related operations, such as a line card, an interface board, etc., or a chip system for performing related operations, which can include one or more chips. When the communication device is a chip system, the transceiver unit and the processing unit can be, for example, the interface circuit of the chip, and the processing unit can be, for example, the processing circuit of the chip.

[0051] For example, when executing the method of the first aspect, the transceiver unit is configured to receive first memory data of a first container, where the first memory data includes: a first virtual memory address VMA list; the destination server creates a second VMA list in the memory data of the second container based on the first VMA list, where the content of the second VMA list is the same as the content of the first VMA list; and the processing unit is configured to restore the first container to the second container based on the first memory data and according to a relationship between the second VMA list and a third VMA list, where the third VMA list is carried in the memory data of the first container received last time.

[0052] In a possible implementation manner of the fourth aspect, the processing unit is specifically configured to: the destination server restores the first container to the second container based on the first memory data and according to whether there is an intersection between the second VMA list and the third VMA list.

[0053] In a possible implementation of the fourth aspect, the processing unit is specifically configured to: when the second VMA list includes the first VMA and the first VMA does not intersect with the third VMA list, copy the second memory data to the memory data corresponding to the second container, where the second memory data is the memory data in the first memory data corresponding to the first VMA.

[0054] In a possible implementation manner of the fourth aspect, the processing unit is specifically configured to: when the third VMA list includes the second VMA and the second VMA has no intersection with the first VMA list, release the second VMA.

[0055] In a possible implementation of the fourth aspect, the processing unit is specifically configured to: when the second VMA list includes a third VMA and the third VMA has an intersection with the third VMA list, establish a mapping relationship between physical page information corresponding to the intersection and the third VMA, where the physical page information is carried in the memory data of the first container received last time.

[0056] In a possible implementation of the fourth aspect, the processing unit is specifically used to: determine whether the third memory data is a dirty memory page based on the physical page information, and the third memory data is the memory data corresponding to the third VMA in the first memory data; when the third memory data is a dirty memory page, copy the third memory data to the memory data corresponding to the second container.

[0057] For example, when executing the method of the second aspect, the transceiver unit is used to obtain the first memory data of the first container; the processing unit is used to determine whether the first condition is met based on the first memory data, and the first condition includes: a total migration time constraint, a dirty page rate constraint or a downtime constraint; when the first condition is met, the transceiver unit is also used to obtain the second memory data of the first container; the processing unit is also used to copy the second memory data and send the copied second memory data to the destination server, wherein the second memory data includes: a first VMA list, and the first process is in a downtime state during the copying process and the sending process, and the first process is the process that generates the first memory data.

[0058] In a possible implementation of the fourth aspect, the transceiver unit is further configured to obtain third memory data of the first container at a current moment; and the calling processing unit determines whether the first condition is met based on a relationship between the first memory data and the third memory data.

[0059] In a possible implementation manner of the fourth aspect, the processing unit is further configured to determine a memory dirty page of the third memory data relative to the first memory data; and determine whether the first condition is satisfied based on the memory dirty page.

[0060] In a fifth aspect, the present application provides a communication device comprising a processor and a communication interface. The communication interface is configured to receive or transmit external communication signals and transmit received communication signals to the processor; the processor is configured to execute the method described in the first or second aspect and any possible implementation or design thereof.

[0061] In a specific design, the processor is coupled to a memory, for example, the memory is used to store programs or instructions. The at least one processor is used to execute the program or instructions so that the device implements all or part of the operations of the method described in the first aspect or the second aspect and any possible implementation thereof.

[0062] In a sixth aspect, the present application provides a computer-readable storage medium storing a program or instruction. When the program or instruction runs on a processor, the method described in the first aspect or the second aspect and any possible implementation thereof is executed.

[0063] In a seventh aspect, the present application provides a computer program product, including a program or instructions, which, when executed on a processor, implements all or part of the operations of the method described in the first or second aspect and any possible implementation thereof.

[0064] In a specific implementation, the computer program product may be the computer-readable storage medium mentioned in the fourth aspect above.

[0065] In an eighth aspect, the present application provides a chip system comprising at least one processor for supporting all or part of the functions of a communication device as described in the first or second aspect and any possible implementation or design thereof.

[0066] Among them, the technical effects brought about by any design method from the third aspect to the eighth aspect can be referred to the technical effects brought about by the above-mentioned first aspect or second aspect and any possible implementation method or design method, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] Figure 1 A schematic diagram of a system architecture provided in an embodiment of the present application;

[0068] Figure 2 A schematic diagram of a container cluster management platform provided in an embodiment of the present application;

[0069] Figure 3 A flowchart of the method 100 provided in an embodiment of the present application;

[0070] Figure 4 A schematic diagram of VMA information provided in an embodiment of the present application;

[0071] Figure 5 This is a schematic diagram of the execution process of container migration according to an embodiment of the present application;

[0072] Figure 6 This embodiment of the present application is a schematic diagram of full migration and incremental migration in container migration;

[0073] Figure 7 A flowchart of method 100 is provided for an embodiment of the present application;

[0074] Figure 8 This is a schematic diagram of a state of a third server during container migration according to an embodiment of the present application;

[0075] Figure 9 This is a schematic diagram of the state of a destination server in a container migration according to an embodiment of the present application;

[0076] Figure 10 is a flow chart of Example 1;

[0077] Figure 11 is a flow chart of Example 2;

[0078] Figure 12 A schematic structural diagram of a communication device provided in an embodiment of the present application;

[0079] Figure 13 This is another structural diagram of a communication device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0080] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0081] The following are some terms involved in the embodiments of this application for explanation.

[0082] (1) Containerization technology refers to the technology that packages application software code and required components, such as libraries, frameworks, and other dependencies, and isolates them in their own containers. Containers can isolate the application software within the container from the surrounding computing environment or infrastructure used to host the container. Therefore, application software developed based on containerization technology can run on any environment and infrastructure. Containerization technology can be used to create new, scalable cloud-native applications and transform traditional systems.

[0083] (2) Container migration: also known as container migration, dynamic migration, and real-time migration, that is, saving or restoring a program or virtual machine. Usually, the running status of the entire virtual machine is completely saved, and it can be quickly restored to the original hardware platform or even a different hardware platform.

[0084] (3) Dump: Also known as copy, replication, or persistence, a dump is a snapshot of a process or system at a given time. The dump file contains information such as the number of running processes and memory data. In this solution, copy is used to refer to dump.

[0085] The following is an example of the system architecture on which the embodiments of the present application are based.

[0086] This solution can be applied to Figure 1 The system 1000 shown includes a source server 101 or a destination server 102. The source server 101 includes a container 1 and a container 2, and the destination server 102 includes a container 3 and a container 4.

[0087] Optionally, the source server 101 and the destination server 102 may include: a virtual server, a physical server, a backend server, a cloud server, a computing server, a routing server or a switching server, etc.

[0088] Optionally, the container information migration in this solution can be applied to a variety of scenarios. For example, if container 1 is located on source server 101 and container 3 is located on destination server 102, the information of container 1 is migrated to container 3. In this case, source server 101 and destination server 102 can be located on the same device or on different devices, which is not limited here. For example, container 1 and container 2 can both be located on the source server, in which case the information of container 1 is migrated to container 2.

[0089] The following is an example of the container cluster management platform based on which the embodiments of the present application are based.

[0090] This solution can be applied to container cluster management platforms. On these platforms, the node agent component is responsible for running container instances within the container cluster. This node agent interacts with the container engine, which then calls the CRIU. The following example uses Kubernetes (K8s) as an example. Kubernetes consists of a control layer, a scheduling layer, and an execution layer.

[0091] Optionally, the control layer includes: a Kubernetes Application Programming Interface server (kube-apiserver), a Kubernetes controller (kube-controller), and a Kubernetes scheduler (kube-scheduler). The control layer is the control plane of Kubernetes and can design resource scheduling and execute container migration scheduling based on Kubernetes Custom Resource Definitions (CRDs).

[0092] Optionally, the scheduling layer includes a migrate Custom Resource Definition (migrate CRD) and a migrate operator. Tasks performed by the scheduling layer include defining the container migration CRD and implementing the container migration operator. The scheduling layer can also identify container migration tasks sent by the execution layer.

[0093] Optionally, the execution layer includes: kubelet, container runtime, and checkpoint / restore in userspace (CRIU). Kubelet is used for container lifecycle management. Kubelet can issue start and stop commands based on cluster information. Container engine (container runtime) is the software that implements this interface specification. Kubelet can call the container engine, which then starts or stops the container. The container engine can also call CRIU to enable CRIU to perform specific container migrations, including dumping container information at the source node, storing migrated container information at the destination node, and synchronizing node container status to the execution layer.

[0094] when Figure 1 As shown, when the source server 101 is upgraded, maintained, or load balanced, it needs to be restarted. The container information in the source server needs to be migrated to the destination server 102 through container migration. At the same time, when the server resource allocation is unbalanced, the resource allocation can also be adjusted through container migration to ensure resource balance. During the container migration process, the source server 101 is the sender of the container information to be migrated, and the destination server 102 is the destination of the container information to be migrated. The destination server 102 needs to restore its own container based on the container information.

[0095] Because new information is generated in the container of source server 101 during the migration process, destination server 102 can migrate the container information multiple times, i.e., obtain container information from source server 101 multiple times and then restore its own container based on this container information. If the relationship between the container information obtained at different times differs, destination server 102 cannot adjust the container recovery method. This may result in the container recovery method used by destination server 102 not matching the relationship between the container information obtained at different times, thereby reducing the effectiveness of the container migration.

[0096] Therefore, how the destination server adaptively adjusts the way to restore the container is a technical problem that needs to be solved urgently.

[0097] Furthermore, during container migration, new data is generated during the container migration process, and multiple container migrations are required after the first migration to migrate the newly generated data to the destination server 102. However, if multiple migrations are performed, the migration time may be too long, and during the last migration of these multiple container migrations, the corresponding process needs to be stopped to avoid generating memory dirty pages. If the downtime is too long, it may affect the user experience.

[0098] Therefore, how to avoid long migration time and long downtime during container migration is a technical problem that needs to be solved urgently.

[0099] In order to solve the problem that the destination server cannot adaptively adjust the way to restore the container, the embodiment of the present application provides an information recovery method 100, which can be applied to Figure 1 The system shown and Figure 2 The container cluster management platform shown in the figure. When this method is applied to Figure 1 In the scenario shown, the destination server can be Figure 1 The first container can be the container 1 or container 2 of the source server 101, and the second container can be the container 3 or container 4 of the destination server 102, or the container 1 or container 2 of the source server 101. Figure 2 When using the container cluster management platform shown, kubelet, container engine, and CRIU can be configured on the destination server. In method 100, the method for restoring container information is determined based on the relationship between the second VMA list and the third VMA list. Therefore, when the relationship between the second VMA list and the third VMA list changes, the method for restoring the container is adaptively adjusted to achieve better container migration results.

[0100] The following combination Figure 3 , to specifically introduce the method 100 provided in the embodiment of the present application. It should be noted that, Figure 3 The method is illustrated by taking the destination server as the execution subject of the interactive indication as an example, but the present application does not limit the execution subject of the interactive indication. Figure 3 In the corresponding embodiments, the execution subject in S301-S303 is the destination server. The execution subject can also be a chip, chip system, or processor that supports the destination server to implement the method, or a logic module or software that can implement all or part of the destination server functions. Figure 3 In the corresponding embodiments, the destination server in S301-S303 can also be replaced by a chip, chip system, or processor that supports the destination server to implement the method, and can also be replaced by a logic module or software that can implement all or part of the controller functions.

[0101] like Figure 3 As shown, the method 100 provided in the embodiment of the present application includes the following steps:

[0102] Step S301: The destination server receives first memory data of a first container;

[0103] It should be noted that the first memory data includes: a first virtual memory address VMA list.

[0104] It should be noted that VMA can also be called virtual memory area. Figure 4 For example, a VMA includes vm_start and vm_end, where vm_start is the starting address of the virtual address area and vm_end is the ending address of the virtual address area. VMA_start and VMA_end can be mapped to a part of the process virtual memory. In other words, the VMA can be used to identify a continuous memory range in the process virtual memory. For example, vm_start can be 0x08d83000 and vm_end can be 0x08d88000. In this case, the VMA is used to identify the memory range 0x08d83000-0x08d88000 in the process virtual memory.

[0105] Optionally, the first VMA list is used to indicate a mapping relationship between the first memory data and the physical memory of the first container.

[0106] Optionally, the first VMA list and the VMAs in the first VMA list include: private file mapping VMAs or anonymous private VMAs.

[0107] Optionally, in addition to receiving the first memory data, the destination server also receives other container information of the first container, where the container information of the first container includes: the first memory data or the first process number information.

[0108] Optionally, the above-mentioned destination server receives the first memory data of the first container, creates the second VMA list, and restores the first container to the second container, etc., which constitute this container migration. In a more specific design, this container migration includes: the source server dumps the container information into a mirror file, and the container information includes: the first memory data and the first process number information; the source server sends the mirror file to the destination server, and the destination server receives the mirror file accordingly. At this time, since the mirror file includes the first memory data, the destination server also receives the first memory data, and the destination server creates the second VMA list in the second container according to the first VMA list in the first memory data; the destination server restores the first container to the second container based on the first memory data and the relationship between the second VMA list and the third VMA list.

[0109] Optionally, the source server may send the mirror file to the destination server in a shared storage manner.

[0110] Optionally, multiple container migrations are sorted in chronological order, where the previous container migration is the one that occurred before the current container migration and is closest to the current container migration. For example, if the current container migration is the third container migration among multiple container migrations, the previous container migration is the second container migration.

[0111] Optionally, the process for the previous container migration is the same as that for the current container migration, but the migrated container information is different. The container information for the previous container migration includes memory data and information about the number of second processes. The container information for the previous container migration is the container information of the first container at the time of the previous dump, while the container information for the current container migration is the container information of the first container at the time of the current dump. Accordingly, the memory data for the previous container migration is the memory data of the first container at the time of the previous dump.

[0112] Optionally, container migration can be divided into full migration and incremental migration. When performing the first container migration among multiple container migrations, a full migration can be performed, that is, all container information of the first container on the source server at the dump time is migrated to the destination server. Optionally, the previous container migration can be a full migration. After the first migration, an incremental migration can be performed, that is, the container information added at the time of this dump compared to the previous dump time. Optionally, this container migration can be an incremental migration, and optionally, the previous container migration can also be an incremental migration.

[0113] like Figure 5 As shown, Figure 5The migration process on the left side of the center is a full migration. The source server dumps all container information for the first container and then transmits the dumped information to the destination server. Image transfer involves saving all container information to an image file and then transmitting it to the destination server. The source server then performs a full restore based on the received image file. After multiple incremental migrations, the source server performs a final container migration. Alternatively, the source server can perform the final container migration directly after performing a full migration. Figure 5 The migration process on the left side of the center represents the final container migration. Specifically, the source server dumps the new container information for the first container relative to the previous dump, such as the increment in memory data and the increment in the number of processes. The dumped information is then mirrored and transmitted to the destination server. The destination server then performs incremental recovery based on the received image file. Incremental recovery involves restoring the first container's container information to the second container based on the received new container information.

[0114] Figure 6 This is a schematic diagram of the full migration and the last incremental migration process, as shown in Figure 6 As described above, multiple container incremental migrations can be performed before the full migration and the last incremental migration. The source server is in a running state before the last container migration begins. When entering the last container migration, the source server is in a shutdown state.

[0115] In a specific design, the first VMA list is used to indicate a mapping relationship between the first memory data and the physical memory of the first container.

[0116] Step S302: The destination server creates a second VMA list in the memory data of the second container based on the first VMA list.

[0117] It should be noted that the content of the second VMA list is the same as the content of the first VMA list. When the destination server receives the VMA list of the first container.

[0118] Optionally, the destination server may create a second VMA list based on the received first VMA list using mmap. mmap is a memory mapping method. In this solution, mmap may map the first VMA list to a virtual memory address in the virtual address space of the destination server, thereby obtaining the second VMA list.

[0119] Optionally, during a previous container migration, the destination server receives memory data including a third VMA list. The destination server creates a fourth VMA list based on the third VMA list. In a more specific design, the destination server may also restore the first container to the second container based on the first memory data and the relationship between the second VMA list and the fourth VMA list.

[0120] Step S303: The destination server restores the first container to the second container based on the first memory data and the relationship between the second VMA list and the third VMA list.

[0121] It should be noted that the third VMA list is carried in the memory data of the first container received last time.

[0122] Optionally, the destination server restores the first container to the second container based on the container information and according to the relationship between the second VMA list and the third VMA list.

[0123] Optionally, in step S303, the destination server restores the first container to the second container based on the first container's container information. That is, the second container's information is restored based on the first container's container information. Generally speaking, this restoration process ensures that the final second container information includes the first container's container information. The relationship between the second VMA list and the third VMA list also affects the restoration of the second container's information. This relationship is primarily used by the destination server to determine how to restore the second container's information.

[0124] Optionally, this solution can have two ways to determine the relationship between the second VMA list and the third VMA list. The first is to use the VMAs in the second VMA list as a reference. For example, the second VMA list includes the first VMA. In this case, the third VMA list is traversed based on the first VMA to find out whether there are any VMAs that intersect with the first VMA or have an inclusion relationship with the first VMA. The second is to use the VMAs in the second VMA list as a reference. For example, the second VMA list includes the third VMA. In this case, the second VMA list is traversed based on the third VMA to find out whether there are any VMAs that intersect with the first VMA. This solution does not limit which specific method is used. These two methods can be used separately or simultaneously. When used simultaneously, the first method can be used to determine whether the first memory data corresponding to the first VMA is a dirty memory page that needs to be copied, and the first method can be used to determine whether the third VMA needs to be released.

[0125] It should be noted that, for ease of description, the first VMA, the third VMA, and the second VMA in the second VMA list are used as examples. However, this solution does not limit the second VMA list to only include the first VMA and the third VMA, nor does it limit the determination of the relationship between the first and third VMA lists to the first and third VMAs. Similarly, the second VMA is also an example and does not constitute a limitation on the determination process of the relationship between the first and third VMA lists. The following specifically describes several possible relationships between the VMAs in the second and third VMA lists:

[0126] The first is that the first VMA in the second VMA list does not intersect with the third VMA list, i.e., the first VMA exists in the current VMA list but does not intersect with the previous VMA list. In one possible implementation, when the second VMA list includes the first VMA and the first VMA does not intersect with the third VMA list, the destination server copies the second memory data to the memory data corresponding to the second container. The second memory data is the memory data in the first memory data corresponding to the first VMA.

[0127] It should be noted that a dirty memory page refers to the memory data in the first container that has been added since the last copy of the container information. For example, during the first container migration, server 1 copies container information 1. During the second container migration, server 1 copies container information 2. The increase in memory data in information 2 relative to the memory data in information 1 is called a dirty memory page. Dirty memory pages can also be referred to as dirty memory data, dirty physical pages, or dirty pages.

[0128] To help understand the above implementation, for example, the first VMA is 0x08d83000-0x08d88000, and there are only two VMAs in the third VMA list, namely 0x08d81000-0x08d82000 and 0x08d89000-0x08d90000. At this time, these two VMAs have no intersection with the first VMA, which means that the first memory data corresponding to the first VMA is a dirty memory page.

[0129] It can be seen that when any VMA in the third VMA list does not have an intersection with the first VMA, the first memory data can be directly determined to be a dirty memory page based on the relationship between the VMAs. As mentioned above, the first VMA is used as an example here. In this solution, all VMAs in the second VMA list that do not have an intersection with any VMA in the third VMA list can be searched, so as to quickly locate which memory data are dirty memory pages, and then copy the dirty memory pages to achieve recovery of the memory data. The location of dirty memory pages is an important part of incremental migration in container migration. This solution shortens the time used to locate dirty memory pages in memory data, and also shortens the time used for container migration to a certain extent.

[0130] Optionally, the destination server may traverse the third VMA list based on the first VMA to determine whether a VMA identical to the first VMA exists in the third VMA list. If not, it may be determined that the first memory data is a dirty memory page.

[0131] The second type is when the second VMA in the third VMA list does not intersect with the second VMA list, i.e., the second VMA exists in the previous VMA list but does not intersect with the current VMA list. In one possible implementation, when the third VMA list includes the second VMA and the second VMA does not intersect with the first VMA list, the destination server releases the second VMA.

[0132] Based on the above technical solution, compared with the solution of determining whether memory data needs to be released based on process-related information, this solution can quickly determine whether the second VMA needs to be released based on the relationship between the second VMA and the second VMA list. When the VMA is released, the corresponding memory data is also released. In this way, the VMA that needs to be released can be quickly found, thereby releasing the memory data that is not needed this time. For example, the released memory data may be memory data that was not received this time but was received last time. This type of memory data is memory data that is not needed this time.

[0133] Optionally, the destination server may traverse the second VMA list and the third VMA list simultaneously, thereby determining which VMAs in the second VMA list correspond to memory data that are memory increments, and which VMAs in the third VMA list are VMAs that need to be released.

[0134] Optionally, the destination server may release the third VMA through a munmap function.

[0135] The third type is when the third VMA in the second VMA list intersects with the third VMA list, i.e., the third VMA exists in the current VMA list and intersects with the previous VMA list. In one possible implementation, when the second VMA list includes the third VMA and the third VMA intersects with the third VMA list, the destination server establishes a mapping relationship between the physical page information corresponding to the intersection and the third VMA. The physical page information is carried in the memory data of the first container received the previous time.

[0136] It's important to note that a physical page is the smallest unit of memory management in the Linux kernel. Specifically, the smallest unit of physical memory managed by the CPU is a page. The Linux kernel uses a page structure (struct page) to describe a physical page. Physical page information is a portion of physical memory, and the physical page information contains an identifier that indicates whether memory data has changed.

[0137] Based on the above technical solution, when the first VMA contains the second VMA, this solution can establish the relationship between the previous memory data and this time by pre-mapping the physical page information, that is, pre-mapping the previous physical page information, that is, establishing an index of the previous memory data in this time. Since the previous memory data already exists in the destination server, by establishing the index, the destination server can call the previous memory data this time.

[0138] In a specific design, the destination server may establish a mapping relationship between the physical page information corresponding to the intersection and the third VMA by means of mremap.

[0139] In one possible implementation, the destination server determines whether the third memory data is a dirty memory page based on the physical page information, and the third memory data is the memory data corresponding to the third VMA in the first memory data; when the third memory data is a dirty memory page, the destination server copies the third memory data to the memory data corresponding to the second container.

[0140] Based on the above technical solution, when the third VMA and the third VMA list intersect, this solution further determines whether the memory data has changed based on the VMA information and the physical page information, thereby determining whether the first memory data is a dirty page. This solution is applicable when the VMA portion of the intersection has not changed, that is, the mapping relationship between the VMA and the virtual memory has not changed, but the stored memory data may have changed. This improves the accuracy of dirty page determination and avoids the situation where dirty pages generated by the first container during container migration are not migrated to the second container.

[0141] Optionally, the physical page information includes: a flag, which is used to indicate whether the memory data corresponding to the VMA has changed. The destination server can further determine whether the first memory data is a dirty memory page based on the flag.

[0142] It should be noted that this solution does not limit the order of the two steps of pre-mapping the physical page information and determining whether the first memory data is a dirty memory page. For example, the destination server can first establish the relationship between all the physical page information and the third VMA, and then determine whether the first memory data is a dirty memory page based on the physical page information. It can also first determine whether the first memory data is a dirty memory page based on the physical page information, and determine the memory data included in the first memory data that is the same as this time, and then establish a mapping relationship between the physical page information corresponding to the same memory data and the third VMA.

[0143] Assuming that the VMA in the third VMA list that intersects with the third VMA is the fourth VMA, the situation where the third VMA in the second VMA list intersects with the third VMA list can be further divided into the following situations:

[0144] Case 1: The third VMA contains the fourth VMA:

[0145] It is understood that the third VMA includes the fourth VMA in two cases: the third VMA is completely identical to the fourth VMA, and the fourth VMA is a proper subset of the third VMA. For the latter case, for example, the third VMA can be 0x08d83000-0x08d88000, and the fourth VMA can be 0x08d84000-0x08d86000.

[0146] Cases where the third VMA contains the fourth VMA include: the third VMA is completely identical to the fourth VMA, or the third VMA is a superset of the fourth VMA. Cases where the third VMA is completely identical to the fourth VMA include: the third VMA is unchanged between the two instances, meaning the same VMA was used both this time and the previous time, or the source server remaps the VMA within the original virtual address range using the munmap function, meaning the third and fourth VMAs share the same virtual address range.

[0147] For this type of situation, i.e., when the third VMA includes the fourth VMA, the destination server may optionally pre-map all physical page information corresponding to the fourth VMA, i.e., establish a relationship between all physical page information corresponding to the fourth VMA and the third VMA. The reason for pre-mapping all memory data is that when the third VMA includes the fourth VMA, the memory data corresponding to the third VMA also includes all memory data corresponding to the fourth VMA. Therefore, the memory data received this time includes all memory data corresponding to the fourth VMA. In other words, all memory data corresponding to the fourth VMA is still needed this time, so all physical page information needs to be pre-mapped.

[0148] Case 2: The third VMA does not include the fourth VMA.

[0149] Optionally, when the third VMA does not include the fourth VMA, the destination server determines a sub-VMA in the fourth VMA that overlaps with the third VMA; and the destination server establishes a mapping relationship between the third VMA and the physical page information corresponding to the sub-VMA.

[0150] It is understood that the third VMA does not include the fourth VMA, but the third VMA and the fourth VMA do intersect, including: the third VMA does not include the fourth VMA, the fourth VMA does not include the third VMA, but the fourth VMA does intersect; the third VMA does not include the fourth VMA, and the fourth VMA includes the third VMA. To help understand the above implementation, for example, the third VMA can be 0x08d83000-0x08d88000, the fourth VMA can be 0x08d81000-0x08d87000; the third VMA can be 0x08d83000-0x08d88000, and the fourth VMA can be 0x08d81000-0x08d89000.

[0151] Based on the above technical solution, by mapping the physical page information corresponding to the last VMA that overlaps with the current one to the current VMA, since the memory data corresponding to the overlapping VMA is still needed in the current container migration process, the relationship between the last memory data that overlaps with the current one and the current memory data can be established in this way, that is, an index of the memory data that overlaps with the current one is established this time. Since the overlapping memory data already exists in the destination server, by establishing the index, the destination server can call the previous memory data this time.

[0152] It can be seen that in this case, the destination server does not need to pre-map all physical page information to the third VMA, but can only pre-map the physical page information that overlaps with the corresponding VMAs to the third VMA, which can save some resources consumed by pre-mapping.

[0153] The above solution introduces the recovery process of the memory data in the first memory data. In addition, optionally, during the current container recovery process, the process number information can also be recovered. Specifically, assuming that the process number information received this time is the first process number information and the process number information received last time is the second process number information, the process number information can be recovered by the following implementation method:

[0154] Optionally, the destination server restores the process number information of the second container according to the relationship between the first process number information and the second process number information.

[0155] Optionally, the destination server determines the newly added process number information, reduced process number information, and unchanged process number information in the first process number information compared to the second process number information. For the newly added process number information, the process number information is copied. For the reduced process number information, that is, the process number information that exists in the second process number information but does not exist in the first process number information, such process number information is deleted. For the unchanged process number information, the process number information in the second process number information that is the same as that in the first process number information is retained.

[0156] Optionally, after the first memory data or the second memory data is restored, the source server can determine whether the first condition is met based on method 200, and further determine whether a final container migration needs to be performed. For details, please refer to method 200 and will not be repeated here. It should be noted that when method 200 is used for determination, the source server can be the third server in method 200, and the destination server can be the destination server in method 200.

[0157] In order to avoid the situation that the migration time is too long and the downtime is too long during the container migration process, the embodiment of the present application provides an information processing method 200, which can be applied to Figure 1 The system shown and Figure 2 The container cluster management platform shown in the figure. When this method is applied to Figure 1 In the scenario shown, the source server may be the source server 101, the third container may be the container 1 or container 2 of the source server 101, and the destination server may be the destination server 102. Figure 2 When using the container cluster management platform shown, the kubelet container engine and CRIU can be configured on the source and destination servers. In method 200, by introducing the first constraint, the timing of starting the last container migration is controlled, thereby controlling the total migration duration, dirty page rate, and downtime. This avoids problems such as excessive total migration duration, excessive dirty page rate, and excessive downtime, thereby optimizing the user experience during the container migration process.

[0158] The following combination Figure 7 , to specifically introduce the method 200 provided in the embodiment of the present application. It should be noted that, Figure 7 The source server is used as the execution subject of the interaction signal to illustrate the method, but the present application does not limit the execution subject of the interaction signal. For example, Figure 7 In the corresponding embodiments, the execution subject in S701-S704 is the source server. The execution subject may also be a chip, chip system, or processor that supports the source server to implement the method, or a logic module or software that can implement all or part of the source server functions. Figure 7 The source server in S701-S704 in the corresponding embodiments may also be replaced by a chip, chip system, or processor that supports the source server to implement the method, or may be replaced by a logic module or software that can implement all or part of the controller functions.

[0159] like Figure 7 As shown, the method 200 provided in the embodiment of the present application includes the following steps:

[0160] Step S701: The source server obtains first memory data of a first container;

[0161] Optionally, after the source server obtains the first memory data of the first container, the source server copies the first memory data and transmits the copied first memory data to the destination server, so that the destination server restores the first container to the second container based on the first memory data.

[0162] Optionally, the destination server may use the method in method 100 to process the first memory data. For example, if the first memory data includes a first VMA list, the destination server creates a second VMA list in the memory data of the second container based on the first VMA list. The memory data received by the destination server last includes a third VMA list. The destination server may restore the first container to the second container based on the relationship between the third VMA list and the second VMA list. For details, please refer to method 100 and will not be repeated here. Optionally, when using method 100 to restore container information, the destination server in method 200 may be the same as the destination server in method 100, and the destination server in method 200 may be the same as the destination server in method 100.

[0163] Step S702: The source server determines whether a first condition is met based on the first memory data.

[0164] It should be noted that the first condition includes: a total migration duration constraint, a dirty page rate constraint, or a downtime duration constraint.

[0165] Optionally, the first condition can be a factory default configuration or user-defined constraint. For example, user-defined constraints include: total migration time not exceeding 1 second, dirty page rate not exceeding 2%, and downtime not exceeding 0.5 seconds.

[0166] In a possible implementation of the second aspect, the source server obtains third memory data of the first container at a current moment; the source server determines whether the first condition is met based on the first memory data, including: the source server determines whether the first condition is met based on a relationship between the first memory data and the third memory data.

[0167] It should be noted that after the source server obtains the first memory data, it will copy the first memory data to the mirror file. After the source server transfers the mirror file to the destination server, the source server will obtain the third memory data. It can be seen that there is a time difference between the acquisition time of the third memory data and the first memory data. During this time difference, the first container may generate new data during operation. Therefore, the third memory data is not necessarily exactly the same as the first memory data. At this time, the total migration time, dirty page rate and downtime can be estimated based on the relationship between the two, so as to determine whether this predicted data meets the first condition.

[0168] Regarding how the source server determines whether the first condition is satisfied based on the relationship between the first memory data and the third memory data, the following implementation may be adopted:

[0169] In one possible implementation, the first memory data includes: third memory data, the third memory data includes: fourth memory data, the source server determines the memory dirty page of the fourth memory data relative to the third memory data; the source server determines whether the first condition is met based on the memory dirty page.

[0170] It is understandable that, as mentioned above, there is a time difference between the acquisition time of the third memory data and the first memory data. During this time difference, the first container may generate memory dirty pages during operation, and this memory dirty page needs to be migrated to the destination server. Since the size of the memory dirty page is the decisive factor affecting the time of container migration, the downtime is equal to the time of the last container migration. Therefore, it is necessary to determine the memory dirty page of the fourth memory data relative to the third memory data, and then based on the memory dirty page, it can be predicted to a certain extent that if the last container migration is started at the current moment, the migration time or downtime required for the entire container migration process can be used. The so-called last migration refers to the container migration in which the process needs to be shut down. Based on this prediction, it can be determined whether the first condition is met, thereby determining whether the current moment is suitable for executing the last migration.

[0171] The following describes how the source server determines whether the first condition is satisfied when the first condition is different constraints:

[0172] In one possible implementation, the first condition is the total migration duration constraint. The source server determines the first duration required to migrate the dirty memory page based on the size of the dirty memory page. The source server uses the sum of the time consumed in hot migrating the information of the first container to the destination server and the first duration as the first total migration duration. The source server determines whether the first total migration duration meets the total migration duration constraint.

[0173] like Figure 8 As shown, the total migration time is equal to the sum of the time consumed in all container migration processes between the first container and the second container. The duration of the last container migration can be predicted based on the size of the memory dirty page. At this time, the duration of the last container migration and the duration consumed by the previous container migration are calculated to obtain the total migration duration. Figure 8 Before the last container migration, multiple incremental migrations and one full migration are performed. The total migration duration = the duration of the incremental migrations that have been performed + the duration of the full migration + the first duration of the predicted last container migration.

[0174] Based on the above technical solution, the source server combines the predicted duration of dirty memory page migration with the duration already consumed by container migration as the total duration of the first migration, and determines whether the first total migration duration meets the total migration duration constraint. Therefore, if the user requires a limited total migration duration, the final container migration can be initiated promptly when the migration duration approaches the user-set total migration duration constraint, ensuring that the total migration duration remains manageable.

[0175] In another possible implementation, the first condition is the downtime constraint, and the source server determines the first time required to migrate the dirty memory page based on the size of the dirty memory page; the source server uses the first time as the first downtime; the source server determines whether the first downtime meets the downtime constraint.

[0176] like Figure 8 As shown, the downtime is equal to the time required for the last container migration. At this time, the time required for the last container migration can be estimated based on the size of the memory dirty page, that is, the first time required to migrate the memory dirty page can be estimated to obtain the downtime.

[0177] Based on the above technical solution, the source server uses the predicted duration of the migration of dirty memory pages as the downtime duration, achieving downtime estimation. Therefore, if the user requires a limited downtime, the last container migration can be started only when the downtime approaches the user-set downtime constraint. This avoids the problem of the last migration being delayed due to excessive dirty memory pages, shortening downtime and improving the user experience.

[0178] In another possible implementation, the first condition is the dirty page rate, and the source server uses the ratio of the size of the memory dirty page to the size of the memory data in the first memory data as the first dirty page rate; the source server determines whether the first dirty page rate meets the dirty page rate constraint.

[0179] Based on the above technical solution, when the dirty page rate is higher, the proportion of memory dirty pages that need to be migrated will be higher, and accordingly, the downtime will be longer. By introducing the dirty page rate constraint, on the one hand, the problem of excessive downtime can be avoided. On the other hand, since the downtime needs to be predicted, this prediction may have certain errors. Introducing the dirty page rate can estimate the downtime to a certain extent. Therefore, introducing the dirty page rate can increase the accuracy of downtime duration assessment to a certain extent.

[0180] Step S703: When the first condition is met, the source server obtains the second memory data of the first container;

[0181] It should be noted that the second memory data includes: the second process number information corresponding to the first process or the fourth memory data corresponding to the first process.

[0182] It should be noted that the acquisition of the first memory data in step S703 and step S704 are the processes of the last container migration, that is, the last container migration will be performed only after the first condition is met.

[0183] Step S704: The source server copies the second memory data and sends the copied second memory data to the destination server.

[0184] It should be noted that the second memory data includes: a first VMA list, and the first process is in a shutdown state during the copying process and the sending process. The first process is the process that generates the first memory data.

[0185] Optionally, the destination server receives the second memory data and restores the destination server according to the second memory data. During this restoration process, the destination server is in a suspended state. Optionally, when the destination server completes the process of restoring the container according to the second memory data, the destination server may start a process.

[0186] like Figure 9 As shown in the figure, before the full recovery of the destination server begins, its process is in the running state. From the start of the full recovery until the end of the last container migration, the process of the destination server is in the suspended state. After the last container migration ends, the process of the destination server is restarted, and at this time the process of the destination server is in the running state.

[0187] Figure 7 The illustrated solution introduces a first condition and determines whether the first condition is met based on the first memory data. Only when the condition is met does the final container migration, i.e., the migration of the second memory data, occur. During the final container migration, the process is in a downtime state. The time when the final container migration begins is correlated with, for example, the total migration duration. For example, the earlier the final container migration begins, the fewer container migrations occur, and accordingly, the shorter the total migration duration. Therefore, controlling the time when the final container migration is executed can control the total migration duration during the container migration process. The earlier the last container migration is started, the smaller the number of container information iterations will be, and the higher the dirty page rate of memory data will be. Therefore, controlling the time when the last container migration is executed can control the dirty page rate. The earlier the last container migration is started, the smaller the number of container information iterations will be, and accordingly, the higher the dirty page rate of memory data will be. Therefore, controlling the time when the last container migration is executed can control the dirty page rate. The earlier the last container migration is started, the smaller the number of container information iterations will be, and the larger the size of the memory dirty pages of memory data will be. Accordingly, the time used to recover the memory dirty pages during the last migration will be longer, and the downtime is equal to the time of the last migration. Therefore, controlling the time when the last container migration is executed can control the downtime. This solution controls the time when the last container migration is started by introducing the first condition as a constraint, thereby controlling the total migration time, the dirty page rate, and the downtime, thereby avoiding problems such as too long a total migration time, too high a dirty page rate, and too long a downtime, and optimizing the user experience during the container migration process.

[0188] The following is a concrete example of the above Figure 3 and Figure 7 The method shown is illustrated by way of example.

[0189] One embodiment is an example of method 100. This embodiment is an example of the destination server in method 100 being server 1. This embodiment illustrates a container migration process, but this solution is not limited to Figure 10 The embodiment can only be executed once, Figure 10 This embodiment can be executed multiple times, that is, multiple times based on Figure 10 Container migration is performed using the solution.

[0190] Figure 10 This is a flow chart of an embodiment. Figure 10 The specific process includes:

[0191] Step S1001, server 1 receives information 1;

[0192] Optionally, the information 1 may be sent by the server 2 . The server 2 dumps the container information and saves it into the image file 1 . The image file 1 is the information 1 . The server 2 sends the information 1 to the server 1 .

[0193] Optionally, the information 1 includes: memory data and process number information, the memory data includes: memory data 1, memory data 2, VMA list 1, and the memory data 1 includes: physical page information 1.

[0194] Optionally, server 1 creates VMA list 2 using mmap function based on VMA list 1. VMA list 2 includes: VMA1 and VMA2, VMA1 corresponds to memory data 1, and VMA2 corresponds to memory data 2.

[0195] Step S1002: Server 1 receives information 2;

[0196] Optionally, information 1 may be sent by server 2 , which dumps the container information again and saves it into image file 2 , which is information 2 . Server 2 sends information 1 to server 1 .

[0197] Optionally, the information 2 includes: memory data 2 and process number information, and the memory data 2 includes: VMA list 3 and physical page information 2.

[0198] Optionally, server 1 creates VMA list 4 using mmap function based on VMA list 3. VMA list 4 includes: VMA 3, which corresponds to memory data 3.

[0199] Step S1003: Server 1 determines the relationship between VMA 3 and VMA list 2;

[0200] Specifically, when there is no intersection between VMA3 and VMA list 2, step S1005 is executed; when there is an intersection between VMA3 and VMA list 2, step S1004 is executed.

[0201] Step S1004: Server 1 determines whether memory data 3 is a dirty memory page based on physical page information 2.

[0202] For example, the server 1 may determine whether the memory data 3 has changed according to the identifier in the physical page information 2 , thereby determining whether the memory data 3 is a dirty memory page.

[0203] When memory data 3 is a dirty memory page, execute step S1005. Assuming that the VMA in VMA list 4 that intersects with VM3 is VMA1, when memory data 3 is not a dirty memory page and VMA3 contains VMA1, execute step S1006. When memory data 3 is a dirty memory page and VMA3 does not contain VMA1, execute step S1007.

[0204] Step S1005: Server 1 copies memory data 3;

[0205] Step S1006: Server 1 pre-maps physical page information 1 to VMA 3;

[0206] For example, the server 1 may establish a relationship between the VMA 3 and the physical page information 1 by using the mremap function through the destination server.

[0207] Step S1007: Server 1 pre-maps the physical page information corresponding to the sub-VMA to VMA3;

[0208] It should be noted that the sub-VMA is the part of the VMA where VMA1 and VM3 intersect.

[0209] Optionally, if VMA list 4 contains other VMAs besides VMA3, refer to steps S1003 to S1007 to determine the relationship between these other VMAs and VMA list 2, and restore the corresponding container information. During execution, the entire VMA list 4 can be traversed at one time to determine the relationship between each VMA in VMA list 4 and VMA list 2.

[0210] Step S1008: Server 1 determines whether VMA 2 and VMA list 4 have an intersection.

[0211] When VMA2 intersects with VMA list 4, the process ends, or the next container migration can be started, or method 200 is used to determine whether the current moment is suitable for performing the last container migration. If it is suitable, the last container migration step is executed.

[0212] When there is no intersection between VMA 2 and VMA list 4, step S1009 is executed.

[0213] Step S1009: Server 1 releases VMA2.

[0214] It is understandable that after releasing VMA2, memory data 2 will also be released.

[0215] Another embodiment is an example of method 200. This embodiment is an example of method 200 in which the source server is server 2. This embodiment is an example in which the first condition includes: total migration duration, downtime duration, and dirty page rate.

[0216] Figure 11 This is a flow chart of an embodiment. Figure 11 The specific process includes:

[0217] Step S1101: Server 2 copies container information of container 3 and saves it to a mirror file.

[0218] Optionally, step S1101 may be a full migration process, in which case the container information of container 3 in step S1101 is all the container information of container 3 at the time of copying. Step S1101 may be an incremental migration process, in which case the container information of container 3 in step S1101 is the additional container information of container 3 at the time of copying relative to the last copying.

[0219] Step S1102: Server 2 sends the image file to container 4.

[0220] Step S1103: Server 2 obtains the container information of container 3 at the current moment;

[0221] The container 4 is located in the device 3. The so-called current moment generally refers to the moment when the device 3 completes the container recovery of the container 4 based on the information in the image file.

[0222] Step S1104: Server 2 determines the size of the dirty page in memory based on information 4 and information 3.

[0223] Optionally, the size of the memory dirty page is the memory data increased by the memory data in the information 4 relative to the memory data in the information 3 .

[0224] Step S1105: Server 2 determines the total migration duration, downtime duration, and dirty page rate based on the size of the dirty pages in the memory.

[0225] Optionally, the total migration time is equal to the sum of the time consumed in all container migration processes between server 2 and device 3. The duration of the last container migration can be predicted based on the size of the memory dirty page. At this time, the sum of the duration of the last container migration and the time consumed by the previous container migration is calculated to obtain the total migration duration.

[0226] Optionally, the source server calculates the time required to migrate the dirty memory page according to the size of the dirty memory page, that is, obtains the downtime duration.

[0227] Optionally, the dirty page ratio is a ratio of the size of dirty memory pages to the size of memory data copied during the last container migration.

[0228] Step S1106: Server 2 determines whether the first condition is met according to the result in step S1105;

[0229] When it is determined according to the result in step S1105 that the first condition is met, step S1107 is executed; when the first condition is not met, the process returns to step S1101.

[0230] Step S1107: Server 2 performs the last container migration.

[0231] The above describes the embodiment of the present application from the perspective of the method. The following describes the communication device in the embodiment of the present application from the perspective of specific device implementation.

[0232] The above describes the embodiment of the present application from the perspective of the method. The following describes the communication device in the embodiment of the present application from the perspective of specific device implementation.

[0233] See also Figure 12 , an embodiment of the present application provides a schematic diagram of a communication device 1200, wherein the communication device 1200 includes at least a processing unit 1201 and a transceiver unit 1202.

[0234] As an example, the communication device 1200 can implement the function of the destination server in the above method 100, and thus can also achieve the beneficial effects of the above method 100.

[0235] Specifically, when executing the method of the first aspect, the transceiver unit 1202 is used to receive first memory data of a first container, where the first memory data includes: a first virtual memory address VMA list; the destination server creates a second VMA list in the memory data of the second container based on the first VMA list, where the content of the second VMA list is the same as the content of the first VMA list; the processing unit 1201 is used to restore the first container to the second container based on the first memory data and according to the relationship between the second VMA list and the third VMA list, wherein the third VMA list is carried in the memory data of the first container received last time.

[0236] In a possible implementation, the processing unit 1201 is specifically configured to: restore, by the destination server based on the first memory data and according to whether there is an intersection between the second VMA list and the third VMA list, the first container to the second container.

[0237] In one possible implementation, the processing unit 1201 is specifically configured to: when the second VMA list includes the first VMA and there is no intersection between the first VMA and the third VMA list, copy the second memory data to the memory data corresponding to the second container, where the second memory data is the memory data corresponding to the first VMA in the first memory data.

[0238] In a possible implementation, the processing unit 1201 is specifically configured to: when the third VMA list includes the second VMA and the second VMA has no intersection with the first VMA list, release the second VMA.

[0239] In one possible implementation, the processing unit 1201 is specifically configured to: when the second VMA list includes a third VMA, and the third VMA has an intersection with the third VMA list, establish a mapping relationship between physical page information corresponding to the intersection and the third VMA, where the physical page information is carried in the memory data of the first container received last time.

[0240] In one possible implementation, the processing unit 1201 is specifically used to: determine whether the third memory data is a dirty memory page based on the physical page information, and the third memory data is the memory data corresponding to the third VMA in the first memory data; when the third memory data is a dirty memory page, copy the third memory data to the memory data corresponding to the second container.

[0241] As an example, the communication device 1200 can implement the function of the source server in the above method 200, and thus can also achieve the beneficial effects of the above method 200.

[0242] Specifically, the transceiver unit 1202 is used to obtain the first memory data of the first container; the processing unit 1201 is used to determine whether a first condition is met based on the first memory data, and the first condition includes: a total migration time constraint, a dirty page rate constraint or a downtime constraint; when the first condition is met, the transceiver unit 1202 is also used to obtain the second memory data of the first container; the processing unit 1201 is also used to copy the second memory data and send the copied second memory data to the destination server, wherein the second memory data includes: a first VMA list, and the first process is in a downtime state during the copying process and the sending process, and the first process is the process that generates the first memory data.

[0243] In a possible implementation, the transceiver unit 1202 is further configured to obtain third memory data of the first container at a current moment; and the calling processing unit 1201 determines whether the first condition is met based on a relationship between the first memory data and the third memory data.

[0244] In a possible implementation, the processing unit 1201 is further configured to determine a memory dirty page of the third memory data relative to the first memory data; and determine whether the first condition is satisfied based on the memory dirty page.

[0245] See also Figure 13 , Figure 13 The present invention provides a schematic diagram of the structure of the communication device involved in the above embodiment, wherein the communication device can be specifically the destination server or source server in the above embodiment. The structure of the communication device can refer to Figure 13 The structure shown.

[0246] The communication device includes at least one processor 1301, at least one communication port 1302, at least one memory 1303, and one or more antennas 1304. Processor 1301, memory 1303, and communication port 1302 are connected, for example, via a bus. In the embodiment of the present application, this connection may include various interfaces, transmission lines, or buses, and is not limited in this embodiment. Antenna 1304 is connected to communication port 1302.

[0247] As an implementation example, Figure 13 The communication device shown is the aforementioned Figure 3 In the case of a destination server in a related embodiment, the communication port 1302 is used to receive first memory data of a first container, where the first memory data includes: a first virtual memory address VMA list; the destination server creates a second VMA list in the memory data of the second container based on the first VMA list, where the content of the second VMA list is the same as the content of the first VMA list; the processor 1301 is used to restore the first container to the second container based on the first memory data and according to the relationship between the second VMA list and the third VMA list, where the third VMA list is carried in the memory data of the first container received last time.

[0248] As an implementation example, Figure 13 The communication device shown is the aforementioned Figure 7In the case of the source server in the related embodiments, the communication port 1302 is used to obtain the first memory data of the first container; the processor 1301 is used to determine whether the first condition is met based on the first memory data, and the first condition includes: total migration time constraint, dirty page rate constraint or downtime constraint; when the first condition is met, the communication port 1302 is also used to obtain the second memory data of the first container; the processor 1301 is also used to copy the second memory data and send the copied second memory data to the destination server, wherein the second memory data includes: a first VMA list, and the first process is in a shutdown state during the copying process and the sending process, and the first process is the process that generates the first memory data.

[0249] It should be noted that the above Figure 13 For details on the execution process of each component in the communication device shown, please refer to the description in the method embodiment shown above in this application, which will not be repeated here.

[0250] Processor 1301 is primarily used to process communication protocols and communication data, control the entire communication device, execute software programs, and process software program data, for example, to support the communication device in performing the actions described in the embodiments. The communication device may include a baseband processor and a central processing unit. The baseband processor is primarily used to process communication protocols and communication data, while the central processing unit is primarily used to control the entire destination server or source server, execute software programs, and process software program data. Figure 13 The processor 1301 in the embodiment can integrate the functions of the baseband processor and the central processing unit. It will be understood by those skilled in the art that the baseband processor and the central processing unit can also be independent processors interconnected through technologies such as buses. It will be understood by those skilled in the art that the destination server or source server can include multiple baseband processors to adapt to different network formats, and the destination server or source server can include multiple central processing units to enhance its processing capabilities. The various components of the destination server or source server can be connected through various buses. The baseband processor can also be expressed as a baseband processing circuit or a baseband processing chip. The central processing unit can also be expressed as a central processing circuit or a central processing chip. The function of processing the communication protocol and communication data can be built into the processor, or it can be stored in the memory in the form of a software program, and the processor executes the software program to implement the baseband processing function.

[0251] The memory is primarily used to store software programs and data. Memory 1303 can exist independently and be connected to processor 1301. Alternatively, memory 1303 and processor 1301 can be integrated together, for example, within a single chip. Memory 1303 can store program code for executing the technical solutions of the embodiments of the present application, and execution is controlled by processor 1301. The various computer program codes executed can also be considered as drivers for processor 1301.

[0252] Figure 13 Only one memory and one processor are shown. In an actual destination server or source server, multiple processors and multiple memories may exist. Memory may also be referred to as a storage medium or storage device. The memory may be a storage element on the same chip as the processor, i.e., an on-chip storage element, or an independent storage element, which is not limited in the present embodiment.

[0253] The communication port 1302 can be used to support the reception or transmission of radio frequency signals between the communication device and the terminal. The communication port 1302 can be connected to the antenna 1304. The communication port 1302 includes a transmitter Tx and a receiver Rx. Specifically, one or more antennas 1304 can receive radio frequency signals. The receiver Rx of the communication port 1302 is used to receive the radio frequency signals from the antennas, convert the radio frequency signals into digital baseband signals or digital intermediate frequency signals, and provide the digital baseband signals or digital intermediate frequency signals to the processor 1301 so that the processor 1301 can further process the digital baseband signals or digital intermediate frequency signals, such as demodulation and decoding. In addition, the transmitter Tx in the communication port 1302 is also used to receive modulated digital baseband signals or digital intermediate frequency signals from the processor 1301, convert the modulated digital baseband signals or digital intermediate frequency signals into radio frequency signals, and transmit the radio frequency signals through one or more antennas 1304. Specifically, the receiver Rx can selectively perform one or more stages of down-mixing and analog-to-digital conversion on the RF signal to obtain a digital baseband signal or a digital intermediate frequency signal. The order of the down-mixing and analog-to-digital conversion processes is adjustable. The transmitter Tx can selectively perform one or more stages of up-mixing and digital-to-analog conversion on the modulated digital baseband signal or digital intermediate frequency signal to obtain a RF signal. The order of the up-mixing and digital-to-analog conversion processes is adjustable. The digital baseband signal and the digital intermediate frequency signal may be collectively referred to as digital signals.

[0254] A transceiver may also be referred to as a transceiver unit, a transceiver, a transceiver device, etc. Alternatively, a device in a transceiver unit that implements a receiving function may be referred to as a receiving unit, and a device in a transceiver unit that implements a transmitting function may be referred to as a transmitting unit. That is, a transceiver unit includes a receiving unit and a transmitting unit. A receiving unit may also be referred to as a receiver, an input port, a receiving circuit, etc., and a transmitting unit may be referred to as a transmitter, a transmitter, or a transmitting circuit, etc.

[0255] It should be noted that Figure 13 The communication device shown can be specifically used to implement the steps implemented by the destination server or the source server in any of the aforementioned method embodiments, and achieve the corresponding technical effects of the destination server or the source server. Figure 13 The specific implementation of the communication device shown can refer to the description in any of the aforementioned method embodiments, and will not be repeated here.

[0256] An embodiment of the present application also provides a computer-readable storage medium storing one or more computer-executable instructions. When the computer-executable instructions are executed by a processor, the processor executes the method described in the possible implementation method of the communication device in the aforementioned embodiment, wherein the communication device can specifically be a destination server or a source server in the aforementioned embodiment.

[0257] An embodiment of the present application also provides a computer program product (or computer program) storing one or more computers. When the computer program product is executed by the processor, the processor executes the method of the possible implementation of the above-mentioned communication device, wherein the communication device can specifically be the destination server or source server in the above-mentioned embodiment.

[0258] The present application also provides a chip system, which includes a processor for supporting a communication device to implement the functions involved in the possible implementation of the communication device. In one possible design, the chip system may also include a memory for storing program instructions and data necessary for the communication device. The chip system may be composed of a chip or may include a chip and other discrete devices, wherein the communication device may specifically be the destination server or source server in the aforementioned embodiment.

[0259] An embodiment of the present application also provides a communication system, which includes the above-mentioned destination server and the above-mentioned source server.

[0260] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0261] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0262] In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit 1201, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The above-mentioned integrated units may be implemented in the form of hardware or software functional units.

[0263] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the part that essentially contributes to the technical solution of the present application or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a destination server or a source server, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0264] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. An information recovery method, characterized in that: The method comprises: Receive first memory data of a first container, where the first memory data includes: a first virtual memory address VMA list; Creating a second VMA list in memory data of a second container based on the first VMA list, wherein the content of the second VMA list is the same as the content of the first VMA list; Based on the first memory data, and according to a relationship between the second VMA list and a third VMA list, the first container is restored to the second container, wherein the third VMA list is carried in the memory data of the first container received last time.

2. The information recovery method according to claim 1, characterized in that: Restoring the first container to the second container based on the first memory data and according to the relationship between the second VMA list and the third VMA list includes: Based on the first memory data, and depending on whether there is an intersection between the second VMA list and the third VMA list, the first container is restored to the second container.

3. The information recovery method according to claim 2, characterized in that: Restoring the first container to the second container based on the first memory data and according to whether there is an intersection between the second VMA list and the third VMA list includes: When the second VMA list includes the first VMA and there is no intersection between the first VMA and the third VMA list, the second memory data is copied to the memory data corresponding to the second container, and the second memory data is the memory data corresponding to the first VMA in the first memory data.

4. The information recovery method according to claim 2, characterized in that: Restoring the first container to the second container based on the first memory data and according to whether there is an intersection between the second VMA list and the third VMA list includes: When the third VMA list includes the second VMA and there is no intersection between the second VMA and the second VMA list, the second VMA is released.

5. The information recovery method according to claim 2, characterized in that: Restoring the first container to the second container based on the first memory data and according to whether there is an intersection between the second VMA list and the third VMA list includes: When the second VMA list includes a third VMA, and the third VMA has an intersection with the third VMA list, a mapping relationship is established between physical page information corresponding to the intersection and the third VMA, where the physical page information is carried in the memory data of the first container received last time.

6. The information recovery method according to claim 5, characterized in that: After establishing the mapping relationship between the physical page information corresponding to the intersection and the third VMA, the method further includes: determining, according to the physical page information, whether the third memory data is a dirty memory page, the third memory data being memory data corresponding to the third VMA in the first memory data; When the third memory data is a dirty memory page, the third memory data is copied to memory data corresponding to the second container.

7. An information processing system, characterized in that: Including source server and destination server; The source server obtains first memory data of the first container; The source server determines, based on the first memory data, whether a first condition is satisfied, where the first condition includes: a total migration duration constraint, a dirty page rate constraint, or a downtime duration constraint; When a first condition is met, the source server obtains the second memory data of the first container; The source server copies the second memory data and sends the copied second memory data to the destination server, wherein the second memory data includes a first VMA list, and a first process is in a stopped state during the copying and sending processes, and the first process is the process that generates the first memory data; The destination server creates a second VMA list in memory data of a second container based on the first VMA list, where content of the second VMA list is the same as content of the first VMA list; The destination server restores the first container to the second container based on the second memory data and according to a relationship between the second VMA list and a third VMA list, wherein the third VMA list is carried in the memory data of the first container received the last time.

8. The information processing system according to claim 7, wherein: After the source server obtains the first memory data of the first container, the method further includes: The source server obtains third memory data of the first container at the current moment; The source server determines, according to the first memory data, whether a first condition is satisfied, including: The source server determines whether a first condition is satisfied according to a relationship between the first memory data and the third memory data.

9. The information processing system according to claim 8, wherein: The source server determines whether a first condition is satisfied according to a relationship between the first memory data and the third memory data, including: The source server determines a memory dirty page of the third memory data relative to the first memory data; The source server determines whether a first condition is met according to the dirty memory page.

10. A communication device, characterized in that: include: Communication interface and processor; The communication interface is configured to receive or send external communication signals, and to send the received communication signals to the processor; The processor is configured to execute the method according to any one of claims 1 to 6.

11. A communication device, characterized in that: include: A transceiver unit, configured to perform the transceiver operation in the method according to any one of claims 1 to 6; A processing unit, configured to perform operations other than the sending and receiving operations in the method according to any one of claims 1 to 6.

12. A computer-readable storage medium, characterized in that The medium stores instructions, and when the instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.

13. A computer program product, characterized in that The method comprises instructions, which, when executed on a processor, execute the method according to any one of claims 1 to 6.

14. A chip, characterized in that: The system comprises at least one processing unit and an interface circuit, wherein the interface circuit is used to provide program instructions or data to the at least one processing unit, and the at least one processing unit is used to execute the program instructions to implement the method according to any one of claims 1 to 6.