CN114398148A - Power industry K8S dynamic container arrangement method and storage medium - Google Patents
Power industry K8S dynamic container arrangement method and storage medium Download PDFInfo
- Publication number
- CN114398148A CN114398148A CN202111644965.0A CN202111644965A CN114398148A CN 114398148 A CN114398148 A CN 114398148A CN 202111644965 A CN202111644965 A CN 202111644965A CN 114398148 A CN114398148 A CN 114398148A
- Authority
- CN
- China
- Prior art keywords
- task
- resource
- container
- slt
- class
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 17
- 238000007637 random forest analysis Methods 0.000 claims abstract description 16
- 238000013145 classification model Methods 0.000 claims description 7
- 238000012544 monitoring process Methods 0.000 claims description 4
- 238000004422 calculation algorithm Methods 0.000 claims description 2
- 238000004590 computer program Methods 0.000 claims 1
- 238000004364 calculation method Methods 0.000 abstract 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/243—Classification techniques relating to the number of classes
- G06F18/24323—Tree-organised classifiers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/06—Energy or water supply
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/4557—Distribution of virtual machine instances; Migration and load balancing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Business, Economics & Management (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Economics (AREA)
- Health & Medical Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Health & Medical Sciences (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Public Health (AREA)
- Water Supply & Treatment (AREA)
- Evolutionary Computation (AREA)
- Human Resources & Organizations (AREA)
- Marketing (AREA)
- Primary Health Care (AREA)
- Strategic Management (AREA)
- Tourism & Hospitality (AREA)
- General Business, Economics & Management (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Description
技术领域technical field
本发明涉及电力行业互联网应用领域,具体涉及一种电力行业K8S动态容器编排方法及存储介质,尤其是一种应用改进随机森林的电力行业K8S动态容器编排方法及存储介质。The invention relates to the field of Internet application in the electric power industry, in particular to a K8S dynamic container arrangement method and storage medium in the electric power industry, in particular to a K8S dynamic container arrangement method and storage medium in the electric power industry using an improved random forest.
背景技术Background technique
总体而言,电力行业应用具有一定的特殊性,需要应用具备高可用、高安全、高并发,而且只能在内网应用。很多可以在互联网应用的K8S容器分配策略都不能应用于电力行业。Docker作为容器化的事实标准,作为基本的资源任务调度单位,每一个容器都分配了相应的资源,容器都封装了整个软件的runtime,可以实现DevOps一体化管理。但目前的容器编排对资源节点的负载度问题差异化分配存在问题,忽视了不同任务特点,容易造成K8S容器分配失衡,导致系统资源的利用低,执行速度慢,执行时间长等问题。In general, applications in the power industry have certain particularities, requiring applications with high availability, high security, and high concurrency, and can only be applied on the intranet. Many K8S container allocation strategies that can be applied on the Internet cannot be applied to the power industry. As the de facto standard of containerization, Docker is the basic resource task scheduling unit. Each container is allocated corresponding resources, and the container encapsulates the runtime of the entire software, which can realize the integrated management of DevOps. However, the current container orchestration has problems in the differential allocation of resource nodes' load, ignoring the characteristics of different tasks, which can easily lead to unbalanced K8S container allocation, resulting in low utilization of system resources, slow execution speed, and long execution time.
针对电网K8S环境下对容器分配情况,从容器引擎管理、性能监控、异常检测、网络配置、I/O性能隔离、Web部署等方面对任务属性、负载均衡等方面均需进行研究,In view of the allocation of containers in the K8S environment of the power grid, it is necessary to study the task attributes and load balancing from the aspects of container engine management, performance monitoring, anomaly detection, network configuration, I/O performance isolation, and Web deployment.
发明内容SUMMARY OF THE INVENTION
针对上述问题,发明人提供了一种电力行业K8S动态容器编排方法,发明人通过分析集群负载容易不均衡和低效的资源利用率等问题,提出根据每个资源节点的利用率,不同的服务请求,更新资源节点权重的动态加权分配算法,进行K8S容器的编排。采用改进随机森林方式进行容器编排,实现最大程利用现有资源进行容器,解决了有限资源条件下,计算容器的最优化编排问题。In response to the above problems, the inventor provides a K8S dynamic container orchestration method in the power industry. The inventor proposes that according to the utilization rate of each resource node, different services Request, update the dynamic weighted allocation algorithm of resource node weights, and arrange K8S containers. The improved random forest method is used for container arrangement, which realizes the maximum utilization of existing resources for container arrangement, and solves the problem of optimal arrangement of computing containers under the condition of limited resources.
本发明提供的电力行业K8S动态容器编排方法,包括以下步骤:The K8S dynamic container arrangement method in the power industry provided by the present invention includes the following steps:
步骤S1:对Docker任务进行分类。将执行时长在(0,50000)之间的任务划分为5个不同的等级,分别是超长任务(Super Long Task,SLT)、长任务(Long Task,LT)、一般任务(Normal Task,NT)、短任务(Short Task,ST)和超短任务(Super Short Task,SST),将这五个等级作为容器任务集的五个类标签,五个类标签的二进制标签见下表:Step S1: Classify Docker tasks. Divide tasks with execution time between (0, 50000) into 5 different levels, namely Super Long Task (SLT), Long Task (LT), and Normal Task (NT) ), Short Task (ST) and Super Short Task (SST), these five levels are used as the five class labels of the container task set, and the binary labels of the five class labels are shown in the following table:
所以,容器任务集的类属性集合表示为Class={SLT,LT,NT,ST,SST}。Therefore, the class attribute set of the container task set is expressed as Class={SLT,LT,NT,ST,SST}.
步骤S2:将步骤S1的Class集合作为分类条件,根据改进的随机森林分类器训练任务分类模型对任务进行分类,分类过程分为两步。Step S2: Using the Class set of Step S1 as a classification condition, classify the task according to the improved random forest classifier training task classification model, and the classification process is divided into two steps.
步骤S21:构造带有类标签的任务集,创建Docker任务容器,放入任务资源池中形成任务集。Step S21: Construct a task set with a class label, create a Docker task container, and put it into a task resource pool to form a task set.
步骤S22:将带有类标签的任务集作为输入参数,并返回最优随机森林分类模型。当基于改进随机森林的容器云任务分类模型训练完成后,表示n个基分类器,每个基分类器的叶子结点均表示一种分类结果,如[10000]则表示第一种分类结果,即SLT,[01000]则表示第二种分类结果,即LT,以此类推,该结果即为该任务的最终类别。Step S22: Take the task set with class labels as input parameters, and return the optimal random forest classification model. When the container cloud task classification model based on the improved random forest is trained, it represents n base classifiers, and the leaf nodes of each base classifier represent a classification result. For example, [10000] represents the first classification result. That is, SLT, [01000] represents the second classification result, namely LT, and so on, the result is the final category of the task.
步骤S3,K8S会利用步骤S2的最终结果。将请求的任务集合Task划分成不同执行时间长度的子任务集合Docker_Task={SLT,LT,NT,ST,SST}。K8S自带的监控平台获取该集群下各资源节点的资源使用情况,构成集合Resource={R1,R2,R3 R4}。K8S评估将该批任务分配到各资源节点是否会超载,若不超载,则按计划分配。若超载,则将可能会超载的资源节点从资源集合中去除,重新评估将该批任务均分到剩余资源节点是否超载,如此反复,直到资源集合为空或任务集合为空,若任务集合为空。In step S3, K8S will use the final result of step S2. Divide the requested task set Task into sub-task sets Docker_Task={SLT, LT, NT, ST, SST} with different execution time lengths. The monitoring platform that comes with K8S obtains the resource usage of each resource node in the cluster, forming a set Resource={R1, R2, R3 R4}. K8S evaluates whether allocating the batch of tasks to each resource node will be overloaded, and if it is not overloaded, it will be allocated according to the plan. If it is overloaded, the resource nodes that may be overloaded will be removed from the resource set, and the batch of tasks will be divided into the remaining resource nodes to re-evaluate whether they are overloaded. Repeat this until the resource set is empty or the task set is empty. If the task set is null.
本发明的有益效果:Beneficial effects of the present invention:
针对电力行业应用具备高可用、高安全、高并发、内网应用特点通过对集群和容器的任务特点及所占资源进行研究,通过应用一种应用改进随机森林的电力行业K8S动态容器编排方法在负载均衡方面还是在最小时间跨度方面,都具有显著的成效,可以广泛应用于大规范docker容器编排的场景中,提高资源的利用率。According to the characteristics of high availability, high security, high concurrency, and intranet applications in power industry applications, through the research on the task characteristics and occupied resources of clusters and containers, and the application of an application to improve the power industry K8S dynamic container arrangement method of random forest is in In terms of load balancing and the minimum time span, it has remarkable results, and can be widely used in scenarios where large-scale docker containers are orchestrated to improve resource utilization.
附图说明Description of drawings
图1为本发明的改进随机森林的容器云任务分类模型示意图。FIG. 1 is a schematic diagram of the container cloud task classification model of the improved random forest of the present invention.
图2为本发明的方法的流程图。Figure 2 is a flow chart of the method of the present invention.
具体实施方式Detailed ways
参照图1,本发明的应用改进随机森林的电力行业K8S动态容器编排方法,包括以下步骤:Referring to FIG. 1 , the K8S dynamic container arrangement method in the power industry of the application of the present invention improves the random forest, including the following steps:
步骤S1:对Docker任务进行分类。将执行时长(ms)在(0,50000)之间的任务划分为5个不同的等级,分别是超长任务(Super Long Task,SLT)、长任务(Long Task,LT)、一般任务(Normal Task,NT)、短任务(Short Task,ST)和超短任务(Super Short Task,SST),将这五个等级作为容器任务集的五个类标签,五个类标签的二进制标签见下表:Step S1: Classify Docker tasks. Divide tasks whose execution duration (ms) is between (0, 50000) into 5 different levels, namely Super Long Task (SLT), Long Task (LT), and Normal Task (Normal Task). Task, NT), short task (Short Task, ST) and super short task (Super Short Task, SST), these five levels are used as the five class labels of the container task set, and the binary labels of the five class labels are shown in the following table :
所以,容器任务集的类属性集合表示为Class={SLT,LT,NT,ST,SST}。Therefore, the class attribute set of the container task set is expressed as Class={SLT,LT,NT,ST,SST}.
步骤S2:根据改进的随机森林分类器训练任务分类模型对任务进行分类,分类过程分为两步。Step S2: Classify the task according to the improved random forest classifier training task classification model, and the classification process is divided into two steps.
步骤S21:构造带有类标签的任务集,创建Docker任务容器,放入任务资源池中形成无序的任务集order_Docker_Task={LT,NT,SLT,SST,ST}。Step S21: Construct a task set with class labels, create a Docker task container, and put it into the task resource pool to form an unordered task set order_Docker_Task={LT,NT,SLT,SST,ST}.
步骤S22:将带有类标签的任务集作为输入参数,并返回最优随机森林分类的有序任务集合。当基于改进随机森林的容器云任务分类模型训练完成后,表示n个基分类器,每个基分类器的叶子结点均表示一种分类结果,如[10000]则表示第一种分类结果,即SLT,[01000]则表示第二种分类结果,即LT,以此类推,具体的对应如图1所示,该结果即为该任务的最终类别,有序集合order_Docker_Task={SLT,LT,NT,ST,SST}。Step S22: Take the task set with the class label as the input parameter, and return the ordered task set of the optimal random forest classification. When the container cloud task classification model based on the improved random forest is trained, it represents n base classifiers, and the leaf nodes of each base classifier represent a classification result. For example, [10000] represents the first classification result. That is, SLT, [01000] represents the second classification result, that is, LT, and so on. The specific correspondence is shown in Figure 1. The result is the final category of the task, and the ordered set order_Docker_Task={SLT,LT, NT, ST, SST}.
步骤S3,K8S会利用上述的最终结果。将请求的任务集合Task划分成不同执行时间长度的子任务集合order_Docker_Task={SLT,LT,NT,ST,SST}。K8S自带的监控平台获取该集群下各资源节点的资源使用情况,构成集合Resource={R1,R2,R3 R4}。K8S评估将该批任务分配到各资源节点是否会超载,若不超载,则按计划分配。若超载,则将可能会超载的资源节点从资源集合中去除,重新评估将该批任务均分到剩余资源节点是否超载,如此反复,直到资源集合为空或任务集合为空,若任务集合为空。In step S3, K8S will use the above final result. Divide the requested task set Task into sub-task sets with different execution time lengths order_Docker_Task={SLT, LT, NT, ST, SST}. The monitoring platform that comes with K8S obtains the resource usage of each resource node in the cluster, forming a set Resource={R1, R2, R3 R4}. K8S evaluates whether allocating the batch of tasks to each resource node will be overloaded, and if it is not overloaded, it will be allocated according to the plan. If it is overloaded, the resource nodes that may be overloaded will be removed from the resource set, and the batch of tasks will be divided into the remaining resource nodes to re-evaluate whether they are overloaded. Repeat this until the resource set is empty or the task set is empty. If the task set is null.
Claims (3)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111644965.0A CN114398148A (en) | 2021-12-30 | 2021-12-30 | Power industry K8S dynamic container arrangement method and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111644965.0A CN114398148A (en) | 2021-12-30 | 2021-12-30 | Power industry K8S dynamic container arrangement method and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114398148A true CN114398148A (en) | 2022-04-26 |
Family
ID=81229713
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111644965.0A Pending CN114398148A (en) | 2021-12-30 | 2021-12-30 | Power industry K8S dynamic container arrangement method and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114398148A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115426365A (en) * | 2022-08-17 | 2022-12-02 | 西安理工大学 | Cluster scheduling method based on generic computation architecture |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105245617A (en) * | 2015-10-27 | 2016-01-13 | 江苏电力信息技术有限公司 | A container-based server resource provisioning method |
CN109063935A (en) * | 2018-09-27 | 2018-12-21 | 北京三快在线科技有限公司 | A kind of method, apparatus and storage medium of prediction task processing time |
CN109491790A (en) * | 2018-11-02 | 2019-03-19 | 中山大学 | Industrial Internet of Things edge calculations resource allocation methods and system based on container |
WO2020206705A1 (en) * | 2019-04-10 | 2020-10-15 | 山东科技大学 | Cluster node load state prediction-based job scheduling method |
CN112073532A (en) * | 2020-09-15 | 2020-12-11 | 北京字节跳动网络技术有限公司 | Resource allocation method and device |
-
2021
- 2021-12-30 CN CN202111644965.0A patent/CN114398148A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105245617A (en) * | 2015-10-27 | 2016-01-13 | 江苏电力信息技术有限公司 | A container-based server resource provisioning method |
CN109063935A (en) * | 2018-09-27 | 2018-12-21 | 北京三快在线科技有限公司 | A kind of method, apparatus and storage medium of prediction task processing time |
CN109491790A (en) * | 2018-11-02 | 2019-03-19 | 中山大学 | Industrial Internet of Things edge calculations resource allocation methods and system based on container |
WO2020206705A1 (en) * | 2019-04-10 | 2020-10-15 | 山东科技大学 | Cluster node load state prediction-based job scheduling method |
CN112073532A (en) * | 2020-09-15 | 2020-12-11 | 北京字节跳动网络技术有限公司 | Resource allocation method and device |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115426365A (en) * | 2022-08-17 | 2022-12-02 | 西安理工大学 | Cluster scheduling method based on generic computation architecture |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Chen et al. | A WOA-based optimization approach for task scheduling in cloud computing systems | |
CN110413389B (en) | Task scheduling optimization method under resource imbalance Spark environment | |
Naaz et al. | Effect of different defuzzification methods in a fuzzy based load balancing application | |
CN108829494A (en) | Container cloud platform intelligence method for optimizing resources based on load estimation | |
CN103279392A (en) | Method for classifying operated load in virtual machine under cloud computing environment | |
CN103873569A (en) | Resource optimized deployment method based on IaaS (infrastructure as a service) cloud platform | |
WO2016167824A1 (en) | Database query classification | |
CN112884248B (en) | An optimization method for large-scale cloud service process | |
CN110838055A (en) | Electric power enterprise financial data management system based on big data | |
CN115543577A (en) | Covariate-based Kubernetes resource scheduling optimization method, storage medium and equipment | |
CN103279505A (en) | Mass data processing method based on semantic meaning | |
CN114398148A (en) | Power industry K8S dynamic container arrangement method and storage medium | |
CN108256182B (en) | A Layout Method of Dynamically Reconfigurable FPGA | |
CN107070965A (en) | A kind of Multi-workflow resource provision method virtualized under container resource | |
CN102063329A (en) | Multi-agent coordination based management task dynamic decomposition method and system | |
US10592473B2 (en) | Method for improving energy efficiency of map-reduce system and apparatus thereof | |
CN107589980A (en) | A kind of dispatching method of cloud computing resources | |
CN115145383A (en) | An adaptive energy-saving selection method for CPU/GPU server | |
CN106095573B (en) | A work-slot-aware Storm platform job-sharing scheduling method | |
CN115202810A (en) | A Kubernetes worker node allocation method and system | |
Chitgar et al. | DSCTS: Dynamic stochastic cloud task scheduling | |
Chen et al. | Minimum migration time selection algorithm for container consolidation | |
CN106569472A (en) | BDD (binary decision diagram)-based enterprise workshop deadlock rapid prevention method | |
CN117472551B (en) | Cloud computing hardware acceleration control system and method based on GPU integration | |
Mohazabiyeh et al. | Energy-aware adaptive four thresholds technique for optimal virtual machine placement |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |