Container scheduling method and device in cloud environment, electronic equipment and storage medium

By migrating containers in cloud data centers to utilize more server resources, the problem of increased energy consumption in cloud data centers is solved, and intensive management of containers and system resources is achieved, and energy consumption is reduced.

CN120011008APending Publication Date: 2025-05-16CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411888025.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

With the expansion of the scale of cloud data centers, the power consumption of infrastructure has increased, becoming a bottleneck in the development of cloud data centers. How to reduce the energy consumption of cloud data centers has become a technical problem that needs to be solved urgently.

Method used

Among multiple servers in the cloud data center, determine the idle server and the non-idle server, migrate the containers hosted on the idle server to run on the non-idle server, and set the idle server to hibernate or off after all the containers are migrated out.

Benefits of technology

By migrating containers from idle/low-load servers to other servers to run, intensive management of containers and intensive management of system resources can be realized, shut down or enter sleep state for idle/low-load servers, reducing energy consumption, thereby reducing global energy consumption in cloud data centers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120011008A_ABST
    Figure CN120011008A_ABST
Patent Text Reader

Abstract

The invention provides a container scheduling method and device in a cloud environment, electronic equipment and a storage medium. According to the method and the device, the server in the idle state and the server in the non-idle state are determined in the plurality of servers in the cloud data center, and the container carried on the server in the idle state is migrated to the server in the non-idle state to run. And after all the containers loaded on the server in the idle state are migrated out, setting the server in the idle state to be in a dormant state or a closed state. According to the method and the device, the containers are migrated and concentrated from the idle load / low load servers to other servers in the cloud data center for operation, so that the containers in operation can be concentrated to the servers as few as possible in the cloud data center for operation, and the idle load / low load servers are closed or enter a dormant state; the energy consumption of the idle load / low load server is reduced, and the global energy consumption of the cloud data center can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a container scheduling method, device, electronic device and storage medium in a cloud environment. Background Art

[0002] With the rapid development of cloud computing technology, the scale of cloud data centers of cloud service providers is getting larger and larger. However, large-scale cloud data centers require huge amounts of electricity to maintain operation.

[0003] However, as the scale of cloud service providers' cloud data centers continues to expand, the power consumption of infrastructure is likely to become a bottleneck restricting the continued development of cloud data centers.

[0004] Therefore, whether from the perspective of improving the economic benefits of cloud service providers or from the perspective of protecting the environment and reducing carbon dioxide emissions that cause global warming, reducing the energy consumption of cloud service providers' cloud data centers is an unavoidable topic.

[0005] However, how to reduce the energy consumption of cloud service providers' cloud data centers is a technical problem that needs to be solved urgently. Summary of the invention

[0006] In order to reduce the energy consumption of a cloud data center of a cloud service provider, the present application shows a container scheduling method, device, electronic device and storage medium in a cloud environment.

[0007] In a first aspect, the present application provides a container scheduling method in a cloud environment, the method comprising:

[0008] Among a plurality of servers in a cloud data center, determining a server in an idle state and a server in a non-idle state;

[0009] Migrate the container hosted on the idle server to a non-idle server for operation;

[0010] After all containers carried on the idle server are migrated out, the idle server is set to a dormant state or a shutdown state.

[0011] In a second aspect, the present application shows a container scheduling device in a cloud environment, the device comprising:

[0012] A determination module, used to determine, among a plurality of servers in a cloud data center, a server in an idle state and a server in a non-idle state;

[0013] A migration module, used to migrate a container carried on an idle server to a server in a non-idle state for operation;

[0014] The setting module is used to set the idle server to a dormant state or a shutdown state after all containers carried on the idle server are migrated out.

[0015] In a third aspect, the present application shows an electronic device, which includes: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the method described in any of the above aspects.

[0016] In a fourth aspect, the present application illustrates a non-temporary computer-readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute a method as described in any of the above aspects.

[0017] In a fifth aspect, the present application illustrates a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the method described in any of the above aspects.

[0018] The technical solution provided by this application may have the following beneficial effects:

[0019] In the present application, among multiple servers in a cloud data center, servers in an idle state and servers in a non-idle state are determined, and containers carried on servers in an idle state are migrated to servers in a non-idle state for operation. After all containers carried on servers in an idle state are migrated out, servers in an idle state are set to a dormant state or a shut down state. Through the present application, containers are migrated from idle / low-load servers to other servers in a cloud data center for operation, and running containers can be concentrated on as few servers in a cloud data center as possible to run, thereby achieving intensive management of containers and intensive management of system resources of servers in a cloud data center, thereby shutting down or putting idle / low-load servers into a dormant state, reducing the energy consumption of idle / low-load servers, and thus reducing the global energy consumption of the cloud data center. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a schematic diagram of a container scheduling system in a cloud environment of the present application.

[0021] Figure 2 This is a flowchart of the steps of a container scheduling method in a cloud environment of the present application.

[0022] Figure 3 It is a schematic diagram of a container scheduling method in a cloud environment of the present application.

[0023] Figure 4This is a structural block diagram of a container scheduling device in a cloud environment of the present application.

[0024] Figure 5 It is a block diagram of an electronic device of the present application.

[0025] Figure 6 It is a block diagram of an electronic device of the present application. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0027] At present, with the development of cloud computing, Containers as a Service (CaaS), as a new service architecture after Infrastructure as a Service (IaaS), Platform as a Service (PaaS) and Software as a Service (SaaS), has occupied more cloud service markets in a short period of time. However, there is no energy-saving research on Containers as a Service.

[0028] Among them, CaaS is a cloud computing service model that provides container-based application development, deployment and management services. Users can use container technology to package applications into containers and then deploy and manage them on the CaaS platform. CaaS usually includes services such as container engines, container orchestration, container images, networks and storage.

[0029] IaaS refers to a service model in which IT (Information Technology) infrastructure is provided as a service through the Internet and users are charged based on their actual usage or occupation of resources.

[0030] PaaS refers to a business model that provides a server platform as a service. The service provided by programs through the Internet is called SaaS, which is one of the three service models of cloud computing. In the era of cloud computing, the corresponding server platform or development environment provided as a service becomes PaaS.

