WO2019141185A1 - Method for controlling user usage of resources, device, medium, and equipment - Google Patents

Method for controlling user usage of resources, device, medium, and equipment 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
French (fr)
Chinese (zh)
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/en

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

Disclosed are a method for controlling user usage of resources, a device, a medium, and equipment. The method comprises: setting a resource usage threshold in a unit time for a user; monitoring the amount of resource used by the user as reported by node modules; determining, on the basis of the resource usage threshold in the unit time for the user and the amount of resources on the node modules used by the user, the amount of available resources for the user in each unit time in N unit times subsequent to the current time, and allocating the available resources to the node modules. A central module in the present text monitors in real-time the amount of resources on the node modules used by the user, dynamically adjusts the amount of resources allocated to the node modules, allows the node modules to ban the user from continuing using resources when the amount of resources used by the user on the respective node modules exceeds the usage amount set by the central node, thus preventing the user from unrestrictedly consuming resources of a system, allowing system to always be kept in a state of having resources remaining, allowing the system to always be able to provide services normally, and preventing system resource depletion and collapse.

Description

一种控制用户使用资源的方法、装置、介质及设备Method, device, medium and device for controlling user use resources
本申请要求在2018年1月19日提交中国专利局、申请号为201810054007.X、发明名称为“一种控制用户使用资源的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to Chinese Patent Application, filed on Jan. 19, 2018, to the Chinese Patent Office, Application No. 201 810 054 007.X, entitled "A Method and Apparatus for Controlling User Use of Resources", the entire contents of which are incorporated by reference. Combined in this application.
技术领域Technical field
本发明实施例涉及但不限于涉及互联网技术领域,尤其涉及一种控制用户使用资源的方法、装置、介质及设备。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.
背景技术Background technique
云存储***提供各种资源,不同的用户访问并使用云存储***提供的各种资源。由于云存储***的处理能力是有限的,如果用户短时间内大量的增加访问量时,有可能极大的消耗云存储***的处理能力,甚至使云存储***发生***崩溃的情况,以至于不能正常提供服务,直接影响其它用户的正常访问。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.
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
本文中的控制用户使用资源的方法,包括:The methods in this article that control user usage of resources include:
为用户设置单位时间内的资源使用量阈值;Set the resource usage threshold per unit time for the user;
监测各节点模块上报的用户使用的资源量;Monitor the amount of resources used by users reported by each node module;
根据所述用户的单位时间内的资源使用量阈值和所述用户在各节点模块使用的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量,将所述可用资源量分配至节点模块;N为正整数。Determining, according to the resource usage threshold of the user in the unit time and the amount of resources used by the user in each node module, the amount of resources available in the unit time of the user in the N unit time after the current time, The amount of available resources is allocated to the node module; N is a positive integer.
上述控制用户使用资源的方法还具有以下特点:The above method of controlling user usage resources also has the following characteristics:
所述为用户设置单位时间内的资源使用量阈值包括:为用户设置单位时间内不同资源类型的资源使用量阈值;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;
所述根据所述用户的单位时间内的资源使用量阈值和所述用户在各节点模块使用的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量包括:根据所述用户的单位时间内的各资源类型的资源使用量阈值和所述用户在各节点模块使用的各资源类型的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内各资源类型的可用资源量。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 above method of controlling user usage resources also has the following characteristics:
将所述可用资源量分配至节点模块之前,所述方法还包括:统计在当前时间之前的预设时段内所述用户在各节点模块上使用资源量的比例;Before the amount of the available resources is allocated to the node module, 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 above method of controlling user usage resources also has the following characteristics:
所述方法还包括:所述节点模块从所述中心模块获取所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量后,检测所述用户在单位时间内的资源使用量,在所述用户在单位时间内的资源使用量大于此单位时间内的可用资源量后,拒绝所述用户的访问。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.
上述控制用户使用资源的方法还具有以下特点:The above method of controlling user usage resources also has the following characteristics:
所述根据所述用户的单位时间内的资源使用量阈值和所述用户在各节点模块使用的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量包括:在每个单位时间内将所述用户的可用资源量增加一所述资源使用量阈值,从节点模块接收到其上报的用户使用的资源量后,从所述用户的可用资源量中减去所述用户使用的资源量,将更新后的所述用户的可用资源量分配为所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量。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;
分配模块,用于根据所述用户的单位时间内的资源使用量阈值和所述用户在各节点模块使用的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量,将所述可用资源量分配至节点模块;N为正整数。And 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 above devices that control user usage resources also have the following characteristics:
所述设置模块,还用于为用户设置单位时间内不同资源类型的资源使用量阈值;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;
所述分配模块,还用于根据所述用户的单位时间内的各资源类型的资源使用量阈值和所述用户在各节点模块使用的各资源类型的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内各资源类型的可用资源量。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 amount of resources available for each resource type per unit time in N unit time.
上述控制用户使用资源的设备还具有以下特点:The above devices that control user usage resources also have the following characteristics:
所述设备还包括统计模块,用于统计在当前时间之前的预设时段内所述用户在各节点模块上使用资源量的比例;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 above devices that control user usage resources also have the following characteristics:
所述设备还包括节点设备,用于从所述中心设备获取所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量,检测所述用户在单位时间内的资源使用量,在所述用户在单位时间内的资源使用量大于此单位时间内的可用资源量后,拒绝所述用户的访问。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.
上述控制用户使用资源的设备还具有以下特点:The above devices that control user usage resources also have the following characteristics:
所述分配模块,用于使用以下方法根据所述用户的单位时间内的资源使用量阈值和所述用户在各节点模块使用的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量:在每个单位时间内将所述用户的可用资源量增加一所述资源使用量阈值,从节点模块接收到其上报的用户使用的资源量后,从所述用户的可用资源量中减去所述用户使用的资源量,将更新后的所述用户的可用资源量分配为所述用户在当前时间后的N个单位时间中每个 单位时间内可用资源量。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.
本发明实施例中中心模块实时监控用户在各节点模块上的资源使用量,动态的调整为各节点模块分配的资源量,使节点模块在用户在此节点模块上的资源使用量超过中心节点设置的使用量时,禁止用户继续使用资源,可以防止用户无限制的消耗***的资源,使***一直处于有剩余资源状态,使***一直能够提供正常服务,防止***资源耗尽和崩溃。In the embodiment of the present invention, 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. When 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.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明实施例的进一步理解,构成本申请的一部分,本发明实施例的示意性实施例及其说明用于解释本发明实施例,并不构成对本发明实施例的不当限定。在附图中:The accompanying drawings are intended to provide a further understanding of the embodiments of the embodiments of the invention Improper limitations. In the drawing:
图1是实施例一中控制用户使用资源的方法的流程图;1 is a flowchart of a method for controlling a user to use a resource in Embodiment 1;
图2是实施例二中控制用户使用资源的方法的流程图。2 is a flow chart of a method for controlling a user to use resources in the second embodiment.
具体实施方式Detailed ways
现结合附图和具体实施方式对本发明实施例进一步说明。The embodiments of the present invention will be further described with reference to the drawings and specific embodiments.
实施例一Embodiment 1
图1是实施例中控制用户使用资源的方法的流程图,此方法包括:FIG. 1 is a flowchart of a method for controlling a user to use a resource in an embodiment, the method includes:
步骤101,为用户设置单位时间内的资源使用量阈值;Step 101: Set a resource usage threshold for the user in a unit time;
步骤102,监测各节点模块上报的用户使用的资源量;Step 102: Monitor the amount of resources used by the user reported by each node module.
步骤103,根据用户的单位时间内的资源使用量阈值和用户在各节点模块使用的资源量确定用户在当前时间后的N个单位时间中每个单位时间内可用资源量,将可用资源量分配至节点模块;N为正整数。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. To the node module; N is a positive integer.
方法还包括步骤104:节点模块从中心模块获取用户在当前时间后的N个单位时间中每个单位时间内可用资源量后,检测用户在单位时间内的资源使用量,在用户在单位时间内的资源使用量大于此单位时间内的可用资源量后,拒绝用户的访问。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.
步骤103中根据用户的单位时间内的资源使用量阈值和用户在各节点模块使用的资源量确定用户在当前时间后的N个单位时间中每个单位时间内可用资源量具体包括:在每个单位时间内将用户的可用资源量增加一资源使用量阈值,从节点模块接收到其上报的用户使用的资源量后,从用户的可用资源量中减去用户使用的资源量,将更新后的用户的可用资源量分配为用户在当前时间后的N个单位时间中每个单位时间内可用资源量。In 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.
步骤103中将可用资源量分配至节点模块之前,此方法还包括:统计在当前时间之前的预设时段内用户在各节点模块上使用资源量的比例;将可用资源量分配至节点模块包括:根据上述比例将可用资源量分配至不同的节点模块。具体的,统计在当前时间之前的预设时段内用户在节点模块上使用资源量的比例较大时,为此节点模块分配可用资源量时将相应的分配较大的比例。此方法中,根据节点模块上资源访问的历史情况确定后续可用资源的分配,使资源分配更加合理。Before the allocation of the available resource amount to the node module in step 103, 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.
实施例二Embodiment 2
实施例二相比实施例一还考虑了对不同资源类型的资源的访问控制。The second embodiment considers the access control of resources of different resource types compared to the first embodiment.
图2是实施例中控制用户使用资源的方法的流程图,此方法包括:2 is a flow chart of a method for controlling a user to use a resource in an embodiment, the method comprising:
步骤201,为用户设置单位时间内不同资源类型的资源使用量阈值;Step 201: Set a resource usage threshold of different resource types in a unit time for the user;
步骤202,监测各节点模块上报的用户使用的不同资源类型的资源量;Step 202: Monitor the amount of resources of different resource types used by the user reported by each node module.
步骤203,根据用户的单位时间内的各资源类型的资源使用量阈值和用户在各节点模块使用的各资源类型的资源量确定用户在当前时间后的N个单位时间中每个单位时间内各资源类型的可用资源量;将可用资源量分配至节点模块,N为正整数。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; the amount of available resources is allocated to the node module, where N is a positive integer.
此方法还包括步骤204:节点模块从中心模块获取用户在当前时间后的N个单位时间中每个单位时间内各资源类型的可用资源量后,检测用户在单位时间内对各资源类型的资源使用量,在用户在单位时间内对至少一资源类型的资源使用量大于此单位时间内的此资源类型的可用资源量后,拒绝用户的对此资源类型的资源的访问。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.
步骤103中根据用户的单位时间内的资源使用量阈值和用户在各节点模块使用的资源量确定用户在当前时间后的N个单位时间中每个单位时间内可用资源量具体包括:在每个单位时间内将用户的各资源类型的可用资源量增加一相应资源类型的资源使用量阈值,从节点模块接收到其上报的用户使用的各资源类型的资源量后,从用户的各资源类型的可用资源量中减去用户使用的相应资源类型的资源量,将更新后的用户的各资源类型的可用资源量分配为用户在当前时间后的N个单位时间中每个单位时间内各资源类型的可用资源量。In 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.
步骤203中将可用资源量分配至节点模块之前,此方法还包括:统计在当前时间之前的预设时段内用户在各节点模块上使用资源量的比例。将可用资源量分配至节点模块包括:根据比例将可用资源量分配至不同的节点模块。此方法中,根据节点模块上资源访问的历史情况确定后续可用资源的分配,使资源分配更加合理。Before the amount of available resources is allocated to the node module in step 203, 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.
实施例三Embodiment 3
对应于实施例一,实施例三中控制用户使用资源的设备,包括中心设备,中心设备包括:Corresponding to the first embodiment, 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;
分配模块,用于根据用户的单位时间内的资源使用量阈值和用户在各节点模块使用的资源量确定用户在当前时间后的N个单位时间中每个单位时间内可用资源量,将可用资源量分配至节点模块;N为正整数。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.
分配模块用于使用以下方法根据用户的单位时间内的资源使用量阈值和用 户在各节点模块使用的资源量确定用户在当前时间后的N个单位时间中每个单位时间内可用资源量:在每个单位时间内将用户的可用资源量增加一资源使用量阈值,从节点模块接收到其上报的用户使用的资源量后,从用户的可用资源量中减去用户使用的资源量,将更新后的用户的可用资源量分配为用户在当前时间后的N个单位时间中每个单位时间内可用资源量。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.
控制用户使用资源的设备还包括节点设备,用于从中心设备获取用户在当前时间后的N个单位时间中每个单位时间内可用资源量,检测用户在单位时间内的资源使用量,在用户在单位时间内的资源使用量大于此单位时间内的可用资源量后,拒绝用户的访问。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.
实施例四Embodiment 4
对应于实施例二,实施例四中控制用户使用资源的设备,包括中心设备,中心设备包括:Corresponding to the second embodiment, 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;
分配模块,用于根据用户的单位时间内的各资源类型的资源使用量阈值和用户在各节点模块使用的各资源类型的资源量确定用户在当前时间后的N个单位时间中每个单位时间内各资源类型的可用资源量,将可用资源量分配至节点模块;N为正整数。And 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.
分配模块用于使用以下方法根据用户的单位时间内的各资源类型的资源使用量阈值和用户在各节点模块使用的各资源类型的资源量确定用户在当前时间后的N个单位时间中每个单位时间内各资源类型的可用资源量:在每个单位时间内将用户的各资源类型的可用资源量增加一相应资源类型的资源使用量阈值,从节点模块接收到其上报的用户使用的各资源类型的资源量后,从用户的各资源类型的可用资源量中减去用户使用的相应资源类型的资源量,将更新后的用户的各资源类型的可用资源量分配为用户在当前时间后的N个单位时间中每个单位时间内各资源类型的可用资源量。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. After the resource type of the resource type, 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 amount of available resources for each resource type per unit time in N unit time.
控制用户使用资源的设备还包括节点设备,用于节点模块从中心模块获取 用户在当前时间后的N个单位时间中每个单位时间内各资源类型的可用资源量后,检测用户在单位时间内对各资源类型的资源使用量,在用户在单位时间内对至少一资源类型的资源使用量大于此单位时间内的此资源类型的可用资源量后,拒绝用户的对此资源类型的资源的访问。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. .
本领域的普通技术人员应当理解,可以对本发明实施例的技术方案进行修改或者等同替换,而不脱离本发明技术方案的精神和范围,均应涵盖在权利要求范围当中。A person skilled in the art should understand that the technical solutions of the embodiments of the present invention may be modified or equivalent, without departing from the spirit and scope of the present invention, and should be included in the scope of the claims.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、***、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。Those of ordinary skill in the art will appreciate that all or some of the steps, systems, and functional blocks/units of the methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical The components work together. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer readable medium, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As is well known to those of ordinary skill in the art, the term 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. Moreover, it is well known to those skilled in the art that 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. .
工业实用性Industrial applicability
本文中中心模块实时监控用户在各节点模块上的资源使用量,动态的调整为各节点模块分配的资源量,使节点模块在用户在此节点模块上的资源使用量超过中心节点设置的使用量时,禁止用户继续使用资源,可以防止用户无限制的消耗***的资源,使***一直处于有剩余资源状态,使***一直能够提供正常服务,防止***资源耗尽和崩溃。In this paper, 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. 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.

