A container migration method and device, and network equipment

By optimizing the container migration path based on communication overhead, the problem of high latency after container migration in existing technologies is solved, and a low-latency container migration method is realized to meet the needs of emerging businesses.

CN115269124BActive Publication Date: 2026-05-19CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA UNITED NETWORK COMM GRP CO LTD
Filing Date
2022-08-19
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing container migration methods cannot meet the high latency requirements of emerging businesses, and the migrated containers still have the problem of large business latency.

Method used

Containers to be migrated are selected based on communication overhead, and the target rack is determined based on the communication overhead after migration. By building a database to store network topology information, the container migration path is optimized to reduce communication overhead and latency.

Benefits of technology

It achieves minimal communication overhead and minimum service latency after container migration, meets the latency requirements of emerging businesses, and improves service quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115269124B_ABST
    Figure CN115269124B_ABST
Patent Text Reader

Abstract

The application provides a container migration method and device and network equipment, and belongs to the technical field of communication. The method comprises the following steps: in response to the resource utilization of a current physical machine exceeding a preset threshold, selecting a to-be-migrated container according to communication overhead, wherein the communication overhead is the number of communication devices through which communication is performed between two containers that have direct data interaction; determining a target rack according to the communication overhead of the to-be-migrated container after migration, and migrating the to-be-migrated container to the target rack. The method can solve the problem that the container after migration still has a large service delay, and cannot meet the high requirement of emerging services on low delay. The method is suitable for the application range of container migration and virtual resource scheduling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and in particular to a container migration method and apparatus, and network equipment. Background Technology

[0002] Currently, container migration methods are mainly based on the resource usage of physical machines. That is, when the resource utilization of a physical machine is too high, containers with high resource consumption are migrated to other physical machines with lower resource utilization.

[0003] With the widespread adoption of 5G mobile communication technology, many emerging services have become extremely sensitive to latency. If the container migration method described above is used, the migrated container may still experience high latency for the services it carries, thus failing to meet the high latency requirements of these emerging services. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to address the above-mentioned shortcomings of the prior art by providing a container migration method, apparatus, and network equipment, so as to at least solve the problem that the migrated container still has high latency of the services it carries, thus failing to meet the high requirements of emerging services for low latency.

[0005] In a first aspect, the present invention provides a container migration method, comprising: in response to the current physical machine's resource utilization rate exceeding a preset threshold, selecting a container to be migrated based on communication overhead, wherein the communication overhead is the number of communication devices traversed between two containers that have direct data interaction; determining a target rack based on the communication overhead of the container to be migrated after the intended migration, and migrating the container to be migrated to the target rack.

[0006] Preferably, before selecting the container to be migrated based on communication overhead, the container migration method further includes: in response to creating a new target container, obtaining the upstream and downstream containers of the new target container and the communication overhead between the new target container and each upstream and downstream container according to the network topology, and storing them in a database, wherein the database stores all target containers, upstream and downstream containers, communication overhead in the network, and the correspondence between the three.

[0007] Preferably, the step of selecting the container to be migrated based on communication overhead specifically includes: obtaining the target container, upstream and downstream containers, communication overhead, and the correspondence between them on the current physical machine; obtaining the first total communication overhead and the second total communication overhead of the target container based on the target container, upstream and downstream containers, communication overhead, and the correspondence between them; calculating the difference between the second total communication overhead and the first total communication overhead of the target container to obtain the communication overhead difference of the target container; sorting the communication overhead differences of all target containers on the current physical machine, and selecting the target container with the largest communication overhead difference as the container to be migrated.

[0008] Preferably, the first total communication overhead and the second total communication overhead of the target container are obtained based on the target container, upstream and downstream containers, communication overhead, and the correspondence between the three. Specifically, this includes: classifying the upstream and downstream containers of the target container into two categories, namely, the current rack and other racks, based on the target container, upstream and downstream containers, communication overhead, and the rack to which the container belongs; calculating the sum of communication overhead between the target container and its upstream and downstream containers in the current rack to obtain the first total communication overhead of the target container; and calculating the sum of communication overhead between the target container and its upstream and downstream containers in other racks to obtain the second total communication overhead of the target container.

