WO2019141185A1 - 一种控制用户使用资源的方法、装置、介质及设备 - Google Patents

一种控制用户使用资源的方法、装置、介质及设备 Download PDF

Info

Publication number
WO2019141185A1
WO2019141185A1 PCT/CN2019/071961 CN2019071961W WO2019141185A1 WO 2019141185 A1 WO2019141185 A1 WO 2019141185A1 CN 2019071961 W CN2019071961 W CN 2019071961W WO 2019141185 A1 WO2019141185 A1 WO 2019141185A1
Authority
WO
WIPO (PCT)
Prior art keywords
user
amount
unit time
resource
resources
Prior art date
Application number
PCT/CN2019/071961
Other languages
English (en)
French (fr)
Inventor
任稚
刘桐伟
张炎泼
Original Assignee
北京白山耘科技有限公司
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 北京白山耘科技有限公司 filed Critical 北京白山耘科技有限公司
Priority to SG11202006854YA priority Critical patent/SG11202006854YA/en
Publication of WO2019141185A1 publication Critical patent/WO2019141185A1/zh

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/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation

Definitions

  • Embodiments of the present invention relate to, but are not limited to, the field of Internet technologies, and in particular, to a method, an apparatus, a medium, and a device for controlling a user to use a resource.
  • the cloud storage system provides various resources, and different users access and use various resources provided by the cloud storage system. Because the processing capacity of the cloud storage system is limited, if the user increases the amount of access in a short period of time, the processing capacity of the cloud storage system may be greatly consumed, or even the system crash of the cloud storage system may be impossible. The normal provision of services directly affects the normal access of other users.
  • N is a positive integer.
  • the setting a resource usage threshold for the user in a unit time includes: setting a resource usage threshold of different resource types in a unit time for the user;
  • the monitoring the amount of resources used by the user reported by each node module includes: monitoring the amount of resources of different resource types used by the user reported by each node module;
  • Determining, according to the resource usage threshold of the user in a unit time period and the amount of resources used by the user in each node module, the amount of available resources in each unit time of the N unit time after the current time of the user includes Determining, according to the resource usage threshold of each resource type in the unit time of the user, and the resource amount of each resource type used by each user in each node module, each of the N unit time after the current time of the user. The amount of resources available for each resource type per unit time.
  • the method further includes: counting a proportion of the amount of resources used by the user on each node module within a preset time period before the current time;
  • the allocating the available resource amount to the node module includes: allocating the available resource amount to different node modules according to the ratio.
  • the method further includes: after the node module acquires the available resources of the user in each unit time in the N unit time after the current time, the node module detects the resource usage of the user in a unit time. The amount is denied after the user's resource usage per unit time is greater than the available resource amount in the unit time.
  • Determining, according to the resource usage threshold of the user in a unit time period and the amount of resources used by the user in each node module, the amount of available resources in each unit time of the N unit time after the current time of the user includes : increasing the amount of available resources of the user by one resource usage threshold per unit time, and receiving the amount of resources used by the user reported by the node module, and subtracting the amount of available resources of the user from the amount of resources available to the user.
  • the amount of resources used by the user is used to allocate the updated amount of available resources of the user to the amount of available resources per unit time of the N unit time of the user after the current time.
  • the device for controlling the user to use the resource in the embodiment of the present invention includes a central device, where the central device includes:
  • a setting module for setting a resource usage threshold per unit time for the user
  • a monitoring module configured to monitor a quantity of resources used by a user reported by each node module
  • an allocating module configured to determine, according to the resource usage threshold of the user in a unit time and the amount of resources used by the user in each node module, that the user is available in each unit time of N unit time after the current time
  • the amount of resources, the amount of available resources is allocated to the node module; N is a positive integer.
  • the setting module is further configured to set, for a user, a resource usage threshold of different resource types in a unit time;
  • the monitoring module is further configured to monitor a resource quantity of different resource types used by the user reported by each node module;
  • the allocating module is further configured to determine, according to a resource usage threshold of each resource type in a unit time of the user, and a resource quantity of each resource type used by each user in each node module, the user is determined to be after the current time.
  • the device further includes a statistics module, configured to calculate a proportion of the amount of resources used by the user on each node module in a preset time period before the current time;
  • the allocation module is configured to allocate the available resource amount to different node modules according to the ratio.
  • the device further includes a node device, configured to acquire, from the central device, an available resource amount per unit time in the N unit time after the current time, and detect the resource usage of the user in a unit time After the user's resource usage per unit time is greater than the available resource amount in the unit time, the user's access is denied.
  • a node device configured to acquire, from the central device, an available resource amount per unit time in the N unit time after the current time, and detect the resource usage of the user in a unit time After the user's resource usage per unit time is greater than the available resource amount in the unit time, the user's access is denied.
  • the allocating module is configured to determine, according to a resource usage threshold of the user in a unit time and an amount of resources used by each user in each node module, that the user is in each of N unit time after the current time.
  • the amount of available resources per unit time the amount of available resources of the user is increased by one resource usage threshold per unit time, and the amount of resources used by the user reported by the node module is received from the user.
  • the amount of resources used by the user is subtracted from the amount of available resources, and the updated amount of available resources of the user is allocated as the amount of available resources per unit time of the N unit time of the user after the current time.
  • the computer readable storage medium provided in the embodiment of the present invention stores a computer program, and when the program is executed by the processor, the steps of the foregoing method are implemented.
  • the computer device provided in the embodiment of the present invention includes a memory, a processor, and a computer program stored on the memory and operable on the processor, and the processor implements the steps of the foregoing method when the program is executed.
  • the central module monitors the resource usage of the user on each node module in real time, and dynamically adjusts the amount of resources allocated by each node module, so that the resource usage of the node module on the node module exceeds the central node setting.
  • the usage is used, the user is prohibited from continuing to use the resources, which prevents the user from consuming the resources of the system without restriction, so that the system is always in the state of remaining resources, so that the system can always provide normal services and prevent system resources from being exhausted and crashed.
  • Embodiment 1 is a flowchart of a method for controlling a user to use a resource in Embodiment 1;
  • FIG. 2 is a flow chart of a method for controlling a user to use resources in the second embodiment.
  • FIG. 1 is a flowchart of a method for controlling a user to use a resource in an embodiment, the method includes:
  • Step 101 Set a resource usage threshold for the user in a unit time
  • Step 102 Monitor the amount of resources used by the user reported by each node module.
  • Step 103 Determine, according to the resource usage threshold of the user's unit time and the amount of resources used by the user in each node module, the amount of available resources in each unit time of the N unit time after the current time, and allocate the available resources.
  • N is a positive integer.
  • the method further includes a step 104: the node module acquires, from the central module, the amount of resources available per unit time in the N unit time after the current time, and detects the resource usage of the user in the unit time, when the user is in the unit time The user's access is denied after the resource usage is greater than the amount of available resources in this unit of time.
  • This method can prevent the user from consuming the resources of the system without restriction, so that the system is always in the state of remaining resources, so that the system can always provide normal services and prevent system resources from being exhausted and crashed.
  • step 103 according to the resource usage threshold of the user's unit time and the amount of resources used by the user in each node module, the amount of available resources in each unit time of the N unit time after the current time of the user is specifically included: The amount of resources available to the user is increased by one resource usage threshold per unit time. After receiving the amount of resources used by the user reported by the node module, the amount of resources used by the user is subtracted from the amount of available resources of the user, and the updated resource is used. The amount of available resources of the user is allocated to the amount of resources available per unit time in the N unit time of the user after the current time.
  • the method further includes: counting the proportion of the amount of resources used by the user on each node module in the preset time period before the current time; and allocating the available resource amount to the node module includes: The amount of available resources is allocated to different node modules according to the above ratio. Specifically, when the proportion of resources used by the user on the node module is large in the preset time period before the current time, when the available resource amount is allocated to the node module, a corresponding proportion is allocated. In this method, the allocation of subsequent available resources is determined according to the historical situation of resource access on the node module, so that the resource allocation is more reasonable.
  • the second embodiment considers the access control of resources of different resource types compared to the first embodiment.
  • FIG. 2 is a flow chart of a method for controlling a user to use a resource in an embodiment, the method comprising:
  • Step 201 Set a resource usage threshold of different resource types in a unit time for the user
  • Step 202 Monitor the amount of resources of different resource types used by the user reported by each node module.
  • Step 203 Determine, according to the resource usage threshold of each resource type in the unit time of the user, and the resource quantity of each resource type used by each node module, the user each time in each unit time of the N unit time after the current time.
  • the amount of resources available for the resource type is allocated to the node module, where N is a positive integer.
  • the method further includes the step 204: the node module acquires, from the central module, the available resources of each resource type in each unit time of the N unit time after the current time, and detects the resources of the user for each resource type in a unit time.
  • the amount of usage, after the user uses the resource amount of the at least one resource type in the unit time is greater than the available resource amount of the resource type in the unit time, the user's access to the resource of the resource type is denied.
  • step 103 according to the resource usage threshold of the user's unit time and the amount of resources used by the user in each node module, the amount of available resources in each unit time of the N unit time after the current time of the user is specifically included:
  • the amount of available resources of each resource type of the user is increased by a resource usage threshold of the corresponding resource type in a unit time, and after receiving the resource amount of each resource type used by the user reported by the node module, the resource types of the user are The amount of resources of the corresponding resource type used by the user is subtracted from the amount of available resources, and the available resource amount of each resource type of the updated user is allocated as the resource type of each unit time in the N unit time after the current time.
  • the amount of resources available is provided.
  • the method further includes: counting the proportion of the amount of resources used by the user on each node module within a preset time period before the current time. Assigning the amount of available resources to the node module includes allocating the amount of available resources to different node modules according to the scale. In this method, the allocation of subsequent available resources is determined according to the historical situation of resource access on the node module, so that the resource allocation is more reasonable.
  • the device for controlling the user to use resources in the third embodiment includes a central device, and the central device includes:
  • a setting module for setting a resource usage threshold per unit time for the user
  • a monitoring module configured to monitor a quantity of resources used by a user reported by each node module
  • An allocating module configured to determine, according to a resource usage threshold of the user in a unit time period and a resource amount used by each node module, a quantity of available resources per unit time in the N unit time after the current time, and an available resource The quantity is assigned to the node module; N is a positive integer.
  • the central device further includes a statistics module for counting the proportion of resources used by the user on each node module within a preset time period before the current time.
  • the allocation module is used to allocate the amount of available resources to different node modules according to this ratio.
  • the allocation module is configured to determine, according to the resource usage threshold of the user's unit time and the amount of resources used by the user in each node module, the amount of resources available per unit time in the N unit time after the current time: The amount of resources available to the user is increased by one resource usage threshold per unit time. After receiving the amount of resources used by the user reported by the node module, the amount of resources used by the user is subtracted from the amount of available resources of the user, and the resource is updated. The amount of available resources of the latter user is allocated as the amount of resources available per unit time in the N unit time of the user after the current time.
  • the device for controlling the user to use the resource further includes a node device, configured to acquire, from the central device, the amount of available resources in each unit time of the N unit time after the current time, and detect the resource usage of the user in the unit time, in the user. After the resource usage per unit time is greater than the available resources in this unit time, the user's access is denied.
  • the device for controlling the user to use resources in the fourth embodiment includes a central device, and the central device includes:
  • a setting module configured to set a resource usage threshold of different resource types in a unit time for a user
  • a monitoring module configured to monitor resources of different resource types used by users reported by each node module
  • an allocating module configured to determine, according to a resource usage threshold of each resource type in a unit time of the user, and a resource quantity of each resource type used by each node module, each unit time in the N unit time after the current time
  • the amount of available resources for each resource type, the amount of available resources is allocated to the node module; N is a positive integer.
  • the central device further includes a statistics module for counting the proportion of resources used by the user on each node module within a preset time period before the current time.
  • the allocation module is used to allocate the amount of available resources to different node modules according to this ratio.
  • the allocation module is configured to determine, according to the resource usage threshold of each resource type in the user's unit time and the resource amount of each resource type used by each node module, the user determines each of the N unit time after the current time.
  • the amount of available resources of each resource type per unit time the amount of available resources of each resource type of the user is increased by a resource usage threshold of the corresponding resource type in each unit time, and each user used by the reported user is received from the node module.
  • the amount of resources of the corresponding resource type used by the user is subtracted from the available resource amount of each resource type of the user, and the available resource amount of each resource type of the updated user is allocated as the user after the current time.
  • the device for controlling the user to use the resource further includes a node device, where the node module acquires, from the central module, the available resources of each resource type in each unit time of the N unit time after the current time, and detects the user in the unit time. For the resource usage of each resource type, after the user uses the resource amount of the at least one resource type in the unit time is greater than the available resource amount of the resource type in the unit time, the user's access to the resource of the resource type is denied. .
  • computer storage medium includes volatile and nonvolatile, implemented in any method or technology for storing information, such as computer readable instructions, data structures, program modules or other data. Sex, removable and non-removable media.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridge, magnetic tape, magnetic disk storage or other magnetic storage device, or may Any other medium used to store the desired information and that can be accessed by the computer.
  • communication media typically includes computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and can include any information delivery media. .
  • the central module monitors the user's resource usage on each node module in real time, and dynamically adjusts the amount of resources allocated to each node module, so that the resource usage of the node module on the node module exceeds the usage of the central node.
  • the user When the user is prohibited from continuing to use resources, the user can be prevented from consuming the resources of the system without restriction, and the system is always in a state of remaining resources, so that the system can always provide normal services and prevent system resources from being exhausted and crashed.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本文公开一种控制用户使用资源的方法、装置、介质及设备,此方法包括:为用户设置单位时间内的资源使用量阈值;监测各节点模块上报的用户使用的资源量;根据用户的单位时间内的资源使用量阈值和用户在各节点模块使用的资源量确定用户在当前时间后的N个单位时间中每个单位时间内可用资源量,将可用资源量分配至节点模块。本文中中心模块实时监控用户在各节点模块上的资源使用量,动态的调整为各节点模块分配的资源量,使节点模块在用户在此节点模块上的资源使用量超过中心节点设置的使用量时,禁止用户继续使用资源,可以防止用户无限制的消耗***的资源,使***一直处于有剩余资源状态,使***一直能够提供正常服务,防止***资源耗尽和崩溃。