[0031] As a software delivery model based on cloud computing, SaaS has the characteristics of multi-tenant architecture, network access, customization and flexibility, security and reliability, etc. It is widely used in business and personal life, helping enterprises reduce costs, improve efficiency and flexibility, while providing individual users with convenient and customized application experience.

[0032] This application proposes energy-saving research for Container as a Service.

[0033] For example, refer to Figure 1 , showing a structural block diagram of a container scheduling system in a cloud environment of the present application, the system includes: a cloud data center and a scheduling program.

[0034] Cloud data center: Cloud data center is the core of the whole system. It is composed of a large number of heterogeneous servers (physical machines or nodes) with different performance. Each server is equipped with a multi-core CPU (Central Processing Unit). The performance of a CPU is measured by millions of instructions per second. In a period of time, the cloud data center will serve multiple users, and will continue to receive new user requests and provide services to new users.

[0035] Figure 1 , it is shown that there are servers 1 to N in the cloud data center. N is a positive integer greater than 1.

[0036] Scheduler,The scheduler includes: server classifier, integration manager and container manager.

[0037] Server classification program: It is a program responsible for classifying the servers that host containers according to their busyness. It uses a classification algorithm (such as the ThresholdNet classification algorithm, etc.) to perform unsupervised training on the feature data of the servers in the cloud data center, and ultimately obtains a result set of server images classified by color depth. Based on the result set of classified images, the current system resource usage of each server in the cloud data center can be obtained, and then the busyness of each server can be obtained.

[0038] Integration management program: It is a program responsible for integrating and regulating containers on servers in cloud data centers. It can select appropriate containers to be migrated based on the server image result set output by the server classification algorithm, using a robust scheduling algorithm through supervised learning tuning, and migrate and integrate the containers to be migrated as a whole to other suitable target servers. The integration management program can also allocate and manage resources for all newly deployed containers and other k8s resource objects on the same physical machine.

[0039] Container manager: Each server is equipped with a container manager, which is responsible for managing and scheduling containers on the server. It can initially place and dynamically schedule containers based on actual conditions, allocate system resources on the server to containers based on actual conditions, and manage the system resources allocated to containers.

[0040] In the present application, in a scenario where a cloud data center has been established and has just started to operate, no container is hosted on each server in the cloud data center.

[0041] In this way, container unloaded placement can be performed. Container unloaded placement refers to the process of configuring containers on unloaded / idle servers and allocating system resources to them when the cloud data center just starts running.

[0042] For example, a container can be created on a server in a cloud data center, and the container can be allocated (for example, randomly or according to manually specified information) to multiple servers in the cloud data center through an integrated management program, and can be allocated to all or part of the servers in the cloud data center. The container unloaded placement needs to consider multiple factors, such as the number of servers, the size of the servers, the minimum resource request for the SVC object service startup, and the access relationship between containers.

[0043] SVC (Service) is a core resource in Kubernetes (K8s), which is mainly used to provide network services, solve the dynamic change problem of containers, and provide stable access addresses and load balancing functions for client applications. SVC defines a group of containers with the same functions, provides a unified entry address, and distributes the request load to each container in the cloud data center.

[0044] Furthermore, if it is necessary to add a new container on a server in the cloud data center in the future, if there are multiple new containers, the multiple new containers can be polled and integrated into as few servers as possible, so as to achieve the effect of reducing the global energy consumption of the cloud data center.

[0045] In addition, system resources on the server can be allocated to the container so that the container can use the system resources, including CPU, memory, bandwidth, disk, etc.

[0046] If a container has a large demand for system resources, more system resources may be allocated to the container; or, if a container has a small demand for system resources, fewer system resources may be allocated to the container, so as to achieve on-demand allocation.

[0047] If there are multiple newly added containers, sometimes there may be conflicts between the multiple containers or they may affect each other, resulting in the multiple newly added containers not being able to be established on the same server. In this way, the multiple newly added containers can be established on different servers respectively, and each server only carries one newly added container.

[0048] Reference Figure 2 , shows a flow chart of steps of a container scheduling method in a cloud environment of the present application, the method is applied to the aforementioned scheduling program, wherein the method includes:

[0049] In step S101 , among a plurality of servers in a cloud data center, servers in an idle state and servers in a non-idle state are determined.

[0050] The server in the idle state is a server with low utilization rate of system resources.

[0051] Generally, the number of containers running on a server in an idle state is relatively small, and the total amount of system resources of the server consumed by each container on the server in an idle state is relatively small.

[0052] The number of containers running on the server in the non-idle state is relatively large, and the total amount of system resources of the server consumed by each of the containers on the server in the non-idle state is relatively large.

[0053] In one embodiment of the present application, the idle state and the non-idle state are relative concepts.

[0054] In one example, the system resource utilization of a server with high system resource utilization is higher than that of a server with low system resource utilization, so that the server with high system resource utilization is in a non-idle state, and the server with low system resource utilization is in an idle state.

[0055] In another example, multiple servers in a cloud data center are sorted in descending order according to the utilization of their respective system resources, with the first half of the servers being in a non-idle state and the second half of the servers being in an idle state.

[0056] In another example, servers in an idle state and servers in a non-idle state can also be divided according to the relationship between the utilization of system resources and a special threshold. The special threshold can be, for example, 50% or 55%, etc., which can be determined according to actual conditions and will not be elaborated in this application.

[0057] A server whose utilization rate of system resources is less than a specific threshold is a server in an idle state, and a server whose utilization rate of system resources is greater than or equal to the specific threshold is a server in a non-idle state.

[0058] In step S102, a container carried on a server in an idle state is migrated to a server in a non-idle state for execution.

[0059] For example, containers carried on a server in an idle state are migrated sequentially (one by one) to a server in a non-idle state for execution.

[0060] Secondly, in the process of migrating the container carried by the idle server to the non-idle server for running, the load of the non-idle server is guaranteed to be not overloaded as much as possible.

[0061] In one embodiment, if the server in the idle state carries one container, the container carried by the server in the idle state may be migrated to one of the servers in the non-idle state for execution.

[0062] In another embodiment, if there are multiple containers carried on the server in the idle state, the multiple containers carried on the server in the idle state can be migrated in sequence to the same server in the non-idle state for execution, or the multiple containers carried on the server in the idle state can be migrated in sequence to different servers in the non-idle state for execution, so as to achieve load balancing among the multiple servers in the non-idle state.