[0009] Preferably, determining the target rack based on the communication overhead of the container to be migrated after migration specifically includes: determining the racks to which the upstream and downstream containers of the container to be migrated belong as candidate racks; obtaining the total third communication overhead corresponding to the container to be migrated after migration to each candidate rack; sorting the total third communication overhead and selecting the candidate rack with the smallest total third communication overhead as the target rack.

[0010] Preferably, obtaining the total third communication overhead corresponding to the container to be migrated after it is to be migrated to each of the alternative racks specifically includes: obtaining the container to be migrated, the upstream and downstream containers, the communication overhead, and the correspondence between them after the container to be migrated is to be migrated to the alternative racks; calculating the total third communication overhead between the container to be migrated and the upstream and downstream containers to obtain the total third communication overhead corresponding to the alternative racks.

[0011] Preferably, after determining the target rack based on the communication overhead of the container to be migrated after migration, and before migrating the container to be migrated to the target rack, the container migration method further includes: determining the target physical machine on the target rack based on the number of interactions with the container to be migrated, so that the container to be migrated can be migrated to the target physical machine.

[0012] Preferably, determining the target physical machine on the target rack based on the number of interactions with the container to be migrated specifically includes: determining the physical machine as the target physical machine in response to the fact that only one physical machine on the target rack has upstream and downstream containers of the container to be migrated; or, determining the physical machine with the largest number of upstream and downstream containers carrying the container to be migrated in response to the fact that at least one physical machine on the target rack has upstream and downstream containers of the container to be migrated; determining the physical machine with the largest number of upstream and downstream containers carrying the container to be migrated as the target physical machine further includes: in response to the fact that at least two physical machines carry the largest number of upstream and downstream containers of the container to be migrated and the number is equal, selecting the physical machine with the lowest resource utilization as the target physical machine.

[0013] Secondly, the present invention also provides a container migration apparatus, including a selection module and a determination module. The selection module is used to select containers to be migrated based on communication overhead in response to a current physical machine resource utilization exceeding a preset threshold, wherein the communication overhead is the number of communication devices traversed for communication between two containers with direct data interaction. The determination module, connected to the selection module, is used to determine a target rack based on the communication overhead of the container to be migrated after the intended migration, and to migrate the container to the target rack.

[0014] Thirdly, the present invention also provides a container migration apparatus, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to implement the container migration method as described in the first aspect.

[0015] The container migration method, apparatus, and network equipment provided by this invention first select containers to be migrated from the current physical machine based on communication overhead, and then determine the target rack for migration based on the communication overhead of the containers to be migrated after the migration is completed. This achieves the goal of minimizing the communication overhead of the containers to be migrated after the migration is completed and minimizing the latency of the services carried on them, thereby providing better service quality and meeting the latency requirements of emerging services. Attached Figure Description

[0016] Figure 1 This is a schematic flowchart of a container migration method according to Embodiment 1 of the present invention;

[0017] Figure 2 This is a schematic diagram of the structure of a container migration device according to Embodiment 2 of the present invention;

[0018] Figure 3 This is a schematic diagram of the structure of a network device according to Embodiment 3 of the present invention. Detailed Implementation

[0019] To enable those skilled in the art to better understand the technical solution of the present invention, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0020] It is understood that the specific embodiments and accompanying drawings described herein are merely for explaining the invention and are not intended to limit the invention.

[0021] It is understood that, without conflict, the various embodiments and features in the embodiments of the present invention can be combined with each other.

[0022] It is understood that, for ease of description, only the parts related to the present invention are shown in the accompanying drawings, while the parts unrelated to the present invention are not shown in the drawings.

[0023] It is understood that each unit or module involved in the embodiments of the present invention may correspond to only one entity structure, or may be composed of multiple entity structures, or multiple units or modules may be integrated into one entity structure.

[0024] It is understood that, without conflict, the functions and steps marked in the flowcharts and block diagrams of this invention may occur in a different order than that marked in the accompanying drawings.

