Scheduling method and device based on container orchestration engine

By using the target coefficients and operation parameters to filter nodes in the container orchestration engine, the problem of low deployment unit scheduling accuracy caused by the scheduler in the prior art is solved, and more efficient node selection and deployment unit scheduling are achieved.

CN119806838APending Publication Date: 2025-04-11INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411996234.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In the prior art, the scheduler of the container orchestration engine schedules the deployment unit according to the resource utilization rate of each node, resulting in a relatively low accuracy of scheduling the deployment unit.

Method used

A scheduling method based on a container orchestration engine is provided, by determining the type and target coefficient of the target deployment unit, the most suitable nodes are selected for scheduling. The method includes determining the target deployment unit to be scheduled and its type. If it is a mixed unit type and there is a target coefficient, the node is filtered based on the target coefficient and the operation parameters, obtain the initial node, and schedule the target deployment unit to the target node.

Benefits of technology

By filtering nodes using target coefficients and operation parameters, it is possible to select the appropriate nodes more accurately for scheduling of deployment units, improving the accuracy of deployment unit scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806838A_ABST
    Figure CN119806838A_ABST
Patent Text Reader

Abstract

The invention discloses a scheduling method and device based on a container orchestration engine. The method comprises the following steps: determining a target deployment unit to be scheduled and a type corresponding to the target deployment unit; if the type corresponding to the target deployment unit is a hybrid type and the target deployment unit has a target coefficient, screening a plurality of nodes in a container arrangement engine based on the target coefficient and operation parameters corresponding to the target deployment unit to obtain a plurality of initial nodes, and according to the plurality of initial nodes, arranging the target deployment unit according to the plurality of initial nodes; and determining a target node, and scheduling the target deployment unit to the target node so as to operate the target deployment unit at the target node. Through application of the method and the device, the problem that the scheduling accuracy of the deployment unit is relatively low due to the fact that a scheduler schedules the deployment unit according to the resource utilization rate of each node in the related technology is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of financial technology, and more specifically, to a scheduling method and device based on a container orchestration engine. Background Art

[0002] Container orchestration engines are used to automate the deployment, expansion, and management of containerized applications. Container orchestration engines have an important position and development prospects in the development and deployment of cloud-native applications. More and more companies and organizations are beginning to use container orchestration engines to manage and deploy their applications.

[0003] Constrained by the architecture design and resource heterogeneity of data centers, container orchestration engines usually adopt relatively conservative resource scheduling strategies, resulting in the phenomenon that the resources of the container orchestration engine cluster are not fully utilized. The scheduler of the container orchestration engine in the prior art often implements the scheduling of deployment units based on the least_requested algorithm. The core idea of ​​the least_requested algorithm is to reduce the resource utilization rate of each node as much as possible and distribute the containers to as many nodes as possible. This method has the problem of low accuracy in scheduling deployment units.

[0004] With regard to the problem in the related art that the scheduler schedules the deployment units according to the resource usage rate of each node, resulting in relatively low accuracy in scheduling the deployment units, no effective solution has been proposed yet. Summary of the invention

[0005] The main purpose of the present application is to provide a scheduling method and device based on a container orchestration engine to solve the problem in the related art that the scheduler schedules the deployment units according to the resource utilization rate of each node, resulting in low accuracy in scheduling the deployment units.

[0006] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a scheduling method based on a container orchestration engine is provided. The method includes: determining the target deployment unit to be scheduled and the type corresponding to the target deployment unit; if the type corresponding to the target deployment unit is a mixed type and the target deployment unit has a target coefficient, then based on the target coefficient and the operating parameters corresponding to the target deployment unit, multiple nodes in the container orchestration engine are screened to obtain multiple initial nodes, wherein the mixed type characterizes that the target deployment unit is a deployment unit that runs both online and offline services, and the target coefficient is determined based on the historical operating data of the target deployment unit, and is used to characterize the tendency of the target deployment unit to use resources during operation; based on the multiple initial nodes, the target node is determined, and the target deployment unit is scheduled to the target node to run the target deployment unit at the target node.

[0007] Further, after determining the target deployment unit to be scheduled and the type corresponding to the target deployment unit, the method also includes: determining multiple nodes in the container orchestration engine, the type corresponding to each node and the remaining resources corresponding to each node; screening the multiple nodes according to the type corresponding to each node and the remaining resources corresponding to each node to obtain multiple candidate nodes; screening the multiple nodes in the container orchestration engine based on the target coefficient and the operating parameters corresponding to the target deployment unit to obtain multiple initial nodes includes: screening the multiple candidate nodes based on the target coefficient and the operating parameters corresponding to the target deployment unit to obtain the multiple initial nodes.

[0008] Furthermore, the multiple candidate nodes are screened based on the target coefficient and the operating parameters corresponding to the target deployment unit to obtain the multiple initial nodes, including: obtaining the total amount of resources corresponding to each candidate node, wherein the total amount of resources at least includes: central processing unit resources, memory resources and input / output resources; calculating according to the target coefficient, the operating parameters and the total amount of resources to obtain a first score corresponding to each candidate node; and screening the multiple candidate nodes according to the first score to obtain the multiple initial nodes.

[0009] Further, the first score corresponding to each candidate node is obtained by calculating according to the target coefficient, the operating parameters and the total amount of resources, including: calculating according to the CPU intensive coefficient in the target coefficient, the CPU request amount in the operating parameters and the CPU resource amount to obtain a CPU ratio value; calculating according to the memory intensive coefficient in the target coefficient, the memory request amount in the operating parameters and the memory resource amount to obtain a memory ratio value; calculating according to the input / output intensive coefficient in the target coefficient, the input / output request amount in the operating parameters and the output / output resource amount to obtain an output / output ratio value; calculating according to the CPU ratio value, the memory ratio value and the output / output ratio value to obtain the first score.

[0010] Further, determining the target node based on the multiple initial nodes includes: for any initial node, determining an estimated resource utilization rate of the initial node, wherein the estimated resource utilization rate is the resource utilization rate after the target deployment unit is scheduled to the initial node; scoring the initial node based on the estimated resource utilization rate and a preset expected resource utilization rate to obtain a second score; scoring the initial node based on a CPU request amount and a memory request amount in operating parameters of the target deployment unit to obtain a third score; and screening the multiple initial nodes based on the second score and the third score to obtain the target node.

