CN117675566A - Resource quota allocation method and device, storage medium and electronic equipment - Google Patents
Resource quota allocation method and device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN117675566A CN117675566A CN202311630102.7A CN202311630102A CN117675566A CN 117675566 A CN117675566 A CN 117675566A CN 202311630102 A CN202311630102 A CN 202311630102A CN 117675566 A CN117675566 A CN 117675566A
- Authority
- CN
- China
- Prior art keywords
- resource quota
- current
- resource
- quota
- target client
- 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 50
- 238000012545 processing Methods 0.000 claims abstract description 4
- 238000012508 change request Methods 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 12
- 238000004458 analytical method Methods 0.000 claims description 10
- 238000005516 engineering process Methods 0.000 abstract description 11
- 230000008859 change Effects 0.000 description 9
- 230000007246 mechanism Effects 0.000 description 9
- 230000008569 process Effects 0.000 description 7
- 239000002699 waste material Substances 0.000 description 7
- 238000012544 monitoring process Methods 0.000 description 6
- 238000004422 calculation algorithm Methods 0.000 description 5
- 230000000737 periodic effect Effects 0.000 description 5
- 238000013468 resource allocation Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000007726 management method Methods 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 238000013500 data storage Methods 0.000 description 3
- 238000012552 review Methods 0.000 description 3
- 230000010365 information processing Effects 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 230000004913 activation Effects 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0894—Policy-based network configuration management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0895—Configuration of virtualised networks or elements, e.g. virtualised network function or OpenFlow elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/40—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks using virtualisation of network functions or resources, e.g. SDN or NFV entities
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Debugging And Monitoring (AREA)
Abstract
本申请公开了一种资源配额的分配方法、装置、存储介质及电子设备,涉及数据处理技术领域,其中方法包括:首先获取云平台中目标客户端的当前历史资源配额信息;然后基于所述历史资源配额信息,确定所述目标客户端的当前第一资源配额调节因子,所述当前第一资源配额调节因子用于确定所述目标客户端的资源配额;再依据所述当前第一资源配额调节因子,对所述目标客户端对应的当前资源配额进行重新分配,得到所述目标客户端对应的下一个资源配额。与目前现有技术相比,本申请通过历史资源配额信息确定客户端对应的资源配额调节因子,按照调节因子对客户端的资源配额进行重新分配,从客户端和云平台两个角度考虑,动态调整用户资源配额。
This application discloses a resource quota allocation method, device, storage medium and electronic equipment, and relates to the field of data processing technology. The method includes: first obtaining the current historical resource quota information of the target client in the cloud platform; and then based on the historical resources Quota information determines the current first resource quota adjustment factor of the target client, and the current first resource quota adjustment factor is used to determine the resource quota of the target client; and then based on the current first resource quota adjustment factor, The current resource quota corresponding to the target client is reallocated to obtain the next resource quota corresponding to the target client. Compared with the current existing technology, this application determines the resource quota adjustment factor corresponding to the client through historical resource quota information, reallocates the client's resource quota according to the adjustment factor, and dynamically adjusts it from the perspective of the client and the cloud platform. User resource quota.
Description
技术领域Technical field
本申请涉及计算机技术领域,尤其涉及一种资源配额的分配方法、装置、存储介质及电子设备。The present application relates to the field of computer technology, and in particular, to a resource quota allocation method, device, storage medium and electronic equipment.
背景技术Background technique
目前云计算服务模式普遍采用资源共享、按需使用,需面临客户端大多突发的动态资源需求,在云计算总体资源有限,部分客户端过度的资源占用可能会导致自身资源利用率低而其他客户端无法使用资源的情况,影响服务的公平性和质量。At present, the cloud computing service model generally adopts resource sharing and on-demand use. It needs to face the sudden dynamic resource demands of most clients. In cloud computing, the overall resources are limited, and excessive resource occupation by some clients may lead to low resource utilization and poor utilization of other clients. The client cannot use resources, which affects the fairness and quality of services.
目前,主要对客户端分配固定的资源配额,通过将客户端的资源配额的设置在一定程度上起到了限制单个客户端的资源占用数量的作用,客户端只能在资源配额范围内申请资源、使用资源。At present, fixed resource quotas are mainly allocated to clients. Setting the resource quota of the client plays a role in limiting the number of resources occupied by a single client to a certain extent. The client can only apply for resources and use resources within the resource quota range. .
然而,使用这种固定式资源配额只能以最大峰值为依据,无法保障客户端的动态资源需求,在资源有限的条件下,会导致云平台资源利用率低,进而导致资源浪费。However, the use of this fixed resource quota can only be based on the maximum peak value and cannot guarantee the dynamic resource needs of the client. Under the condition of limited resources, it will lead to low resource utilization of the cloud platform, which will lead to resource waste.
发明内容Contents of the invention
有鉴于此,本申请提供了一种资源配额的分配方法、装置、存储介质及电子设备,主要目的在于改善目前现有技术无法保障客户端的动态资源需求,在资源有限的条件下,会导致云平台资源利用率低,进而导致资源浪费的技术问题。In view of this, this application provides a resource quota allocation method, device, storage medium and electronic equipment. The main purpose is to improve the current existing technology that cannot guarantee the dynamic resource requirements of the client. Under the condition of limited resources, it will lead to cloud The utilization rate of platform resources is low, which leads to technical problems of resource waste.
第一方面,本申请提供了一种资源配额的分配方法,包括:In the first aspect, this application provides a resource quota allocation method, including:
获取云平台中目标客户端的当前历史资源配额信息;Obtain the current historical resource quota information of the target client in the cloud platform;
基于所述历史资源配额信息,确定所述目标客户端的当前第一资源配额调节因子,所述当前第一资源配额调节因子用于确定所述目标客户端的资源配额;Based on the historical resource quota information, determine the current first resource quota adjustment factor of the target client, where the current first resource quota adjustment factor is used to determine the resource quota of the target client;
依据所述当前第一资源配额调节因子,对所述目标客户端对应的当前资源配额进行重新分配,得到所述目标客户端对应的下一个资源配额。According to the current first resource quota adjustment factor, the current resource quota corresponding to the target client is reallocated to obtain the next resource quota corresponding to the target client.
第二方面,本申请提供了一种资源配额的分配装置,包括:In the second aspect, this application provides a resource quota allocation device, including:
获取模块,被配置为获取云平台中目标客户端的当前历史资源配额信息;The acquisition module is configured to obtain the current historical resource quota information of the target client in the cloud platform;
确定模块,被配置为基于所述历史资源配额信息,确定所述目标客户端的当前第一资源配额调节因子,所述当前第一资源配额调节因子用于确定所述目标客户端的资源配额;A determining module configured to determine the current first resource quota adjustment factor of the target client based on the historical resource quota information, where the current first resource quota adjustment factor is used to determine the resource quota of the target client;
分配模块,被配置为依据所述当前第一资源配额调节因子,对所述目标客户端对应的当前资源配额进行重新分配,得到所述目标客户端对应的下一个资源配额。The allocation module is configured to reallocate the current resource quota corresponding to the target client according to the current first resource quota adjustment factor to obtain the next resource quota corresponding to the target client.
第三方面,本申请提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现第一方面的资源配额的分配方法。In a third aspect, this application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the resource quota allocation method of the first aspect is implemented.
第四方面,本申请提供了一种电子设备,包括存储介质、处理器及存储在存储介质上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现第一方面的资源配额的分配方法。In a fourth aspect, the present application provides an electronic device, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor. When the processor executes the computer program, the resource quota of the first aspect is implemented. Allocation method.
借由上述技术方案,本申请提供的一种资源配额的分配方法、装置、存储介质及电子设备,首先获取获取云平台中目标客户端的当前历史资源配额信息;然后基于所述历史资源配额信息,确定所述目标客户端的当前第一资源配额调节因子,所述当前第一资源配额调节因子用于确定所述目标客户端的资源配额;再依据所述当前第一资源配额调节因子,对所述目标客户端对应的当前资源配额进行重新分配,得到所述目标客户端对应的下一个资源配额。与目前现有技术相比,本申请通过历史资源配额信息确定客户端对应的资源配额调节因子,按照调节因子对客户端的资源配额进行重新分配,从客户端和云平台两个角度考虑,动态调整用户资源配额,可以让云平台的算力资源动态灵活调整,增强资源配额分配的效率,避免造成资源浪费,大幅提升云平台资源服务能力。With the above technical solution, this application provides a resource quota allocation method, device, storage medium and electronic device that first obtains the current historical resource quota information of the target client in the cloud platform; and then based on the historical resource quota information, Determine the current first resource quota adjustment factor of the target client, and the current first resource quota adjustment factor is used to determine the resource quota of the target client; and then based on the current first resource quota adjustment factor, adjust the target The current resource quota corresponding to the client is reallocated to obtain the next resource quota corresponding to the target client. Compared with the current existing technology, this application determines the resource quota adjustment factor corresponding to the client through historical resource quota information, reallocates the client's resource quota according to the adjustment factor, and dynamically adjusts it from the perspective of the client and the cloud platform. User resource quotas can allow the cloud platform's computing resources to be dynamically and flexibly adjusted, enhance the efficiency of resource quota allocation, avoid resource waste, and significantly improve the cloud platform's resource service capabilities.
上述说明仅是本申请技术方案的概述,为了能够更清楚了解本申请的技术手段,而可依照说明书的内容予以实施,并且为了让本申请的上述和其它目的、特征和优点能够更明显易懂,以下特举本申请的具体实施方式。The above description is only an overview of the technical solutions of the present application. In order to have a clearer understanding of the technical means of the present application, they can be implemented according to the content of the description, and in order to make the above and other purposes, features and advantages of the present application more obvious and understandable. , the specific implementation methods of the present application are specifically listed below.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings needed to describe the embodiments or the prior art. Obviously, for those of ordinary skill in the art, It is said that other drawings can be obtained based on these drawings without exerting creative labor.
图1示出了本申请实施例提供的一种资源配额的分配方法的流程示意图;Figure 1 shows a schematic flowchart of a resource quota allocation method provided by an embodiment of the present application;
图2示出了本申请实施例提供的一种资源配额的分配方法的流程示意图;Figure 2 shows a schematic flowchart of a resource quota allocation method provided by an embodiment of the present application;
图3示出了本申请实施例提供的一种示例的示意图;Figure 3 shows a schematic diagram of an example provided by the embodiment of the present application;
图4示出了本申请实施例提供的一种示例的流程示意图;Figure 4 shows a schematic flow diagram of an example provided by the embodiment of the present application;
图5示出了本申请实施例提供的一种示例的流程示意图;Figure 5 shows a schematic flow diagram of an example provided by the embodiment of the present application;
图6示出了本申请实施例提供的一种资源配额的分配装置的结构示意图。FIG. 6 shows a schematic structural diagram of a resource quota allocation device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将参照附图更详细地描述本申请的实施例。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. It should be noted that, as long as there is no conflict, the embodiments and features in the embodiments of this application can be combined with each other.
为了改善目前现有技术无法保障客户端的动态资源需求,在资源有限的条件下,会导致云平台资源利用率低,进而导致资源浪费的技术问题。本实施例提供了一种资源配额的分配方法,如图1所示,该方法包括:In order to improve the technical problem that the current existing technology cannot guarantee the dynamic resource requirements of the client, under the condition of limited resources, it will lead to low resource utilization of the cloud platform, which will lead to resource waste. This embodiment provides a resource quota allocation method, as shown in Figure 1. The method includes:
步骤101、获取云平台中目标客户端的当前历史资源配额信息。Step 101: Obtain the current historical resource quota information of the target client in the cloud platform.
在本申请实施例中,云平台(cloud platforms)可以为将写好的程序放在"云"里运行,或是使用"云"里提供的服务的平台,云平台的名称还可以为按需平台(on-demandplatform)、平台即服务(platform as aservice,PaaS)等等,对于云平台的名称,在本申请实施例中不做具体限定。In the embodiment of this application, cloud platforms can be platforms that run written programs in the "cloud" or use services provided by the "cloud". The name of the cloud platform can also be On-Demand Platform (on-demand platform), platform as a service (PaaS), etc. The name of the cloud platform is not specifically limited in the embodiment of this application.
相应的,云计算(cloud computing)可以提供可用的、便捷的、按需的网络访问,进入可配置的网络、服务器、存储、应用软件、服务计算等资源共享池,只需投入很少的管理工作,或与服务供应商进行很少的交互,这些资源便能够被快速提供。Correspondingly, cloud computing can provide available, convenient, on-demand network access to a configurable resource sharing pool of networks, servers, storage, application software, service computing, etc., with minimal management investment. work, or with minimal interaction with the service provider, these resources can be provisioned quickly.
需要说明的是,目标客户端可以为云平台中多个客户端中的任意一个。It should be noted that the target client can be any one of multiple clients in the cloud platform.
在一些示例中,历史资源配额信息可以包括周期性获取、计算客户端配额变更和资源利用率记录、远程上报的资源利用率记录等等。In some examples, historical resource quota information may include periodic acquisition, calculation of client quota changes and resource utilization records, remotely reported resource utilization records, and so on.
步骤102、基于历史资源配额信息,确定目标客户端的当前第一资源配额调节因子。Step 102: Determine the current first resource quota adjustment factor of the target client based on historical resource quota information.
其中,当前第一资源配额调节因子用于确定目标客户端的资源配额。Wherein, the current first resource quota adjustment factor is used to determine the resource quota of the target client.
对于本实施例,第一资源配额调节因子为动态调节因子,根据历史资源配额信息的不同,第一资源配额调节因子的值也不同。For this embodiment, the first resource quota adjustment factor is a dynamic adjustment factor, and the value of the first resource quota adjustment factor is different according to different historical resource quota information.
步骤103、依据当前第一资源配额调节因子,对目标客户端对应的当前资源配额进行重新分配,得到目标客户端对应的下一个资源配额。Step 103: Reallocate the current resource quota corresponding to the target client according to the current first resource quota adjustment factor to obtain the next resource quota corresponding to the target client.
与目前现有技术相比,本实施例通过历史资源配额信息确定客户端对应的资源配额调节因子,按照调节因子对客户端的资源配额进行重新分配,从客户端和云平台两个角度考虑,动态调整用户资源配额,可以让云平台的算力资源动态灵活调整,增强资源配额分配的效率,避免造成资源浪费,大幅提升云平台资源服务能力。Compared with the current existing technology, this embodiment determines the resource quota adjustment factor corresponding to the client through historical resource quota information, and reallocates the client's resource quota according to the adjustment factor. Considering the two perspectives of the client and the cloud platform, dynamic Adjusting user resource quotas can allow the computing resources of the cloud platform to be dynamically and flexibly adjusted, enhance the efficiency of resource quota allocation, avoid resource waste, and significantly improve the cloud platform's resource service capabilities.
为了进一步说明本实施例方法的具体实施过程,本实施例提供了如图2所示的具体方法,该方法包括:In order to further illustrate the specific implementation process of the method in this embodiment, this embodiment provides a specific method as shown in Figure 2, which method includes:
步骤201、获取云平台中目标客户端的当前历史资源配额信息。Step 201: Obtain the current historical resource quota information of the target client in the cloud platform.
可选的,在步骤201之前,本实施例方法还包括:响应于接收目标客户端的当前资源配额的变更请求,对变更请求进行分析;相应的,步骤201具体可包括:基于分析结果,若确定变更请求为请求增加当前资源配额,则通过collectd服务获取目标客户端的当前历史资源配额信息。Optionally, before step 201, the method in this embodiment also includes: in response to receiving a change request for the current resource quota of the target client, analyzing the change request; accordingly, step 201 may specifically include: based on the analysis results, if it is determined If the change request is to request to increase the current resource quota, the current historical resource quota information of the target client is obtained through the collectd service.
在本申请实施例中,步骤201具体还包括:基于分析结果,若确定变更请求为请求减少当前资源配额,则按照变更请求对当前资源配额进行调整。In this embodiment of the present application, step 201 specifically includes: based on the analysis results, if it is determined that the change request is a request to reduce the current resource quota, adjusting the current resource quota according to the change request.
在一些示例中,步骤201具体还包括:确定当前与目标客户端上一个资源配额的确定时间之间的时间隔达到预设周期阈值,获取目标客户端的当前历史资源配置信息。In some examples, step 201 specifically includes: determining that the time interval between the current and the determination time of the target client's previous resource quota reaches a preset period threshold, and obtaining the current historical resource configuration information of the target client.
需要说明的是,本实施例可以基于客户端资源配额的变更请求进行获取历史资源配额信息,还可以周期性获取历史资源配额信息进行资源配额重新分配。It should be noted that this embodiment can obtain historical resource quota information based on the client's resource quota change request, and can also periodically obtain historical resource quota information to reallocate resource quotas.
进一步的,资源监控用到collectd和关系型数据库管理系统(MySQL),collectd是linux系统的一个守护进程,用来收集系统性能数据和提供数据存储方式,通过集成MySQL,实现数据存储。collectd监控组件结构如图3所示,具体流程可以包括在云平台中被监控虚拟节点中部署collectd,通过对collectd.conf文件中network节点的配置,使其成为collectd客户(client)端。在被监控节点部署collectd,同样对collectd.conf文件中的network节点进行配置,监控端collectd作为服务(server)端。服务端和客户端运用套接字(socket)二进制协议互相通信。Furthermore, resource monitoring uses collectd and relational database management system (MySQL). collectd is a daemon process of the Linux system, which is used to collect system performance data and provide data storage methods. It integrates MySQL to realize data storage. The structure of the collectd monitoring component is shown in Figure 3. The specific process can include deploying collectd in the monitored virtual node in the cloud platform, and making it a collectd client by configuring the network node in the collectd.conf file. Deploy collectd on the monitored node, also configure the network node in the collectd.conf file, and use the monitoring end collectd as the service (server) end. The server and client communicate with each other using the socket binary protocol.
相应的,根据不同虚拟节点的实际情况,在collectd客户端配置需要被监控的应用服务器插件,以及日志文件存放位置,完成配置后开启collectd服务。collect客户端每隔10s读取一次/proc文件系统下有关信息内容,形成时间序列RRB数据文件,存储在collectd服务端配置文件中指定位置。collectd集成MySQL,在/etc/collectd/managed_config/编辑连接到远程MySQL主机的配置,完成数据入库。Accordingly, according to the actual situation of different virtual nodes, configure the application server plug-in that needs to be monitored and the log file storage location on the collectd client. After completing the configuration, start the collectd service. The collect client reads relevant information from the /proc file system every 10 seconds to form a time series RRB data file, which is stored in the location specified in the collectd server configuration file. collectd integrates MySQL, edits the configuration to connect to the remote MySQL host in /etc/collectd/managed_config/, and completes data storage.
进一步的,在客户端申请资源配额变更情况下,当客户端资源配额不足时可提出资源配额变更请求,若客户端申请减少资源配额,则直接审核通过,变更客户端资源配额。若客户端配额不足提出申请增加资源配额请求,则云平台根据客户端历史资源配额使用情况计算用户的动态调节因子。Furthermore, when the client applies for a resource quota change, when the client resource quota is insufficient, a resource quota change request can be made. If the client applies to reduce the resource quota, it will be approved directly and the client resource quota will be changed. If the client's quota is insufficient and a request is made to increase the resource quota, the cloud platform calculates the user's dynamic adjustment factor based on the client's historical resource quota usage.
步骤202、依据历史资源配额信息,确定目标客户端的当前第二资源配额调节因子和与当前第二资源配额调节因子对应的权重信息。Step 202: Determine the current second resource quota adjustment factor of the target client and the weight information corresponding to the current second resource quota adjustment factor based on the historical resource quota information.
在本申请实施例中,第二资源配额调节因子为进行加权分析前得到的初始资源配额调节因子。In this embodiment of the present application, the second resource quota adjustment factor is the initial resource quota adjustment factor obtained before performing weighted analysis.
示例性的,若平台资源种类为n个,包括CPU、内存、硬盘、IP、路由器、负载均衡器等,将资源配额表示为n元组,可以通过公式一确定用户的资源配额,公式一具体如下所示:For example, if there are n types of platform resources, including CPU, memory, hard disk, IP, router, load balancer, etc., and the resource quota is expressed as n-tuple, the user's resource quota can be determined through Formula 1. Formula 1 is specific. As follows:
wi(ti,di) = (wi,1(ti,di),,,wi,k(ti,di),,,wi,n(ti,di)) (公式一)w i (t i ,d i ) = (w i,1 (t i ,d i ),, w i,k (t i ,d i ),, w i,n (t i ,d i ) ) (Formula 1)
在公式一中,wi(ti,di)表示分配给用户的第i次资源配额,ti表示第i次配额启用的起始时间,di表示使用时间,wi,k(ti,di)表示第i次分配给用户第k个资源的配额,如CPU核数、内存大小和硬盘容量等。In formula 1, w i (t i ,d i ) represents the i-th resource quota allocated to the user, ti represents the starting time of the i-th quota activation, di represents the usage time, w i,k (t i ,d i ) represent the quota allocated to the k-th resource of the user for the i-th time, such as the number of CPU cores, memory size, hard disk capacity, etc.
以CPU资源为例,CPU的资源配额利用率计算可以通过公式二进行,公式二具体如下所示:Taking CPU resources as an example, the CPU resource quota utilization can be calculated through Formula 2. Formula 2 is as follows:
在公式二中,Ci表示配额使用时间内某时间段用户使用的CPU核数,ti表示该段时间段,C表示CPU配额总数,t表示配额使用时间,loadi表示监测上报的远程主机的CPU负载利用率,α表示调节因子。In formula 2, Ci represents the number of CPU cores used by users in a certain period of time within the quota usage period, t i represents the period of time, C represents the total number of CPU quotas, t represents the quota usage time, and load i represents the number of remote hosts reported by monitoring. CPU load utilization, α represents the adjustment factor.
进一步的,如果取α为0.9,服务端CPU实际使用率均为50%,客户端CPU配额为100核,配额服务时间为100天,客户端在连续的15天、10天、15天、25天、35天这5个时间段内使用的CPU核数分别为24、20、32、36、28,则CPU的资源配额使用率=0.9*(24*15+20*10+32*15+36*25+28*35)/(100*100)+5*0.1*0.5=32.75%。Furthermore, if α is taken as 0.9, the actual CPU usage rate of the server is 50%, the client CPU quota is 100 cores, the quota service time is 100 days, and the client is running continuously for 15 days, 10 days, 15 days, and 25 days. The number of CPU cores used in the five time periods of days and 35 days are 24, 20, 32, 36, and 28 respectively. Then the resource quota usage rate of the CPU = 0.9*(24*15+20*10+32*15+ 36*25+28*35)/(100*100)+5*0.1*0.5=32.75%.
假设初次申请资源配额,客户端基于权重因子通过公式三和公式四确定资源配额,公式三和公式四具体如下所示:Assuming that the client applies for resource quota for the first time, the client determines the resource quota through Formula 3 and Formula 4 based on the weight factor. Formula 3 and Formula 4 are as follows:
wi+1(ti+1,di+1)=(wi+1,1(ti+1,di+1),,,wi+1,n(ti+1,di+1))(公式三)w i+1 (t i+1 ,d i+1 )=(wi +1,1 (t i+1 ,d i+1 ),,, w i+1,n (t i+1 ,d i+1 ))(Formula 3)
Δw=wi+1(ti+1,di+1) -wi(ti,di) (公式4)Δw=wi +1 (t i+1 ,d i+1 ) -w i (t i ,d i ) (Formula 4)
步骤203、基于权重信息,对当前第二资源配额调节因子进行加权分析,得到当前第一资源配额调节因子。Step 203: Based on the weight information, perform weighted analysis on the current second resource quota adjustment factor to obtain the current first resource quota adjustment factor.
示例性的,基于步骤202,云计算资源配额动态分配算法的关键是构建用户动态调节因子模型。若历史上共有n类资源i次资源配额使用。用户i次资源配额利用率可以表示为v1(t1,d1),v2(t2,d2),,,,vn(tn,dn)可以通过公式五进行确定,公式五具体如下所示:Exemplarily, based on step 202, the key to the cloud computing resource quota dynamic allocation algorithm is to construct a user dynamic adjustment factor model. If there are n resource quotas used i times in history for n types of resources. The resource quota utilization rate of user i can be expressed as v 1 (t 1 ,d 1 ), v 2 (t 2 ,d 2 ),,, v n (t n ,d n ) can be determined by formula 5. Formula Five details are as follows:
vm(tm,dm)=(vm,1(tm,dm),vm,2(tm,1,dm),,,vm,k(tm,1,dm))(公式五)v m (t m ,d m ) = (v m,1 (t m ,d m ), v m,2 (t m,1 ,d m ),,, v m,k (t m,1 ,d m ))(Formula 5)
在公式五中,vm(tm,dm)表示第m次分配的资源配额平均利用率,v(tm,1,dm)表示第m次分配的第k类资源的资源配额平均利用率,k=1,2,3...n,tm表示第m次资源配额被分配的起始时间,dm表示第m次资源配额的使用时间。In Formula 5, v m (t m , d m ) represents the average resource quota utilization of the m-th allocated resource, and v (t m,1 , d m ) represents the average resource quota of the k-th type of resource allocated for the m-th time. Utilization rate, k=1, 2, 3...n, tm represents the starting time when the mth resource quota is allocated, and dm represents the usage time of the mth resource quota.
进一步的,第i+1次资源配额分配前先计算用户配额动态调节因子,第i+1次调节因子的计算受到前i次配额使使用的影响,可通过前i次的权重结果来计算第i+1次资源配额调节因子。权重一方面受某一资源配额下用户使用时长的影响,同等条件下,某一资源配额使用时间越长,权重越高,另一方面,考虑到历史数据的时效性,与资源配额分配次序m是否靠近第i次有关,同等条件下,越是近期的资源配额使用情况对资源配额的分配影响越大,也就是分配次序m越靠近i,所占权重就越高,并且权重的变化速度越来越快,如果采用线性变化,不能体现这种非线性变化特性,因此通过以下模型计算第m次后第k类资源源配额利用率vm(tm,dm)所占的权重,通过公式六确定初始权重,公式六具体如下所示:Furthermore, the user quota dynamic adjustment factor is calculated before the i+1th resource quota allocation. The calculation of the i+1th adjustment factor is affected by the use of the previous i quota. The weight result of the previous i time can be used to calculate the user quota dynamic adjustment factor. i+1 resource quota adjustment factor. On the one hand, the weight is affected by the user's usage time under a certain resource quota. Under the same conditions, the longer the usage time of a certain resource quota, the higher the weight. On the other hand, taking into account the timeliness of historical data, it is related to the resource quota allocation order m. It is related to whether it is close to the i-th time. Under the same conditions, the more recent resource quota usage has a greater impact on the allocation of resource quotas, that is, the closer the allocation order m is to i, the higher the weight, and the faster the weight changes. It comes faster and faster. If linear change is adopted, this nonlinear change characteristic cannot be reflected. Therefore, the following model is used to calculate the weight of the k-th resource source quota utilization rate v m (t m , d m ) after the m-th time. Formula 6 determines the initial weight. Formula 6 is as follows:
c’i(0)=0 (公式六)c' i (0)=0 (Formula 6)
第i次变更后,可以通过公式七确定权重,公式七具体如下所示:After the ith change, the weight can be determined through Formula 7, which is as follows:
在公式七中,a表示影响因子,0<α<1,D表示云平台周期性动态调整资源配额的周期时间,m=1,2,3...i。In Formula 7, a represents the impact factor, 0<α<1, and D represents the cycle time for the cloud platform to periodically dynamically adjust resource quotas, m=1,2,3...i.
需要说明的是,在资源配额同等使用时间情况下,随着资源配额分配次数的变大权重也越大,这说明动态调节客户端的力度更大。It should be noted that when resource quotas are used for the same time, the weight increases as the number of resource quota allocations increases, which shows that the dynamic adjustment of the client is greater.
步骤204、依据当前第一资源配额调节因子,对目标客户端对应的当前资源配额进行重新分配,得到目标客户端对应的下一个资源配额。Step 204: Reallocate the current resource quota corresponding to the target client according to the current first resource quota adjustment factor to obtain the next resource quota corresponding to the target client.
可选的,步骤204具体可包括:若判断第一资源配额调节因子大于预设调节因子阈值,则将当前资源配额确定为所述下一个资源配额;若判断第一资源配额调节因子小于预设调节因子阈值,则基于当前资源配额进行处理,得到下一个资源配额。Optionally, step 204 may specifically include: if it is determined that the first resource quota adjustment factor is greater than the preset adjustment factor threshold, determining the current resource quota as the next resource quota; if it is determined that the first resource quota adjustment factor is less than the preset adjustment factor threshold The adjustment factor threshold is processed based on the current resource quota to obtain the next resource quota.
在本申请实施例中,在步骤204后,本实施例方法还包括:分析目标客户端的当前使用资源数量,确定当前使用资源数量大于下一个资源配额,则将下一个资源配额更新为当前使用资源数量。In the embodiment of this application, after step 204, the method of this embodiment also includes: analyzing the current number of resources used by the target client, determining that the number of currently used resources is greater than the next resource quota, and then updating the next resource quota to the currently used resources. quantity.
示例性的,基于步骤202,如果客户端动态调节因子Ci>1,则为用户增加资源配额Δw,即用户实际分配资源配额可通过公式八进行确定,公式八具体如下所示:For example, based on step 202, if the client dynamic adjustment factor Ci>1, the resource quota Δw is increased for the user, that is, the actual resource quota allocated to the user can be determined through Formula 8, which is specifically as follows:
w′i+1(ti+1,di+1)=wi,1(ti,di)+Δw (公式八)w′ i+1 (t i+1 ,d i+1 )=w i,1 (t i ,d i )+Δw (Formula 8)
若客户端动态调节因子Ci<1,则根据用户动态调节因子增加资源配额,即用户资源配额实际增加量为Δw*Ci,增加后的实际资源配额可通过公式九进行确定,公式九具体如下所示:If the client dynamic adjustment factor Ci < 1, the resource quota will be increased according to the user dynamic adjustment factor, that is, the actual increase in the user resource quota is Δw*Ci. The actual resource quota after the increase can be determined by Formula 9, which is as follows: Show:
w′i+1(ti+1,di+1)=qi,1(ti,di)+Δw*Ci (公式九)w′ i+1 (t i+1 ,d i+1 )=q i,1 (t i ,d i )+Δw*C i (Formula 9)
示例性的,用户动态调节参数C′i,是指对于所有资源类型,可以通过公式十确定用户经过i次资源配额使用后的平均资源配额利用率,用于用户第i+1次分配新配额时的动态调整参考。公式十具体如下所示:For example, the user dynamic adjustment parameter C′ i means that for all resource types, the average resource quota utilization rate of the user after i resource quota usage can be determined through Formula 10, which is used for the user to allocate a new quota for the i+1th time. dynamic adjustment reference. Formula 10 is as follows:
基于公式十一可以确定用户动态调节因子,是用户动态调节参数C′i与调节因子基准参照值Co的比值,公式十一具体如下所示:The user dynamic adjustment factor can be determined based on Formula 11, which is the ratio of the user dynamic adjustment parameter C′ i to the adjustment factor baseline reference value Co. Formula 11 is as follows:
Ci=C′i/Co (公式十一)Ci=C′ i /Co (Formula 11)
当Ci<1时,用户第i+1次申请资源配额为Ai时,实际分配数量可以通过公式十二进行确定,公式十二具体如下所示:When Ci < 1, when the user applies for resource quota A i for the i+1th time, the actual allocated quantity can be determined by Formula 12. Formula 12 is as follows:
Ca=Ai*Ci (公式十二)C a =A i *C i (Formula 12)
随着现有云平台用户急剧增长、资源需求量不断动态变化,一直沿用的固定配额机制虽然有效限制每个用户资源使用数量,避免了资源的滥用,但也存在大量用户长期占用较髙配额但利用率低,导致平台资源服务能力受限,给云计算资源的高效利用带来了挑战。With the rapid growth of existing cloud platform users and the constant and dynamic changes in resource demand, although the fixed quota mechanism that has been used effectively limits the number of resources used by each user and avoids resource abuse, there are also a large number of users who occupy relatively high quotas for a long time. Low utilization rates result in limited platform resource service capabilities, which poses challenges to the efficient utilization of cloud computing resources.
目前云计算服务模式普遍采用资源共享、按需使用,需面临用户大多突发的动态资源需求,在云计算总体资源有限,保证需求双方利益最大化的情况下,部分用户过度的资源占用可能会导致自身资源利用率低而其他用户无法使用资源的情况,影响服务的公平性和质量。资源配额的设置在一定程度上起到了限制单个用户的资源占用数量的作用,用户只能在资源配额范围内申请资源、使用资源,然而目前云计算平台大多采用固定的资源配额限制方式,存在以下问题:At present, cloud computing service models generally adopt resource sharing and on-demand use, which requires users to face sudden and dynamic resource demands. When the overall cloud computing resources are limited and the interests of both parties are maximized, excessive resource occupation by some users may cause problems. This results in low resource utilization and the inability of other users to use resources, affecting the fairness and quality of services. The setting of resource quotas plays a role in limiting the amount of resources occupied by a single user to a certain extent. Users can only apply for and use resources within the resource quota range. However, most current cloud computing platforms use fixed resource quota restrictions. The following exist question:
一是不同用户资源需求不同时段资源需求是不断变化的,固定式资源配额只能以最大峰值为依据,无法保障用户的动态资源需求,在资源有限的条件下,存在资源浪费现象。First, the resource demands of different users are constantly changing at different times. Fixed resource quotas can only be based on the maximum peak value and cannot guarantee the dynamic resource demands of users. Under conditions of limited resources, there is a waste of resources.
二是一些用户通过过度申请等手段谎报较高的资源配额,导致长时间占用较大资源配额,但实际资源配额利用率比较低,在平台资源总配额有限且需要保证服务质量情况下,导致其他用户资源需求无法得到相应和满足,影响资源分配的效率。Second, some users falsely report higher resource quotas through over-application and other means, resulting in a large resource quota being occupied for a long time, but the actual resource quota utilization rate is relatively low. When the total platform resource quota is limited and service quality needs to be guaranteed, other problems arise. User resource needs cannot be responded to and met, affecting the efficiency of resource allocation.
三是云平台资源的异构化和虚拟化特点,用户可能难以准确计算实际所需的资源数量,最终导致申请的资源配额与实际需求可能会存在较大的偏差,云平台也难以有效预估用户真实资源需求,平台资源得不到高效利用,平台服务能力难以有效提升。Third, due to the heterogeneous and virtualized characteristics of cloud platform resources, it may be difficult for users to accurately calculate the actual number of resources required. Ultimately, there may be a large deviation between the applied resource quota and the actual demand, and it is also difficult for the cloud platform to effectively predict. Users have real resource needs, platform resources cannot be efficiently utilized, and platform service capabilities are difficult to effectively improve.
综上,目前针对资源配额分配方法的研究较少,多数研究集中于资源分配的公平性问题,大多从用户、计算节点、资源共享角度研究资源分配公平性。一些研究虽然提出了建立用户信用级别限制资源使用的机制,但均是围绕单个用户资源限制的研究,未能从云平台整体来考虑如何增强资源分配的公平性、控制优化资源的配置利用、提高云平台的资源服务能力。In summary, there are currently few studies on resource quota allocation methods. Most of the research focuses on the fairness of resource allocation, and most studies the fairness of resource allocation from the perspectives of users, computing nodes, and resource sharing. Although some studies have proposed mechanisms to establish user credit levels to limit resource usage, they are all focused on individual user resource limitations and fail to consider how to enhance the fairness of resource allocation, control and optimize resource allocation and utilization, and improve the cloud platform as a whole. The resource service capabilities of the cloud platform.
在本申请实施例中,克服了现有固定资源配额机制无法不断满足客户端的动态资源需求。动态调节因子模型中,若客户端长期占用资源配额且利用率较低,则该客户端资源配额将被施以惩罚性分配。若客户端长期占用资源配额,即使用时间d1,...,dm,...di较大,则根据公式9资源权重分量的wm,k(m,dm)是由dm和m决定,但资源利用率Um(tm,dm)越低,由公式10知动态调节因子也将较小,分配的资源会更少。动态调节因子模型中,若客户端资源配额利用率持续降低,客户端动态调节因子Ci,具有放大和累积的效应。动态调节因子模型能够激励客户端在任务完成后释放空闲资源配额。In the embodiment of this application, it is overcome that the existing fixed resource quota mechanism cannot continuously meet the dynamic resource requirements of the client. In the dynamic adjustment factor model, if a client occupies the resource quota for a long time and the utilization rate is low, the client's resource quota will be punitively allocated. If the client occupies the resource quota for a long time, that is, the usage time d 1 ,...,d m ,...d i is large, then according to Equation 9, the resource weight component w m,k (m,d m ) is given by d Determined by m and m, but the lower the resource utilization rate U m (t m , d m ), the dynamic adjustment factor will also be smaller according to Formula 10, and fewer resources will be allocated. In the dynamic adjustment factor model, if the client's resource quota utilization continues to decrease, the client's dynamic adjustment factor Ci has an amplifying and cumulative effect. The dynamic adjustment factor model can motivate clients to release idle resource quotas after task completion.
本申请实施例所归集的产品为一级互联网技术(Internet Technology,IT)云管理平台四期项目,已开发应用于大云运营管理平台,解决了不同用户资源需求不同时段资源需求是不断变化的动态配额变更,在资源有限的条件下,避免资源浪费现象,具有一定的应用价值。The products collected in the embodiments of this application are the fourth phase of the first-level Internet Technology (IT) cloud management platform project. They have been developed and applied to the big cloud operation management platform to solve the problem that the resource needs of different users are constantly changing at different times. Dynamic quota changes have certain application value to avoid resource waste under conditions of limited resources.
与目前现有技术相比,本实施例通过历史资源配额信息确定客户端对应的资源配额调节因子,按照调节因子对客户端的资源配额进行重新分配,从客户端和云平台两个角度考虑,动态调整用户资源配额,可以让云平台的算力资源动态灵活调整,增强资源配额分配的效率,大幅提升云平台资源服务能力。将历史资源配额信息和实际资源数据相结合,选取动态变化的权重模型实现资源配额动态分配的算法,不仅实现用户主动发起,被动调节配额,还可以实现周期性主动动态分配。有效控制了用户使用资源的数量,满足了更多用户的动态资源需求,增强了资源配额分配效率,提升了云平台资源服务能力,基于collectd将配额审核机制与资源利用考核机制协同起来,提升云平台整体资源利用率。Compared with the current existing technology, this embodiment determines the resource quota adjustment factor corresponding to the client through historical resource quota information, and reallocates the client's resource quota according to the adjustment factor. Considering the two perspectives of the client and the cloud platform, dynamic Adjusting user resource quotas allows the computing resources of the cloud platform to be dynamically and flexibly adjusted, enhances the efficiency of resource quota allocation, and greatly improves the resource service capabilities of the cloud platform. Combining historical resource quota information with actual resource data, a dynamically changing weight model is selected to implement an algorithm for dynamic allocation of resource quotas, which not only enables users to actively initiate and passively adjust quotas, but also enables periodic active dynamic allocation. It effectively controls the number of resources used by users, meets the dynamic resource needs of more users, enhances the efficiency of resource quota allocation, and improves the resource service capabilities of the cloud platform. Based on collectd, the quota review mechanism and the resource utilization assessment mechanism are coordinated to improve the cloud Overall resource utilization of the platform.
为了说明本实施例的具体实现过程,给出如下具体的应用示例,如图4所示,但不限于此:In order to illustrate the specific implementation process of this embodiment, the following specific application examples are given, as shown in Figure 4, but are not limited to this:
通过被监控虚拟节点通过collectd监控收集远程主机资源使用情况。监控节点服务端向MySQL周期性上报资源使用数据。当客户端申请配额变更时可以通过数据库配额使用情况和远程主机上报的资源使用情况根据相应的权重模型计算权重因子。根据计算出的权重因子计算实际需要变更的配额。最终客户端发起的变更配额完成。除客户端主动发起配额以外,可以实现资源配额动态分配。Collect remote host resource usage through collectd monitoring through the monitored virtual node. The monitoring node server periodically reports resource usage data to MySQL. When the client applies for a quota change, the weight factor can be calculated according to the corresponding weight model based on the database quota usage and the resource usage reported by the remote host. Calculate the actual quota that needs to be changed based on the calculated weight factor. Eventually the quota change initiated by the client is completed. In addition to the client actively initiating quotas, dynamic allocation of resource quotas can be achieved.
如图5中左侧流程图所示,客户端申请资源配额变更可以在客户端申请资源配额变更情况下,当客户端资源配额不足时可提出资源配额变更请求,若客户端申请减少资源配额,则直接审核通过,变更客户端资源配额。若客户端配额不足提出申请增加资源配额请求,则云平台根据客户端历史资源配额使用情况计算客户端的动态调节因子。As shown in the flow chart on the left side of Figure 5, the client can apply for a resource quota change. When the client applies for a resource quota change, it can make a resource quota change request when the client's resource quota is insufficient. If the client applies for a resource quota reduction, If approved, the client resource quota will be changed directly. If the client's quota is insufficient and a request is made to increase the resource quota, the cloud platform calculates the client's dynamic adjustment factor based on the client's historical resource quota usage.
如果客户端动态调节因子大于等于1,则为客户端分配申请的配额,否则依据动态调节因子为客户端分配资源配额。If the client's dynamic adjustment factor is greater than or equal to 1, the requested quota is allocated to the client; otherwise, the client is allocated a resource quota based on the dynamic adjustment factor.
如图5中右侧流程图所示,资源配额动态分配基于周期性获取、计算客户端配额变更和资源利用率记录、远程上报的资源利用率记录。客户端第i次资源配额使用完成后,根据其历史资源配额利用率计算其动态调节因子Ci。如果Ci>1,客户端资源配额维持不变,但作为一次新的资源配额分配。如果动态调节因子Ci<1,则根据动态调节因子计算客户端第i+1次变更后的资源配额。然后判断客户端目前在用的资源数是否在该配额内,若是,则调整客户端再用资源数作为新配额。如果超出配额范围,则设定客户端在用资源数为客户端新的资源配额。As shown in the flow chart on the right side of Figure 5, the dynamic allocation of resource quotas is based on periodic acquisition, calculation of client quota changes and resource utilization records, and remotely reported resource utilization records. After the client completes the ith resource quota usage, its dynamic adjustment factor Ci is calculated based on its historical resource quota utilization. If Ci>1, the client resource quota remains unchanged, but is allocated as a new resource quota. If the dynamic adjustment factor Ci<1, the client's resource quota after the i+1th change is calculated based on the dynamic adjustment factor. Then it is determined whether the number of resources currently used by the client is within the quota. If so, the number of resources reused by the client is adjusted as the new quota. If the quota range is exceeded, the number of resources used by the client is set to the client's new resource quota.
云平台资源配额动态分配算法,可以促使客户端在任务完成后,主动提出减少资源配额的申请,释放出更多空闲资源配额,使更多的客户端具有使用资源的机会,增强资源使用的效率。The cloud platform resource quota dynamic allocation algorithm can prompt clients to proactively apply for resource quota reduction after the task is completed, releasing more idle resource quotas, allowing more clients to have the opportunity to use resources, and enhancing the efficiency of resource use. .
与目前现有技术相比,本实施例通过历史资源配额信息确定客户端对应的资源配额调节因子,按照调节因子对客户端的资源配额进行重新分配,从客户端和云平台两个角度考虑,动态调整用户资源配额,可以让云平台的算力资源动态灵活调整,增强资源配额分配的效率,大幅提升云平台资源服务能力。将历史资源配额信息和实际资源数据相结合,选取动态变化的权重模型实现资源配额动态分配的算法,不仅实现用户主动发起,被动调节配额,还可以实现周期性主动动态分配。有效控制了用户使用资源的数量,满足了更多用户的动态资源需求,增强了资源配额分配效率,提升了云平台资源服务能力,基于collectd将配额审核机制与资源利用考核机制协同起来,提升云平台整体资源利用率。Compared with the current existing technology, this embodiment determines the resource quota adjustment factor corresponding to the client through historical resource quota information, and reallocates the client's resource quota according to the adjustment factor. Considering the two perspectives of the client and the cloud platform, dynamic Adjusting user resource quotas allows the computing resources of the cloud platform to be dynamically and flexibly adjusted, enhances the efficiency of resource quota allocation, and greatly improves the resource service capabilities of the cloud platform. Combining historical resource quota information with actual resource data, a dynamically changing weight model is selected to implement an algorithm for dynamic allocation of resource quotas, which not only enables users to actively initiate and passively adjust quotas, but also enables periodic active dynamic allocation. It effectively controls the number of resources used by users, meets the dynamic resource needs of more users, enhances the efficiency of resource quota allocation, and improves the resource service capabilities of the cloud platform. Based on collectd, the quota review mechanism and the resource utilization assessment mechanism are coordinated to improve the cloud Overall resource utilization of the platform.
进一步的,作为图1和图2所示方法的具体实现,本实施例提供了一种资源配额的分配装置,如图6所示,该装置包括:获取模块31、确定模块32、分配模块33。Further, as a specific implementation of the methods shown in Figures 1 and 2, this embodiment provides a device for allocating resource quotas. As shown in Figure 6, the device includes: an acquisition module 31, a determination module 32, and an allocation module 33. .
获取模块31,被配置为获取云平台中目标客户端的当前历史资源配额信息;The acquisition module 31 is configured to obtain the current historical resource quota information of the target client in the cloud platform;
确定模块32,被配置为基于所述历史资源配额信息,确定所述目标客户端的当前第一资源配额调节因子,所述当前第一资源配额调节因子用于确定所述目标客户端的资源配额;The determination module 32 is configured to determine the current first resource quota adjustment factor of the target client based on the historical resource quota information, where the current first resource quota adjustment factor is used to determine the resource quota of the target client;
分配模块33,被配置为依据所述当前第一资源配额调节因子,对所述目标客户端对应的当前资源配额进行重新分配,得到所述目标客户端对应的下一个资源配额。The allocation module 33 is configured to reallocate the current resource quota corresponding to the target client according to the current first resource quota adjustment factor to obtain the next resource quota corresponding to the target client.
在本实施例的一些示例中,确定模块32,具体被配置为依据所述历史资源配额信息,确定所述目标客户端的当前第二资源配额调节因子和与所述当前第二资源配额调节因子对应的权重信息;基于所述权重信息,对所述当前第二资源配额调节因子进行加权分析,得到所述当前第一资源配额调节因子。In some examples of this embodiment, the determination module 32 is specifically configured to determine the current second resource quota adjustment factor of the target client and the current second resource quota adjustment factor corresponding to the current second resource quota adjustment factor based on the historical resource quota information. weight information; based on the weight information, perform a weighted analysis on the current second resource quota adjustment factor to obtain the current first resource quota adjustment factor.
在本实施例的一些示例中,分配模块33,具体被配置为若判断所述第一资源配额调节因子大于预设调节因子阈值,则将所述当前资源配额确定为所述下一个资源配额;若判断所述第一资源配额调节因子小于预设调节因子阈值,则基于所述当前资源配额进行处理,得到所述下一个资源配额。In some examples of this embodiment, the allocation module 33 is specifically configured to determine the current resource quota as the next resource quota if it is determined that the first resource quota adjustment factor is greater than the preset adjustment factor threshold; If it is determined that the first resource quota adjustment factor is less than the preset adjustment factor threshold, processing is performed based on the current resource quota to obtain the next resource quota.
在本实施例的一些示例中,分配模块33,具体还被配置为分析所述目标客户端的当前使用资源数量,确定所述当前使用资源数量大于所述下一个资源配额,则将所述下一个资源配额更新为所述当前使用资源数量。In some examples of this embodiment, the allocation module 33 is specifically configured to analyze the currently used resource quantity of the target client, and determine that the currently used resource quantity is greater than the next resource quota, and then assign the next resource quota to the target client. The resource quota is updated to the currently used resource quantity.
在本实施例的一些示例中,获取模块31,还被配置为响应于接收所述目标客户端的当前资源配额的变更请求,对所述变更请求进行分析;相应的,获取模块31,具体被配置为基于所述分析结果,若确定变更请求为请求增加所述当前资源配额,则通过collectd服务获取所述目标客户端的当前历史资源配额信息。In some examples of this embodiment, the acquisition module 31 is also configured to respond to receiving a change request for the current resource quota of the target client and analyze the change request; accordingly, the acquisition module 31 is specifically configured Based on the analysis results, if it is determined that the change request is a request to increase the current resource quota, the current historical resource quota information of the target client is obtained through the collectd service.
在本实施例的一些示例中,获取模块31,具体被配置为基于分析结果,若确定所述变更请求为请求减少所述当前资源配额,则按照所述变更请求对所述当前资源配额进行调整。In some examples of this embodiment, the acquisition module 31 is specifically configured to adjust the current resource quota according to the change request if it is determined that the change request is a request to reduce the current resource quota based on the analysis results. .
在本实施例的一些示例中,获取模块31,具体被配置为确定当前与所述目标客户端上一个资源配额的确定时间之间的时间隔达到预设周期阈值,获取所述目标客户端的当前历史资源配置信息。In some examples of this embodiment, the acquisition module 31 is specifically configured to determine that the time interval between the current and the determination time of the previous resource quota of the target client reaches a preset period threshold, and obtain the current resource quota of the target client. Historical resource configuration information.
需要说明的是,本实施例提供的一种资源配额的分配装置所涉及各功能单元的其它相应描述,可以参考图1和图2中的对应描述,在此不再赘述。It should be noted that, for other corresponding descriptions of the functional units involved in the resource quota allocation device provided in this embodiment, reference can be made to the corresponding descriptions in Figures 1 and 2, which will not be described again here.
基于上述如图1至图2所示方法,相应的,本实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述如图1至图2所示的方法。Based on the above methods shown in Figures 1 to 2, correspondingly, this embodiment also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above mentioned Figures 1 to 2 are implemented. The method shown in Figure 2.
基于这样的理解,本申请的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施场景的方法。Based on this understanding, the technical solution of this application can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (can be a CD-ROM, U disk, mobile hard disk, etc.), including several Instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method of each implementation scenario of this application.
基于上述如图1至图2所示的方法,以及图6所示的虚拟装置实施例,为了实现上述目的,本申请实施例还提供了一种电子设备,如个人计算机、服务器、笔记本电脑、智能手机、智能机器人等智能终端,该设备包括存储介质和处理器;存储介质,用于存储计算机程序;处理器,用于执行计算机程序以实现上述如图1至图2所示的方法。Based on the above method shown in Figures 1 to 2 and the virtual device embodiment shown in Figure 6, in order to achieve the above purpose, embodiments of the present application also provide an electronic device, such as a personal computer, a server, a notebook computer, Smart terminals such as smart phones and smart robots include a storage medium and a processor; the storage medium is used to store computer programs; and the processor is used to execute computer programs to implement the above methods as shown in Figures 1 to 2.
可选的,上述实体设备还可以包括用户接口、网络接口、摄像头、射频(RadioFrequency,RF)电路,传感器、音频电路、WI-FI模块等等。用户接口可以包括显示屏(Display)、输入单元比如键盘(Keyboard)等,可选用户接口还可以包括USB接口、读卡器接口等。网络接口可选的可以包括标准的有线接口、无线接口(如WI-FI接口)等。Optionally, the above-mentioned physical devices may also include user interfaces, network interfaces, cameras, radio frequency (Radio Frequency, RF) circuits, sensors, audio circuits, WI-FI modules, etc. The user interface may include a display screen (Display), an input unit such as a keyboard (Keyboard), etc. The optional user interface may also include a USB interface, a card reader interface, etc. Optional network interfaces may include standard wired interfaces, wireless interfaces (such as WI-FI interfaces), etc.
本领域技术人员可以理解,本实施例提供的上述实体设备结构并不构成对该实体设备的限定,可以包括更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the above-mentioned physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or combine certain components, or arrange different components.
存储介质中还可以包括操作系统、网络通信模块。操作系统是管理上述实体设备硬件和软件资源的程序,支持信息处理程序以及其它软件和/或程序的运行。网络通信模块用于实现存储介质内部各组件之间的通信,以及与信息处理实体设备中其它硬件和软件之间通信。The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the above-mentioned physical devices and supports the operation of information processing programs and other software and/or programs. The network communication module is used to realize communication between components within the storage medium, as well as communication with other hardware and software in the information processing physical device.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本申请可以借助软件加必要的通用硬件平台的方式来实现,也可以通过硬件实现。与目前现有技术相比,本实施例通过历史资源配额信息确定客户端对应的资源配额调节因子,按照调节因子对客户端的资源配额进行重新分配,从客户端和云平台两个角度考虑,动态调整用户资源配额,可以让云平台的算力资源动态灵活调整,增强资源配额分配的效率,大幅提升云平台资源服务能力。将历史资源配额信息和实际资源数据相结合,选取动态变化的权重模型实现资源配额动态分配的算法,不仅实现用户主动发起,被动调节配额,还可以实现周期性主动动态分配。有效控制了用户使用资源的数量,满足了更多用户的动态资源需求,增强了资源配额分配效率,提升了云平台资源服务能力,基于collectd将配额审核机制与资源利用考核机制协同起来,提升云平台整体资源利用率。Through the above description of the embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform, or can also be implemented by hardware. Compared with the current existing technology, this embodiment determines the resource quota adjustment factor corresponding to the client through historical resource quota information, and reallocates the client's resource quota according to the adjustment factor. Considering the two perspectives of the client and the cloud platform, dynamic Adjusting user resource quotas allows the computing resources of the cloud platform to be dynamically and flexibly adjusted, enhances the efficiency of resource quota allocation, and greatly improves the resource service capabilities of the cloud platform. Combining historical resource quota information with actual resource data, a dynamically changing weight model is selected to implement an algorithm for dynamic allocation of resource quotas, which not only enables users to actively initiate and passively adjust quotas, but also enables periodic active dynamic allocation. It effectively controls the number of resources used by users, meets the dynamic resource needs of more users, enhances the efficiency of resource quota allocation, and improves the resource service capabilities of the cloud platform. Based on collectd, the quota review mechanism and the resource utilization assessment mechanism are coordinated to improve the cloud Overall resource utilization of the platform.
需要说明的是,在本文中,诸如“第一”和“第二”等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relational terms such as “first” and “second” are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these Any such actual relationship or sequence exists between entities or operations. Furthermore, the terms "comprises," "comprises," or any other variations thereof are intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also those not expressly listed other elements, or elements inherent to the process, method, article or equipment. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article, or apparatus that includes the stated element.
以上所述仅是本申请的具体实施方式,使本领域技术人员能够理解或实现本申请。对这些实施例的多种修改对本领域的技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所述的这些实施例,而是要符合与本文所申请的原理和新颖特点相一致的最宽的范围。The above descriptions are only specific embodiments of the present application, enabling those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be practiced in other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments described herein but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311630102.7A CN117675566A (en) | 2023-11-29 | 2023-11-29 | Resource quota allocation method and device, storage medium and electronic equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311630102.7A CN117675566A (en) | 2023-11-29 | 2023-11-29 | Resource quota allocation method and device, storage medium and electronic equipment |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN117675566A true CN117675566A (en) | 2024-03-08 |
Family
ID=90067408
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202311630102.7A Pending CN117675566A (en) | 2023-11-29 | 2023-11-29 | Resource quota allocation method and device, storage medium and electronic equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN117675566A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118152124A (en) * | 2024-03-15 | 2024-06-07 | 聚明数据(南京)有限公司 | A data processing method and system based on cloud computing |
| CN118466866A (en) * | 2024-07-15 | 2024-08-09 | 济南浪潮数据技术有限公司 | A data processing method, product, device and medium in a distributed system |
| CN118644190A (en) * | 2024-08-12 | 2024-09-13 | 苏州慧工云信息科技有限公司 | Material distribution method, device and electronic equipment |
-
2023
- 2023-11-29 CN CN202311630102.7A patent/CN117675566A/en active Pending
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118152124A (en) * | 2024-03-15 | 2024-06-07 | 聚明数据(南京)有限公司 | A data processing method and system based on cloud computing |
| CN118466866A (en) * | 2024-07-15 | 2024-08-09 | 济南浪潮数据技术有限公司 | A data processing method, product, device and medium in a distributed system |
| CN118644190A (en) * | 2024-08-12 | 2024-09-13 | 苏州慧工云信息科技有限公司 | Material distribution method, device and electronic equipment |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN117675566A (en) | Resource quota allocation method and device, storage medium and electronic equipment | |
| CN109643251B (en) | Resource oversubscription based on utilization patterns in computing systems | |
| CN116360972A (en) | Resource management method, device and resource management platform | |
| CN112689007B (en) | Resource allocation method, device, computer equipment and storage medium | |
| US20120221730A1 (en) | Resource control system and resource control method | |
| CN110380891A (en) | An edge computing service resource allocation method, device and electronic equipment | |
| CN105049268A (en) | Distributed computing resource allocation system and task processing method | |
| CN117971499B (en) | Resource allocation method, device, electronic equipment and storage medium | |
| CN106209967B (en) | A kind of video surveillance cloud resource prediction method and system | |
| CN103067524A (en) | Ant colony optimization computing resource distribution method based on cloud computing environment | |
| US20190268213A1 (en) | Network function management method, management unit, and system | |
| CN106534318A (en) | OpenStack cloud platform resource dynamic scheduling system and method based on flow affinity | |
| US20180026855A1 (en) | Network management system, device, and method | |
| WO2017166643A1 (en) | Method and device for quantifying task resources | |
| CN109298937A (en) | File parsing method and network device | |
| CN111078404A (en) | Computing resource determination method and device, electronic equipment and medium | |
| WO2020224531A1 (en) | Method and device for assigning tokens in storage system | |
| US11374869B2 (en) | Managing bandwidth based on user behavior | |
| CN111124669A (en) | A distributed SaaS software operation method, system, terminal and storage medium | |
| CN110727511B (en) | Control method for application program, network side device and computer readable storage medium | |
| CN114489463A (en) | Method and device for dynamically adjusting QOS (quality of service) of storage volume and computing equipment | |
| WO2024148864A1 (en) | Virtual machine memory adjustment method and device, non-volatile readable storage medium, and electronic device | |
| CN114422565A (en) | Network connection management method based on connection pool and related device | |
| CN111506425A (en) | Method and device for processing quality of service data | |
| CN118885290A (en) | Method, device, storage medium and electronic device for dynamically adjusting container video memory |
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 |