[0025] It is understood that the flowcharts and block diagrams of this invention illustrate the possible architecture, functions, and operations of systems, apparatuses, devices, and methods according to various embodiments of this invention. Each block in the flowchart or block diagram may represent a unit, module, program segment, or code, containing executable instructions for implementing the specified function. Furthermore, each block or combination of blocks in the block diagram and flowchart can be implemented using a hardware-based system to achieve the specified function, or using a combination of hardware and computer instructions.

[0026] It is understood that the units and modules involved in the embodiments of the present invention can be implemented by software or by hardware. For example, the units and modules can be located in a processor.

[0027] Example 1:

[0028] like Figure 1 As shown, this embodiment provides a container migration method that can be applied to a network management system or scheduling center, including:

[0029] Step 101: In response to the current physical machine's resource utilization exceeding a preset threshold, select containers to be migrated based on communication overhead, wherein the communication overhead is the number of communication devices traversed for communication between two containers that have direct data interaction.

[0030] In this embodiment, physical machines are stored on racks, and multiple containers are built on each physical machine. All physical machines on the same rack are connected to the same access switch. Resource utilization refers to the utilization rate of a single resource or the average utilization rate of multiple resources. Resources include computing resources, storage resources, etc. Upstream and downstream containers refer to containers that have direct data interaction with the target container. Communication overhead refers to the number of communication devices required for communication between the target container and its upstream and downstream containers. For example, the communication overhead of two containers on the same physical machine is set to 1; the communication overhead of two containers connected under the same access switch is 3; the communication overhead of two containers managed by different access switches but connected through the same aggregation switch is 5; and the communication overhead of two containers not managed by the same aggregation switch is 7. As can be seen from the meaning of communication overhead, the lower the communication overhead of a container, the lower the latency of the services carried on the container. Therefore, when the resource utilization of the current physical machine exceeds a preset threshold, there are two different approaches to selecting containers to be migrated based on communication overhead. Approach 1: Obtain the total communication overhead between the target container and its upstream and downstream containers on the current physical machine, sort them, and select the target container with the highest total communication overhead as the container to be migrated. Approach 1, by selecting the container with the highest total communication overhead as the container to be migrated, reduces the resource utilization of the current physical machine on the one hand, and on the other hand, allows the container to be migrated to other physical machines through subsequent steps to reduce its communication overhead, thereby reducing the latency of the services carried by the migrated container.

[0031] Option 2: Selecting containers to be migrated based on communication overhead specifically includes: obtaining the target container, upstream and downstream containers, communication overhead, and their correspondence on the current physical machine; obtaining the first and second total communication overhead of the target container based on the target container, upstream and downstream containers, communication overhead, and their correspondence; calculating the difference between the second and first total communication overhead of the target container to obtain the communication overhead difference of the target container; sorting the communication overhead differences of all target containers on the current physical machine, and selecting the target container with the largest communication overhead difference as the container to be migrated. Specifically, obtaining the first total communication overhead and the second total communication overhead of the target container based on the target container, upstream and downstream containers, communication overhead, and the correspondence between the three includes: classifying the upstream and downstream containers of the target container into two categories: the current rack and other racks, based on the target container, upstream and downstream containers, communication overhead, and the rack to which the container belongs; calculating the sum of communication overhead between the target container and its upstream and downstream containers in the current rack to obtain the first total communication overhead of the target container; and calculating the sum of communication overhead between the target container and its upstream and downstream containers in other racks to obtain the second total communication overhead of the target container.

[0032] In this embodiment, the target container, upstream and downstream containers, communication overhead, and their corresponding relationships on the current physical machine can be obtained from a preset database, or the target container, upstream and downstream containers, communication overhead, and their corresponding relationships on the current physical machine can be obtained in real time based on the network topology. An example of selecting containers to be migrated based on communication overhead is as follows: The upstream and downstream containers of target container A are B, C, D, E, F, and G, respectively. The communication overhead between target container A and container B is 1, the communication overhead with container C is 3, and the communication overheads with containers D, E, F, and G are 5, 5, 7, and 7, respectively. The upstream and downstream containers are classified according to whether they belong to the same rack as container A. B and C belong to the same rack as container A, while D, E, F, and G belong to other racks (i.e., not belonging to the same rack as container A). The first total communication overhead of target container A is calculated as 1 + 3 = 4, and the second total communication overhead is calculated as 5 + 5 + 7 + 7 = 24. The communication overhead difference of target container A is then calculated as 24 - 4 = 20. If the communication overhead difference of target container M is 15 and the communication overhead difference of target container N is 8, then target container A is selected as the container to be migrated. Since the target container interacts more with containers on other racks and less with containers on the current rack, the communication overhead difference of the target container will be larger. Therefore, the target container that interacts most with containers on other racks is most likely to be the migration target. Compared with Scheme 1, Scheme 2 only considers the total communication overhead of the target containers, while Scheme 2 makes a fine-grained distinction and comprehensive consideration of the communication overhead between the target container and containers on other racks and the current rack. Therefore, the container selected for migration according to Scheme 2 is more reasonable, avoiding the misjudgment of the target container with a large number of interactions with containers on the current rack as the migration target.