[0011] Further, scoring the initial node according to the estimated resource utilization rate and the preset expected resource utilization rate to obtain a second score includes: determining whether the estimated resource utilization rate is less than or equal to the expected resource utilization rate; if the estimated resource utilization rate is less than or equal to the expected resource utilization rate, calculating based on the estimated resource utilization rate and the expected resource utilization rate to obtain the second score; if the estimated resource utilization rate is greater than the expected resource utilization rate and less than or equal to the maximum resource utilization rate, calculating based on the estimated resource utilization rate, the expected resource utilization rate and the maximum resource utilization rate to obtain the second score; if the estimated resource utilization rate is greater than the maximum resource utilization rate, determining the second score based on a preset value.

[0012] Furthermore, screening the multiple initial nodes according to the second score and the third score to obtain the target node includes: taking a weighted sum of the second score and the third score to obtain a fourth score; obtaining the number of deployment units scheduled for the multiple initial nodes in a historical time period; adjusting the fourth score according to the number of scheduled deployment units to obtain a fifth score; and screening the multiple initial nodes according to the fifth score to obtain the target node.

[0013] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a scheduling device based on a container orchestration engine is provided. The device includes: a first determination unit, which is used to determine the target deployment unit to be scheduled and the type corresponding to the target deployment unit; a first screening unit, which is used to screen multiple nodes in the container orchestration engine based on the target coefficient and the operating parameters corresponding to the target deployment unit if the type corresponding to the target deployment unit is a mixed type and the target deployment unit has a target coefficient, to obtain multiple initial nodes, wherein the mixed type characterizes that the target deployment unit is a deployment unit that runs online and offline services at the same time, and the target coefficient is determined based on the historical operating data of the target deployment unit, and is used to characterize the tendency of the target deployment unit to use resources when it is running; a second determination unit, which is used to determine the target node based on the multiple initial nodes, and schedule the target deployment unit to the target node to run the target deployment unit at the target node.

[0014] Furthermore, the device also includes: a third determination unit, which is used to determine multiple nodes in the container orchestration engine, the type corresponding to each node, and the remaining resources corresponding to each node after determining the target deployment unit to be scheduled and the type corresponding to the target deployment unit; a second screening unit, which is used to screen the multiple nodes according to the type corresponding to each node and the remaining resources corresponding to each node to obtain multiple candidate nodes; the first screening unit includes: a first screening sub-unit, which is used to screen the multiple candidate nodes based on the target coefficient and the operating parameters corresponding to the target deployment unit to obtain the multiple initial nodes.

[0015] Furthermore, the first screening sub-unit includes: a first acquisition module, used to obtain the total amount of resources corresponding to each candidate node, wherein the total amount of resources includes at least: central processing unit resources, memory resources and input / output resources; a first calculation module, used to calculate according to the target coefficient, the operating parameters and the total amount of resources to obtain a first score corresponding to each candidate node; a first screening module, used to screen the multiple candidate nodes according to the first scores to obtain the multiple initial nodes.

[0016] Further, the first calculation module includes: a first calculation submodule, used to calculate based on the CPU intensive coefficient in the target coefficient, the CPU request amount of the operating parameters and the CPU resource amount, to obtain a CPU ratio value; a second calculation submodule, used to calculate based on the memory intensive coefficient in the target coefficient, the memory request amount in the operating parameters and the memory resource amount, to obtain a memory ratio value; a third calculation submodule, used to calculate based on the input / output intensive coefficient in the target coefficient, the input / output request amount in the operating parameters and the output / output resource amount, to obtain an output / output ratio value; a fourth calculation submodule, used to calculate based on the CPU ratio value, the memory ratio value and the output / output ratio value to obtain the first score.

[0017] Furthermore, the second determination unit includes: a determination subunit, used to determine, for any initial node, an estimated resource utilization rate of the initial node, wherein the estimated resource utilization rate is the resource utilization rate after the target deployment unit is scheduled to the initial node; a first scoring subunit, used to score the initial node according to the estimated resource utilization rate and a preset expected resource utilization rate to obtain a second score; a second scoring subunit, used to score the initial node according to the CPU request amount and the memory request amount in the operating parameters of the target deployment unit to obtain a third score; and a second screening subunit, used to screen the multiple initial nodes according to the second score and the third score to obtain the target node.

[0018] Furthermore, the first scoring sub-unit includes: a judgment module, used to judge whether the estimated resource utilization rate is less than or equal to the expected resource utilization rate; a second calculation module, used to calculate based on the estimated resource utilization rate and the expected resource utilization rate to obtain the second score if the estimated resource utilization rate is less than or equal to the expected resource utilization rate; a third calculation module, used to calculate based on the estimated resource utilization rate, the expected resource utilization rate and the maximum resource utilization rate to obtain the second score if the estimated resource utilization rate is greater than the expected resource utilization rate and less than or equal to the maximum resource utilization rate; a determination module, used to determine the second score according to a preset value if the estimated resource utilization rate is greater than the maximum resource utilization rate.

[0019] Furthermore, the second screening sub-unit includes: a fourth calculation module, used to perform weighted summation of the second score and the third score to obtain a fourth score; a second acquisition module, used to obtain the number of deployment units scheduled for the multiple initial nodes within a historical time period; an adjustment module, used to adjust the fourth score according to the number of scheduled deployment units to obtain a fifth score; and a second screening module, used to screen the multiple initial nodes according to the fifth score to obtain the target node.

[0020] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a computer-readable storage medium is also provided, wherein the computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the steps of any one of the above-mentioned method embodiments.

[0021] In order to achieve the above-mentioned purpose, according to another aspect of the present application, there is further provided an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above-mentioned method embodiments.

[0022] In an embodiment of the present application, the following steps are adopted: determining a target deployment unit to be scheduled and a type corresponding to the target deployment unit; if the type corresponding to the target deployment unit is a mixed type and the target deployment unit has a target coefficient, then screening multiple nodes in the container orchestration engine based on the target coefficient and the operating parameters corresponding to the target deployment unit to obtain multiple initial nodes, wherein the mixed type characterizes that the target deployment unit is a deployment unit that runs both online and offline services, and the target coefficient is determined based on the historical operating data of the target deployment unit, and is used to characterize the tendency of the target deployment unit to use resources during operation; based on the multiple initial nodes, determining the target node, and scheduling the target deployment unit to the target node, so as to run the target deployment unit on the target node, solves the technical problem in the related art that the scheduler schedules the deployment unit according to the resource utilization rate of each node, resulting in relatively low accuracy in scheduling the deployment unit.