[0063] Alternatively, in another embodiment of the present application, before migrating the container carried on the server in an idle state to the server in a non-idle state for running, the time required for the process of "migrating the container carried on the server in an idle state to the server in a non-idle state for running" can also be evaluated. If the time is short, the container carried on the server in the idle state can be migrated to the server in a non-idle state for running. Alternatively, if the time is long, the migration process may cause the container carried on the server in the idle state to be unable to provide services normally for a long period of time. In order to avoid affecting the service quality, the container carried on the server in the idle state can be temporarily not migrated to the server in a non-idle state for running.

[0064] In step S103, after all containers carried on the server in the idle state are migrated out, the server in the idle state is set to a dormant state or a shutdown state.

[0065] The power consumption of a server in sleep state is very low, consuming very little energy, and a server that is turned off consumes no energy.

[0066] In an optional implementation, the frequency of executing the process of step S101 can be set according to actual conditions. For example, step S101 is executed once every 1 second, or step S101 is executed once every 2 seconds. This can shorten the idle time of the idle server, and can promptly migrate the containers carried on the idle server to the non-idle server for operation. After all the containers carried on the idle server are migrated out, the idle server can be promptly set to sleep or shut down. In this way, the global energy consumption of the cloud data center can be further reduced in a timely manner.

[0067] In the present application, among multiple servers in a cloud data center, servers in an idle state and servers in a non-idle state are determined, and containers carried on servers in an idle state are migrated to servers in a non-idle state for operation. After all containers carried on servers in an idle state are migrated out, servers in an idle state are set to a dormant state or a shut down state. Through the present application, containers are migrated from idle / low-load servers to other servers in a cloud data center for operation, and running containers can be concentrated on as few servers in a cloud data center as possible to run, thereby achieving intensive management of containers and intensive management of system resources of servers in a cloud data center, thereby shutting down or putting idle / low-load servers into a dormant state, reducing the energy consumption of idle / low-load servers, and thus reducing the global energy consumption of the cloud data center.

[0068] In one embodiment of the present application, the server in a non-idle state includes a server in a normal state and a server in a busy state.

[0069] The utilization rate of the system resources of the server in the normal state is greater than the utilization rate of the system resources of the server in the idle state.

[0070] The utilization rate of the system resources of the server in the busy state is greater than the utilization rate of the system resources of the server in the normal state.

[0071] In one embodiment of the present application, the normal state and the busy state are relative concepts.

[0072] For example, multiple servers in a cloud data center are sorted in descending order according to the utilization of their respective system resources, with the second half of the servers being idle, the first half of the servers being non-idle, the first half of the servers being busy, and the second half of the servers being normal.

[0073] In one example, servers in a normal state and servers in a busy state may also be divided according to the relationship between the utilization of system resources and a specific threshold. The specific threshold may be determined based on actual conditions and is not described in detail in this application.

[0074] Alternatively, in another example, a heuristic algorithm or a genetic algorithm may be used to screen out servers that have been in a normal state for a period of time from among the servers in a non-idle state based on historical operating data of the servers in a non-idle state (e.g., historical system resource utilization, etc.). The length of the period of time may include 5 seconds, 10 seconds, 15 seconds, 30 seconds, or 60 seconds, etc., and the specific duration may be determined based on actual conditions, and this application is not limited to this.

[0075] In this embodiment, when the container carried on the server in the idle state is migrated to the server in the non-idle state for execution in step S102, the containers carried on the server in the idle state can be migrated to the server in the normal state in sequence for execution, without migrating the containers carried on the server in the idle state to the server in the busy state in sequence for execution.

[0076] The utilization rate of the system resources of the server in the busy state is higher than that of the server in the normal state, and the margin of the idle system resources of the server in the normal state is greater than that of the server in the busy state.

[0077] In this way, it is possible to avoid the containers carried on the idle server from further increasing the utilization of system resources of the busy server, thereby avoiding further increasing the load of the busy server, avoiding overloading the busy server, and avoiding affecting the service quality of the cloud service provided by the container in the busy server.

[0078] In one embodiment, there is only one server in a normal state in the cloud data center. Thus, when the containers carried on the server in an idle state are sequentially migrated to the server in a normal state for operation, the containers carried on the server in an idle state can be sequentially migrated to the one server in a normal state for operation.

[0079] Alternatively, in another embodiment, there are multiple servers in a normal state in the cloud data center; thus, when the containers carried on the idle servers are sequentially migrated to the servers in a normal state for operation, the server with the lowest utilization of system resources can be screened among the multiple servers in a normal state; then, the containers carried on the idle servers are sequentially migrated to the screened servers with the lowest utilization of system resources for operation.

[0080] In one embodiment, there is one container carried on the server in an idle state. Thus, for this one container, among multiple servers in a normal state, a server with the lowest utilization of system resources is screened, and the one container carried on the server in an idle state is migrated to the screened server with the lowest utilization of system resources for operation.

[0081] Alternatively, in another embodiment, the server in the idle state carries multiple containers.

[0082] In this way, multiple containers carried on the server in the idle state can be polled in sequence.

[0083] For example, for one of the multiple containers hosted on a server in an idle state, a server with the lowest utilization of system resources is screened among multiple servers in a normal state, and the one of the containers hosted on the server in the idle state is migrated to the screened server with the lowest utilization of system resources for operation.

[0084] For the next container among the multiple containers hosted on the server in an idle state, a server with the lowest utilization rate of system resources is screened among the multiple servers in a normal state, and the next container hosted on the server in the idle state is migrated to the screened server with the lowest utilization rate of system resources for operation.

[0085] Until the last container of the multiple containers hosted on the idle server is processed.

[0086] In another embodiment of the present application, in the process of migrating containers carried on a server in an idle state to a server in a normal state for running in sequence, it can be detected in real time whether the utilization rate of system resources of the server in the normal state exceeds a preset threshold.

[0087] For example, the utilization of system resources of a server in a normal state is obtained in real time, and the utilization of system resources of the server includes at least one of the following: the utilization of the server's CPU, the utilization of the server's memory, the utilization of the server's disk, and the utilization of the server's bandwidth, etc.

[0088] The preset thresholds may include: a preset CPU utilization threshold, a preset memory utilization threshold, a preset disk utilization threshold, and a preset bandwidth utilization threshold, etc.