[0033] Optionally, before selecting the container to be migrated based on communication overhead, the container migration method further includes: in response to creating a new target container, obtaining the upstream and downstream containers of the new target container and the communication overhead between the new target container and each upstream and downstream container according to the network topology, and storing them in a database, wherein the database stores all target containers, upstream and downstream containers, communication overhead in the network, and the correspondence between the three.

[0034] In this embodiment, by pre-building and updating the database in real time, the database data can be quickly called to calculate the relevant communication overhead when container migration is required, thereby quickly realizing container migration decisions and improving service quality.

[0035] Step 102: Determine the target rack based on the communication overhead of the container to be migrated after migration, and migrate the container to be migrated to the target rack.

[0036] Specifically, the target rack is determined based on the communication overhead of the container to be migrated after the migration, including:

[0037] Step 1021: Determine the racks to which the upstream and downstream containers of the container to be migrated belong as candidate racks.

[0038] Step 1022: Obtain the total third communication overhead corresponding to the container to be migrated to each alternative rack.

[0039] Step 1023: Sort the total third communication overhead and select the candidate rack with the smallest total third communication overhead as the target rack.

[0040] In this embodiment, since the container to be migrated, obtained from step 101, interacts extensively with containers on other racks, there is at least one candidate rack. Therefore, there is at least one possible scheme for the container to be migrated to a candidate rack, and the candidate rack may also include the current rack. The target rack is determined based on the communication overhead corresponding to the various schemes after the container to be migrated, thereby selecting the optimal target rack, i.e., minimizing the communication overhead after the container is migrated to the target rack.

[0041] Optionally, step 1022: obtaining the total third communication overhead corresponding to the container to be migrated after it is to be migrated to each alternative rack, specifically includes: obtaining the container to be migrated, upstream and downstream containers, communication overhead and their correspondence after the container to be migrated is to be migrated to the alternative rack according to the network topology; calculating the total third communication overhead between the container to be migrated and the upstream and downstream containers to obtain the total third communication overhead corresponding to the alternative rack.

[0042] Optionally, after determining the target rack based on the communication overhead of the container to be migrated after migration, and before migrating the container to be migrated to the target rack, the container migration method further includes: determining the target physical machine on the target rack based on the number of interactions with the container to be migrated, so that the container to be migrated can be migrated to the target physical machine.

[0043] In this embodiment, when multiple physical machines are stored on the target rack, the target physical machine on the target rack can be further determined based on the number of interactions with the container to be migrated, thereby further reducing the communication overhead after container migration and reducing the latency of the services carried by the migrated container.

[0044] Specifically, determining the target physical machine on the target rack based on the number of interactions with the container to be migrated includes: determining the physical machine as the target physical machine if only one physical machine on the target rack has upstream and downstream containers of the container to be migrated; or, determining the physical machine with the largest number of upstream and downstream containers carrying the container to be migrated as the target physical machine if at least one physical machine on the target rack has upstream and downstream containers of the container to be migrated. Determining the physical machine with the largest number of upstream and downstream containers carrying the container to be migrated as the target physical machine further includes: selecting the physical machine with the lowest resource utilization as the target physical machine if at least two physical machines have the largest and equal number of upstream and downstream containers carrying the container to be migrated.