Description

一种控制用户使用资源的方法、装置、介质及设备
本申请要求在2018年1月19日提交中国专利局、申请号为201810054007.X、发明名称为“一种控制用户使用资源的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明实施例涉及但不限于涉及互联网技术领域,尤其涉及一种控制用户使用资源的方法、装置、介质及设备。
背景技术
云存储***提供各种资源,不同的用户访问并使用云存储***提供的各种资源。由于云存储***的处理能力是有限的,如果用户短时间内大量的增加访问量时,有可能极大的消耗云存储***的处理能力,甚至使云存储***发生***崩溃的情况,以至于不能正常提供服务,直接影响其它用户的正常访问。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本文中的控制用户使用资源的方法,包括:
为用户设置单位时间内的资源使用量阈值;
监测各节点模块上报的用户使用的资源量;
根据所述用户的单位时间内的资源使用量阈值和所述用户在各节点模块使用的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量,将所述可用资源量分配至节点模块;N为正整数。
上述控制用户使用资源的方法还具有以下特点:
所述为用户设置单位时间内的资源使用量阈值包括:为用户设置单位时间内不同资源类型的资源使用量阈值;
所述监测各节点模块上报的用户使用的资源量包括:监测各节点模块上报的用户使用的不同资源类型的资源量;
所述根据所述用户的单位时间内的资源使用量阈值和所述用户在各节点模块使用的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量包括:根据所述用户的单位时间内的各资源类型的资源使用量阈值和所述用户在各节点模块使用的各资源类型的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内各资源类型的可用资源量。
上述控制用户使用资源的方法还具有以下特点:
将所述可用资源量分配至节点模块之前,所述方法还包括:统计在当前时间之前的预设时段内所述用户在各节点模块上使用资源量的比例;
所述将所述可用资源量分配至节点模块包括:根据所述比例将所述可用资源量分配至不同的节点模块。
上述控制用户使用资源的方法还具有以下特点:
所述方法还包括:所述节点模块从所述中心模块获取所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量后,检测所述用户在单位时间内的资源使用量,在所述用户在单位时间内的资源使用量大于此单位时间内的可用资源量后,拒绝所述用户的访问。
上述控制用户使用资源的方法还具有以下特点:
所述根据所述用户的单位时间内的资源使用量阈值和所述用户在各节点模块使用的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量包括:在每个单位时间内将所述用户的可用资源量增加一所述资源使用量阈值,从节点模块接收到其上报的用户使用的资源量后,从所述用户的可用资源量中减去所述用户使用的资源量,将更新后的所述用户的可用资源量分配为所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量。
本发明实施例中控制用户使用资源的设备,包括中心设备,所述中心设备包括:
设置模块,用于为用户设置单位时间内的资源使用量阈值;
监测模块,用于监测各节点模块上报的用户使用的资源量;
分配模块,用于根据所述用户的单位时间内的资源使用量阈值和所述用户在各节点模块使用的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量,将所述可用资源量分配至节点模块;N为正整数。
上述控制用户使用资源的设备还具有以下特点:
所述设置模块,还用于为用户设置单位时间内不同资源类型的资源使用量阈值;
所述监测模块,还用于监测各节点模块上报的用户使用的不同资源类型的资源量;
所述分配模块,还用于根据所述用户的单位时间内的各资源类型的资源使用量阈值和所述用户在各节点模块使用的各资源类型的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内各资源类型的可用资源量。
上述控制用户使用资源的设备还具有以下特点:
所述设备还包括统计模块,用于统计在当前时间之前的预设时段内所述用户在各节点模块上使用资源量的比例;
所述分配模块,用于根据所述比例将所述可用资源量分配至不同的节点模块。
上述控制用户使用资源的设备还具有以下特点:
所述设备还包括节点设备,用于从所述中心设备获取所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量,检测所述用户在单位时间内的资源使用量,在所述用户在单位时间内的资源使用量大于此单位时间内的可用资源量后,拒绝所述用户的访问。
上述控制用户使用资源的设备还具有以下特点:
所述分配模块,用于使用以下方法根据所述用户的单位时间内的资源使用量阈值和所述用户在各节点模块使用的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量:在每个单位时间内将所述用户的可用资源量增加一所述资源使用量阈值,从节点模块接收到其上报的用户使用的资源量后,从所述用户的可用资源量中减去所述用户使用的资源量,将更新后的所述用户的可用资源量分配为所述用户在当前时间后的N个单位时间中每个 单位时间内可用资源量。
本发明实施例中提供的计算机可读存储介质上存储有计算机程序,所述程序被处理器执行时实现权利要求上述方法的步骤。
本发明实施例中提供的计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现上述方法的步骤。
本发明实施例中中心模块实时监控用户在各节点模块上的资源使用量,动态的调整为各节点模块分配的资源量,使节点模块在用户在此节点模块上的资源使用量超过中心节点设置的使用量时,禁止用户继续使用资源,可以防止用户无限制的消耗***的资源,使***一直处于有剩余资源状态,使***一直能够提供正常服务,防止***资源耗尽和崩溃。
附图说明
此处所说明的附图用来提供对本发明实施例的进一步理解,构成本申请的一部分,本发明实施例的示意性实施例及其说明用于解释本发明实施例,并不构成对本发明实施例的不当限定。在附图中:
图1是实施例一中控制用户使用资源的方法的流程图;
图2是实施例二中控制用户使用资源的方法的流程图。
具体实施方式
现结合附图和具体实施方式对本发明实施例进一步说明。
实施例一
图1是实施例中控制用户使用资源的方法的流程图,此方法包括:
步骤101,为用户设置单位时间内的资源使用量阈值;
步骤102,监测各节点模块上报的用户使用的资源量;
步骤103,根据用户的单位时间内的资源使用量阈值和用户在各节点模块使用的资源量确定用户在当前时间后的N个单位时间中每个单位时间内可用资源量,将可用资源量分配至节点模块;N为正整数。
方法还包括步骤104:节点模块从中心模块获取用户在当前时间后的N个单位时间中每个单位时间内可用资源量后,检测用户在单位时间内的资源使用量,在用户在单位时间内的资源使用量大于此单位时间内的可用资源量后,拒绝用户的访问。
此方法可以防止用户无限制的消耗***的资源,使***一直处于有剩余资源状态,使***一直能够提供正常服务,防止***资源耗尽和崩溃。
步骤103中根据用户的单位时间内的资源使用量阈值和用户在各节点模块使用的资源量确定用户在当前时间后的N个单位时间中每个单位时间内可用资源量具体包括:在每个单位时间内将用户的可用资源量增加一资源使用量阈值,从节点模块接收到其上报的用户使用的资源量后,从用户的可用资源量中减去用户使用的资源量,将更新后的用户的可用资源量分配为用户在当前时间后的N个单位时间中每个单位时间内可用资源量。
步骤103中将可用资源量分配至节点模块之前,此方法还包括:统计在当前时间之前的预设时段内用户在各节点模块上使用资源量的比例;将可用资源量分配至节点模块包括:根据上述比例将可用资源量分配至不同的节点模块。具体的,统计在当前时间之前的预设时段内用户在节点模块上使用资源量的比例较大时,为此节点模块分配可用资源量时将相应的分配较大的比例。此方法中,根据节点模块上资源访问的历史情况确定后续可用资源的分配,使资源分配更加合理。
实施例二
实施例二相比实施例一还考虑了对不同资源类型的资源的访问控制。
图2是实施例中控制用户使用资源的方法的流程图,此方法包括:
步骤201,为用户设置单位时间内不同资源类型的资源使用量阈值;
步骤202,监测各节点模块上报的用户使用的不同资源类型的资源量;
步骤203,根据用户的单位时间内的各资源类型的资源使用量阈值和用户在各节点模块使用的各资源类型的资源量确定用户在当前时间后的N个单位时间中每个单位时间内各资源类型的可用资源量;将可用资源量分配至节点模块,N为正整数。
此方法还包括步骤204:节点模块从中心模块获取用户在当前时间后的N个单位时间中每个单位时间内各资源类型的可用资源量后,检测用户在单位时间内对各资源类型的资源使用量,在用户在单位时间内对至少一资源类型的资源使用量大于此单位时间内的此资源类型的可用资源量后,拒绝用户的对此资源类型的资源的访问。
步骤103中根据用户的单位时间内的资源使用量阈值和用户在各节点模块使用的资源量确定用户在当前时间后的N个单位时间中每个单位时间内可用资源量具体包括:在每个单位时间内将用户的各资源类型的可用资源量增加一相应资源类型的资源使用量阈值,从节点模块接收到其上报的用户使用的各资源类型的资源量后,从用户的各资源类型的可用资源量中减去用户使用的相应资源类型的资源量,将更新后的用户的各资源类型的可用资源量分配为用户在当前时间后的N个单位时间中每个单位时间内各资源类型的可用资源量。
步骤203中将可用资源量分配至节点模块之前,此方法还包括:统计在当前时间之前的预设时段内用户在各节点模块上使用资源量的比例。将可用资源量分配至节点模块包括:根据比例将可用资源量分配至不同的节点模块。此方法中,根据节点模块上资源访问的历史情况确定后续可用资源的分配,使资源分配更加合理。
实施例三
对应于实施例一,实施例三中控制用户使用资源的设备,包括中心设备,中心设备包括:
设置模块,用于为用户设置单位时间内的资源使用量阈值;
监测模块,用于监测各节点模块上报的用户使用的资源量;
分配模块,用于根据用户的单位时间内的资源使用量阈值和用户在各节点模块使用的资源量确定用户在当前时间后的N个单位时间中每个单位时间内可用资源量,将可用资源量分配至节点模块;N为正整数。
中心设备还包括统计模块,用于统计在当前时间之前的预设时段内用户在各节点模块上使用资源量的比例。分配模块用于根据此比例将可用资源量分配至不同的节点模块。
分配模块用于使用以下方法根据用户的单位时间内的资源使用量阈值和用 户在各节点模块使用的资源量确定用户在当前时间后的N个单位时间中每个单位时间内可用资源量:在每个单位时间内将用户的可用资源量增加一资源使用量阈值,从节点模块接收到其上报的用户使用的资源量后,从用户的可用资源量中减去用户使用的资源量,将更新后的用户的可用资源量分配为用户在当前时间后的N个单位时间中每个单位时间内可用资源量。
控制用户使用资源的设备还包括节点设备,用于从中心设备获取用户在当前时间后的N个单位时间中每个单位时间内可用资源量,检测用户在单位时间内的资源使用量,在用户在单位时间内的资源使用量大于此单位时间内的可用资源量后,拒绝用户的访问。
实施例四
对应于实施例二,实施例四中控制用户使用资源的设备,包括中心设备,中心设备包括:
设置模块,用于为用户设置单位时间内不同资源类型的资源使用量阈值;
监测模块,用于监测各节点模块上报的用户使用的不同资源类型的资源量;
分配模块,用于根据用户的单位时间内的各资源类型的资源使用量阈值和用户在各节点模块使用的各资源类型的资源量确定用户在当前时间后的N个单位时间中每个单位时间内各资源类型的可用资源量,将可用资源量分配至节点模块;N为正整数。
中心设备还包括统计模块,用于统计在当前时间之前的预设时段内用户在各节点模块上使用资源量的比例。分配模块用于根据此比例将可用资源量分配至不同的节点模块。
分配模块用于使用以下方法根据用户的单位时间内的各资源类型的资源使用量阈值和用户在各节点模块使用的各资源类型的资源量确定用户在当前时间后的N个单位时间中每个单位时间内各资源类型的可用资源量:在每个单位时间内将用户的各资源类型的可用资源量增加一相应资源类型的资源使用量阈值,从节点模块接收到其上报的用户使用的各资源类型的资源量后,从用户的各资源类型的可用资源量中减去用户使用的相应资源类型的资源量,将更新后的用户的各资源类型的可用资源量分配为用户在当前时间后的N个单位时间中每个单位时间内各资源类型的可用资源量。
控制用户使用资源的设备还包括节点设备,用于节点模块从中心模块获取 用户在当前时间后的N个单位时间中每个单位时间内各资源类型的可用资源量后,检测用户在单位时间内对各资源类型的资源使用量,在用户在单位时间内对至少一资源类型的资源使用量大于此单位时间内的此资源类型的可用资源量后,拒绝用户的对此资源类型的资源的访问。
本领域的普通技术人员应当理解,可以对本发明实施例的技术方案进行修改或者等同替换,而不脱离本发明技术方案的精神和范围,均应涵盖在权利要求范围当中。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、***、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。
工业实用性
本文中中心模块实时监控用户在各节点模块上的资源使用量,动态的调整为各节点模块分配的资源量,使节点模块在用户在此节点模块上的资源使用量超过中心节点设置的使用量时,禁止用户继续使用资源,可以防止用户无限制的消耗***的资源,使***一直处于有剩余资源状态,使***一直能够提供正常服务,防止***资源耗尽和崩溃。