[0023] In this solution, when there is a target deployment unit that needs to be scheduled, if the type corresponding to the target deployment unit is a mixed deployment type and the target deployment unit has a target coefficient for characterizing the tendency to use resources at runtime, then multiple nodes in the container orchestration engine are screened according to the target coefficient and the operating parameters corresponding to the target deployment unit to obtain the target node, and the target deployment unit is scheduled to run on the target node. Through the tendency of the deployment unit to use resources and the operating parameters, a more suitable node can be selected for the deployment unit more accurately, thereby achieving the effect of improving the accuracy of scheduling the deployment unit. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0025] Figure 1 It is a hardware structure block diagram of a computer terminal for implementing a scheduling method based on a container orchestration engine according to an embodiment of the present application;

[0026] Figure 2 The process of the scheduling method based on the container orchestration engine provided in the embodiment of the present application is as follows Figure 1 ;

[0027] Figure 3 The process of the scheduling method based on the container orchestration engine provided in the embodiment of the present application is as follows Figure 2 ;

[0028] Figure 4 is a schematic diagram of a scheduling device based on a container orchestration engine provided according to an embodiment of the present application;

[0029] Figure 5It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only 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 should fall within the scope of protection of the present application.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] It should be noted that the collected information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this application are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with relevant laws, regulations and standards, necessary confidentiality measures are taken, and public order and good customs are not violated, and corresponding operation entrances are provided for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or institutions to provide users with corresponding operation entrances for users to choose to agree or refuse the results of automated decision-making; if the user chooses to refuse, the expert decision-making process will be entered.

[0033] Example 1

[0034] According to an embodiment of the present application, a method embodiment of scheduling based on a container orchestration engine is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0035] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 The hardware structure block diagram of a computer terminal (or mobile device) for implementing a scheduling method based on a container orchestration engine is shown. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0036] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0037] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the scheduling method based on the container orchestration engine in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned scheduling method based on the container orchestration engine. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0038] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0039] The display may be a touch screen type liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0040] Under the above operating environment, this application provides Figure 2 The scheduling method based on the container orchestration engine is shown.

[0041] Figure 2 This is the process of the scheduling method based on the container orchestration engine according to the first embodiment of the present application. Figure 1 The method comprises:

[0042] Step S201, determining the target deployment unit to be scheduled and the type corresponding to the target deployment unit.

[0043] Optionally, determine the target deployment unit that needs to be scheduled and the type corresponding to the target deployment unit. It should be noted that the deployment unit is the smallest deployable unit in the container orchestration engine, which is composed of one or more closely related containers. It should be noted that financial services are deployed in the deployment unit. The types corresponding to the deployment unit include hybrid type and non-hybrid type. The hybrid type refers to a deployment unit that runs both online and offline services, and the non-hybrid type refers to a deployment unit that only runs online services or offline services.

[0044] Step S202: If the type corresponding to the target deployment unit is a colocation type and the target deployment unit has a target coefficient, multiple nodes in the container orchestration engine are screened based on the target coefficient and the operating parameters corresponding to the target deployment unit to obtain multiple initial nodes, wherein the colocation type characterizes that the target deployment unit is a deployment unit that runs both online and offline services, and the target coefficient is determined based on the historical operating data of the target deployment unit, and is used to characterize the tendency of the target deployment unit to use resources during operation.

[0045] Optionally, if the type corresponding to the target deployment unit is a mixed deployment type, it is determined whether the target deployment unit has a target coefficient. It should be noted that the target coefficient is determined based on the historical operation data of the target deployment unit and is used to characterize the tendency of the target deployment unit to use resources during operation. In the case where the target deployment unit has a target coefficient, multiple nodes in the container orchestration engine are screened according to the target coefficient and the operating parameters corresponding to the target deployment unit to obtain multiple initial nodes. It should be noted that the operating parameters include but are not limited to the central processing unit request amount (i.e., CPU request amount) and the memory request amount (mem request amount).

[0046] It should be noted that if the type corresponding to the target deployment unit is a non-hybrid type, the deployment unit can be scheduled according to the least_requested algorithm. If the target deployment unit does not have a target coefficient, the deployment unit can also be scheduled according to the least_requested algorithm.

[0047] Step S203, determining a target node according to the multiple initial nodes, and scheduling the target deployment unit to the target node, so as to run the target deployment unit on the target node.

[0048] Optionally, after obtaining the above-mentioned multiple initial nodes, the multiple initial nodes can be screened according to relevant parameters of the initial nodes (for example, resource utilization) to obtain the target node, and then the target deployment unit is scheduled to the target node to run the target deployment unit on the target node.

[0049] To summarize, when there is a target deployment unit that needs to be scheduled, if the type corresponding to the target deployment unit is a mixed deployment type and the target deployment unit has a target coefficient for characterizing the tendency to use resources at runtime, then the multiple nodes in the container orchestration engine are screened according to the target coefficient and the operating parameters corresponding to the target deployment unit to obtain the target node, and the target deployment unit is scheduled to run on the target node. Through the tendency of the deployment unit to use resources and the operating parameters, a more suitable node can be selected for the deployment unit more accurately, thereby achieving the effect of improving the accuracy of scheduling the deployment unit.

[0050] Optionally, in the scheduling method based on the container orchestration engine provided in an embodiment of the present application, after determining the target deployment unit to be scheduled and the type corresponding to the target deployment unit, the method also includes: determining multiple nodes in the container orchestration engine, the type corresponding to each node, and the remaining resources corresponding to each node; screening the multiple nodes according to the type corresponding to each node and the remaining resources corresponding to each node to obtain multiple candidate nodes; screening the multiple nodes in the container orchestration engine based on the target coefficient and the operating parameters corresponding to the target deployment unit to obtain multiple initial nodes includes: screening the multiple candidate nodes based on the target coefficient and the operating parameters corresponding to the target deployment unit to obtain multiple initial nodes.