[0045] In this embodiment, if the container to be migrated and its upstream and downstream containers are all located on the same physical machine, the communication overhead between them is minimized. Therefore, the container to be migrated is moved to a physical machine with more upstream and downstream containers to minimize the overall communication overhead. If multiple physical machines on a rack contain upstream and downstream containers of the container to be migrated, the physical machine with the largest number of upstream and downstream containers is determined as the target physical machine to minimize the overall communication overhead.

[0046] The container migration method provided in this embodiment first selects containers to be migrated from the current physical machines based on communication overhead. Then, it determines the target rack for migration based on the communication overhead after the container is to be migrated, aiming to minimize the communication overhead of the container after migration and minimize the latency of the services it carries, thereby providing better service quality and meeting the latency requirements of emerging services. Secondly, the containers selected based on communication overhead are those that interact more with containers on other racks and less with containers on the current rack. This method is more reasonable and avoids misjudging target containers with a large number of interactions with containers on the current rack as migration targets. Thirdly, it determines the target rack for container migration based on the corresponding communication overhead of various migration scenarios for the container, thus selecting the optimal target rack, i.e., minimizing the communication overhead after the container is migrated to the target rack. Furthermore, when the target rack contains multiple physical machines, the target physical machines on the target rack are determined based on the number of interactions with the container to be migrated, further reducing the communication overhead after container migration and thus minimizing the latency of the services carried by the migrated container. Furthermore, by building and updating a database to store the target container, upstream and downstream containers, communication overhead, and the correspondence between them, the database can be quickly accessed to calculate the required communication overhead when container migration is needed, thereby enabling rapid container migration decisions and further improving service quality.

[0047] Example 2:

[0048] like Figure 2As shown, this embodiment provides a container migration device, including a selection module 21 and a first determination module 22.

[0049] The selection module 21 is used to select containers to be migrated based on communication overhead in response to the current physical machine's resource utilization exceeding a preset threshold. The communication overhead is the number of communication devices traversed between two containers that have direct data interaction.

[0050] The first determining module 22, connected to the selecting module 21, is used to determine the target rack based on the communication overhead of the container to be migrated after migration, and to migrate the container to be migrated to the target rack.

[0051] Optionally, the container migration apparatus also includes an update module.

[0052] The update module connects to the database and, in response to the creation of a new target container, obtains the upstream and downstream containers of the new target container and the communication overhead between the new target container and each upstream and downstream container according to the network topology, and stores them in the database. The database stores all target containers, upstream and downstream containers, communication overhead in the network, and the correspondence between the three.

[0053] Optionally, the selection module includes a first acquisition unit, a second acquisition unit, a calculation unit, and a selection unit.

[0054] The first acquisition unit is used to acquire the target container, upstream and downstream containers, communication overhead, and the correspondence between them on the current physical machine.

[0055] The second acquisition unit, connected to the first acquisition unit, is used to acquire the first total communication overhead and the second total communication overhead of the target container based on the target container, upstream and downstream containers, communication overhead, and the correspondence between the three.

[0056] The calculation unit, connected to the second acquisition unit, is used to calculate the difference between the second total communication overhead of the target container and the first total communication overhead, so as to obtain the communication overhead difference of the target container.

[0057] The selection unit, connected to the computing unit, is used to sort the communication overhead differences of all target containers on the current physical machine and select the target container with the largest communication overhead difference as the container to be migrated.

[0058] Optionally, the second acquisition unit includes a partitioning component, a first acquisition component, and a second acquisition component.

[0059] The partitioning component is used to classify the target container's upstream and downstream containers into two categories: the target container's current rack and other racks, based on the target container, upstream and downstream containers, communication overhead, the correspondence between these three, and the rack to which the container belongs. The first acquisition component, connected to the partitioning component, is used to calculate the sum of communication overhead between the target container and its upstream and downstream containers in its current rack, to obtain the first total communication overhead of the target container.

[0060] The second acquisition component, connected to the partitioning component, is used to calculate the sum of communication overhead between the target container and its upstream and downstream containers in other racks, so as to obtain the second total communication overhead of the target container.

[0061] Optionally, the first determining module includes a first determining unit, a third acquiring unit, and a second determining unit.

[0062] The first determining unit is used to determine the racks to which the upstream and downstream containers of the container to be migrated belong as candidate racks.