[0089] The specific values ​​of the preset CPU utilization threshold, the preset memory utilization threshold, the preset disk utilization threshold, and the preset bandwidth utilization threshold can be determined according to actual conditions, and this application does not limit this.

[0090] In an optional implementation of the present application, for any server in a non-idle state in a cloud data center, the utilization of the server's system resources can be made not to exceed a preset threshold but close to the preset threshold as much as possible, thereby improving the utilization of system resources without reducing the quality of cloud services.

[0091] The preset CPU utilization threshold, the preset memory utilization threshold, the preset disk utilization threshold and the preset bandwidth utilization threshold are respectively between 80% and 90%. The preset CPU utilization threshold, the preset memory utilization threshold, the preset disk utilization threshold and the preset bandwidth utilization threshold can be different. In this way, 10% to 20% of system resources are reserved, which can achieve a balanced consideration of improving the global energy saving effect of the cloud data center and the cloud service quality of the cloud data center. It can achieve the reduction of the global energy consumption of the cloud data center while ensuring the quality of cloud services, and improve the utilization rate of system resources on the server, so as to improve the robustness of the cloud data center and the adaptability to sudden high-concurrency services.

[0092] Among them, when the CPU utilization of the server in normal state exceeds the preset CPU utilization threshold, the memory utilization of the server in normal state exceeds the preset memory utilization threshold, the disk utilization of the server in normal state exceeds the preset disk utilization threshold, or the bandwidth utilization of the server in normal state exceeds the preset bandwidth utilization threshold, it can be determined that the utilization of system resources of the server in normal state exceeds the preset threshold.

[0093] Alternatively, when the CPU utilization of the server in normal state does not exceed the preset CPU utilization threshold, the memory utilization of the server in normal state does not exceed the preset memory utilization threshold, the disk utilization of the server in normal state does not exceed the preset disk utilization threshold, and the bandwidth utilization of the server in normal state does not exceed the preset bandwidth utilization threshold, it can be determined that the utilization of system resources of the server in normal state does not exceed the preset threshold.

[0094] When the utilization rate of the system resources of the server in the normal state exceeds a preset threshold, a server with the lowest utilization rate of the system resources is selected from among the multiple servers in the idle state.

[0095] The server with the lowest utilization of system resources is the server with the lowest utilization of system resources at the current moment or in the current time period. At least part of the containers on the server in a normal state whose utilization of system resources exceeds a preset threshold are migrated to the selected server with the lowest utilization of system resources for operation, and the work of migrating the containers carried by the selected server with the lowest utilization of system resources can also be terminated.

[0096] The server with the lowest utilization of system resources is selected as a server, which can be understood as: one of the servers in the idle state determined in step S101, the container carried by the one of the servers in the idle state determined in step S101 originally needs to be migrated to the server in the normal state for operation, but because the utilization of system resources of the server in the normal state exceeds the preset threshold, the server with the lowest utilization of system resources selected needs to carry at least part of the containers carried by the server in the normal state whose utilization of system resources exceeds the preset threshold, that is, the server with the lowest utilization of system resources selected needs to carry at least part of the containers carried by the server in the normal state whose utilization of system resources exceeds the preset threshold. For example, there is no need to migrate the container carried on the server with the lowest utilization rate of the selected system resources to a server in a normal state whose utilization rate of system resources exceeds a preset threshold for operation. Otherwise, the container carried on the server in a normal state whose utilization rate of system resources exceeds the preset threshold will need to be migrated back to the server with the lowest utilization rate of the selected system resources for operation, which will waste the resources consumed by the switching work.

[0097] Therefore, the work of migrating the container hosted on the server with the lowest utilization rate of the selected system resources can be terminated.

[0098] Secondly, whether to "migrate some containers in the servers in normal state whose system resource utilization exceeds the preset threshold to the selected server with the lowest system resource utilization for operation" or "migrate all containers in the servers in normal state whose system resource utilization exceeds the preset threshold to the selected server with the lowest system resource utilization for operation" can be determined according to actual conditions.

[0099] For example, it is assumed that a server in a normal state whose utilization rate of system resources exceeds a preset threshold is regarded as a source server.

[0100] The containers on the source server can be migrated one by one to the selected server with the lowest utilization of system resources for running, and after each container on the source server is migrated to the selected server with the lowest utilization of system resources for running, it can be detected whether the utilization of the system resources of the source server still exceeds the preset threshold.

[0101] When the utilization rate of the system resources of the source server no longer exceeds the preset threshold, the remaining containers on the source server may no longer be migrated to the selected server with the lowest utilization rate of the system resources for running.

[0102] When the utilization rate of the system resources of the source server still exceeds the preset threshold, the next container on the source server is migrated to the selected server with the lowest utilization rate of the system resources for operation.

[0103] In one embodiment of the present application, after executing step S101 to determine the servers in an idle state and the servers in a non-idle state among multiple servers in the cloud data center, the server identifiers of the servers in the idle state can be stored in a preset queue; different servers in the cloud data center have different server identifiers.

[0104] Accordingly, when executing step S102 to migrate the container carried on the server in the idle state to the server in the non-idle state for execution, the container carried on the server corresponding to the server identifier in the preset queue can be migrated to the server in the non-idle state for execution, that is, the containers carried on which servers need to be migrated out are determined by the server identifier in the preset queue.

[0105] Accordingly, for terminating the work of migrating the container carried on the server with the lowest utilization rate of the selected system resources, the server identifier of the server with the lowest utilization rate of the selected system resources can be deleted from the preset queue. In this way, when the process of "migrating the container carried on the server in an idle state to the server in a non-idle state for running" is executed later, since the server identifier of the server with the lowest utilization rate of the selected system resources is no longer in the preset queue, the container carried on the server with the lowest utilization rate of the selected system resources will no longer be migrated to the server in a non-idle state for running, thereby terminating the work of migrating the container carried on the server with the lowest utilization rate of the selected system resources.

[0106] In another embodiment of the present application, it may be detected whether the utilization rate of system resources of a server in a normal state in a next time period will exceed a preset threshold.