Claims (12)

  1. 一种控制用户使用资源的方法,包括:A method of controlling user usage of resources, including:
    为用户设置单位时间内的资源使用量阈值;Set the resource usage threshold per unit time for the user;
    监测各节点模块上报的用户使用的资源量;Monitor the amount of resources used by users reported by each node module;
    根据所述用户的单位时间内的资源使用量阈值和所述用户在各节点模块使用的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量,将所述可用资源量分配至节点模块;N为正整数。Determining, according to the resource usage threshold of the user in the unit time and the amount of resources used by the user in each node module, the amount of resources available in the unit time of the user in the N unit time after the current time, The amount of available resources is allocated to the node module; N is a positive integer.
  2. 如权利要求1所述控制用户使用资源的方法,其中,A method of controlling a user to use a resource as claimed in claim 1, wherein
    所述为用户设置单位时间内的资源使用量阈值包括:为用户设置单位时间内不同资源类型的资源使用量阈值;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;
    所述根据所述用户的单位时间内的资源使用量阈值和所述用户在各节点模块使用的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量包括:根据所述用户的单位时间内的各资源类型的资源使用量阈值和所述用户在各节点模块使用的各资源类型的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内各资源类型的可用资源量。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.
  3. 如权利要求1所述控制用户使用资源的方法,其中,A method of controlling a user to use a resource as claimed in claim 1, wherein
    将所述可用资源量分配至节点模块之前,所述方法还包括:统计在当前时间之前的预设时段内所述用户在各节点模块上使用资源量的比例;Before the amount of the available resources is allocated to the node module, 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.
  4. 如权利要求1所述控制用户使用资源的方法,其中,A method of controlling a user to use a resource as claimed in claim 1, wherein
    所述方法还包括:所述节点模块从所述中心模块获取所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量后,检测所述用户在单位时间内的资源使用量,在所述用户在单位时间内的资源使用量大于此单位时间内的可用资源量后,拒绝所述用户的访问。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.
  5. 如权利要求1所述控制用户使用资源的方法,其中,A method of controlling a user to use a resource as claimed in claim 1, wherein
    所述根据所述用户的单位时间内的资源使用量阈值和所述用户在各节点模块使用的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量包括:在每个单位时间内将所述用户的可用资源量增加一所述资源使用量阈值,从节点模块接收到其上报的用户使用的资源量后,从所述用户的可用资源量中减去所述用户使用的资源量,将更新后的所述用户的可用资源量分配为所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量。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.
  6. 一种控制用户使用资源的设备,包括中心设备,所述中心设备包括:A device for controlling a user to use a resource, including 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;
    分配模块,用于根据所述用户的单位时间内的资源使用量阈值和所述用户在各节点模块使用的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量,将所述可用资源量分配至节点模块;N为正整数。And 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.
  7. 如权利要求6所述控制用户使用资源的设备,其中,A device for controlling a user to use a resource as claimed in claim 6, wherein
    所述设置模块,还用于为用户设置单位时间内不同资源类型的资源使用量阈值;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;
    所述分配模块,还用于根据所述用户的单位时间内的各资源类型的资源使用量阈值和所述用户在各节点模块使用的各资源类型的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内各资源类型的可用资源量。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 amount of resources available for each resource type per unit time in N unit time.
  8. 如权利要求6所述控制用户使用资源的设备,其中,A device for controlling a user to use a resource as claimed in claim 6, wherein
    所述设备还包括统计模块,用于统计在当前时间之前的预设时段内所述用户在各节点模块上使用资源量的比例;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.
  9. 如权利要求6所述控制用户使用资源的设备,其中,A device for controlling a user to use a resource as claimed in claim 6, wherein
    所述设备还包括节点设备,用于从所述中心设备获取所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量,检测所述用户在单位时间内 的资源使用量,在所述用户在单位时间内的资源使用量大于此单位时间内的可用资源量后,拒绝所述用户的访问。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.
  10. 如权利要求6所述控制用户使用资源的设备,其中,A device for controlling a user to use a resource as claimed in claim 6, wherein
    所述分配模块,用于使用以下方法根据所述用户的单位时间内的资源使用量阈值和所述用户在各节点模块使用的资源量确定所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量:在每个单位时间内将所述用户的可用资源量增加一所述资源使用量阈值,从节点模块接收到其上报的用户使用的资源量后,从所述用户的可用资源量中减去所述用户使用的资源量,将更新后的所述用户的可用资源量分配为所述用户在当前时间后的N个单位时间中每个单位时间内可用资源量。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.
  11. 一种计算机可读存储介质,所述存储介质上存储有计算机程序,所述程序被处理器执行时实现权利要求1至5中任意一项所述方法的步骤。A computer readable storage medium having stored thereon a computer program, the program being executed by a processor to perform the steps of the method of any one of claims 1 to 5.
  12. 一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现权利要求1至5中任意一项所述方法的步骤。A computer device comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor executing the program to implement any one of claims 1 to 5 The steps of the method.