[0063] The third acquisition unit, connected to the first determination unit, is used to acquire the total third communication overhead corresponding to the migration of the container to be migrated to each alternative rack.

[0064] The second determining unit, connected to the third obtaining unit, is used to sort the total third communication overhead and select the candidate rack with the smallest total third communication overhead as the target rack.

[0065] Optionally, the third acquisition unit includes a third acquisition component and a calculation component.

[0066] The third acquisition component, connected to the first determination unit, is used to acquire the container to be migrated, upstream and downstream containers, communication overhead, and the correspondence between them after the container to be migrated is migrated to the alternative rack.

[0067] The computing component, connected to the third acquisition component, is used to calculate the total third communication overhead between the container to be migrated and its upstream and downstream containers, so as to obtain the total third communication overhead corresponding to the alternative rack.

[0068] Optionally, the container migration apparatus also includes a second determining module.

[0069] The second determining module, connected to the first determining module, is used to determine the target physical machine on the target rack based on the number of interactions with the container to be migrated, so that the container to be migrated can be migrated to the target physical machine.

[0070] Optionally, the second determining module is specifically configured to determine the physical machine as the target physical machine in response to the fact that only one physical machine on the target rack has upstream and downstream containers of the container to be migrated; or, in response to the fact that at least one physical machine on the target rack has upstream and downstream containers of the container to be migrated, determine the physical machine with the largest number of upstream and downstream containers carrying the container to be migrated as the target physical machine. The second determining module is further configured to determine the physical machine with the largest number of upstream and downstream containers carrying the container to be migrated as the target physical machine, and also to select the physical machine with the lowest resource utilization as the target physical machine in response to the fact that at least two physical machines have the largest and equal number of upstream and downstream containers carrying the container to be migrated.

[0071] The container migration apparatus provided in this embodiment is used to select containers to be migrated from the current physical machines based on communication overhead, and to determine the target rack for migration based on the communication overhead of the containers to be migrated after the planned migration. This aims to minimize the communication overhead of the containers to be migrated after the migration and minimize the latency of the services carried on them, thereby providing better service quality and meeting the latency requirements of emerging services. Furthermore, the containers to be migrated selected based on communication overhead are those that interact more with containers on other racks and less with containers on the current rack. Containers selected in this way are more reasonable and avoid misjudging target containers with a large number of interactions with containers on the current rack as migration targets. The apparatus also determines the target rack for container migration based on the corresponding communication overhead of various migration schemes for the containers to be migrated, thereby selecting the optimal target rack, i.e., minimizing the communication overhead after the containers are migrated to the target rack. Further, when multiple physical machines are located on the target rack, the apparatus determines the target physical machine on the target rack based on the number of interactions with the containers to be migrated, thereby further reducing the communication overhead after container migration and minimizing the latency of the services carried by the migrated containers. In addition, the database is used to store containers, upstream and downstream containers, communication overhead, and the correspondence between the three. This allows the database to be quickly accessed to calculate the required communication overhead data when container migration is needed, thereby enabling rapid container migration and further improving service quality.

[0072] Example 3:

[0073] like Figure 3 As shown, this embodiment provides a network device, including a memory 31 and a processor 32. The memory 31 stores a computer program, and the processor 32 is configured to run the computer program to implement the container migration method as described in Embodiment 1.

[0074] The network device provided in this embodiment selects containers to be migrated from the current physical machine based on communication overhead, and determines the target rack for migration based on the communication overhead of the containers to be migrated after the migration is completed, so as to minimize the communication overhead of the containers to be migrated after the migration is completed and minimize the latency of the services carried on them, so as to provide better service quality and meet the latency requirements of emerging services.

[0075] It is understood that the above embodiments are merely exemplary implementations used to illustrate the principles of the present invention, and the present invention is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.

Claims