Claims (12)

  1. 一种控制用户使用资源的方法,包括:
    为用户设置单位时间内的资源使用量阈值;
    监测各节点模块上报的用户使用的资源量;
    根据所述用户的单位时间内的资源使用量阈值和所述用户在各节点模块使用的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量,将所述可用资源量分配至节点模块;N为正整数。
  2. 如权利要求1所述控制用户使用资源的方法,其中,
    所述为用户设置单位时间内的资源使用量阈值包括:为用户设置单位时间内不同资源类型的资源使用量阈值;
    所述监测各节点模块上报的用户使用的资源量包括:监测各节点模块上报的用户使用的不同资源类型的资源量;
    所述根据所述用户的单位时间内的资源使用量阈值和所述用户在各节点模块使用的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量包括:根据所述用户的单位时间内的各资源类型的资源使用量阈值和所述用户在各节点模块使用的各资源类型的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内各资源类型的可用资源量。
  3. 如权利要求1所述控制用户使用资源的方法,其中,
    将所述可用资源量分配至节点模块之前,所述方法还包括:统计在当前时间之前的预设时段内所述用户在各节点模块上使用资源量的比例;
    所述将所述可用资源量分配至节点模块包括:根据所述比例将所述可用资源量分配至不同的节点模块。
  4. 如权利要求1所述控制用户使用资源的方法,其中,
    所述方法还包括:所述节点模块从所述中心模块获取所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量后,检测所述用户在单位时间内的资源使用量,在所述用户在单位时间内的资源使用量大于此单位时间内的可用资源量后,拒绝所述用户的访问。
  5. 如权利要求1所述控制用户使用资源的方法,其中,
    所述根据所述用户的单位时间内的资源使用量阈值和所述用户在各节点模块使用的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量包括:在每个单位时间内将所述用户的可用资源量增加一所述资源使用量阈值,从节点模块接收到其上报的用户使用的资源量后,从所述用户的可用资源量中减去所述用户使用的资源量,将更新后的所述用户的可用资源量分配为所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量。
  6. 一种控制用户使用资源的设备,包括中心设备,所述中心设备包括:
    设置模块,用于为用户设置单位时间内的资源使用量阈值;
    监测模块,用于监测各节点模块上报的用户使用的资源量;
    分配模块,用于根据所述用户的单位时间内的资源使用量阈值和所述用户在各节点模块使用的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量,将所述可用资源量分配至节点模块;N为正整数。
  7. 如权利要求6所述控制用户使用资源的设备,其中,
    所述设置模块,还用于为用户设置单位时间内不同资源类型的资源使用量阈值;
    所述监测模块,还用于监测各节点模块上报的用户使用的不同资源类型的资源量;
    所述分配模块,还用于根据所述用户的单位时间内的各资源类型的资源使用量阈值和所述用户在各节点模块使用的各资源类型的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内各资源类型的可用资源量。
  8. 如权利要求6所述控制用户使用资源的设备,其中,
    所述设备还包括统计模块,用于统计在当前时间之前的预设时段内所述用户在各节点模块上使用资源量的比例;
    所述分配模块,用于根据所述比例将所述可用资源量分配至不同的节点模块。
  9. 如权利要求6所述控制用户使用资源的设备,其中,
    所述设备还包括节点设备,用于从所述中心设备获取所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量,检测所述用户在单位时间内 的资源使用量,在所述用户在单位时间内的资源使用量大于此单位时间内的可用资源量后,拒绝所述用户的访问。
  10. 如权利要求6所述控制用户使用资源的设备,其中,
    所述分配模块,用于使用以下方法根据所述用户的单位时间内的资源使用量阈值和所述用户在各节点模块使用的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量:在每个单位时间内将所述用户的可用资源量增加一所述资源使用量阈值,从节点模块接收到其上报的用户使用的资源量后,从所述用户的可用资源量中减去所述用户使用的资源量,将更新后的所述用户的可用资源量分配为所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量。
  11. 一种计算机可读存储介质,所述存储介质上存储有计算机程序,所述程序被处理器执行时实现权利要求1至5中任意一项所述方法的步骤。
  12. 一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现权利要求1至5中任意一项所述方法的步骤。