[0051] In an optional embodiment, after determining the target deployment unit to be scheduled and the type corresponding to the target deployment unit, it also includes: determining multiple nodes in the container orchestration engine, the type corresponding to each node, and the remaining resources corresponding to each node, and the type corresponding to the node is divided into a mixed type and a non-mixed type. Multiple nodes are screened by the type corresponding to each node and the remaining resources corresponding to each node to obtain multiple candidate nodes. It should be noted that the candidate node can be a node of a mixed type and the remaining resources are greater than the resources required by the target deployment unit, or the candidate node can also be a node that is allowed to be set to a mixed type and the remaining resources are greater than the resources required by the target deployment unit and greater than the red line threshold. When screening multiple nodes in the container orchestration engine by the target coefficient and the operating parameters corresponding to the target deployment unit, it includes screening multiple candidate nodes by the target coefficient and the operating parameters corresponding to the target deployment unit to obtain multiple initial nodes.

[0052] The nodes are preliminarily screened by the type and remaining resources corresponding to each node to improve the accuracy of subsequent node scheduling.

[0053] Optionally, in the scheduling method based on the container orchestration engine provided in an embodiment of the present application, multiple candidate nodes are screened based on the target coefficient and the operating parameters corresponding to the target deployment unit to obtain multiple initial nodes, including: obtaining the total amount of resources corresponding to each candidate node, wherein the total amount of resources includes at least: central processing unit resources, memory resources, and input / output resources; calculating according to the target coefficient, the operating parameters, and the total amount of resources to obtain a first score corresponding to each candidate node; and screening multiple candidate nodes according to the first score to obtain multiple initial nodes.

[0054] In an optional embodiment, screening multiple candidate nodes to obtain multiple initial nodes includes the following steps: obtaining the total amount of resources corresponding to each node, for example, the amount of central processing unit resources (CPU mixed resources), the amount of memory resources (mem mixed resources) and the amount of input / output resources (IO mixed resources), etc. Then, the first score corresponding to each candidate node is calculated based on the target coefficient, the operating parameters and the total amount of resources, and finally, the multiple candidate nodes are screened according to the first score to obtain multiple initial nodes. For example, the candidate nodes whose first scores are greater than the threshold are determined as the initial nodes, or the candidate nodes are sorted according to the first scores, and then the candidate nodes with the highest sorting are determined as the initial nodes.

[0055] Through the amount of central processing unit resources (CPU co-location resources), memory resources (mem co-location resources), input / output resources (IO co-location resources), and the target coefficient and operating parameters corresponding to the target deployment unit, a node that meets the resource requirements of the deployment unit can be selected for the deployment unit to improve the accuracy of scheduling.

[0056] Optionally, in the scheduling method based on the container orchestration engine provided in the embodiment of the present application, the first score corresponding to each candidate node is obtained by calculating according to the target coefficient, the operating parameters and the total amount of resources, including: calculating according to the CPU intensive coefficient in the target coefficient, the CPU request amount and the CPU resource amount of the operating parameters to obtain a CPU ratio value; calculating according to the memory intensive coefficient in the target coefficient, the memory request amount and the memory resource amount in the operating parameters to obtain a memory ratio value; calculating according to the input / output intensive coefficient in the target coefficient, the input / output request amount and the output / output resource amount in the operating parameters to obtain an output / output ratio value; calculating according to the CPU ratio value, the memory ratio value and the output / output ratio value to obtain the first score.

[0057] In an optional embodiment, the following steps are used to calculate the first score corresponding to each candidate node: the CPU ratio value is obtained based on the CPU density coefficient in the target coefficient, the CPU request amount and the CPU resource amount of the operating parameters. For example, the CPU ratio value CPU-ratio is calculated using the following formula: CPU-ratio = CPU weight * CPU density coefficient * L2 norm (CPU request amount - CPU mixed resources of the node), where the CPU density coefficient is the CPU density coefficient.

[0058] The memory ratio value is calculated by the memory density coefficient in the target coefficient, the memory request amount and the memory resource amount in the operating parameters. For example, the memory ratio value mem-ratio is calculated by the following formula: mem-ratio=mem weight*mem density coefficient*L2 norm (mem request amount-mem mixed resources of the node).

[0059] The output / output ratio value is calculated by the input / output density coefficient in the target coefficient, the input / output request amount and the output / output resource amount in the operating parameters. For example, the output / output ratio value io-ratio is calculated by the following formula: io-ratio = IO weight * IO density coefficient * L2 norm (IO request amount - IO mixed resources of the node).

[0060] Finally, the first score is obtained by calculating the CPU ratio value, the memory ratio value and the I / O ratio value. For example, the first score is calculated by the following formula: result = (CPU-ratio + mem-ratio + io-ratio) / 3.

[0061] It should be noted that the weight is a preset value (the default is 1 / 3, which can be dynamically adjusted later based on the scheduling effect).

[0062] The candidate nodes are scored by three dimensions: CPU, memory, and I / O, which improves the accuracy of scoring the candidate nodes.

[0063] Optionally, in the scheduling method based on the container orchestration engine provided in the embodiment of the present application, determining the target node based on multiple initial nodes includes: for any initial node, determining an estimated resource utilization rate of the initial node, wherein the estimated resource utilization rate is the resource utilization rate after the target deployment unit is scheduled to the initial node; scoring the initial node based on the estimated resource utilization rate and a preset expected resource utilization rate to obtain a second score; scoring the initial node based on the CPU request amount and the memory request amount in the operating parameters of the target deployment unit to obtain a third score; and screening multiple initial nodes based on the second score and the third score to obtain the target node.

[0064] In an optional embodiment, the following steps are used to determine the target node: in actual scheduling, it is expected that the resource utilization rate of each dimension of the node after scheduling is as close to the preset value as possible. Therefore, for any initial node, it is necessary to estimate the estimated resource utilization rate of the initial node. It should be noted that the estimated resource utilization rate is the resource utilization rate after the target deployment unit is scheduled to the initial node. Then, the initial node is scored according to the estimated resource utilization rate and the preset expected resource utilization rate to obtain a second score, that is, each initial node is scored according to the difference between the resource utilization rate of each dimension of the node after scheduling and the preset expected resource utilization rate to obtain a second score.

[0065] Then, the CPU request amount and memory request amount in the operating parameters of the target deployment unit are obtained, and the balanced resource performance of the initial node is scored according to the CPU request amount and the memory request amount to obtain a third score, that is, the CPU and memory usage of the node are balanced as much as possible.

[0066] Finally, multiple initial nodes are screened according to the second score and the third score to obtain the target node.

[0067] The initial nodes are scored based on the difference between the resource utilization of each dimension of the node after scheduling and the preset expected resource utilization, as well as the balanced resource performance of the node, to improve the accuracy of scheduling.

[0068] Optionally, in the scheduling method based on the container orchestration engine provided in an embodiment of the present application, the initial node is scored according to the estimated resource utilization rate and the preset expected resource utilization rate, and obtaining the second score includes: determining whether the estimated resource utilization rate is less than or equal to the expected resource utilization rate; if the estimated resource utilization rate is less than or equal to the expected resource utilization rate, calculating based on the estimated resource utilization rate and the expected resource utilization rate to obtain the second score; if the estimated resource utilization rate is greater than the expected resource utilization rate, and less than or equal to the maximum resource utilization rate, calculating based on the estimated resource utilization rate, the expected resource utilization rate and the maximum resource utilization rate to obtain the second score; if the estimated resource utilization rate is greater than the maximum resource utilization rate, determining the second score based on the preset value.

[0069] In an optional embodiment, in order to improve the accuracy of calculating the second score, the scheduling method based on the container orchestration engine provided in the embodiment of the present application also includes: judging the relationship between the estimated resource utilization rate and the expected resource utilization rate. If the estimated resource utilization rate is less than or equal to the expected resource utilization rate, calculating according to the estimated resource utilization rate and the expected resource utilization rate to obtain the second score. For example, the second score is calculated using the following formula: score = ((1-cluster)target / cluster+cluster)*10.0, wherein cluster is the expected resource utilization rate mentioned above, and target is the estimated resource utilization rate mentioned above.

[0070] If the estimated resource utilization is greater than the expected resource utilization and is less than or equal to the maximum resource utilization, a second score is obtained based on the estimated resource utilization, the expected resource utilization and the maximum resource utilization. For example, the second score is calculated using the following formula: score = cluster*(max-target) / (max-cluster)*10.0, where max is the above-mentioned maximum resource utilization.

[0071] If the estimated resource usage is greater than the maximum resource usage, the second score is determined according to a preset value, for example, the preset value is 0.

[0072] It should be noted that the above resources can be divided into CPU and mem (memory), that is, according to the estimated CPU usage, the expected CPU usage and the maximum CPU usage, the score corresponding to the CPU is determined, and according to the estimated mem usage, the expected mem usage and the maximum mem usage, the score corresponding to the mem is determined, and finally the second score is calculated according to the score corresponding to the CPU and the score corresponding to the mem. For example, the second score is calculated using the following formula:

[0073] Score=cpu_intensity / (cpu_intensity+mem_intensity)*cpuScore+mem_intensity / (cpu_intensity+mem_intensity)*memScore, wherein cpu_intensity is the CPU intensity coefficient, mem_intensity is the mem intensity coefficient, cpuScore is the score corresponding to the above-mentioned CPU, and memScore is the score corresponding to the above-mentioned mem.

[0074] By evaluating the difference between the resource utilization of each dimension of the node after scheduling and the preset expected resource utilization and the maximum resource utilization, the node can be better scheduled and the resource utilization of the node can be improved.

[0075] Optionally, in the scheduling method based on the container orchestration engine provided in an embodiment of the present application, multiple initial nodes are screened according to the second score and the third score to obtain the target node, including: taking a weighted sum of the second score and the third score to obtain a fourth score; obtaining the number of deployment units scheduled for the multiple initial nodes in a historical time period; adjusting the fourth score according to the number of scheduled deployment units to obtain a fifth score; and screening the multiple initial nodes according to the fifth score to obtain the target node.

[0076] In an optional embodiment, the target node is determined by taking the following steps: performing weighted summation on the second score and the third score to obtain a fourth score, for example, the fourth score is mixedScore=0.7*resoucesScore+0.3*banlancedScore, where resoucesScore is the second score and banlancedScore is the fourth score.

[0077] In an optional embodiment, the fourth score can be calculated using the following formula: banlancedScore = {1-[((CPU usage + CPU request amount of the current deployment unit) / total node CPU) + (((mem usage + mem request amount of the current deployment unit) / total node mem)]}*10.

[0078] After obtaining the fourth score, in order to avoid too many deployment units being scheduled for the same node, the number of deployment units scheduled for multiple initial nodes in the historical time period can be counted, and then the fourth score is adjusted according to the number of scheduled deployment units to obtain a fifth score. For example, if the node has scheduled more than 2 deployment units in the past 1 minute, the score is subtracted by 1 point, and if the node has scheduled more than 5 deployment units in the past 5 minutes, the score is further subtracted by 1 point. Finally, multiple initial nodes are screened according to the fifth score to obtain the target node. For example, the initial node with the largest fifth score is determined as the target node.

[0079] By evaluating the number of scheduled deployment units and the difference between the resource utilization of each dimension of the node after scheduling and the preset expected resource utilization and maximum resource utilization, the node can be better scheduled and the resource utilization of the node can be improved.

[0080] In an optional embodiment, the following may be used: Figure 3The flowchart shown implements scheduling, specifically including: for a deployment unit that needs to be scheduled, determining whether it is a colocation deployment unit. If it is determined that it is not a colocation deployment unit, scheduling it according to the least_requested algorithm. If it is a colocation deployment unit, excluding all nodes that do not have the colocation switch turned on and all nodes whose colocation resources are less than the colocation resources required by the application, and then scoring the remaining nodes according to the dense coefficient operation parameters and the total amount of resources, and filtering the nodes according to the scores to obtain the initial node, and finally determining the target node according to the initial node, and scheduling the deployment unit that needs to be scheduled to the target node.

[0081] The scheduling method based on the container orchestration engine provided in the embodiment of the present application determines the target deployment unit to be scheduled and the type corresponding to the target deployment unit; if the type corresponding to the target deployment unit is a mixed type and the target deployment unit has a target coefficient, multiple nodes in the container orchestration engine are screened based on the target coefficient and the operating parameters corresponding to the target deployment unit to obtain multiple initial nodes, wherein the mixed type characterizes that the target deployment unit is a deployment unit that runs both online and offline services, and the target coefficient is determined based on the historical operating data of the target deployment unit, and is used to characterize the tendency of the target deployment unit to use resources when running; based on the multiple initial nodes, the target node is determined, and the target deployment unit is scheduled to the target node to run the target deployment unit on the target node, thereby solving the technical problem in the related art that the scheduler schedules the deployment unit according to the resource utilization rate of each node, resulting in relatively low accuracy in scheduling the deployment units.

[0082] In this solution, when there is a target deployment unit that needs to be scheduled, if the type corresponding to the target deployment unit is a mixed deployment type and the target deployment unit has a target coefficient for characterizing the tendency to use resources at runtime, then multiple nodes in the container orchestration engine are screened according to the target coefficient and the operating parameters corresponding to the target deployment unit to obtain the target node, and the target deployment unit is scheduled to run on the target node. Through the tendency of the deployment unit to use resources and the operating parameters, a more suitable node can be selected for the deployment unit more accurately, thereby achieving the effect of improving the accuracy of scheduling the deployment unit.

[0083] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0084] Example 2