1. A container migration method, characterized in that, include: In response to the current physical machine's resource utilization exceeding a preset threshold, based on the target container, upstream and downstream containers, communication overhead, and the correspondence between the three, as well as the rack to which the container belongs, the upstream and downstream containers of the target container are divided into two categories: the current rack and other racks. Calculate the sum of communication overhead between the target container and its upstream and downstream containers in the current rack to obtain the first total communication overhead of the target container, and calculate the sum of communication overhead between the target container and its upstream and downstream containers in other racks to obtain the second total communication overhead of the target container. Calculate the difference between the second total communication overhead and the first total communication overhead of the target container to obtain the communication overhead difference of the target container; Sort the communication overhead differences of all target containers on the current physical machine, and select the target container with the largest communication overhead difference as the container to be migrated. The communication overhead is the number of communication devices traversed between two containers that have direct data interaction. The racks containing the upstream and downstream containers of the container to be migrated are identified as alternative racks; Obtain the total third communication overhead corresponding to the containers to be migrated to each of the alternative racks; The total third communication overhead is sorted, and the candidate rack with the smallest total third communication overhead is selected as the target rack. The container to be migrated is then migrated to the target rack.

2. The container migration method according to claim 1, characterized in that, Before selecting the container to be migrated based on communication overhead, the method further includes: In response to the creation of a new target container, the upstream and downstream containers of the new target container and the communication overhead between the new target container and each upstream and downstream container are obtained according to the network topology, and stored in the database. The database stores all target containers, upstream and downstream containers, communication overhead in the network, and the correspondence between the three.

3. The container migration method according to claim 1, characterized in that, The process of obtaining the total third communication overhead corresponding to the container to be migrated after it is planned to be migrated to each of the alternative racks specifically includes: After obtaining the container to be migrated to the alternative rack, the container to be migrated, the upstream and downstream containers, the communication overhead, and the correspondence between the three are determined. Calculate the total third communication overhead between the container to be migrated and its upstream and downstream containers to obtain the total third communication overhead corresponding to the alternative rack.

4. The container migration method according to claim 1, characterized in that, After determining the target rack based on the communication overhead of the container to be migrated after the migration, and before migrating the container to be migrated to the target rack, the method further includes: The target physical machine on the target rack is determined based on the number of interactions with the container to be migrated, so that the container to be migrated can be migrated to the target physical machine.

5. The container migration method according to claim 4, characterized in that, The step of determining the target physical machine on the target rack based on the number of interactions with the container to be migrated specifically includes: In response to the fact that there is only one physical machine on the target rack with upstream and downstream containers of the container to be migrated, the physical machine is identified as the target physical machine; Alternatively, in response to the fact that at least one physical machine on the target rack has upstream and downstream containers of the container to be migrated, the physical machine with the largest number of upstream and downstream containers carrying the container to be migrated is determined as the target physical machine; The physical machine with the largest number of upstream and downstream containers carrying the container to be migrated is identified as the target physical machine, which also includes: In response to the maximum number of upstream and downstream containers to be migrated being equal in number and at least two physical machines, the physical machine with the lowest resource utilization is selected as the target physical machine.

6. A container migration device, characterized in that, Includes a selection module and a first determination module. A selection module is used to respond to situations where the resource utilization of the current physical machine exceeds a preset threshold. Based on the target container, upstream and downstream containers, communication overhead, and the correspondence between these three, as well as the rack to which the container belongs, the upstream and downstream containers of the target container are divided into two categories: the target container's current rack and other racks. The sum of the communication overhead between the target container and its upstream and downstream containers in its current rack is calculated to obtain the first total communication overhead of the target container. The sum of the communication overhead between the target container and its upstream and downstream containers in other racks is also calculated to obtain the second total communication overhead of the target container. The difference between the second total communication overhead and the first total communication overhead is calculated to obtain the communication overhead difference of the target container. All target containers on the current physical machine are sorted by their communication overhead differences, and the target container with the largest communication overhead difference is selected as the container to be migrated. Here, the communication overhead refers to the number of communication devices traversed between two containers with direct data interaction. The first determining module, connected to the selecting module, is used to determine the racks to which the upstream and downstream containers of the container to be migrated belong as candidate racks, obtain the total third communication overhead corresponding to each candidate rack after the container to be migrated is to be migrated, sort the total third communication overhead, select the candidate rack with the smallest total third communication overhead as the target rack, and migrate the container to be migrated to the target rack.

7. A network device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to implement the container migration method as described in any one of claims 1-5.