[0107] The time period in which the current moment is located is before the next time period and is adjacent to the next time period. The length of each time period in this application can be the same. The length can be determined according to actual conditions, and this application does not limit this. For example, the length can be 10 seconds, 20 seconds, 30 seconds, 60 seconds, 120 seconds, and so on.

[0108] In the present application, it is possible to detect whether the system resource utilization of a server in a normal state in the next time period will exceed a preset threshold based on the system resource utilization of the server in a normal state in the current time period and the system resource utilization of the server in a normal state in the historical time period.

[0109] The historical time period is before the current time period. The historical time period can be one or multiple adjacent time periods.

[0110] The utilization rate of system resources in the current time period of the server in normal state and the utilization rate of system resources in the historical time period of the server in normal state can be input into the neural network model, so that the neural network model processes the utilization rate of system resources in the current time period of the server in normal state and the utilization rate of system resources in the historical time period of the server in normal state to obtain the result of whether the utilization rate of system resources of the server in normal state in the next time period will exceed the preset threshold.

[0111] This application does not limit the specific structure of the neural network model, as long as it can predict whether the utilization of system resources of a server in a normal state will exceed a preset threshold in the next time period.

[0112] If the utilization rate of system resources of the server in normal state exceeds the preset threshold in the next time period, the capacity of the server in normal state can be expanded (system resources can be increased) in time, or at least part of the containers on the server in normal state can be migrated to idle servers in the cloud data center in time to run, so as to avoid overloading of the server in normal state in the next time period.

[0113] In another embodiment of the present application, sometimes, according to actual requests, it may be necessary to establish a new container in the cloud data center, for example, to establish a new container in the cloud data center for a new user to provide cloud services to the new user through the new container.

[0114] When a new container needs to be established in a cloud data center, it can be detected whether there is a server in the cloud data center that is running and in a normal state.

[0115] A running server can be understood as a server that is not in a dormant state and is not in a shut down state.

[0116] Among them, by polling the servers in the cloud data center, the running servers in the cloud data center are first screened out, and then it is determined whether there are servers in normal status among the running servers.

[0117] In the case where there are servers running in a normal state in the cloud data center, a new container can be established on the servers running in a normal state to achieve intensive management of the containers.

[0118] Alternatively, when there is no server running in a normal state in the cloud data center, it is detected whether there is a server running in an idle state in the cloud data center.

[0119] In the case that there are servers that are running and in an idle state in the cloud data center, a new container may be established on the servers that are running and in an idle state.

[0120] Alternatively, when there is no idle server in the cloud data center, a server in a dormant or shut down state in the cloud data center is set to a running state, and a new container is established on the server set to the running state.

[0121] For example, in one embodiment, a second number of servers that need to be involved in the new containers is determined based on a first number of new containers that need to be established, and then a second number of servers that are in a dormant or shutdown state in the cloud data center are set to a running state, and then new containers are established on the second number of servers that are set to a running state, wherein a partial number of new containers are established on the second number of servers, the partial number is smaller than the first number, and the sum of the numbers of the new containers established on the second number of servers may be equal to the first number.

[0122] See also Figure 3 , a schematic diagram is used to illustrate the scheme of the present application, but it is not intended to limit the protection scope of the scheme of the present application.

[0123] In one embodiment, when determining servers in an idle state and servers in a non-idle state among multiple servers in a cloud data center, feature data of each server in the cloud data center can be obtained, and the feature data of the server includes at least one of the following: central processing unit CPU utilization of the server, memory utilization of the server, bandwidth utilization of the server, and disk utilization of the server; the feature data of each server in the cloud data center is input into a classification model so that the classification model processes the feature data of each server in the cloud data center to obtain the status of each server in the cloud data center, and the status of the server includes at least an idle state and a non-idle state; according to the status of each server, servers in an idle state and servers in a non-idle state are distinguished in the cloud data center.

[0124] Classification models include ThresholdNet algorithm model, etc.

[0125] The ThresholdNet algorithm model includes multiple layers, as shown in Table 1 below.

[0126]

[0127] Table 1

[0128] In Table 1, the first 3*3 convolution kernel in the convolution layer is used to input the feature data of each server in the cloud data center.

[0129] The softmax in the classification layer is used to output the status of each server in the cloud data center.

[0130] 1. Convolutional Layer

[0131] oOutput size: 112×112.

[0132] oContains two 3×3 convolution operations.

[0133] oConvolutional layers are used to extract features of the input data.

[0134] 2. Pooling layer

[0135] oOutput size: 56×56.

[0136] o Use a 3×3 max pooling operation to halve the size of the feature matrix / feature vector.

[0137] oPooling layers are often used to reduce the size of feature matrices or feature vectors, increase the receptive field, and reduce the amount of computation.

[0138] 3. Threshold block (1)

[0139] oOutput size: 56×56.

[0140] oContains 6 3×3 convolution operations, including threshold operations.

[0141] o A threshold block may be a specially designed convolutional block that aims to enhance the representation power of features by some means (e.g. thresholding).

[0142] 4. Transport layer (1)

[0143] oThe output size is first kept as 56×56 and then dimensionality reduction or feature conversion is performed through 1×1 convolution.

[0144] o Then use 2×2 max pooling to halve the feature matrix / feature vector size to 28×28.

[0145] oThe transfer layer is usually used to reduce the number of channels of the feature matrix / eigenvector or perform feature transformation while maintaining the spatial structure of the feature matrix / eigenvector.

[0146] 5.Threshold block (2), transport layer (2), threshold block (3), transport layer (3), threshold block (4), transport layer (4)

[0147] oThe layers follow a similar pattern.

[0148] o After each layer transfer, the size of the feature matrix / feature vector is halved (through max pooling), and threshold blocks are used to extract and enhance features.

[0149] 6.Threshold Block (5)

[0150] oOutput size: 7×7.

[0151] oContains four 3×3 convolution operations.

[0152] oThis is the last thresholding block, the feature matrix / feature vector size is already small and may be used to extract global features.

[0153] 7. Classification Layer

[0154] oThe output size first passes through a 1×1 average pooling layer, which is usually used for global average pooling, to convert the feature matrix / feature vector into a feature vector.

[0155] o This is followed by a 1000-dimensional fully connected layer for classification.

[0156] You can set thresholds to determine how the layers are connected, for example:

[0157] i≤Threshold,

[0158] i>Threshold,