[0085] The embodiment of the present application also provides a scheduling device based on a container orchestration engine. It should be noted that the scheduling device based on a container orchestration engine in the embodiment of the present application can be used to execute the scheduling method based on a container orchestration engine provided in the embodiment of the present application. The scheduling device based on a container orchestration engine provided in the embodiment of the present application is introduced below.

[0086] According to an embodiment of the present application, a device for implementing the above-mentioned scheduling method based on the container orchestration engine is also provided, such as Figure 4 As shown, the device includes: a first determining unit 401, a first screening unit 402 and a second determining unit 403.

[0087] A first determining unit 401 is used to determine a target deployment unit to be scheduled and a type corresponding to the target deployment unit;

[0088] The first screening unit 402 is used to screen multiple nodes in the container orchestration engine based on the target coefficient and the operating parameters corresponding to the target deployment unit to obtain multiple initial nodes if the type corresponding to the target deployment unit is a colocation type and the target deployment unit has a target coefficient, wherein the colocation type indicates that the target deployment unit is a deployment unit that runs both online and offline services, and the target coefficient is determined based on historical operating data of the target deployment unit and is used to indicate the tendency of the target deployment unit to use resources during operation;

[0089] The second determining unit 403 is used to determine a target node according to the multiple initial nodes, and schedule the target deployment unit to the target node, so as to run the target deployment unit on the target node.

[0090] The scheduling device based on the container orchestration engine provided in the embodiment of the present application determines the target deployment unit to be scheduled and the type corresponding to the target deployment unit through the first determination unit 401; the first screening unit 402 screens multiple nodes in the container orchestration engine based on the target coefficient and the operating parameters corresponding to the target deployment unit if the type corresponding to the target deployment unit is a mixed type and the target deployment unit has a target coefficient, and obtains multiple initial nodes, wherein the mixed type characterizes that the target deployment unit is a deployment unit that runs both online and offline services, and the target coefficient is determined based on the historical operating data of the target deployment unit, and is used to characterize the tendency of the target deployment unit to use resources when running; the second determination unit 403 determines the target node based on the multiple initial nodes, and schedules the target deployment unit to the target node to run the target deployment unit on the target node, thereby solving the technical problem in the related art that the scheduler schedules the deployment unit according to the resource utilization rate of each node, resulting in relatively low accuracy in scheduling the deployment unit.

[0091] In this solution, when there is a target deployment unit that needs to be scheduled, if the type corresponding to the target deployment unit is a mixed deployment type and the target deployment unit has a target coefficient for characterizing the tendency to use resources at runtime, then multiple nodes in the container orchestration engine are screened according to the target coefficient and the operating parameters corresponding to the target deployment unit to obtain the target node, and the target deployment unit is scheduled to run on the target node. Through the tendency of the deployment unit to use resources and the operating parameters, a more suitable node can be selected for the deployment unit more accurately, thereby achieving the effect of improving the accuracy of scheduling the deployment unit.

[0092] Optionally, in the scheduling device based on the container orchestration engine provided in the embodiment of the present application, the device also includes: a third determination unit, which is used to determine multiple nodes in the container orchestration engine, the type corresponding to each node, and the remaining resources corresponding to each node after determining the target deployment unit to be scheduled and the type corresponding to the target deployment unit; a second screening unit, which is used to screen the multiple nodes according to the type corresponding to each node and the remaining resources corresponding to each node, so as to obtain multiple candidate nodes; the first screening unit includes: a first screening sub-unit, which is used to screen the multiple candidate nodes based on the target coefficient and the operating parameters corresponding to the target deployment unit, so as to obtain multiple initial nodes.

[0093] Optionally, in the scheduling device based on the container orchestration engine provided in the embodiment of the present application, the first screening sub-unit includes: a first acquisition module, used to obtain the total amount of resources corresponding to each candidate node, wherein the total amount of resources includes at least: central processing unit resources, memory resources and input / output resources; a first calculation module, used to calculate according to the target coefficient, operating parameters and the total amount of resources to obtain a first score corresponding to each candidate node; a first screening module, used to screen multiple candidate nodes according to the first score to obtain multiple initial nodes.

[0094] Optionally, in the scheduling device based on the container orchestration engine provided in the embodiment of the present application, the first calculation module includes: a first calculation submodule, which is used to calculate according to the CPU intensive coefficient in the target coefficient, the CPU request amount and the CPU resource amount of the operating parameters, and obtain the CPU ratio value; a second calculation submodule, which is used to calculate according to the memory intensive coefficient in the target coefficient, the memory request amount and the memory resource amount in the operating parameters, and obtain the memory ratio value; a third calculation submodule, which is used to calculate according to the input / output intensive coefficient in the target coefficient, the input / output request amount and the output / output resource amount in the operating parameters, and obtain the output / output ratio value; a fourth calculation submodule, which is used to calculate according to the CPU ratio value, the memory ratio value and the output / output ratio value to obtain the first score.

[0095] Optionally, in the scheduling device based on the container orchestration engine provided in the embodiment of the present application, the second determination unit includes: a determination subunit, for determining, for any initial node, an estimated resource utilization rate of the initial node, wherein the estimated resource utilization rate is the resource utilization rate after the target deployment unit is scheduled to the initial node; a first scoring subunit, for scoring the initial node according to the estimated resource utilization rate and a preset expected resource utilization rate to obtain a second score; a second scoring subunit, for scoring the initial node according to the CPU request amount and the memory request amount in the operating parameters of the target deployment unit to obtain a third score; and a second screening subunit, for screening multiple initial nodes according to the second score and the third score to obtain a target node.

[0096] Optionally, in the scheduling device based on the container orchestration engine provided in the embodiment of the present application, the first scoring sub-unit includes: a judgment module, used to judge whether the estimated resource utilization rate is less than or equal to the expected resource utilization rate; a second calculation module, used to calculate based on the estimated resource utilization rate and the expected resource utilization rate to obtain a second score if the estimated resource utilization rate is less than or equal to the expected resource utilization rate; a third calculation module, used to calculate based on the estimated resource utilization rate, the expected resource utilization rate and the maximum resource utilization rate to obtain a second score if the estimated resource utilization rate is greater than the expected resource utilization rate and less than or equal to the maximum resource utilization rate; a determination module, used to determine the second score based on a preset value if the estimated resource utilization rate is greater than the maximum resource utilization rate.

[0097] Optionally, in the scheduling device based on the container orchestration engine provided in the embodiment of the present application, the second screening sub-unit includes: a fourth calculation module, used to perform weighted summation of the second score and the third score to obtain a fourth score; a second acquisition module, used to obtain the number of deployment units scheduled for multiple initial nodes in a historical time period; an adjustment module, used to adjust the fourth score according to the number of scheduled deployment units to obtain a fifth score; and a second screening module, used to screen the multiple initial nodes according to the fifth score to obtain a target node.

[0098] It should be noted that the first determination unit 401, the first screening unit 402 and the second determination unit 403 described above correspond to steps S201 to S203 in the first embodiment, and the three units and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the first embodiment. It should be noted that the modules or units described above may be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the modules described above may also be run as part of a device in the computer terminal 10 provided in the first embodiment.

[0099] Example 3

[0100] An embodiment of the present application may provide an electronic device, Figure 5 is a structural block diagram of an electronic device according to an embodiment of the present application. Figure 5 As shown, the electronic device may include: one or more ( Figure 5 (only one is shown) processor 502, memory 504, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0101] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0102] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: determine the target deployment unit to be scheduled and the type corresponding to the target deployment unit; if the type corresponding to the target deployment unit is a mixed type and the target deployment unit has a target coefficient, then based on the target coefficient and the operating parameters corresponding to the target deployment unit, multiple nodes in the container orchestration engine are screened to obtain multiple initial nodes, wherein the mixed type characterizes that the target deployment unit is a deployment unit that runs both online and offline services, and the target coefficient is determined based on the historical operating data of the target deployment unit, and is used to characterize the tendency of the target deployment unit to use resources when running; based on the multiple initial nodes, determine the target node, and schedule the target deployment unit to the target node to run the target deployment unit on the target node.

[0103] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: After determining the target deployment unit to be scheduled and the type corresponding to the target deployment unit, the method also includes: determining multiple nodes in the container orchestration engine, the type corresponding to each node and the remaining resource amount corresponding to each node; screening the multiple nodes according to the type corresponding to each node and the remaining resource amount corresponding to each node to obtain multiple candidate nodes; screening the multiple nodes in the container orchestration engine based on the target coefficient and the operating parameters corresponding to the target deployment unit to obtain multiple initial nodes includes: screening the multiple candidate nodes based on the target coefficient and the operating parameters corresponding to the target deployment unit to obtain multiple initial nodes.

[0104] The processor can call the information and application programs stored in the memory through the transmission device to perform the following steps: screening multiple candidate nodes based on the target coefficient and the operating parameters corresponding to the target deployment unit to obtain multiple initial nodes, including: obtaining the total amount of resources corresponding to each candidate node, wherein the total amount of resources includes at least: central processing unit resources, memory resources and input / output resources; calculating according to the target coefficient, operating parameters and total amount of resources to obtain a first score corresponding to each candidate node; screening multiple candidate nodes according to the first score to obtain multiple initial nodes.

[0105] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: calculate according to the target coefficient, operating parameters and total resources to obtain the first score corresponding to each candidate node, including: calculate according to the central processing unit intensive coefficient in the target coefficient, the central processing unit request amount and the central processing unit resource amount in the operating parameters to obtain the central processing unit ratio value; calculate according to the memory intensive coefficient in the target coefficient, the memory request amount and the memory resource amount in the operating parameters to obtain the memory ratio value; calculate according to the input / output intensive coefficient in the target coefficient, the input / output request amount and the output / output resource amount in the operating parameters to obtain the output / output ratio value; calculate according to the central processing unit ratio value, the memory ratio value and the output / output ratio value to obtain the first score.

[0106] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: determining the target node based on multiple initial nodes includes: for any initial node, determining the estimated resource utilization rate of the initial node, wherein the estimated resource utilization rate is the resource utilization rate after the target deployment unit is scheduled to the initial node; scoring the initial node based on the estimated resource utilization rate and the preset expected resource utilization rate to obtain a second score; scoring the initial node based on the CPU request amount and the memory request amount in the operating parameters of the target deployment unit to obtain a third score; and screening multiple initial nodes based on the second score and the third score to obtain the target node.

[0107] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: score the initial node according to the estimated resource utilization rate and the preset expected resource utilization rate, and obtain the second score including: determine whether the estimated resource utilization rate is less than or equal to the expected resource utilization rate; if the estimated resource utilization rate is less than or equal to the expected resource utilization rate, calculate based on the estimated resource utilization rate and the expected resource utilization rate to obtain the second score; if the estimated resource utilization rate is greater than the expected resource utilization rate and less than or equal to the maximum resource utilization rate, calculate based on the estimated resource utilization rate, the expected resource utilization rate and the maximum resource utilization rate to obtain the second score; if the estimated resource utilization rate is greater than the maximum resource utilization rate, determine the second score according to the preset value.