PCT/CN2019/071961 2018-01-19 2019-01-16 Method for controlling user usage of resources, device, medium, and equipment WO2019141185A1 (en)

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.X 2018-01-19
CN201810054007.XA CN108390913B (en) 2018-01-19 2018-01-19 A kind of control user uses the method and device of resource

Publications (1)

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

Family

ID=63077326

Family Applications (1)

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

Country Status (3)

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

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108390913B (en) * 2018-01-19 2019-03-12 北京白山耘科技有限公司 A kind of control user uses the method and device of resource
CN116431347B (en) * 2023-04-14 2024-03-26 北京达佳互联信息技术有限公司 Method, device, electronic equipment and storage medium for resource processing

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 (en) * 2013-12-29 2014-04-16 国云科技股份有限公司 Method for limiting resource using limit of cloud computing users
CN103907128A (en) * 2011-06-14 2014-07-02 英派尔科技开发有限公司 Peak-performance-aware billing for cloud computing environment
CN105703927A (en) * 2014-11-25 2016-06-22 华为软件技术有限公司 Resource allocation method, network device and network system
CN108390913A (en) * 2018-01-19 2018-08-10 北京白山耘科技有限公司 A kind of control user uses the method and device of resource

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1612529A (en) * 2003-10-27 2005-05-04 华为技术有限公司 Method for predistributing available resources of users
CN102761572B (en) * 2011-04-28 2016-07-27 腾讯科技(深圳)有限公司 The method and system of dynamic adjusting data flow
CN102546587B (en) * 2011-11-16 2015-08-05 深信服网络科技(深圳)有限公司 Prevent gateway system Session Resources by the method that maliciously exhausts and device
CN105813140A (en) * 2014-12-29 2016-07-27 中兴通讯股份有限公司 Resource allocation regulation and control method and resource allocation regulation and control device
CN106375115B (en) * 2016-08-30 2019-12-03 东软集团股份有限公司 Resource allocation methods and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103907128A (en) * 2011-06-14 2014-07-02 英派尔科技开发有限公司 Peak-performance-aware billing for cloud computing environment
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 (en) * 2013-12-29 2014-04-16 国云科技股份有限公司 Method for limiting resource using limit of cloud computing users
CN105703927A (en) * 2014-11-25 2016-06-22 华为软件技术有限公司 Resource allocation method, network device and network system
CN108390913A (en) * 2018-01-19 2018-08-10 北京白山耘科技有限公司 A kind of control user uses the method and device of resource

Also Published As

Publication number Publication date
CN108390913A (en) 2018-08-10
CN108390913B (en) 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 (en) Token obtaining method, device, server, terminal equipment and medium
US9910695B2 (en) Automatic virtual machine termination in a cloud
WO2017140130A1 (en) Method and device for storage resource allocation for video cloud storage
JP6480642B2 (en) Stochastic bandwidth adjustment
US10700993B2 (en) Controlling message output
WO2019141185A1 (en) Method for controlling user usage of resources, device, medium, and equipment
CN106411558B (en) Method and system for limiting data flow
US9794421B2 (en) Method, system and apparatus for adaptive quota determination for shared resources
CN110505158B (en) Network bandwidth control method and device, electronic equipment and storage medium
US20150358216A1 (en) Dynamic and adaptive quota shares
JP2017538987A5 (en)
WO2019170011A1 (en) Task allocation method and device, and distributed storage system
EP3800843A1 (en) Network optimization method and system, and network device
US20180167326A1 (en) Method and system for limiting data traffic
US9008122B2 (en) Method and apparatus for triggering bandwidth upspeeding within an existing reservation
CN114385370B (en) Memory allocation method, system, device and medium
CN106534231B (en) Method, device and system for controlling use limit of network resources
CN106021026B (en) Backup method and device
CN111143071A (en) Cache partition management method, system and related components based on MCS system
KR20150074531A (en) Apparatus and method for providing bandwidth on demand service
CN103259817B (en) Method for releasing resource and device
CN110968406A (en) Method, device, storage medium and processor for processing task
US9762504B1 (en) System, method, and computer program for managing a shared quota for a plurality of network subscribers in a consumer telecommunications network

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