[0159] In the above formula, i is the layer number (the number can be seen in Table 1). Threshold is the threshold value,

[0160] The x on the left side of the equal sign i Refers to the input of the i-th layer.

[0161] The x in H([]) on the right side of the equal sign o Refers to the feature data of each server in the cloud data center. That is, the input of the i-th layer has the feature data of each server in the cloud data center.

[0162] The x1 in H([]) on the right side of the equal sign refers to the output of the first layer, that is, the input of the i-th layer is connected to the output of the first layer.

[0163] The x in H([]) on the right side of the equal sign n / 4 refers to the output of the n / 4th layer, that is, the input of the i-th layer is connected to the output of the n / 4th layer.

[0164] The x in H([]) on the right side of the equal sign i-n / 4 refers to the output of the in / 4th layer, that is, the input of the i-th layer is connected to the output of the in / 4th layer.

[0165] The x in H([]) on the right side of the equal sign i-1 Refers to the output of the i-1th layer, that is, the input of the i-th layer is connected to the output of the i-1th layer.

[0166] The threshold is set to different values, and then the model architecture with different connection methods can be obtained according to the different threshold values.

[0167] In the above Table 1, there are 16 layers in total except "1000D fully connected and softmax".

[0168] In one example, if the threshold is 4.

[0169] According to the above formula, the connection relationship between each layer can be shown in Table 2 below.

[0170] layer connect layer connect n=1 0 n=9 8 n=2 0-1 n=10 2-6-8-9 n=3 0-1-2 n=11 10 n=4 0-1-2-3 n=12 4-8-10-11 n=5 4 n=13 12 n=6 4-5 n=14 6-10-12-13 n=7 6. n=15 14 n=8 0-4-6-7 n=16 0-8-12-14-15

[0171] Table 2

[0172] Table 2 can be understood as follows: the input of layer 1 is the characteristic data of each server in the cloud data center.

[0173] The input of layer 2 is connected to the output of layer 1 and the feature data of each server in the cloud data center.

[0174] The input of layer 3 is connected to the output of layer 1, the output of layer 2, and the feature data of each server in the cloud data center.

[0175] The input of layer 4 is connected to the output of layer 1, the output of layer 2, the output of layer 3, and the feature data of each server in the cloud data center.

[0176] The input of layer 5 is connected to the output of layer 4.

[0177] The input of layer 6 is connected to the output of layer 4 and the output of layer 5.

[0178] The input of layer 7 is connected to the output of layer 6.

[0179] The input of layer 8 is connected to the output of layer 4, the output of layer 6, the output of layer 7, and the feature data of each server in the cloud data center.

[0180] The input of layer 9 is connected to the output of layer 8.

[0181] The input of layer 10 is connected to the output of layer 2, the output of layer 6, the output of layer 8, and the output of layer 9.

[0182] The input of layer 11 is connected to the output of layer 10.

[0183] The input of layer 12 is connected to the output of layer 4, the output of layer 8, the output of layer 10, and the output of layer 11.

[0184] The input of layer 13 is connected to the output of layer 12.

[0185] The input of layer 14 is connected to the output of layer 6 , the output of layer 10 , the output of layer 12 , and the output of layer 13 .

[0186] The output of layer 15 is connected to the output of layer 14.

[0187] The input of layer 16 is connected to the output of layer 8, the output of layer 12, the output of layer 14, the output of layer 15, and the feature data of each server in the cloud data center.

[0188] In another example, if the threshold is 8.

[0189] According to the above formula, the connection relationship between each layer can be shown in Table 3 below.

[0190] layer connect layer connect n=1 0 n=9 8 n=2 0-1 n=10 2-6-8-9 n=3 0-1-2 n=11 10 n=4 0-1-2-3 n=12 4-8-10-11 n=5 0-1-2-3-4 n=13 12 n=6 0-1-2-4-5 n=14 6-10-12-13 n=7 0-1-2-5-6 n=15 14 n=8 0-1-2-6-7 n=16 0-8-12-14-15

[0191] Table 3

[0192] Table 2 can be understood as follows: the input of layer 1 is the characteristic data of each server in the cloud data center.

[0193] The input of layer 2 is connected to the output of layer 1 and the feature data of each server in the cloud data center.

[0194] The input of layer 3 is connected to the output of layer 1, the output of layer 2, and the feature data of each server in the cloud data center.

[0195] The input of layer 4 is connected to the output of layer 1, the output of layer 2, the output of layer 3, and the feature data of each server in the cloud data center.

[0196] The input of layer 5 is connected to the output of layer 1, the output of layer 2, the output of layer 3, the output of layer 4, and the feature data of each server in the cloud data center.

[0197] The input of layer 6 is connected to the output of layer 1, the output of layer 2, the output of layer 4, the output of layer 5, and the feature data of each server in the cloud data center.

[0198] The input of layer 7 is connected to the output of layer 1, the output of layer 2, the output of layer 5, the output of layer 6, and the feature data of each server in the cloud data center.

[0199] The input of layer 8 is connected to the output of layer 1, the output of layer 2, the output of layer 6, the output of layer 7, and the feature data of each server in the cloud data center.

[0200] The input of layer 9 is connected to the output of layer 8.

[0201] The input of layer 10 is connected to the output of layer 2, the output of layer 6, the output of layer 8, and the output of layer 9.

[0202] The input of layer 11 is connected to the output of layer 10.

[0203] The input of layer 12 is connected to the output of layer 4, the output of layer 8, the output of layer 10, and the output of layer 11.

[0204] The input of layer 13 is connected to the output of layer 12.

[0205] The input of layer 14 is connected to the output of layer 6 , the output of layer 10 , the output of layer 12 , and the output of layer 13 .

[0206] The output of layer 15 is connected to the output of layer 14.

[0207] The input of layer 16 is connected to the output of layer 8, the output of layer 12, the output of layer 14, the output of layer 15, and the feature data of each server in the cloud data center.

[0208] Through this embodiment, if the value of the layer number i is less than the threshold, the original dense connection can be sparse. Secondly, in another embodiment, the connection between layer 1 and layer 16 can be further retained.

[0209] In this way, the connection between (n / 4) and (i*n / 4) can be deleted, and the total number of (in / 2) connections can be reduced, where n is the threshold. If the threshold is larger, the number of sparse connections will be smaller and the complexity of the model architecture will be higher, thus ensuring that the size of the threshold is positively correlated with the complexity of the neural network.

[0210] The server features are used as the input of the model. The traditional one-dimensional time series data (such as the server's CPU, memory, disk space, etc.) is used to generate a color image describing the time series in the phase-state space using a custom binary recursive function. The RGB color image is used as the input feature, and the input image size is set to 224×224.

[0211] This embodiment proposes a new threshold block (layers 4, 7, 10, 12, and 16) followed by a 1×1 convolution layer, and no other pooling layers are added between the threshold segmented blocks.

[0212] In the process of determining whether the state of the server is an idle state or a non-idle state, underlying parameters of underlying hardware devices on the server may be used to determine whether the state of the server is an idle state or a non-idle state.

[0213] However, there are many server manufacturers on the market. Different manufacturers produce different server models, and the underlying parameters of the underlying hardware devices on different server models are different.

[0214] For example, in the current context of cloud computing, the underlying hardware devices have diversified and personalized features. For example, for CPUs, there are currently CPUs produced by Loongson, Feiteng, Kunpeng, Hygon, Zhaoxin, Shenwei and Intel, and the number of cores in the chips in different CPUs produced by different manufacturers is also different.

[0215] Therefore, the method of determining whether the server is in an idle state or a non-idle state requires adapting the underlying parameters of the underlying hardware devices on each model of servers produced by each manufacturer respectively. However, the adaptation is difficult and labor-intensive, and it is difficult to cover the underlying hardware devices on all models of servers produced by all manufacturers on the market. If new models of servers are added in the future, it is necessary to adapt the underlying parameters of the underlying hardware devices on the new models of servers respectively, and the updating is also difficult.

[0216] In the present application, in the process of determining whether the state of the server is idle or non-idle, the characteristic data of the server is used, and the characteristic data of the server includes at least one of the following: the CPU utilization of the server, the memory utilization of the server, the bandwidth utilization of the server, and the disk utilization of the server. Servers of various models produced by various manufacturers all have the above-mentioned characteristic data, for example, all have the CPU utilization of the server, the memory utilization of the server, the bandwidth utilization of the server, and the disk utilization of the server, etc. In this way, the underlying parameters of the underlying hardware devices on the various models of servers produced by various manufacturers do not need to be adapted separately, which reduces the workload and difficulty, and if there are new models of servers in the future, the underlying parameters of the underlying hardware devices on the new models of servers do not need to be adapted separately.

[0217] It can be seen that the method of determining whether the server status is idle or non-idle in the present application is adaptable to various models of servers produced by various manufacturers, and can intelligently adapt to various cloud data centers, and even adapt to changing cloud data centers. It has strong flexibility, scalability, and robustness, can adapt to the needs of different scenarios, and provide more reliable, efficient, flexible and scalable solutions for actual application scenarios.

[0218] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions involved are not necessarily required by the present application.

[0219] Reference Figure 4 , shows a container scheduling device in a cloud environment of the present application, the device comprising:

[0220] A determination module 11 is used to determine a server in an idle state and a server in a non-idle state among multiple servers in a cloud data center;

[0221] A migration module 12 is used to migrate a container carried by a server in an idle state to a server in a non-idle state for execution;

[0222] The setting module 13 is used to set the server in the idle state to a dormant state or a shutdown state after all containers carried on the server in the idle state are migrated out.

[0223] In an optional implementation, the server in a non-idle state includes a server in a normal state and a server in a busy state; the utilization rate of system resources of the server in the normal state is greater than the utilization rate of system resources of the server in the idle state; the utilization rate of system resources of the server in the busy state is greater than the utilization rate of system resources of the server in the normal state;

[0224] The migration module includes:

[0225] The first migration unit is used to migrate containers carried by a server in an idle state to a server in a normal state for operation in sequence.

[0226] In an optional implementation, there are multiple servers in a normal state in the cloud data center;

[0227] The first migration unit comprises:

[0228] A screening subunit, used for screening a server with the lowest utilization rate of system resources among multiple servers in a normal state;

[0229] The first migration subunit is used to migrate the containers carried by the idle servers in sequence to the selected servers with the lowest utilization rate of system resources for execution.

[0230] In an optional implementation, the migration module further includes:

[0231] A first detection unit is used to detect whether there is a server in a normal state running in the cloud data center when a new container needs to be established in the cloud data center;

[0232] A first establishing unit is used to establish a new container on a server that is running and in a normal state when there is a server that is running and in a normal state in the cloud data center;

[0233] or,

[0234] A second detection unit is used to detect whether there is a server running in an idle state in the cloud data center when there is no server running in a normal state in the cloud data center;

[0235] A second establishing unit is used to establish a new container on a server that is running and in an idle state when there is a server that is running and in an idle state in the cloud data center;

[0236] or,

[0237] The third establishing unit is used to set a server in a dormant or shut down state in the cloud data center to a running state when there is no idle server running in the cloud data center, and to establish a new container on the server set to the running state.

[0238] In an optional implementation, the migration module further includes:

[0239] A third detection unit is used to detect in real time whether the utilization rate of system resources of the server in the normal state exceeds a preset threshold value during the process of sequentially migrating containers carried on the server in the idle state to the server in the normal state for operation;

[0240] A selection unit, configured to select a server with the lowest utilization rate of system resources from among a plurality of servers in an idle state when the utilization rate of system resources of a server in a normal state exceeds a preset threshold;

[0241] The second migration unit is used to migrate at least part of the containers on the server in normal state whose utilization of system resources exceeds a preset threshold to the selected server with the lowest utilization of system resources for operation; the termination unit is used to terminate the work of migrating the containers carried by the selected server with the lowest utilization of system resources.

[0242] In an optional implementation, the migration module further includes:

[0243] A determination unit, configured to, after determining a server in an idle state and a server in a non-idle state among a plurality of servers in a cloud data center, store the server identifiers of the servers in the idle state in a preset queue;

[0244] Accordingly, the first migration unit includes:

[0245] A second migration subunit is used to migrate the container carried by the server corresponding to the server identifier in the preset queue to a server in a non-idle state for execution;

[0246] Accordingly, the termination unit comprises:

[0247] The deleting subunit is used to delete the server identifier of the server with the lowest utilization rate of the selected system resources from the preset queue.

[0248] In an optional implementation, the determining module includes:

[0249] An acquisition unit, configured to acquire characteristic data of each server in the cloud data center, wherein the characteristic data of the server includes at least one of the following: a CPU utilization rate of the server, a memory utilization rate of the server, a bandwidth utilization rate of the server, and a disk utilization rate of the server;

[0250] An input unit, used to input feature data of each server in the cloud data center into the classification model, so that the classification model processes the feature data of each server in the cloud data center to obtain the status of each server in the cloud data center, where the status of the server includes at least an idle state and a non-idle state;

[0251] The distinguishing unit is used to distinguish between servers in an idle state and servers in a non-idle state in the cloud data center according to the states of the servers.

[0252] In the present application, among multiple servers in a cloud data center, servers in an idle state and servers in a non-idle state are determined, and containers carried on servers in an idle state are migrated to servers in a non-idle state for operation. After all containers carried on servers in an idle state are migrated out, servers in an idle state are set to a dormant state or a shut down state. Through the present application, containers are migrated from idle / low-load servers to other servers in a cloud data center for operation, and running containers can be concentrated on as few servers in a cloud data center as possible to run, thereby achieving intensive management of containers and intensive management of system resources of servers in a cloud data center, thereby shutting down or putting idle / low-load servers into a dormant state, reducing the energy consumption of idle / low-load servers, and thus reducing the global energy consumption of the cloud data center.

[0253] Optionally, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0254] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0255] Figure 5 800 is a block diagram of an electronic device 800 shown in the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0256] Reference Figure 5 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0257] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0258] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, images, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0259] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.