PCT/CN2019/071961 2018-01-19 2019-01-16 一种控制用户使用资源的方法、装置、介质及设备 WO2019141185A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SG11202006854YA SG11202006854YA (en) 2018-01-19 2019-01-16 Method for controlling user usage of resources, device, medium, and equipment

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810054007.XA CN108390913B (zh) 2018-01-19 2018-01-19 一种控制用户使用资源的方法及装置
CN201810054007.X 2018-01-19

Publications (1)

Publication Number Publication Date
WO2019141185A1 true WO2019141185A1 (zh) 2019-07-25

Family

ID=63077326

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/071961 WO2019141185A1 (zh) 2018-01-19 2019-01-16 一种控制用户使用资源的方法、装置、介质及设备

Country Status (3)

Country Link
CN (1) CN108390913B (zh)
SG (1) SG11202006854YA (zh)
WO (1) WO2019141185A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108390913B (zh) * 2018-01-19 2019-03-12 北京白山耘科技有限公司 一种控制用户使用资源的方法及装置
CN116431347B (zh) * 2023-04-14 2024-03-26 北京达佳互联信息技术有限公司 用于资源处理的方法、装置、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130326507A1 (en) * 2012-05-30 2013-12-05 Michael P. McGrath Mechanism for Controlling Utilization in a Multi-Tenant Platform-as-a-Service (PaaS) Environment in a Cloud Computing System
CN103729236A (zh) * 2013-12-29 2014-04-16 国云科技股份有限公司 一种限制云计算用户资源使用额度的方法
CN103907128A (zh) * 2011-06-14 2014-07-02 英派尔科技开发有限公司 用于云计算环境的峰值性能已知计费
CN105703927A (zh) * 2014-11-25 2016-06-22 华为软件技术有限公司 一种资源分配方法、网络设备和网络***
CN108390913A (zh) * 2018-01-19 2018-08-10 北京白山耘科技有限公司 一种控制用户使用资源的方法及装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1612529A (zh) * 2003-10-27 2005-05-04 华为技术有限公司 一种对用户可用资源进行预分配的方法
CN102761572B (zh) * 2011-04-28 2016-07-27 腾讯科技(深圳)有限公司 动态调整数据流量的方法及***
CN102546587B (zh) * 2011-11-16 2015-08-05 深信服网络科技(深圳)有限公司 防止网关***会话资源被恶意耗尽的方法及装置
CN105813140A (zh) * 2014-12-29 2016-07-27 中兴通讯股份有限公司 一种资源分配调控的方法和装置
CN106375115B (zh) * 2016-08-30 2019-12-03 东软集团股份有限公司 资源分配方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103907128A (zh) * 2011-06-14 2014-07-02 英派尔科技开发有限公司 用于云计算环境的峰值性能已知计费
US20130326507A1 (en) * 2012-05-30 2013-12-05 Michael P. McGrath Mechanism for Controlling Utilization in a Multi-Tenant Platform-as-a-Service (PaaS) Environment in a Cloud Computing System
CN103729236A (zh) * 2013-12-29 2014-04-16 国云科技股份有限公司 一种限制云计算用户资源使用额度的方法
CN105703927A (zh) * 2014-11-25 2016-06-22 华为软件技术有限公司 一种资源分配方法、网络设备和网络***
CN108390913A (zh) * 2018-01-19 2018-08-10 北京白山耘科技有限公司 一种控制用户使用资源的方法及装置

Also Published As

Publication number Publication date
CN108390913A (zh) 2018-08-10
CN108390913B (zh) 2019-03-12
SG11202006854YA (en) 2020-08-28

Similar Documents

Publication Publication Date Title
US11546644B2 (en) Bandwidth control method and apparatus, and device
US20200356682A1 (en) Method, a system, a device and a readable medium for setting access permission for an application
CN109936511B (zh) 一种令牌获取方法、装置、服务器、终端设备及介质
US10152347B2 (en) Automatic virtual machine termination in a cloud
WO2017140130A1 (zh) 一种视频云存储的存储资源分配方法及装置
JP6480642B2 (ja) 確率的帯域幅調整
US10700993B2 (en) Controlling message output
WO2019141185A1 (zh) 一种控制用户使用资源的方法、装置、介质及设备
CN106411558B (zh) 一种数据流量限制的方法及***
US9794421B2 (en) Method, system and apparatus for adaptive quota determination for shared resources
CN110505158B (zh) 一种网络带宽控制方法、装置及电子设备和存储介质
US20150358216A1 (en) Dynamic and adaptive quota shares
JP2017538987A5 (zh)
WO2019170011A1 (zh) 任务分配方法及装置、分布式存储***
US9008122B2 (en) Method and apparatus for triggering bandwidth upspeeding within an existing reservation
CN114385370B (zh) 内存分配方法、***、设备及介质
CN106534231B (zh) 一种网络资源的使用限额的控制方法、装置及***
CN113760549A (zh) 一种pod部署方法及装置
CN106021026B (zh) 一种备份方法及装置
CN111143071A (zh) 基于mcs***的缓存分区管理方法、***及相关组件
CN110968406B (zh) 处理任务的方法、装置、存储介质和处理器
CN103259817B (zh) 资源释放方法及装置
US9762504B1 (en) System, method, and computer program for managing a shared quota for a plurality of network subscribers in a consumer telecommunications network
CN115033369A (zh) 基于任务处理的线程调度方法、装置和设备
US9667562B2 (en) Method and apparatus for supporting variable bit-rate reservations

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19741751

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19741751

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 16/10/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 19741751

Country of ref document: EP

Kind code of ref document: A1