[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN111901410A - Server grouping method, device, equipment and computer readable storage medium - Google Patents

Server grouping method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN111901410A
CN111901410A CN202010725778.4A CN202010725778A CN111901410A CN 111901410 A CN111901410 A CN 111901410A CN 202010725778 A CN202010725778 A CN 202010725778A CN 111901410 A CN111901410 A CN 111901410A
Authority
CN
China
Prior art keywords
server
grouping
target
task
parameters
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
Application number
CN202010725778.4A
Other languages
Chinese (zh)
Inventor
李松
李锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Yingxin Computer Technology Co Ltd
Original Assignee
Shandong Yingxin Computer Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shandong Yingxin Computer Technology Co Ltd filed Critical Shandong Yingxin Computer Technology Co Ltd
Priority to CN202010725778.4A priority Critical patent/CN111901410A/en
Publication of CN111901410A publication Critical patent/CN111901410A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1042Peer-to-peer [P2P] networks using topology management mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明公开了一种服务器分组方法,该方法包括以下步骤:对接收到的服务器分组请求进行解析,得到目标分组任务;分别获取各服务器中与目标分组任务对应的各目标服务器参数;利用模糊C均值聚类算法基于各目标服务器参数对各服务器进行聚类分组,得到各服务器组。应用本发明实施例所提供的技术方案,较大地降低了人为主观因素的影响,提高了分组准确性,较大地提高了分组效率。本发明还公开了一种服务器分组装置、设备及存储介质,具有相应技术效果。

Figure 202010725778

The invention discloses a server grouping method. The method includes the following steps: analyzing a received server grouping request to obtain a target grouping task; obtaining parameters of each target server corresponding to the target grouping task in each server; using fuzzy C The mean clustering algorithm performs clustering and grouping of each server based on the parameters of each target server, and obtains each server group. By applying the technical solutions provided by the embodiments of the present invention, the influence of human subjective factors is greatly reduced, the grouping accuracy is improved, and the grouping efficiency is greatly improved. The invention also discloses a server grouping device, equipment and storage medium, which have corresponding technical effects.

Figure 202010725778

Description

一种服务器分组方法、装置、设备及计算机可读存储介质A server grouping method, apparatus, device and computer-readable storage medium

技术领域technical field

本发明涉及计算机应用技术领域,特别是涉及一种服务器分组方法、装置、设备及计算机可读存储介质。The present invention relates to the technical field of computer applications, and in particular, to a server grouping method, apparatus, device, and computer-readable storage medium.

背景技术Background technique

当今数据中心的规模变得越来越大,一个机房中的机器有成千上万台,运维人员管理起来变得异常复杂。其中有两种场景,需要将数量庞大的服务器进行分组处理,第一种场景是对网络中的所有服务器根据配置信息进行分组以方便维护,比如,相同配置,同等算力的服务器尽可能的归属为同一分组,以便管理员在进行系统维护的时候可以快速地找到类似的服务器。另一种情形是对于运行中的服务器进行分组,找出当前时刻资源相近的机器组成集群,方便有复杂任务时,可以以此集群为基础进行分发,一般情况下,配置和算力相近的服务器因为资源均衡,能够更好地执行已分发的任务,这种分发策略要优于将任务分发到配置千差万别的机器上,因为在划分临时集群时,有必要先将整体服务器进行分组,筛选出资源相对充裕,压力不大的服务器。The scale of today's data centers is getting larger and larger, and there are thousands of machines in a computer room, which makes it extremely complicated for operation and maintenance personnel to manage. There are two scenarios in which a large number of servers need to be grouped for processing. The first scenario is to group all servers in the network according to configuration information to facilitate maintenance. For example, servers with the same configuration and the same computing power should belong as much as possible. For the same group, so that administrators can quickly find similar servers when performing system maintenance. Another situation is to group the running servers, and find out the machines with similar resources at the current moment to form a cluster. It is convenient for complex tasks to be distributed on the basis of this cluster. In general, the configuration and computing power of the servers are similar. Because the resources are balanced, the distributed tasks can be better executed. This distribution strategy is better than distributing tasks to machines with different configurations, because when dividing a temporary cluster, it is necessary to first group the entire server and filter out the resources. Relatively abundant, low-stress servers.

上述两种场景均涉及到对服务器集群中各服务器进行分组,现有的服务器分组方式为通过人工遴选方式对服务器集群中各服务器进行分组,但是现实中一个数据中心的服务器数量往往成千上万,服务器分组任务量庞大,易出错,受人为主观因素影响较大,分组准确性较低,分组效率低。The above two scenarios both involve grouping each server in the server cluster. The existing server grouping method is to group each server in the server cluster by manual selection. However, in reality, the number of servers in a data center is often thousands. , The amount of server grouping tasks is huge, prone to errors, and is greatly affected by human subjective factors, the grouping accuracy is low, and the grouping efficiency is low.

综上所述,如何有效地解决人工遴选的服务器分组方式分组准确性较低,分组效率低等问题,是目前本领域技术人员急需解决的问题。To sum up, how to effectively solve the problems of low grouping accuracy and low grouping efficiency of the manually selected server grouping method is an urgent problem to be solved by those skilled in the art at present.

发明内容SUMMARY OF THE INVENTION

本发明的目的是提供一种服务器分组方法,该方法较大地降低了人为主观因素的影响,提高了分组准确性,较大地提高了分组效率;本发明的另一目的是提供一种服务器分组装置、设备及计算机可读存储介质。The purpose of the present invention is to provide a server grouping method, which greatly reduces the influence of human subjective factors, improves the accuracy of grouping, and greatly improves the efficiency of grouping; another purpose of the present invention is to provide a server grouping device , devices, and computer-readable storage media.

为解决上述技术问题,本发明提供如下技术方案:In order to solve the above-mentioned technical problems, the present invention provides the following technical solutions:

一种服务器分组方法,包括:A server grouping method, comprising:

对接收到的服务器分组请求进行解析,得到目标分组任务;Analyze the received server grouping request to obtain the target grouping task;

分别获取各服务器中与所述目标分组任务对应的各目标服务器参数;Respectively obtain each target server parameter corresponding to the target grouping task in each server;

利用模糊C均值聚类算法基于各所述目标服务器参数对各所述服务器进行聚类分组,得到各服务器组。The servers are clustered and grouped based on the parameters of each target server by using a fuzzy C-means clustering algorithm to obtain each server group.

在本发明的一种具体实施方式中,当所述目标分组任务为服务器维护任务时,分别获取各服务器中与所述目标分组任务对应的各目标服务器参数,包括:In a specific embodiment of the present invention, when the target grouping task is a server maintenance task, acquiring parameters of each target server corresponding to the target grouping task in each server, including:

分别获取各所述服务器中与所述服务器维护任务对应的各原始配置参数;Respectively obtain each original configuration parameter corresponding to the server maintenance task in each of the servers;

利用配置量化函数对各所述原始配置参数进行量化处理,得到各目标配置参数;Use the configuration quantization function to perform quantization processing on each of the original configuration parameters to obtain each target configuration parameter;

利用模糊C均值聚类算法基于各所述目标服务器参数对各所述服务器进行聚类分组,包括:Using the fuzzy C-means clustering algorithm to cluster and group each of the servers based on the parameters of each of the target servers, including:

利用所述模糊C均值聚类算法基于各所述目标配置参数对各所述服务器进行聚类分组。The servers are clustered and grouped based on the target configuration parameters using the fuzzy C-means clustering algorithm.

在本发明的一种具体实施方式中,利用配置量化函数对各所述原始配置参数进行量化处理,包括:In a specific embodiment of the present invention, using a configuration quantization function to perform quantization processing on each of the original configuration parameters, including:

获取通过函数预置接口预置的配置量化函数;Obtain the configuration quantization function preset through the function preset interface;

利用所述配置量化函数对各所述原始配置参数进行量化处理。Each of the original configuration parameters is quantized by using the configuration quantization function.

在本发明的一种具体实施方式中,在利用所述模糊C均值聚类算法基于各所述目标配置参数对各所述服务器进行聚类分组,得到各所述服务器组之后,还包括:In a specific embodiment of the present invention, after using the fuzzy C-means clustering algorithm to cluster and group each of the servers based on each of the target configuration parameters to obtain each of the server groups, the method further includes:

以各所述服务器组为单位对各所述服务器进行并行维护操作。A parallel maintenance operation is performed on each of the servers in units of each of the server groups.

在本发明的一种具体实施方式中,当所述目标分组任务为业务分发任务时,分别获取各服务器中与所述目标分组任务对应的各目标服务器参数,包括:In a specific embodiment of the present invention, when the target grouping task is a service distribution task, acquiring parameters of each target server corresponding to the target grouping task in each server, including:

分别获取各所述服务器中与所述业务分发任务对应的各实时性能参数;respectively acquiring each real-time performance parameter corresponding to the service distribution task in each of the servers;

利用模糊C均值聚类算法基于各所述目标服务器参数对各所述服务器进行聚类分组,包括:Using the fuzzy C-means clustering algorithm to cluster and group each of the servers based on the parameters of each of the target servers, including:

利用所述模糊C均值聚类算法基于各所述实时性能参数对各所述服务器进行聚类分组。The servers are clustered and grouped based on the real-time performance parameters using the fuzzy C-means clustering algorithm.

在本发明的一种具体实施方式中,在利用所述模糊C均值聚类算法基于各所述实时性能参数对各所述服务器进行聚类分组,得到各所述服务器组之后,还包括:In a specific embodiment of the present invention, after using the fuzzy C-means clustering algorithm to cluster and group each of the servers based on each of the real-time performance parameters to obtain each of the server groups, the method further includes:

从各所述服务器组中选取目标服务器组;Selecting a target server group from each of the server groups;

将待处理业务分发给所述目标服务器组中各目标服务器,以利用各所述目标服务器进行业务处理。Distributing the to-be-processed service to each target server in the target server group, so as to use each of the target servers to perform service processing.

在本发明的一种具体实施方式中,利用模糊C均值聚类算法基于各所述目标服务器参数对各所述服务器进行聚类分组,包括:In a specific embodiment of the present invention, clustering and grouping each of the servers based on the parameters of each of the target servers using a fuzzy C-means clustering algorithm, including:

获取各预置服务器类分别对应的服务器子集;Obtain the server subsets corresponding to each preset server class;

获取分别为各所述服务器子集预置的质心;obtaining the centroids preset for each of the server subsets respectively;

根据各所述目标服务器参数分别计算各所述服务器到各所述质心之间的各距离值;Calculate each distance value between each of the servers and each of the centroids according to the parameters of each of the target servers;

根据当前各距离值分别计算各所述服务器属于各所述预置服务器类的概率值;Calculate the probability value that each of the servers belongs to each of the preset server classes according to the current distance values;

根据当前各概率值对各所述质心进行重新计算;Recalculate each of the centroids according to each current probability value;

根据各所述目标服务器参数计算各所述服务器到重新计算得到的各质心之间的各距离值;Calculate the distance values between each of the servers and the recalculated centroids according to the parameters of each of the target servers;

结合当前各概率值和当前各距离值计算价值函数;Calculate the value function by combining the current probability values and the current distance values;

判断所述价值函数是否满足预设条件;Judging whether the value function satisfies a preset condition;

若否,则重复执行所述根据各所述距离值分别计算各所述服务器属于各所述预置服务器类的概率值的步骤;If not, repeat the step of calculating the probability value of each of the servers belonging to each of the preset server classes according to each of the distance values;

若是,获取各当前质心,并根据各所述当前质心对各所述服务器进行聚类分组。If so, each current centroid is obtained, and each of the servers is clustered and grouped according to each of the current centroids.

一种服务器分组装置,包括:A server grouping device, comprising:

任务获得模块,用于对接收到的服务器分组请求进行解析,得到目标分组任务;The task obtaining module is used to parse the received server grouping request to obtain the target grouping task;

参数获取模块,用于分别获取各服务器中与所述目标分组任务对应的各目标服务器参数;a parameter obtaining module, used for obtaining each target server parameter corresponding to the target grouping task in each server;

服务器组获得模块,用于利用模糊C均值聚类算法基于各所述目标服务器参数对各所述服务器进行聚类分组,得到各服务器组。The server group obtaining module is used for clustering and grouping each of the servers based on the parameters of each of the target servers by using a fuzzy C-means clustering algorithm to obtain each server group.

一种服务器分组设备,包括:A server grouping device, comprising:

存储器,用于存储计算机程序;memory for storing computer programs;

处理器,用于执行所述计算机程序时实现如前所述服务器分组方法的步骤。The processor is configured to implement the steps of the aforementioned server grouping method when executing the computer program.

一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如前所述服务器分组方法的步骤。A computer-readable storage medium having a computer program stored on the computer-readable storage medium, when the computer program is executed by a processor, implements the steps of the foregoing server grouping method.

应用本发明实施例所提供的方法,对接收到的服务器分组请求进行解析,得到目标分组任务;分别获取各服务器中与目标分组任务对应的各目标服务器参数;利用模糊C均值聚类算法基于各目标服务器参数对各服务器进行聚类分组,得到各服务器组。通过根据目标分组任务获取各服务器的目标服务器参数,利用模糊C均值聚类算法基于各目标服务器参数对各服务器进行自动聚类分组,相较于现有的人工遴选服务器分组方式,本发明较大地降低了人为主观因素的影响,提高了分组准确性,较大地提高了分组效率。Apply the method provided by the embodiment of the present invention, analyze the received server grouping request, and obtain the target grouping task; obtain each target server parameter corresponding to the target grouping task in each server; use the fuzzy C-means clustering algorithm based on each The target server parameters are used to cluster and group each server to obtain each server group. By obtaining the target server parameters of each server according to the target grouping task, and using the fuzzy C-means clustering algorithm to automatically cluster and group each server based on the parameters of each target server, compared with the existing manual selection server grouping method, the present invention greatly reduces the The influence of human subjective factors is reduced, the grouping accuracy is improved, and the grouping efficiency is greatly improved.

相应的,本发明实施例还提供了与上述服务器分组方法相对应的服务器分组装置、设备和计算机可读存储介质,具有上述技术效果,在此不再赘述。Correspondingly, the embodiments of the present invention also provide a server grouping apparatus, device, and computer-readable storage medium corresponding to the above-mentioned server grouping method, which have the above-mentioned technical effects, and are not repeated here.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.

图1为本发明实施例中服务器分组方法的一种实施流程图;FIG. 1 is an implementation flowchart of a server grouping method in an embodiment of the present invention;

图2为本发明实施例中服务器分组方法的另一种实施流程图;Fig. 2 is another implementation flowchart of the server grouping method in the embodiment of the present invention;

图3为本发明实施例中一种服务器网络拓扑图;Fig. 3 is a kind of server network topology diagram in the embodiment of the present invention;

图4为本发明实施例中一种服务器分组后的示意图;4 is a schematic diagram of a server grouped according to an embodiment of the present invention;

图5为本发明实施例中服务器分组方法的另一种实施流程图;Fig. 5 is another implementation flowchart of the server grouping method in the embodiment of the present invention;

图6为本发明实施例中一种服务器分组装置的结构框图;6 is a structural block diagram of a server grouping apparatus in an embodiment of the present invention;

图7为本发明实施例中一种服务器分组设备的结构框图。FIG. 7 is a structural block diagram of a server grouping device in an embodiment of the present invention.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本发明方案,下面结合附图和具体实施方式对本发明作进一步的详细说明。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make those skilled in the art better understand the solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, but not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

实施例一:Example 1:

参见图1,图1为本发明实施例中服务器分组方法的一种实施流程图,该方法可以包括以下步骤:Referring to FIG. 1, FIG. 1 is an implementation flowchart of a server grouping method in an embodiment of the present invention, and the method may include the following steps:

S101:对接收到的服务器分组请求进行解析,得到目标分组任务。S101: Analyze the received server grouping request to obtain a target grouping task.

当需要对服务器集群中的服务器进行聚类分组时,向服务器分组中心发送服务器分组请求,服务器分组请求包含目标分组任务。服务器分组中心接收服务器分组请求,并对服务器分组请求进行解析,得到目标分组任务。When the servers in the server cluster need to be clustered and grouped, a server grouping request is sent to the server grouping center, and the server grouping request includes the target grouping task. The server grouping center receives the server grouping request, parses the server grouping request, and obtains the target grouping task.

可以在需要对服务器集群中的各服务器进行维护时,生成服务器分组请求,相应的目标分组任务为服务器维护任务;还可以在需要对临时业务进行处理时,生成服务器分组请求,相应的目标分组任务为业务分发任务。When it is necessary to maintain each server in the server cluster, a server grouping request can be generated, and the corresponding target grouping task is a server maintenance task; when a temporary business needs to be processed, a server grouping request can be generated, and the corresponding target grouping task can be generated. Distribute tasks for the business.

S102:分别获取各服务器中与目标分组任务对应的各目标服务器参数。S102: Respectively obtain parameters of each target server corresponding to the target grouping task in each server.

在解析得到目标分组任务之后,分别获取各服务器中与目标分组任务对应的各目标服务器参数。如当目标分组任务为服务器维护任务时,各目标服务器参数可以包括CPU配置信息、内存配置信息、硬盘配置信息、网卡配置信息、磁盘冗余阵列配置信息、操作系统配置信息等;当目标分组任务为业务分发任务时,各目标服务器参数可以包括当前CPU的利用率、当前内存利用率、当前硬盘容量利用率、当前网络带宽利用率、数据库连接数比例、硬盘IO带宽占比等。After the target grouping task is obtained by parsing, parameters of each target server corresponding to the target grouping task in each server are obtained respectively. For example, when the target grouping task is a server maintenance task, the parameters of each target server may include CPU configuration information, memory configuration information, hard disk configuration information, network card configuration information, redundant disk array configuration information, operating system configuration information, etc.; when the target grouping task is When assigning tasks to services, the parameters of each target server can include the current CPU utilization, current memory utilization, current hard disk capacity utilization, current network bandwidth utilization, ratio of database connections, and ratio of hard disk IO bandwidth.

S103:利用模糊C均值聚类算法基于各目标服务器参数对各服务器进行聚类分组,得到各服务器组。S103: Clustering and grouping each server based on the parameters of each target server by using a fuzzy C-means clustering algorithm to obtain each server group.

在分别获取各服务器中与目标分组任务对应的各目标服务器参数之后,利用模糊C均值聚类算法基于各目标服务器参数对各服务器进行聚类分组,得到各服务器组。通过根据目标分组任务获取各服务器的目标服务器参数,利用模糊C均值聚类算法基于各目标服务器参数对各服务器进行自动聚类分组,相较于现有的人工遴选服务器分组方式,本发明较大地降低了人为主观因素的影响,提高了分组准确性,较大地提高了分组效率。After acquiring the parameters of each target server corresponding to the target grouping task in each server, the fuzzy C-means clustering algorithm is used to cluster and group each server based on the parameters of each target server to obtain each server group. By obtaining the target server parameters of each server according to the target grouping task, and using the fuzzy C-means clustering algorithm to automatically cluster and group each server based on the parameters of each target server, compared with the existing manual selection server grouping method, the present invention greatly reduces the The influence of human subjective factors is reduced, the grouping accuracy is improved, and the grouping efficiency is greatly improved.

模糊C均值聚类算法通过优化目标函数得到每个样本点对所有类中心的隶属度,从而决定样本点的类属以达到自动对样本数据进行分类的目的。The fuzzy C-means clustering algorithm obtains the membership degree of each sample point to all class centers by optimizing the objective function, so as to determine the category of the sample point to achieve the purpose of automatically classifying the sample data.

应用本发明实施例所提供的方法,对接收到的服务器分组请求进行解析,得到目标分组任务;分别获取各服务器中与目标分组任务对应的各目标服务器参数;利用模糊C均值聚类算法基于各目标服务器参数对各服务器进行聚类分组,得到各服务器组。通过根据目标分组任务获取各服务器的目标服务器参数,利用模糊C均值聚类算法基于各目标服务器参数对各服务器进行自动聚类分组,相较于现有的人工遴选服务器分组方式,本发明较大地降低了人为主观因素的影响,提高了分组准确性,较大地提高了分组效率。Apply the method provided by the embodiment of the present invention, analyze the received server grouping request, and obtain the target grouping task; obtain each target server parameter corresponding to the target grouping task in each server; use the fuzzy C-means clustering algorithm based on each The target server parameters are used to cluster and group each server to obtain each server group. By obtaining the target server parameters of each server according to the target grouping task, and using the fuzzy C-means clustering algorithm to automatically cluster and group each server based on the parameters of each target server, compared with the existing manual selection server grouping method, the present invention greatly reduces the The influence of human subjective factors is reduced, the grouping accuracy is improved, and the grouping efficiency is greatly improved.

需要说明的是,基于上述实施例一,本发明实施例还提供了相应的改进方案。在后续实施例中涉及与上述实施例一中相同步骤或相应步骤之间可相互参考,相应的有益效果也可相互参照,在下文的改进实施例中不再一一赘述。It should be noted that, based on the foregoing first embodiment, the embodiment of the present invention also provides a corresponding improvement solution. In subsequent embodiments, the same steps or corresponding steps in the above-mentioned first embodiment can be referred to each other, and corresponding beneficial effects can also be referred to each other, which will not be repeated in the following improved embodiments.

实施例二:Embodiment 2:

参见图2,图2为本发明实施例中服务器分组方法的另一种实施流程图,该方法可以包括以下步骤:Referring to FIG. 2, FIG. 2 is another implementation flowchart of a server grouping method in an embodiment of the present invention, and the method may include the following steps:

S201:对接收到的服务器分组请求进行解析,得到目标分组任务。S201: Analyze the received server grouping request to obtain a target grouping task.

S202:当目标分组任务为服务器维护任务时,分别获取各服务器中与服务器维护任务对应的各原始配置参数。S202: When the target grouping task is a server maintenance task, obtain each original configuration parameter corresponding to the server maintenance task in each server.

当目标分组任务为服务器维护任务时,分别获取各服务器中与服务器维护任务对应的各原始配置参数。各原始配置参数可以包括CPU配置信息、内存配置信息、硬盘配置信息、网卡配置信息、磁盘冗余阵列配置信息、操作系统配置信息等。参见图3,图3为本发明实施例中一种服务器网络拓扑图。管理主机需要与被管理的各服务器在一个网段,用户端可以通过以太网与管理主机相连,用户端Web页面可以展示当前服务器集群中所有服务器以及其配置参数,主要是用于与用户交互,因此其主要功能是数据展示。管理主机可以通过千兆交换机管理网络与被管理的各服务器建立通信连接。When the target grouping task is the server maintenance task, each original configuration parameter corresponding to the server maintenance task in each server is obtained respectively. Each original configuration parameter may include CPU configuration information, memory configuration information, hard disk configuration information, network card configuration information, redundant disk array configuration information, operating system configuration information, and the like. Referring to FIG. 3, FIG. 3 is a topology diagram of a server network in an embodiment of the present invention. The management host needs to be in a network segment with the managed servers. The client can be connected to the management host through Ethernet. The client web page can display all servers in the current server cluster and their configuration parameters, mainly for interacting with users. Therefore, its main function is data display. The management host can establish a communication connection with the managed servers through the Gigabit switch management network.

S203:获取通过函数预置接口预置的配置量化函数。S203: Obtain the configuration quantization function preset through the function preset interface.

由于采集到的各原始配置参数并不一定适合进行聚类计算,比如硬盘接口是一个枚举类型,并不是连续的数字,直接计算没有意义。因此需要对各原始配置参数进行预处理。可以预先设置对各原始配置参数进行量化所需的配置量化函数进行设置的函数预置接口,用户可以根据实际需要通过函数预置接口预先设置配置量化函数,从而提升参数量化的灵活性,提升用户体验。Since the collected original configuration parameters are not necessarily suitable for clustering calculation, for example, the hard disk interface is an enumeration type and not a continuous number, so direct calculation is meaningless. Therefore, each original configuration parameter needs to be preprocessed. The function preset interface for setting the configuration quantization function required to quantize each original configuration parameter can be preset. Users can preset the configuration quantization function through the function preset interface according to actual needs, thereby improving the flexibility of parameter quantization and improving the user experience. experience.

在获取到各服务器中与服务器维护任务对应的各原始配置参数之后,获取通过函数预置接口预置的配置量化函数。After acquiring each original configuration parameter corresponding to the server maintenance task in each server, acquire the configuration quantization function preset through the function preset interface.

S204:利用配置量化函数对各原始配置参数进行量化处理,得到各目标配置参数。S204: Perform quantization processing on each original configuration parameter by using a configuration quantization function to obtain each target configuration parameter.

在获取到通过函数预置接口预置的配置量化函数之后,利用配置量化函数对各原始配置参数进行量化处理,得到各目标配置参数。After the configuration quantization function preset through the function preset interface is obtained, each original configuration parameter is quantized by using the configuration quantization function to obtain each target configuration parameter.

对各原始配置参数进行量化的过程可以包括:首先把各原始配置参数的都量化成数字类,其次要考虑不同枚举之间的差异并在量化过程中将差异考虑进去。经过量化处理后,每个服务器的各目标配置参数都变成可以计算的数字类型,各目标配置参数构成多维的数据。如可以用D={d1,d2…dj…dn}表示服务器集群,dj表示服务器集群的第j个服务器。pj为第j个服务器量化后的目标配置参数集,pj={cpu1j,mem1j,hd1j,net1j,raidj,osj},其中,cpu1j为第j个服务器的CPU配置信息,mem1j为第j个服务器的内存配置信息,hd1j为第j个服务器的硬盘配置信息,net1j为第j个服务器的网卡配置信息,raidj为第j个服务器的磁盘冗余阵列配置信息、osj为第j个服务器的操作系统配置信息。The process of quantifying each original configuration parameter may include: firstly, quantizing each original configuration parameter into a digital class, and secondly, considering the difference between different enumerations and taking the difference into account in the quantization process. After quantification processing, each target configuration parameter of each server becomes a digital type that can be calculated, and each target configuration parameter constitutes multi-dimensional data. For example, D={d 1 , d 2 . . . d j . . . d n } can be used to represent the server cluster, and d j represents the jth server of the server cluster. p j is the quantized target configuration parameter set of the jth server, p j ={cpu 1j ,mem 1j ,hd 1j ,net 1j ,raid j ,os j }, where cpu 1j is the CPU configuration of the jth server information, mem 1j is the memory configuration information of the jth server, hd 1j is the hard disk configuration information of the jth server, net 1j is the network card configuration information of the jth server, raid j is the redundant disk array of the jth server The configuration information, os j is the operating system configuration information of the jth server.

以CPU中主频的量化过程举例,如下量化公式所示,显示当主频大于3Ghz时,CPU主频属性量化值为100,介于2.0到3.0Ghz时量化值为60,小于2.0Ghz时量化值为30,此量化公式提供默认的量化过程,但是提供用户复写的渠道,因为现实场景中的各个性能参数因为历史原因会千差万别,一个固定的量化函数无法准确描述其中的差异,而且随着技术的迭代发展,会有新的性能指标会被加入进去,因此仅提供框架层的解决方案,而把具体的衡量标准交予用户,这样能在最大程度上符合实际情况。Taking the quantization process of the main frequency in the CPU as an example, the following quantization formula shows that when the main frequency is greater than 3Ghz, the quantization value of the CPU main frequency attribute is 100, when it is between 2.0 and 3.0Ghz, the quantization value is 60, and when it is less than 2.0Ghz, the quantization value is 100. The value is 30. This quantization formula provides the default quantization process, but provides a channel for users to copy, because various performance parameters in real scenarios will vary widely due to historical reasons, and a fixed quantization function cannot accurately describe the difference, and with the technology With the iterative development of , new performance indicators will be added, so only the framework layer solution is provided, and the specific measurement standards are handed over to the user, which can meet the actual situation to the greatest extent.

Figure BDA0002601609050000081
Figure BDA0002601609050000081

其中,rate1j为CPU主频,cache1j为CPU缓存大小,rate2j为内存主频值,size1j为内存容量值,size2j为硬盘容量值,interfacej为硬盘接口类型,speed1j为硬盘转速,cache2j为硬盘数据缓存区容量,speed2j为网卡带宽,type1j为网卡类型,type2j为操作系统类型,versionj为操作系统版本。Among them, rate 1j is the CPU frequency, cache 1j is the CPU cache size, rate 2j is the memory frequency value, size 1j is the memory capacity value, size 2j is the hard disk capacity value, interface j is the hard disk interface type, and speed 1j is the hard disk speed. , cache 2j is the hard disk data buffer capacity, speed 2j is the network card bandwidth, type 1j is the network card type, type 2j is the operating system type, and version j is the operating system version.

S205:获取各预置服务器类分别对应的服务器子集。S205: Acquire server subsets corresponding to each preset server class.

预先设置一个服务器类别总数,假设将服务器集群中各服务器分为m类,获取各预置服务器类分别对应的服务器子集,如用ci表示第i类服务器子集。A total number of server categories is preset, and it is assumed that each server in the server cluster is divided into m categories, and the server subsets corresponding to each preset server category are obtained.

S206:获取分别为各服务器子集预置的质心。S206: Acquire the centroids preset for each server subset respectively.

预先为每个服务器子集设置质心,在获取各预置服务器类分别对应的服务器子集之后,获取分别为各服务器子集预置的质心,如用vi表示第ci类服务器子集的质心。Set the centroid for each server subset in advance. After obtaining the server subset corresponding to each preset server class, obtain the centroid preset for each server subset, for example, use vi to represent the c i - th server subset Centroid.

S207:根据各目标配置参数分别计算各服务器到各质心之间的各距离值。S207: Calculate each distance value between each server and each centroid according to each target configuration parameter.

在获取分别为各服务器子集预置的质心之后,根据各目标服务器参数分别计算各服务器到各质心之间的各距离值。如可以通过以下公式计算各服务器到各质心之间的各距离值:After acquiring the centroids preset for each server subset respectively, each distance value between each server and each centroid is calculated according to the parameters of each target server. For example, each distance value between each server and each centroid can be calculated by the following formula:

Figure BDA0002601609050000091
Figure BDA0002601609050000091

其中,dist(dj,vi)表示dj服务器距离ci质心vi的距离,q为距离指数,默认为2,α,β,γ,λ,μ,η分别为各目标配置参数的权重值,α+β+γ+λ+μ+η=1,如一般将各目标配置参数的权重值设置如下:Among them, dist(d j ,vi ) represents the distance between the d j server and the centroid vi of c i , q is the distance index, the default is 2, α, β, γ, λ, μ, η are the configuration parameters of each target, respectively The weight value, α+β+γ+λ+μ+η=1, generally set the weight value of each target configuration parameter as follows:

Figure BDA0002601609050000092
Figure BDA0002601609050000092

可以提供标准api接口,允许用户按照各自业务进行权重参数修改。A standard API interface can be provided, allowing users to modify the weight parameters according to their own business.

S208:根据当前各距离值分别计算各服务器属于各预置服务器类的概率值。S208: Calculate the probability value of each server belonging to each preset server class according to each current distance value.

在分别计算得到各服务器到各质心之间的各距离值之后,根据当前各距离值分别计算各服务器属于各预置服务器类的概率值,如可以通过以下公式计算各服务器属于各预置服务器类的概率值:After calculating the distance values between each server and each centroid, calculate the probability value of each server belonging to each preset server class according to the current distance values. For example, the following formula can be used to calculate that each server belongs to each preset server class The probability value of :

Figure BDA0002601609050000093
Figure BDA0002601609050000093

其中,uij表示dj服务器隶属于ci这一类的概率。Among them, u ij represents the probability that the d j server belongs to the class c i .

得到隶属矩阵U:Get the membership matrix U:

Figure BDA0002601609050000101
Figure BDA0002601609050000101

上述矩阵满足以下公式:The above matrix satisfies the following formula:

Figure BDA0002601609050000102
Figure BDA0002601609050000102

即每一行的值的和等于1,某一个服务器dj虽然属于各预置服务器类ci的概率值不同,但是它们的概率和一定是等于1的。That is, the sum of the values of each row is equal to 1. Although the probability values of a certain server d j belonging to the preset server classes c i are different, the sum of their probabilities must be equal to 1.

S209:根据当前各概率值对各质心进行重新计算。S209: Recalculate each centroid according to each current probability value.

在根据当前各距离值分别计算各服务器属于各预置服务器类的概率值之后,根据当前各概率值对各质心进行重新计算,如可以通过以下公式根据当前各概率值对各质心进行重新计算:After calculating the probability value of each server belonging to each preset server class according to each current distance value, recalculate each centroid according to each current probability value. For example, each centroid can be recalculated according to each current probability value by the following formula:

Figure BDA0002601609050000103
Figure BDA0002601609050000103

S210:根据各目标服务器参数计算各服务器到重新计算得到的各质心之间的各距离值。S210: Calculate each distance value between each server and each recalculated centroid according to each target server parameter.

在根据当前各概率值对各质心进行重新计算之后,根据各目标服务器参数计算各服务器到重新计算得到的各质心之间的各距离值。计算过程可以参照步骤S207,在此不做赘述。After each centroid is recalculated according to each current probability value, each distance value between each server and each recalculated centroid is calculated according to each target server parameter. For the calculation process, reference may be made to step S207, which is not repeated here.

S211:结合当前各概率值和当前各距离值计算价值函数。S211: Calculate a value function in combination with each current probability value and each current distance value.

在根据各目标服务器参数计算各服务器到重新计算得到的各质心之间的各距离值之后,结合当前各概率值和当前各距离值计算价值函数,可以通过以下公式计算价值函数J:After calculating the distance values between each server and the recalculated centroids according to the parameters of each target server, and combining the current probability values and the current distance values to calculate the value function, the value function J can be calculated by the following formula:

Figure BDA0002601609050000104
Figure BDA0002601609050000104

S212:判断价值函数是否满足预设条件,若是,则执行步骤S213,若否,则执行步骤S208。S212: Determine whether the value function satisfies the preset condition, if yes, go to step S213, if not, go to step S208.

在结合当前各概率值和当前各距离值计算价值函数之后,判断价值函数是否满足预设条件,若是,则说明当前重新计算得到的质心已为其表示的服务器子集的最佳质心位置,执行步骤S213,若否,则说明当前重新计算得到的质心并不是其表示的服务器子集的最佳质心位置,返回执行步骤S208。After calculating the value function in combination with the current probability values and the current distance values, it is judged whether the value function satisfies the preset conditions. Step S213, if not, it means that the currently recalculated centroid is not the best centroid position of the server subset represented by it, and the process returns to step S208.

当首次计算得到价值函数时,预设条件可以为价值函数小于一个预设值,如ε1,判断价值函数J是否小于预设值ε1;当非首次计算得到价值函数时,预设条件可以为将当前计算得到的价值函数与上次计算得到的价值函数Jpre之间的差值小于一个固定值ε2,判断价值函数J与上次计算得到的价值函数Jpre至今的差值是否小于固定值ε2When the value function is obtained from the first calculation, the preset condition can be that the value function is less than a preset value, such as ε 1 , to determine whether the value function J is less than the preset value ε 1 ; when the value function is not obtained from the first calculation, the preset condition can be In order to make the difference between the currently calculated value function and the last calculated value function J pre smaller than a fixed value ε 2 , judge whether the difference between the value function J and the last calculated value function J pre is less than Fixed value ε 2 .

S213:获取各当前质心,并根据各当前质心对各服务器进行聚类分组,得到各服务器组。S213: Acquire each current centroid, and perform clustering and grouping of each server according to each current centroid to obtain each server group.

在确定计算得到的价值函数满足预设条件之后,获取各当前质心,即最新计算得到的质心,并根据各当前质心对各服务器进行聚类分组,得到各服务器组。对各服务器进行聚类分组的过程可以包括:处理隶属度矩阵U,循环遍历隶属度矩阵U,每一行表示服务器dj属于服务器子集ci的概率,如果uij>0.5,则认为属于该服务器子集,否则属于其他服务器子集。参见图4,图4为本发明实施例中一种服务器分组后的示意图。从图4可以看出本次服务器分组为4个服务器组。After it is determined that the calculated value function satisfies the preset condition, each current centroid, that is, the newly calculated centroid, is obtained, and each server is clustered and grouped according to each current centroid to obtain each server group. The process of clustering and grouping each server may include: processing the membership degree matrix U, traversing the membership degree matrix U in a loop, each row represents the probability that the server d j belongs to the server subset c i , if u ij >0.5, it is considered to belong to this A subset of servers, otherwise a subset of other servers. Referring to FIG. 4, FIG. 4 is a schematic diagram of a server grouped according to an embodiment of the present invention. It can be seen from Figure 4 that the servers are grouped into 4 server groups this time.

S214:以各服务器组为单位对各服务器进行并行维护操作。S214: Perform parallel maintenance operations on each server in units of each server group.

在根据各当前质心对各服务器进行聚类分组,得到各服务器组之后,以各服务器组为单位对各服务器进行并行维护操作。通过以各服务器组为单位对各服务器进行并行维护操作,较大地提升了对服务器集群中各服务器的维护效率。After clustering and grouping each server according to each current centroid to obtain each server group, parallel maintenance operations are performed on each server by taking each server group as a unit. By performing parallel maintenance operations on each server with each server group as a unit, the maintenance efficiency of each server in the server cluster is greatly improved.

需要说明的是,本发明实施例中各步骤中所提及的“当前”均指在上一步新得到的对应参数值。It should be noted that the "current" mentioned in each step in the embodiment of the present invention refers to the corresponding parameter value newly obtained in the previous step.

实施例三:Embodiment three:

参见图5,图5为本发明实施例中服务器分组方法的另一种实施流程图,该方法可以包括以下步骤:Referring to FIG. 5, FIG. 5 is another implementation flowchart of the server grouping method in the embodiment of the present invention, and the method may include the following steps:

S501:对接收到的服务器分组请求进行解析,得到目标分组任务。S501: Analyze the received server grouping request to obtain a target grouping task.

S502:当目标分组任务为业务分发任务时,分别获取各服务器中与业务分发任务对应的各实时性能参数。S502: When the target grouping task is a service distribution task, obtain each real-time performance parameter corresponding to the service distribution task in each server.

当目标分组任务为业务分发任务时,分别获取各服务器中与业务分发任务对应的各实时性能参数。各实时性能参数可以包括当前CPU的利用率、当前内存利用率、当前硬盘容量利用率、当前网络带宽利用率、数据库连接数比例、硬盘IO带宽占比等。如可以用sj表示第j个服务器量化后的实时性能参数集,sj={cpu2j,mem2j,hd2j,net2j,dbj,IOj},其中,cpu2j为第j个服务器的当前CPU的利用率,mem2j为第j个服务器的当前内存利用率,hd2j为第j个服务器的当前硬盘容量利用率,net2j为第j个服务器的当前网络带宽利用率,dbj为第j个服务器的数据库连接数比例,IOj第j个服务器的硬盘IO带宽占比。When the target grouping task is a service distribution task, each real-time performance parameter corresponding to the service distribution task in each server is obtained respectively. The real-time performance parameters may include current CPU utilization, current memory utilization, current hard disk capacity utilization, current network bandwidth utilization, database connection ratio, hard disk IO bandwidth ratio, and the like. For example, s j can be used to represent the quantized real-time performance parameter set of the jth server, sj ={cpu 2j ,mem 2j ,hd 2j ,net 2j ,db j ,IO j }, where cpu 2j is the jth server The current CPU utilization, mem 2j is the current memory utilization of the jth server, hd 2j is the current hard disk capacity utilization of the jth server, net 2j is the jth server The current network bandwidth utilization, db j is the ratio of the number of database connections of the jth server, and IOj is the ratio of the hard disk IO bandwidth of the jth server.

S503:获取各预置服务器类分别对应的服务器子集。S503: Acquire server subsets corresponding to each preset server class.

S504:获取分别为各服务器子集预置的质心。S504: Acquire the centroids preset for each server subset respectively.

S505:根据各实时性能参数分别计算各服务器到各质心之间的各距离值。S505: Calculate each distance value between each server and each centroid according to each real-time performance parameter.

S506:根据当前各距离值分别计算各服务器属于各预置服务器类的概率值。S506: Calculate the probability value of each server belonging to each preset server class according to each current distance value.

S507:根据当前各概率值对各质心进行重新计算。S507: Recalculate each centroid according to each current probability value.

S508:根据各目标服务器参数计算各服务器到重新计算得到的各质心之间的各距离值。S508: Calculate each distance value between each server and each recalculated centroid according to each target server parameter.

S509:结合当前各概率值和当前各距离值计算价值函数。S509: Calculate a value function in combination with each current probability value and each current distance value.

S510:判断价值函数是否满足预设条件,若是,则执行步骤S511,若否,则执行步骤S506。S510: Determine whether the value function satisfies the preset condition, if yes, go to step S511, if not, go to step S506.

S511:获取各当前质心,并根据各当前质心对各服务器进行聚类分组,得到各服务器组。S511: Acquire each current centroid, and cluster and group each server according to each current centroid to obtain each server group.

根据各实时性能参数对服务器集群中的各服务器进行聚类分组的方式,可以类比实施例二中根据各目标配置参数对服务器集群中的各服务器进行聚类分组的方式,仅需将目标配置参数集pj变换为实时性能参数集sj。两种场景求解dist(dj,vi)的距离函数不相同,需要在不同场景中切换不同的距离函数,距离函数的参数对外提供标准restful接口,当不同的临时任务来临时,可以由用户自定义距离函数的各项参数,以更加符合实际需求。The method of clustering and grouping each server in the server cluster according to each real-time performance parameter can be analogous to the method of clustering and grouping each server in the server cluster according to each target configuration parameter in the second embodiment, and only the target configuration parameter Set p j is transformed into real-time performance parameter set s j . The distance functions for solving dist(d j ,vi ) in the two scenarios are different, and different distance functions need to be switched in different scenarios. The parameters of the distance function provide a standard restful interface to the outside world. When different temporary tasks come, users can Customize the parameters of the distance function to better meet the actual needs.

S512:从各服务器组中选取目标服务器组。S512: Select a target server group from each server group.

在根据各当前质心对各服务器进行聚类分组,得到各服务器组之后,从各服务器组中选取目标服务器组。After clustering and grouping each server according to each current centroid to obtain each server group, a target server group is selected from each server group.

目标服务器组一般为资源相对充裕,压力不大,资源占用较少,相对空闲的服务器。The target server group is generally a relatively idle server with relatively abundant resources, low pressure, and low resource occupation.

S513:将待处理业务分发给目标服务器组中各目标服务器,以利用各目标服务器进行业务处理。S513: Distribute the to-be-processed service to each target server in the target server group, so as to use each target server to perform service processing.

在选取得到目标服务器组之后,将待处理业务分发给目标服务器组中各目标服务器,利用各目标服务器进行业务处理,从而实现高效的业务处理。After the target server group is selected, the to-be-processed business is distributed to each target server in the target server group, and each target server is used for business processing, thereby realizing efficient business processing.

需要说明的是,本发明实施例中各步骤中所提及的“当前”均指在上一步新得到的对应参数值。It should be noted that the "current" mentioned in each step in the embodiment of the present invention refers to the corresponding parameter value newly obtained in the previous step.

相应于上面的方法实施例,本发明实施例还提供了一种服务器分组装置,下文描述的服务器分组装置与上文描述的服务器分组方法可相互对应参照。Corresponding to the above method embodiments, an embodiment of the present invention further provides a server grouping apparatus, and the server grouping apparatus described below and the server grouping method described above may refer to each other correspondingly.

参见图6,图6为本发明实施例中一种服务器分组装置的结构框图,该装置可以包括:Referring to FIG. 6, FIG. 6 is a structural block diagram of a server grouping apparatus in an embodiment of the present invention, and the apparatus may include:

任务获得模块61,用于对接收到的服务器分组请求进行解析,得到目标分组任务;The task obtaining module 61 is used to parse the received server grouping request to obtain the target grouping task;

参数获取模块62,用于分别获取各服务器中与目标分组任务对应的各目标服务器参数;The parameter obtaining module 62 is used to obtain the parameters of each target server corresponding to the target grouping task in each server respectively;

服务器组获得模块63,用于利用模糊C均值聚类算法基于各目标服务器参数对各服务器进行聚类分组,得到各服务器组。The server group obtaining module 63 is used for clustering and grouping each server based on the parameters of each target server by using the fuzzy C-means clustering algorithm to obtain each server group.

应用本发明实施例所提供的装置,对接收到的服务器分组请求进行解析,得到目标分组任务;分别获取各服务器中与目标分组任务对应的各目标服务器参数;利用模糊C均值聚类算法基于各目标服务器参数对各服务器进行聚类分组,得到各服务器组。通过根据目标分组任务获取各服务器的目标服务器参数,利用模糊C均值聚类算法基于各目标服务器参数对各服务器进行自动聚类分组,相较于现有的人工遴选服务器分组方式,本发明较大地降低了人为主观因素的影响,提高了分组准确性,较大地提高了分组效率。The device provided by the embodiment of the present invention is applied to analyze the received server grouping request to obtain the target grouping task; the parameters of each target server corresponding to the target grouping task in each server are obtained respectively; The target server parameters are used to cluster and group each server to obtain each server group. By obtaining the target server parameters of each server according to the target grouping task, and using the fuzzy C-means clustering algorithm to automatically cluster and group each server based on the parameters of each target server, compared with the existing manual selection server grouping method, the present invention greatly reduces the The influence of human subjective factors is reduced, the grouping accuracy is improved, and the grouping efficiency is greatly improved.

在本发明的一种具体实施方式中,参数获取模块62包括:In a specific embodiment of the present invention, the parameter acquisition module 62 includes:

原始配置参数获取子模块,用于分别获取各服务器中与服务器维护任务对应的各原始配置参数;The original configuration parameter obtaining sub-module is used to obtain the original configuration parameters corresponding to the server maintenance tasks in each server;

参数量化子模块,用于利用配置量化函数对各原始配置参数进行量化处理,得到各目标配置参数;The parameter quantization sub-module is used to quantify each original configuration parameter by using the configuration quantization function to obtain each target configuration parameter;

服务器组获得模块具体为利用模糊C均值聚类算法基于各目标配置参数对各服务器进行聚类分组的模块。The server group obtaining module is specifically a module for clustering and grouping each server based on each target configuration parameter by using the fuzzy C-means clustering algorithm.

在本发明的一种具体实施方式中,参数量化子模块包括:In a specific embodiment of the present invention, the parameter quantization sub-module includes:

量化函数获取单元,用于获取通过函数预置接口预置的配置量化函数;The quantization function acquisition unit is used to acquire the configuration quantization function preset through the function preset interface;

参数量化单元,用于利用配置量化函数对各原始配置参数进行量化处理。The parameter quantization unit is used for quantizing each original configuration parameter by using the configuration quantization function.

在本发明的一种具体实施方式中,该装置还可以包括:In a specific embodiment of the present invention, the device may further include:

服务器维护模块,用于在利用模糊C均值聚类算法基于各目标配置参数对各服务器进行聚类分组,得到各服务器组之后,以各服务器组为单位对各服务器进行并行维护操作。The server maintenance module is used for clustering and grouping each server based on each target configuration parameter by using the fuzzy C-means clustering algorithm to obtain each server group, and performing parallel maintenance operations on each server with each server group as a unit.

在本发明的一种具体实施方式中,参数获取模块62包括:In a specific embodiment of the present invention, the parameter acquisition module 62 includes:

实施性能参数获取子模块,用于分别获取各服务器中与业务分发任务对应的各实时性能参数;Implementing a performance parameter acquisition sub-module for acquiring real-time performance parameters corresponding to service distribution tasks in each server;

服务器组获得模块具体为利用模糊C均值聚类算法基于各实时性能参数对各服务器进行聚类分组的模块。The server group obtaining module is specifically a module for clustering and grouping each server based on each real-time performance parameter by using the fuzzy C-means clustering algorithm.

在本发明的一种具体实施方式中,该装置还可以包括:In a specific embodiment of the present invention, the device may further include:

服务器组选取模块,用于在利用模糊C均值聚类算法基于各实时性能参数对各服务器进行聚类分组,得到各服务器组之后,从各服务器组中选取目标服务器组;The server group selection module is configured to use the fuzzy C-means clustering algorithm to cluster and group each server based on each real-time performance parameter, and after each server group is obtained, select a target server group from each server group;

业务处理模块,用于将待处理业务分发给目标服务器组中各目标服务器,以利用各目标服务器进行业务处理。The business processing module is used for distributing the business to be processed to each target server in the target server group, so as to use each target server for business processing.

在本发明的一种具体实施方式中,服务器组获得模块63包括:In a specific embodiment of the present invention, the server group obtaining module 63 includes:

服务器子集获取子模块,用于获取各预置服务器类分别对应的服务器子集;The server subset obtaining submodule is used to obtain the server subset corresponding to each preset server class;

质心获取子模块,用于获取分别为各服务器子集预置的质心;The centroid obtaining submodule is used to obtain the centroids preset for each server subset;

第一距离计算子模块,用于根据各目标服务器参数分别计算各服务器到各质心之间的各距离值;The first distance calculation submodule is used to calculate each distance value between each server and each centroid according to each target server parameter;

概率计算子模块,用于根据当前各距离值分别计算各服务器属于各预置服务器类的概率值;The probability calculation submodule is used to calculate the probability value of each server belonging to each preset server class according to each current distance value;

质心计算子模块,用于根据当前各概率值对各质心进行重新计算;The centroid calculation sub-module is used to recalculate each centroid according to the current probability values;

第二距离计算子模块,用于根据各目标服务器参数计算各服务器到重新计算得到的各质心之间的各距离值;The second distance calculation submodule is used to calculate each distance value between each server and each recalculated centroid according to each target server parameter;

价值函数计算子模块,用于结合当前各概率值和当前各距离值计算价值函数;The value function calculation submodule is used to calculate the value function in combination with the current probability values and the current distance values;

判断子模块,用于判断价值函数是否满足预设条件;The judgment sub-module is used to judge whether the value function satisfies the preset conditions;

重复执行子模块,用于当确定价值函数未满足预设条件时,重复执行根据各距离值分别计算各服务器属于各预置服务器类的概率值的步骤;The repeated execution submodule is used to repeatedly execute the step of calculating the probability value of each server belonging to each preset server class according to each distance value when it is determined that the value function does not meet the preset condition;

服务器组获得子模块,用于当确定价值函数满足预设条件时,获取各当前质心,并根据各当前质心对各服务器进行聚类分组。The server group obtaining sub-module is used to obtain each current centroid when it is determined that the value function satisfies the preset condition, and cluster and group each server according to each current centroid.

相应于上面的方法实施例,参见图7,图7为本发明所提供的服务器分组设备的示意图,该设备可以包括:Corresponding to the above method embodiments, see FIG. 7 , which is a schematic diagram of a server grouping device provided by the present invention, and the device may include:

存储器71,用于存储计算机程序;memory 71 for storing computer programs;

处理器72,用于执行上述存储器71存储的计算机程序时可实现如下步骤:The processor 72 can implement the following steps when executing the computer program stored in the above-mentioned memory 71:

对接收到的服务器分组请求进行解析,得到目标分组任务;分别获取各服务器中与目标分组任务对应的各目标服务器参数;利用模糊C均值聚类算法基于各目标服务器参数对各服务器进行聚类分组,得到各服务器组。Analyze the received server grouping request to obtain the target grouping task; obtain the target server parameters corresponding to the target grouping task in each server respectively; use the fuzzy C-means clustering algorithm to cluster each server based on the target server parameters. to get each server group.

对于本发明提供的设备的介绍请参照上述方法实施例,本发明在此不做赘述。For the introduction of the device provided by the present invention, please refer to the above method embodiments, which will not be repeated in the present invention.

相应于上面的方法实施例,本发明还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时可实现如下步骤:Corresponding to the above method embodiments, the present invention also provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the following steps can be implemented:

对接收到的服务器分组请求进行解析,得到目标分组任务;分别获取各服务器中与目标分组任务对应的各目标服务器参数;利用模糊C均值聚类算法基于各目标服务器参数对各服务器进行聚类分组,得到各服务器组。Analyze the received server grouping request to obtain the target grouping task; obtain the target server parameters corresponding to the target grouping task in each server respectively; use the fuzzy C-means clustering algorithm to cluster each server based on the target server parameters. to get each server group.

该计算机可读存储介质可以包括:U盘、移动硬盘、只读存储器(Read-OnlyMemory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The computer-readable storage medium may include: a USB flash drive, a removable hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, etc., which can store program codes. medium.

对于本发明提供的计算机可读存储介质的介绍请参照上述方法实施例,本发明在此不做赘述。For the introduction of the computer-readable storage medium provided by the present invention, please refer to the foregoing method embodiments, which will not be repeated in the present invention.

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。对于实施例公开的装置、设备及计算机可读存储介质而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts of the various embodiments may be referred to each other. For the apparatuses, devices, and computer-readable storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and reference may be made to the descriptions of the methods for related parts.

本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的技术方案及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。The principles and implementations of the present invention are described herein by using specific examples, and the descriptions of the above embodiments are only used to help understand the technical solutions and core ideas of the present invention. It should be pointed out that for those skilled in the art, without departing from the principle of the present invention, several improvements and modifications can also be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

Claims (10)

1. A server grouping method, comprising:
analyzing the received server grouping request to obtain a target grouping task;
respectively acquiring parameters of each target server corresponding to the target grouping task in each server;
and clustering and grouping the servers based on the parameters of the target servers by using a fuzzy C-means clustering algorithm to obtain each server group.
2. The server grouping method according to claim 1, wherein when the target grouping task is a server maintenance task, respectively obtaining each target server parameter corresponding to the target grouping task in each server comprises:
respectively acquiring each original configuration parameter corresponding to the server maintenance task in each server;
carrying out quantization processing on each original configuration parameter by using a configuration quantization function to obtain each target configuration parameter;
clustering and grouping the servers based on the parameters of the target servers by using a fuzzy C-means clustering algorithm, wherein the clustering and grouping method comprises the following steps:
and clustering and grouping the servers based on the target configuration parameters by using the fuzzy C-means clustering algorithm.
3. The server grouping method according to claim 2, wherein quantizing each of the original configuration parameters using a configuration quantization function includes:
acquiring a configuration quantization function preset through a function preset interface;
and quantizing each original configuration parameter by using the configuration quantization function.
4. The server grouping method according to claim 3, wherein after clustering and grouping the servers based on the target configuration parameters by using the fuzzy C-means clustering algorithm to obtain the server groups, further comprising:
and performing parallel maintenance operation on the servers by taking the server groups as units.
5. The server grouping method according to claim 1, wherein when the target grouping task is a service distribution task, respectively obtaining each target server parameter corresponding to the target grouping task in each server comprises:
respectively acquiring each real-time performance parameter corresponding to the service distribution task in each server;
clustering and grouping the servers based on the parameters of the target servers by using a fuzzy C-means clustering algorithm, wherein the clustering and grouping method comprises the following steps:
and clustering and grouping the servers based on the real-time performance parameters by using the fuzzy C-means clustering algorithm.
6. The method of claim 5, wherein after clustering and grouping the servers based on the real-time performance parameters by using the fuzzy C-means clustering algorithm to obtain the server groups, the method further comprises:
selecting a target server group from each server group;
and distributing the service to be processed to each target server in the target server group so as to utilize each target server to process the service.
7. The server grouping method according to any one of claims 1 to 6, wherein clustering groups the servers based on the target server parameters using a fuzzy C-means clustering algorithm, comprises:
acquiring a server subset corresponding to each preset server class;
obtaining centroids preset for each server subset respectively;
respectively calculating each distance value between each server and each centroid according to each target server parameter;
respectively calculating probability values of the servers belonging to the preset server classes according to the current distance values;
recalculating each centroid according to each current probability value;
calculating each distance value between each server and each recalculated centroid according to each target server parameter;
calculating a value function by combining the current probability values and the current distance values;
judging whether the value function meets a preset condition or not;
if not, the step of respectively calculating the probability value of each server belonging to each preset server class according to each distance value is repeatedly executed;
and if so, acquiring each current centroid, and clustering and grouping the servers according to each current centroid.
8. A server grouping apparatus, comprising:
the task obtaining module is used for analyzing the received server grouping request to obtain a target grouping task;
the parameter acquisition module is used for respectively acquiring parameters of each target server corresponding to the target grouping task in each server;
and the server group obtaining module is used for clustering and grouping the servers based on the target server parameters by using a fuzzy C-means clustering algorithm to obtain the server groups.
9. A server grouping apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the server grouping method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the server grouping method according to any one of claims 1 to 7.
CN202010725778.4A 2020-07-24 2020-07-24 Server grouping method, device, equipment and computer readable storage medium Pending CN111901410A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010725778.4A CN111901410A (en) 2020-07-24 2020-07-24 Server grouping method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010725778.4A CN111901410A (en) 2020-07-24 2020-07-24 Server grouping method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111901410A true CN111901410A (en) 2020-11-06

Family

ID=73189915

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010725778.4A Pending CN111901410A (en) 2020-07-24 2020-07-24 Server grouping method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111901410A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112463381A (en) * 2020-12-01 2021-03-09 苏州浪潮智能科技有限公司 Server automatic grouping method and device based on clustering validity index
CN114385436A (en) * 2021-12-06 2022-04-22 网宿科技股份有限公司 Server grouping method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102457575A (en) * 2010-10-22 2012-05-16 国际商业机器公司 Server consolidation system
US20120303618A1 (en) * 2011-05-23 2012-11-29 Cisco Technology, Inc. Clustering-Based Resource Aggregation within a Data Center
CN106487591A (en) * 2016-10-20 2017-03-08 郑州云海信息技术有限公司 A kind of server automatic get-on carriage statistic device and its system
CN109729155A (en) * 2018-12-13 2019-05-07 平安医疗健康管理股份有限公司 A kind of distribution method and relevant apparatus of service request
CN109976901A (en) * 2017-12-28 2019-07-05 航天信息股份有限公司 A kind of resource regulating method, device, server and readable storage medium storing program for executing
CN110162388A (en) * 2019-04-26 2019-08-23 深圳智链物联科技有限公司 A kind of method for scheduling task, system and terminal device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102457575A (en) * 2010-10-22 2012-05-16 国际商业机器公司 Server consolidation system
US20120303618A1 (en) * 2011-05-23 2012-11-29 Cisco Technology, Inc. Clustering-Based Resource Aggregation within a Data Center
CN106487591A (en) * 2016-10-20 2017-03-08 郑州云海信息技术有限公司 A kind of server automatic get-on carriage statistic device and its system
CN109976901A (en) * 2017-12-28 2019-07-05 航天信息股份有限公司 A kind of resource regulating method, device, server and readable storage medium storing program for executing
CN109729155A (en) * 2018-12-13 2019-05-07 平安医疗健康管理股份有限公司 A kind of distribution method and relevant apparatus of service request
CN110162388A (en) * 2019-04-26 2019-08-23 深圳智链物联科技有限公司 A kind of method for scheduling task, system and terminal device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
肖宇鹏,何云斌,万静,李松: "《基于模糊C-均值的空间不确定数据聚类》", 《计算机工程》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112463381A (en) * 2020-12-01 2021-03-09 苏州浪潮智能科技有限公司 Server automatic grouping method and device based on clustering validity index
CN114385436A (en) * 2021-12-06 2022-04-22 网宿科技股份有限公司 Server grouping method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
WO2021179462A1 (en) Improved quantum ant colony algorithm-based spark platform task scheduling method
US10460241B2 (en) Server and cloud computing resource optimization method thereof for cloud big data computing architecture
US9697316B1 (en) System and method for efficient data aggregation with sparse exponential histogram
US10354201B1 (en) Scalable clustering for mixed machine learning data
CN108416054B (en) Calculation method of dynamic HDFS replica number based on file access heat
US20220253222A1 (en) Data reduction method, apparatus, computing device, and storage medium
CN111901410A (en) Server grouping method, device, equipment and computer readable storage medium
CN113377488A (en) Method, system and equipment for resource migration
WO2024037368A1 (en) Scheduling optimization method of scheduling apparatus, scheduling apparatus and storage medium
WO2023207039A1 (en) Data processing method and apparatus, and device and storage medium
CN118331750B (en) Dynamic resource allocation system, electronic equipment and storage medium for processing network threat
CN114356531A (en) Edge calculation task classification scheduling method based on K-means clustering and queuing theory
CN118870443A (en) A method, device, electronic device, storage medium and product for allocating network resources
Yan et al. Automatic virtual network embedding based on deep reinforcement learning
CN115473781B (en) Distributed SNMP data center equipment monitoring method
CN116737387A (en) A cloud computing resource prediction system and method based on power grid digital business
CN117667327A (en) Job scheduling method, scheduler and related equipment
CN113760484B (en) Data processing method and device
CN108347466A (en) A kind of date storage method and device of cloud storage system
CN110602569A (en) Bandwidth multiplexing method and system based on bandwidth trend
CN117812185B (en) Control method and system of intelligent outbound system
CN116991563B (en) A queue generation method and device that supports rapid sandbox construction
CN115098247A (en) Resource allocation method and device
CN119620959B (en) Elastic telescoping method, device, medium and program product for storage space
US20240160572A1 (en) Systems and methods to generate a miss ratio curve for a cache with variable-sized data blocks

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20201106

RJ01 Rejection of invention patent application after publication