[0108] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: screening multiple initial nodes according to the second score and the third score to obtain the target node, including: weighted summing the second score and the third score to obtain a fourth score; obtaining the number of deployment units scheduled for the multiple initial nodes in a historical time period; adjusting the fourth score according to the number of scheduled deployment units to obtain a fifth score; screening multiple initial nodes according to the fifth score to obtain the target node.

[0109] It can be understood by those skilled in the art that Figure 5 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 5 The structure of the electronic device is not limited. Figure 5 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 5 Different configurations are shown.

[0110] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0111] Example 4

[0112] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the scheduling method based on the container orchestration engine provided in the first embodiment.

[0113] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0114] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing the program of the scheduling method steps based on the container orchestration engine.

[0115] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0116] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0117] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, 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. For example, 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 units or modules, which can be electrical or other forms.

[0118] 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.

[0119] 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0120] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0121] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A scheduling method based on a container orchestration engine, characterized in that: include: Determine a target deployment unit to be scheduled and a type corresponding to the target deployment unit; If the type corresponding to the target deployment unit is a colocation type and the target deployment unit has a target coefficient, multiple nodes in the container orchestration engine are screened based on the target coefficient and the operating parameters corresponding to the target deployment unit to obtain multiple initial nodes, wherein the colocation type indicates that the target deployment unit is a deployment unit that runs both online and offline services, and the target coefficient is determined based on historical operating data of the target deployment unit and is used to indicate the tendency of the target deployment unit to use resources during operation; A target node is determined according to the multiple initial nodes, and the target deployment unit is scheduled to the target node to run the target deployment unit at the target node.

2. The method according to claim 1, characterized in that After determining the target deployment unit to be scheduled and the type corresponding to the target deployment unit, the method further includes: Determine multiple nodes in the container orchestration engine, the type corresponding to each node, and the remaining resources corresponding to each node; The multiple nodes are screened according to the type corresponding to each node and the remaining resource amount corresponding to each node to obtain multiple candidate nodes; Based on the target coefficient and the operating parameters corresponding to the target deployment unit, multiple nodes in the container orchestration engine are screened to obtain multiple initial nodes including: The multiple candidate nodes are screened based on the target coefficient and the operating parameters corresponding to the target deployment unit to obtain the multiple initial nodes.

3. The method according to claim 2, characterized in that The plurality of candidate nodes are screened based on the target coefficient and the operating parameters corresponding to the target deployment unit, and the plurality of initial nodes are obtained, including: Obtaining the total amount of resources corresponding to each candidate node, wherein the total amount of resources at least includes: CPU resources, memory resources, and input / output resources; Calculating according to the target coefficient, the operating parameter and the total amount of resources to obtain a first score corresponding to each candidate node; The multiple candidate nodes are screened according to the first scores to obtain the multiple initial nodes.

4. The method according to claim 3, characterized in that Calculating according to the target coefficient, the operating parameters and the total amount of resources to obtain a first score corresponding to each candidate node includes: Calculating according to the CPU intensive coefficient in the target coefficient, the CPU request amount of the operating parameter and the CPU resource amount to obtain a CPU ratio value; Calculating according to the memory intensive coefficient in the target coefficient, the memory request amount in the operating parameter, and the memory resource amount to obtain a memory ratio value; Calculating according to the input / output intensive coefficient in the target coefficient, the input / output request amount in the operation parameter and the output / output resource amount to obtain an output / output ratio value; The first score is obtained by performing calculation according to the CPU ratio value, the memory ratio value and the I / O ratio value.

5. The method according to claim 1, characterized in that Determining the target node according to the multiple initial nodes includes: For any initial node, determining an estimated resource usage rate of the initial node, wherein the estimated resource usage rate is a resource usage rate after the target deployment unit is scheduled to the initial node; Scoring the initial node according to the estimated resource usage rate and the preset expected resource usage rate to obtain a second score; Scoring the initial node according to the CPU request amount and the memory request amount in the operating parameters of the target deployment unit to obtain a third score; The multiple initial nodes are screened according to the second score and the third score to obtain the target node.

6. The method according to claim 5, characterized in that Scoring the initial node according to the estimated resource usage rate and the preset expected resource usage rate to obtain a second score includes: Determining whether the estimated resource usage rate is less than or equal to the expected resource usage rate; If the estimated resource usage rate is less than or equal to the expected resource usage rate, performing calculation based on the estimated resource usage rate and the expected resource usage rate to obtain the second score; If the estimated resource usage is greater than the expected resource usage and less than or equal to the maximum resource usage, calculating according to the estimated resource usage, the expected resource usage and the maximum resource usage to obtain the second score; If the estimated resource usage is greater than the maximum resource usage, the second score is determined according to a preset value.

7. The method according to claim 5, characterized in that The plurality of initial nodes are screened according to the second score and the third score to obtain the target node, including: Performing a weighted summation on the second score and the third score to obtain a fourth score; Obtaining the number of deployment units scheduled for the multiple initial nodes in a historical time period; adjusting the fourth score according to the number of the scheduled deployment units to obtain a fifth score; The multiple initial nodes are screened according to the fifth score to obtain the target node.

8. A scheduling device based on a container orchestration engine, characterized in that: include: A first determining unit, used to determine a target deployment unit to be scheduled and a type corresponding to the target deployment unit; A first screening unit is configured to screen multiple nodes in a container orchestration engine based on the target coefficient and an operating parameter corresponding to the target deployment unit to obtain multiple initial nodes if the type corresponding to the target deployment unit is a colocation type and the target deployment unit has a target coefficient, wherein the colocation type indicates that the target deployment unit is a deployment unit that runs both online and offline services, and the target coefficient is determined based on historical operating data of the target deployment unit and is used to indicate a tendency of the target deployment unit to use resources when running. The second determining unit is used to determine a target node according to the multiple initial nodes, and schedule the target deployment unit to the target node to run the target deployment unit on the target node.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the scheduling method based on the container orchestration engine according to any one of claims 1 to 7.

10. An electronic device, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program, when running, executes the scheduling method based on the container orchestration engine described in any one of claims 1 to 7.