[0260] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also monitor the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0261] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0262] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0263] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can monitor the open / closed state of the device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also monitor the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to monitor the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0264] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast operation information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0265] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0266] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0267] Figure 6 1 is a block diagram of an electronic device 1900 shown in the present application. For example, the electronic device 1900 may be provided as a server.

[0268] Reference Figure 6 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.

[0269] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.

[0270] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0271] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0272] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

[0273] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0274] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0275] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, 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 through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0277] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0278] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.

[0279] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A container scheduling method in a cloud environment, characterized in that: The method comprises: Among a plurality of servers in a cloud data center, determining a server in an idle state and a server in a non-idle state; Migrate the container hosted on the idle server to a non-idle server for operation; After all containers carried on the idle server are migrated out, the idle server is set to a dormant state or a shutdown state.

2. The method according to claim 1, characterized in that The server in a non-idle state includes a server in a normal state and a server in a busy state; the utilization rate of the system resources of the server in the normal state is greater than the utilization rate of the system resources of the server in the idle state; The utilization rate of system resources of a server in a busy state is greater than the utilization rate of system resources of a server in a normal state; The step of migrating a container carried on a server in an idle state to a server in a non-idle state for execution includes: The containers hosted on the idle server are migrated to the normal server in sequence for operation.

3. The method according to claim 2, characterized in that There are multiple servers in the cloud data center that are in normal status; The step of sequentially migrating containers carried on a server in an idle state to a server in a normal state for running includes: Among multiple servers in normal status, select the server with the lowest utilization rate of system resources; Containers hosted on idle servers are sequentially migrated to servers with the lowest utilization of filtered system resources for operation.

4. The method according to claim 2, characterized in that: The method further comprises: When a new container needs to be established in the cloud data center, detect whether there is a server in the cloud data center that is running normally; When there is a server that is running and in a normal state in the cloud data center, a new container is established on the server that is running and in a normal state; Alternatively, in the case that there is no server in normal state running in the cloud data center, detecting whether there is a server in idle state running in the cloud data center; When there is a server that is running and in an idle state in the cloud data center, a new container is created on the server that is running and in an idle state; Alternatively, when there is no idle server in the cloud data center, a server in a dormant or shut down state in the cloud data center is set to a running state, and a new container is established on the server set to the running state.

5. The method according to claim 2, characterized in that: The method further comprises: In the process of migrating containers carried on idle servers to servers in normal state for operation, it is detected in real time whether the utilization rate of system resources of the servers in normal state exceeds a preset threshold; When the utilization rate of the system resources of the server in a normal state exceeds a preset threshold, a server with the lowest utilization rate of the system resources is selected from a plurality of servers in an idle state; Migrate at least some containers on a server in a normal state whose utilization of system resources exceeds a preset threshold to a selected server with the lowest utilization of system resources for operation, and terminate the work of migrating the containers carried by the selected server with the lowest utilization of system resources.

6. The method according to claim 5, characterized in that The method further comprises: After determining a server in an idle state and a server in a non-idle state among multiple servers in a cloud data center, the server identifiers of the servers in the idle state are stored in a preset queue; Accordingly, the step of migrating a container carried on a server in an idle state to a server in a non-idle state for execution includes: Migrate the container carried by the server corresponding to the server identifier in the preset queue to a server in a non-idle state for operation; Accordingly, the work of terminating the migration of the container carried on the selected server with the lowest utilization rate of system resources includes: The server ID of the server with the lowest utilization rate of the selected system resources is deleted from the preset queue.

7. The method according to claim 1, characterized in that The step of determining, among the plurality of servers in the cloud data center, servers in an idle state and servers in a non-idle state comprises: Acquire characteristic data of each server in the cloud data center, the characteristic data of the server including at least one of the following: CPU utilization of the server, memory utilization of the server, bandwidth utilization of the server, and disk utilization of the server; Inputting feature data of each server in the cloud data center into the classification model, so that the classification model processes the feature data of each server in the cloud data center to obtain the status of each server in the cloud data center, where the status of the server at least includes an idle state and a non-idle state; According to the status of each server, servers in an idle state and servers in a non-idle state are distinguished in the cloud data center.

8. A container scheduling device in a cloud environment, characterized in that: The device comprises: A determination module, used to determine, among a plurality of servers in a cloud data center, a server in an idle state and a server in a non-idle state; A migration module, used to migrate a container carried on an idle server to a server in a non-idle state for operation; The setting module is used to set the idle server to a dormant state or a shutdown state after all containers carried on the idle server are migrated out.

9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the method according to any one of claims 1 to 7 when executed by the processor.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.