CN116775267A - Resource quota methods, devices, equipment and storage media - Google Patents

Resource quota methods, devices, equipment and storage media Download PDF

Info

Publication number
CN116775267A
CN116775267A CN202211448668.3A CN202211448668A CN116775267A CN 116775267 A CN116775267 A CN 116775267A CN 202211448668 A CN202211448668 A CN 202211448668A CN 116775267 A CN116775267 A CN 116775267A
Authority
CN
China
Prior art keywords
quota
user terminal
indicator
user
resource
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211448668.3A
Other languages
Chinese (zh)
Inventor
吴忠文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Suzhou Software Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202211448668.3A priority Critical patent/CN116775267A/en
Publication of CN116775267A publication Critical patent/CN116775267A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the disclosure discloses a resource quota method, a device, equipment and a storage medium, wherein the method comprises the following steps: in response to receiving a quota request of a user terminal, determining a quota index matched with user information in the quota request; wherein the quota index comprises at least a quota dimension; under the condition that the identity of the user terminal is legal, a quota mode matched with a quota dimension is adopted, and quota is carried out on the user terminal based on a quota index, so that at least one resource pool corresponding to the user terminal is obtained. The embodiment of the disclosure can be beneficial to realizing differential control on different resource pools and different quota indexes.

Description

资源配额方法、装置、设备及存储介质Resource quota methods, devices, equipment and storage media

技术领域Technical field

本公开涉及但不限于计算机技术领域,尤其涉及一种资源配额方法、装置、设备及存储介质。The present disclosure relates to but is not limited to the field of computer technology, and in particular, to a resource quota method, device, equipment and storage medium.

背景技术Background technique

随着科技水平的不断提升、越来越多产品需要云化,用于实现主机、硬盘、带宽等产品的定制化需求,达到资源合理利用的效果。因此,云计算技术是信息发展和信息社会对资源需求到达一定阶段的必然结果。为保证资源的合理利用,在进行资源订购时,实现资源的配额管控是必不可少的一个环节。As the level of science and technology continues to improve, more and more products need to be cloud-based to meet the customized needs of hosts, hard disks, bandwidth and other products, and to achieve the effect of rational utilization of resources. Therefore, cloud computing technology is the inevitable result of information development and the demand for resources in the information society reaching a certain stage. In order to ensure the rational utilization of resources, when ordering resources, achieving resource quota control is an indispensable link.

发明内容Contents of the invention

有鉴于此,本公开实施例至少提供一种资源配额方法、装置、设备及存储介质。In view of this, embodiments of the present disclosure provide at least a resource quota method, device, equipment and storage medium.

本公开实施例的技术方案是这样实现的:The technical solution of the embodiment of the present disclosure is implemented as follows:

一方面,本公开实施例提供一种资源配额方法,应用于配额中心,包括:响应于接收用户终端的配额请求,确定与所述配额请求中的用户信息所匹配的配额指标;其中,所述配额指标至少包括配额维度;在所述用户终端身份合法的情况下,采用与所述配额维度相匹配的配额方式,基于所述配额指标对所述用户终端进行配额,得到所述用户终端所对应的至少一个资源池。On the one hand, embodiments of the present disclosure provide a resource quota method, applied to a quota center, including: in response to receiving a quota request from a user terminal, determining a quota indicator that matches the user information in the quota request; wherein, The quota indicator at least includes a quota dimension; when the identity of the user terminal is legal, a quota method matching the quota dimension is used to perform quota on the user terminal based on the quota indicator to obtain the corresponding at least one resource pool.

另一方面,本公开实施例提供一种资源配额装置,应用于配额中心,包括:第一确定模块,用于响应于接收用户终端的配额请求,确定与所述配额请求中的用户信息所匹配的配额指标;其中,所述配额指标至少包括配额维度;分配模块,用于在所述用户终端身份合法的情况下,采用与所述配额维度相匹配的配额方式,基于所述配额指标对所述用户终端进行配额,得到所述用户终端所对应的至少一个资源池。On the other hand, embodiments of the present disclosure provide a resource quota device, which is applied to a quota center and includes: a first determination module, configured to respond to receiving a quota request from a user terminal and determine the user information that matches the quota request. The quota indicator; wherein the quota indicator at least includes a quota dimension; the allocation module is used to adopt a quota method that matches the quota dimension when the identity of the user terminal is legal, and assign the quota indicator to the quota indicator based on the quota indicator. The user terminal performs a quota to obtain at least one resource pool corresponding to the user terminal.

再一方面,本公开实施例提供一种计算机设备,包括存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述方法中的部分或全部步骤。In another aspect, an embodiment of the present disclosure provides a computer device, including a memory and a processor. The memory stores a computer program that can be run on the processor. When the processor executes the program, part of the above method is implemented. or all steps.

又一方面,本公开实施例提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述方法中的部分或全部步骤。In another aspect, embodiments of the present disclosure provide a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, some or all of the steps in the above method are implemented.

又一方面,本公开实施例提供一种计算机程序,包括计算机可读代码,当所述计算机可读代码在计算机设备中运行时,所述计算机设备中的处理器执行用于实现上述方法中的部分或全部步骤。In another aspect, an embodiment of the present disclosure provides a computer program, including computer readable code. When the computer readable code is run in a computer device, a processor in the computer device executes the method for implementing the above method. Some or all of the steps.

又一方面,本公开实施例提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序被计算机读取并执行时,实现上述方法中的部分或全部步骤。In another aspect, embodiments of the present disclosure provide a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. When the computer program is read and executed by a computer, the above method is implemented. some or all of the steps.

本公开实施例中,首先,通过响应于接收用户终端的配额请求,确定与配额请求中的用户信息所匹配的配额指标;其中,配额指标至少包括配额维度;这样,可以快速准确地基于配额维度进行资源池的配额。然后,在用户终端身份合法的情况下,采用与配额维度相匹配的配额方式,基于配额指标对用户终端进行配额,得到用户终端所对应的至少一个资源池;这样,通过设置资源池配额维度的配额指标,使得配额指标项在单资源池配额和多资源配额分开控制,实现对不同资源池、不同配额指标的差异化控制,实现针对资源池维度用户的配额分配与管控等。In the embodiment of the present disclosure, first, in response to receiving a quota request from a user terminal, a quota indicator that matches the user information in the quota request is determined; where the quota indicator at least includes a quota dimension; in this way, a quota indicator based on the quota dimension can be quickly and accurately determined Set quotas for resource pools. Then, when the identity of the user terminal is legal, a quota method matching the quota dimension is used to quota the user terminal based on the quota indicator to obtain at least one resource pool corresponding to the user terminal; in this way, by setting the resource pool quota dimension Quota indicators allow quota indicator items to be controlled separately in single resource pool quotas and multi-resource quotas, to achieve differentiated control of different resource pools and different quota indicators, and to achieve quota allocation and management and control for users in the resource pool dimension.

同时,相关技术采用的配额方式中,配额校验、增加、减少等流程都需要通过添加分布式锁、串行化校验实现的,若某一用户进行配额所涉及的部门层级过多,需要与每一部门层级进行校验,导致校验时间长、配额流程中接口的响应速度慢、影响用户体验等;这里,通过去掉部门层级配额的校验,使用针对用户终端的用户层校验替代部门层级配额的校验,可以减少校验的次数,提高配额流程中接口的运行效率等。At the same time, in the quota method used by related technologies, processes such as quota verification, increase, and decrease need to be implemented by adding distributed locks and serial verification. If a user's quota involves too many department levels, it is necessary to Verification with each department level results in long verification time, slow response speed of the interface in the quota process, affecting user experience, etc.; here, by removing the verification of department-level quotas, user-level verification for user terminals is used instead. Verification of department-level quotas can reduce the number of verifications and improve the operating efficiency of interfaces in the quota process.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开的技术方案。It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit the technical solution of the present disclosure.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。The accompanying drawings herein are incorporated into and constitute a part of this specification. They illustrate embodiments consistent with the disclosure and, together with the description, serve to explain the technical solutions of the disclosure.

图1为本公开实施例提供的第一种资源配额方法的实现流程示意图;Figure 1 is a schematic flow chart of the implementation of the first resource quota method provided by an embodiment of the present disclosure;

图2为本公开实施例提供的第二种资源配额方法的实现流程示意图;Figure 2 is a schematic flow chart of the implementation of the second resource quota method provided by an embodiment of the present disclosure;

图3为本公开实施例提供的第三种资源配额方法的实现流程示意图;Figure 3 is a schematic flow chart of the implementation of the third resource quota method provided by an embodiment of the present disclosure;

图4为本公开实施例提供的第四种资源配额方法的实现流程示意图;Figure 4 is a schematic flow chart of the implementation of the fourth resource quota method provided by an embodiment of the present disclosure;

图5为本公开实施例提供的一种配额管理系统的组成结构示意图;Figure 5 is a schematic structural diagram of a quota management system provided by an embodiment of the present disclosure;

图6为本公开实施例提供的一种多资源池配额维度处理方法的实现流程示意图;Figure 6 is a schematic flow chart of the implementation of a multi-resource pool quota dimension processing method provided by an embodiment of the present disclosure;

图7为本公开实施例提供一种配额总量的确定方法的实现流程示意图;Figure 7 is a schematic flowchart of the implementation of a method for determining the total quota provided by an embodiment of the present disclosure;

图8为本公开实施例提供一种管理模块和配额模块的交互示意图;Figure 8 is a schematic diagram of the interaction between a management module and a quota module according to an embodiment of the present disclosure;

图9为本公开实施例提供一种工程的关联示意图;Figure 9 is a related schematic diagram of a project provided by an embodiment of the present disclosure;

图10为本公开实施例提供一种不同维度资源池配额的实现流程示意图;Figure 10 is a schematic flow chart for implementing resource pool quotas in different dimensions according to an embodiment of the present disclosure;

图11为本公开实施例提供一种资源订购的实现流程示意图;Figure 11 is a schematic flow chart of an implementation of resource ordering provided by an embodiment of the present disclosure;

图12为本公开实施例提供一种资源退订的实现流程示意图;Figure 12 is a schematic flow chart of an implementation of resource unsubscription provided by an embodiment of the present disclosure;

图13为本公开实施例提供的一种资源配额装置的组成结构示意图;Figure 13 is a schematic structural diagram of a resource quota device provided by an embodiment of the present disclosure;

图14为本公开实施例提供的一种计算机设备的硬件实体示意图。FIG. 14 is a schematic diagram of a hardware entity of a computer device provided by an embodiment of the present disclosure.

具体实施方式Detailed ways

为了使本公开的目的、技术方案和优点更加清楚,下面结合附图和实施例对本公开的技术方案进一步详细阐述,所描述的实施例不应视为对本公开的限制,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本公开保护的范围。In order to make the purpose, technical solutions and advantages of the present disclosure clearer, the technical solutions of the present disclosure are further elaborated below in conjunction with the accompanying drawings and examples. The described embodiments should not be regarded as limiting the present disclosure. Those of ordinary skill in the art will All other embodiments obtained without creative efforts belong to the scope of protection of this disclosure.

在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。所涉及的术语“第一/第二/第三”仅仅是区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一/第二/第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本公开实施例能够以除了在这里图示或描述的以外的顺序实施。In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or a different subset of all possible embodiments, and Can be combined with each other without conflict. The terms "first/second/third" involved are only used to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first/second/third" can be used interchangeably if permitted. The specific order or sequence may be changed so that the embodiments of the disclosure described herein can be implemented in an order other than that illustrated or described herein.

除非另有定义,本文所使用的所有的技术和科学术语与属于本公开的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本公开的目的,不是旨在限制本公开。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terminology used herein is for the purpose of describing the disclosure only and is not intended to be limiting of the disclosure.

本公开实施例提供一种资源配额方法,该方法可以由配额中心的处理器执行。其中,配额中心可以是指用于对用户终端进行资源配额、配额管理的设备或平台等,如,云端服务器等。例如:用户终端向配额中心发送配额请求,配额中心为用户终端分配相应资源池中的资源。其中,资源可以为存储、网络、内存、计算、输入输出端口(Input/Output,IO)等资源。用户终端指的可以是服务器、笔记本电脑、平板电脑、台式计算机、智能电视、机顶盒、移动设备(例如移动电话、便携式视频播放器、个人数字助理、专用消息设备、便携式游戏设备)等设备。图1为本公开实施例提供的一种资源配额方法的实现流程示意图,如图1所示,该方法包括如下步骤S101至步骤S102:Embodiments of the present disclosure provide a resource quota method, which can be executed by a processor in a quota center. Among them, the quota center may refer to a device or platform used for resource quota and quota management of user terminals, such as a cloud server, etc. For example: the user terminal sends a quota request to the quota center, and the quota center allocates resources in the corresponding resource pool to the user terminal. Among them, resources can be storage, network, memory, computing, input/output port (Input/Output, IO) and other resources. User terminals may refer to devices such as servers, laptops, tablets, desktop computers, smart TVs, set-top boxes, mobile devices (such as mobile phones, portable video players, personal digital assistants, dedicated messaging devices, portable gaming devices). Figure 1 is a schematic flowchart of the implementation of a resource quota method provided by an embodiment of the present disclosure. As shown in Figure 1, the method includes the following steps S101 to S102:

步骤S101,响应于接收用户终端的配额请求,确定与所述配额请求中的用户信息所匹配的配额指标。Step S101: In response to receiving a quota request from a user terminal, determine a quota indicator that matches the user information in the quota request.

这里,配额请求可以是指用于用户终端进行配额的信息,配额请求中可以包括用户终端所对应的用户信息、项目信息和资源需求额度等信息中的一种或多种。用户信息可以包括用户类型、用户身份标识等信息;项目信息可以包括项目名称、项目标识等信息,通常用于指定一个或多个项目;资源需求额度可以包括上述项目所需要使用的云资源的类型和数量,如,中央处理器的核数、内存容量和存储器的容量等。配额指标可以是指配额中心中用于对用户终端进行配额的参考数据,配额指标可以包括用户终端进行资源配额的最大值、最小值、默认总量、资源池等数据。例如:配额指标包括虚拟云主机的虚拟化类型、操作系统类型、预配置规格类型、创建来源方式、系统盘性能等级、用途、中央处理器核数、内存大小、系统盘大小、台数等。Here, the quota request may refer to information for the user terminal to perform quota, and the quota request may include one or more of user information, project information, resource demand quota, and other information corresponding to the user terminal. User information can include user type, user identity and other information; project information can include project name, project identification and other information, which is usually used to specify one or more projects; resource demand quota can include the type of cloud resources required for the above projects. And quantity, such as the number of cores of the central processor, memory capacity and storage capacity, etc. The quota indicator may refer to the reference data used in the quota center to implement quotas for user terminals. The quota indicators may include data such as the maximum value, minimum value, default total amount, resource pool, etc. of user terminal resource quotas. For example, quota indicators include virtual cloud host virtualization type, operating system type, preconfigured specification type, creation source method, system disk performance level, purpose, number of central processor cores, memory size, system disk size, number of units, etc.

可以预先设置用户信息与配额指标之间的对应关系,如,用户信息表征用户终端所属的用户的用户类型为第一类型,则对应第一配额指标;用户信息表征用户终端所属的用户的用户类型为第二类型,则对应第二配额指标等;其中,第一配额指标与第二配额指标的数值不等。The corresponding relationship between the user information and the quota indicator can be set in advance. For example, if the user information represents the user type of the user to which the user terminal belongs, it corresponds to the first quota indicator; the user information represents the user type of the user to which the user terminal belongs. If it is the second type, it corresponds to the second quota indicator, etc.; where the first quota indicator and the second quota indicator have different values.

配额指标至少可以包括配额维度,配额维度可以是用于在对用户终端进行配额的资源池的数量,如,配额维度为1,则表征用户终端可以调用一个资源池的资源;配额维度为2,则表征用户终端可以调用2个资源池的资源等。资源池是指云计算中所涉及到的各种硬件和软件的集合,按其类型可分为计算资源、存储资源和网络资源等不同类型的资源;云计算可以依靠虚拟化技术将多个服务器虚化为一个资源池,由于资源的多样化和复杂化,从而需要对资源进行分配(也即针对用户终端的资源配额),云计算的资源分配是指在一个共同的云环境中用户终端可以根据一定的使用规则来调度资源的过程。The quota indicator may at least include a quota dimension. The quota dimension may be the number of resource pools used to quota the user terminal. For example, if the quota dimension is 1, it means that the user terminal can call resources of a resource pool; if the quota dimension is 2, This means that the user terminal can call resources from two resource pools, etc. Resource pool refers to a collection of various hardware and software involved in cloud computing. According to its type, it can be divided into different types of resources such as computing resources, storage resources and network resources; cloud computing can rely on virtualization technology to combine multiple servers Virtualized into a resource pool, due to the diversification and complexity of resources, resources need to be allocated (that is, resource quotas for user terminals). Cloud computing resource allocation means that in a common cloud environment, user terminals can The process of scheduling resources according to certain usage rules.

在步骤S101的实施过程中,可以包括:通过预设的通信协议接收用户终端上报的配额请求;对配额请求进行预设字段的读取,得到配额请求所携带的用户信息;基于预设的配额指标与用户信息之间的对应关系,确定与用户信息匹配的配额指标。During the implementation of step S101, it may include: receiving the quota request reported by the user terminal through a preset communication protocol; reading the preset fields of the quota request to obtain the user information carried by the quota request; based on the preset quota The correspondence between indicators and user information determines the quota indicators that match the user information.

步骤S102,在所述用户终端身份合法的情况下,采用与所述配额维度相匹配的配额方式,基于所述配额指标对所述用户终端进行配额,得到所述用户终端所对应的至少一个资源池。Step S102: When the identity of the user terminal is legal, use a quota method that matches the quota dimension to perform quota on the user terminal based on the quota indicator to obtain at least one resource corresponding to the user terminal. Pool.

这里,在对用户终端进行配额之间,可以先对用户终端进行验证,如,基于用户信息,采用预设的验证方式对用户信息进行验证,得到验证结果;其中,验证结果包括验证成功和验证失败,验证成功可以表征用户终端身份合法,验证失败可以表征用户终端身份不合法等;或者,还可以将用户信息和配额中心的身份标识等信息发送至第三方验证平台进行验证,得到验证结果。相关技术的配额过程中所涉及的部门层级过多,配额校验、增加、减少等处理都是通过加分布式锁、串行化校验实现的,若某一用户部门层级过多,则校验时间长、验证接口响应速度慢,影响用户体验等。而本公开实施例中,通过去掉部门级配额的校验,使用针对用户终端的用户层校验替代部门层级配额的校验,可以减少校验所涉及的部门层级数量,提高验证接口的性能等。Here, before applying the quota to the user terminal, the user terminal can be verified first. For example, based on the user information, the user information is verified using a preset verification method to obtain the verification result; where the verification result includes verification success and verification Failure, successful verification can indicate that the identity of the user terminal is legitimate, failure in verification can indicate that the identity of the user terminal is illegal, etc.; alternatively, information such as user information and the identity of the quota center can also be sent to a third-party verification platform for verification, and the verification results can be obtained. There are too many department levels involved in the quota process of related technologies. Quota verification, increase, decrease, etc. are all implemented by adding distributed locks and serialization verification. If there are too many department levels for a certain user, the verification The verification time is long and the response speed of the verification interface is slow, which affects the user experience. In the embodiment of the present disclosure, by removing the verification of department-level quotas and using user-level verification for user terminals instead of verification of department-level quotas, the number of department levels involved in verification can be reduced, and the performance of the verification interface can be improved. .

配额方式可以是指对用户终端进行配额的逻辑或流程,不同的配额维度对应不同的配额方式,如,对应于单配额维度的单个资源池的配额方式,对应于多配额维度的多个资源池的配额方式等,以使得得到的用户终端的至少一个资源池中可使用资源量满足配额指标。例如:确定第一用户终端所对应的配额维度为3,那么获取预设的所有资源池中每一资源池当前的可使用资源量,从所有资源池中确定3个资源池作为第一用户终端进行配额得到的资源池,其中,第一用户终端的3个资源池中的可使用资源量的总和满足配额指标。The quota method may refer to the logic or process of imposing quotas on user terminals. Different quota dimensions correspond to different quota methods. For example, the quota method corresponds to a single resource pool with a single quota dimension, and corresponds to multiple resource pools with multiple quota dimensions. Quota method, etc., so that the obtained amount of usable resources in at least one resource pool of the user terminal meets the quota indicator. For example: determine that the quota dimension corresponding to the first user terminal is 3, then obtain the current usable resource amount of each resource pool in all preset resource pools, and determine 3 resource pools from all resource pools as the first user terminal The resource pool obtained by performing quotas, in which the sum of the usable resources in the three resource pools of the first user terminal meets the quota indicator.

本公开实施例中,首先,通过响应于接收用户终端的配额请求,确定与配额请求中的用户信息所匹配的配额指标;其中,配额指标至少包括配额维度;这样,可以快速准确地基于配额维度进行资源池的配额。然后,在用户终端身份合法的情况下,采用与配额维度相匹配的配额方式,基于配额指标对用户终端进行配额,得到用户终端所对应的至少一个资源池;这样,通过设置资源池配额维度的配额指标,使得配额指标项在单资源池配额和多资源配额分开控制,实现对不同资源池、不同配额指标的差异化控制,实现针对资源池维度用户的配额分配与管控等。In the embodiment of the present disclosure, first, in response to receiving a quota request from a user terminal, a quota indicator that matches the user information in the quota request is determined; where the quota indicator at least includes a quota dimension; in this way, a quota indicator based on the quota dimension can be quickly and accurately determined Set quotas for resource pools. Then, when the identity of the user terminal is legal, a quota method matching the quota dimension is used to quota the user terminal based on the quota indicator to obtain at least one resource pool corresponding to the user terminal; in this way, by setting the resource pool quota dimension Quota indicators allow quota indicator items to be controlled separately in single resource pool quotas and multi-resource quotas, to achieve differentiated control of different resource pools and different quota indicators, and to achieve quota allocation and management and control for users in the resource pool dimension.

同时,相关技术采用的配额方式中,配额校验、增加、减少等流程都需要通过添加分布式锁、串行化校验实现的,若某一用户进行配额所涉及的部门层级过多,需要与每一部门层级进行校验,导致校验时间长、配额流程中接口的响应速度慢、影响用户体验等;这里,通过去掉部门层级配额的校验,使用针对用户终端的用户层校验替代部门层级配额的校验,可以减少校验的次数,提高配额流程中接口的运行效率等。At the same time, in the quota method used by related technologies, processes such as quota verification, increase, and decrease need to be implemented by adding distributed locks and serial verification. If a user's quota involves too many department levels, it is necessary to Verification with each department level results in long verification time, slow response speed of the interface in the quota process, affecting user experience, etc.; here, by removing the verification of department-level quotas, user-level verification for user terminals is used instead. Verification of department-level quotas can reduce the number of verifications and improve the operating efficiency of interfaces in the quota process.

在一些实施例中,在实施步骤S102之后,该方法还可以包括如下步骤S111至步骤S112:In some embodiments, after implementing step S102, the method may further include the following steps S111 to S112:

步骤S111,在所述用户终端的资源池的剩余使用量满足预设条件的情况下,对所述剩余使用量进行配额冻结处理,得到预占用配额量和预占流水号。Step S111: When the remaining usage of the resource pool of the user terminal meets the preset conditions, a quota freezing process is performed on the remaining usage to obtain a pre-occupied quota amount and a pre-occupied serial number.

这里,相关技术的配额下单流程中,用户通过用户终端向配额中心进行资源下单时,配额中心没有进行后台配额的冻结,当同一用户多次购买配额时,可能出现用户下单成功,但配额开通失败的情况,增加用户投诉的次数。Here, in the quota ordering process of related technologies, when the user places an order for resources to the quota center through the user terminal, the quota center does not freeze the background quota. When the same user purchases quota multiple times, the user may place an order successfully, but Failure to activate quota will increase the number of user complaints.

而本公开实施例中引入冻结配额流程,用于降低出现用户下单成功,但配额开通失败的情况。首先,用户可以通过用户终端上的订购页面发起配额校验,配额校验用于验证用户终端已关联的资源池中的剩余配额量是否满足新增的配额指标;若验证结果为验证成功,则用户可以通过订购页面发起产品订购流程,产品侧会预先发起冻结配额操作;若验证失败,则结束产品订购流程等;其中,产品侧可以是指移动云上的各个产品模块,如,主机、硬盘、网际互连协议(Internet Protocol,IP)等,产品侧也可以称为配额的业务调用方等,可以理解为产品侧携带有资源;In the embodiment of the present disclosure, a quota freezing process is introduced to reduce the situation where the user successfully places an order but fails to activate the quota. First, the user can initiate quota verification through the order page on the user terminal. The quota verification is used to verify whether the remaining quota in the resource pool associated with the user terminal meets the new quota indicator; if the verification result is successful, then Users can initiate the product ordering process through the ordering page, and the product side will initiate a quota freezing operation in advance; if the verification fails, the product ordering process will end, etc.; where the product side can refer to each product module on the mobile cloud, such as the host, hard disk , Internet Protocol (IP), etc. The product side can also be called a quota business caller, etc. It can be understood that the product side carries resources;

然后,产品订购流程可以包括从资源池中预占满足新增的配额指标的资源量,得到冻结配额量(也即预占用配额),在预占成功后,配额中心生成一个预占流水号,并将该预占流水号反馈至产品侧;产品侧响应于接收预占流水号执行预设的内部业务逻辑,用于创建订单;在订单创建成功后,若用户需要使用该冻结配额量,可以利用该冻结配额量所对应的预占流水号发起冻结配额量的配额解冻操作,将冻结配额量转化为已使用配额量等。Then, the product ordering process can include pre-empting the amount of resources that meet the newly added quota indicators from the resource pool to obtain the frozen quota amount (that is, the pre-occupied quota). After the pre-occupation is successful, the quota center generates a pre-occupied serial number. And the reserved serial number is fed back to the product side; the product side executes the preset internal business logic in response to receiving the reserved serial number, which is used to create an order; after the order is successfully created, if the user needs to use the frozen quota, he or she can Use the reservation serial number corresponding to the frozen quota amount to initiate the quota unfreezing operation of the frozen quota amount, convert the frozen quota amount into used quota amount, etc.

步骤S112,在预设的产品订购成功的情况下,基于所述预占流水号对所述预占用配额量进行配额解冻处理,得到已使用配额量。Step S112: If the preset product order is successful, a quota unfreezing process is performed on the pre-occupied quota amount based on the pre-occupied serial number to obtain the used quota amount.

这里,在用户终端接收到产品侧反馈的预占流水号的情况下,确定产品订购成功;若用户终端需要调用资源执行业务,用户终端可以将预占流水号发送至产品侧,用于回调产品侧;产品侧将该预占流水号传递至配额中心,以使得配额中心更新预占用配额量为已使用配额量等,实现预占用配额的配额解冻处理。Here, when the user terminal receives the reservation serial number fed back by the product side, it is determined that the product order is successful; if the user terminal needs to call resources to perform services, the user terminal can send the reservation serial number to the product side for callback of the product. side; the product side passes the pre-occupied serial number to the quota center, so that the quota center updates the pre-occupied quota amount to the used quota amount, etc., to implement the quota unfreezing process of the pre-occupied quota.

已使用配额量可以用于在产品退订成功后对用户终端的资源池的剩余使用量进行更新,如,用户通过用户终端上的退订页面向产品侧发起退订流程,以使得产品侧控制配额中心用户终端的资源池当前的剩余使用量减去已使用配额量,得到用户终端更新后的剩余使用量。The used quota can be used to update the remaining usage of the resource pool of the user terminal after the product unsubscribes successfully. For example, the user initiates the unsubscribe process to the product side through the unsubscribe page on the user terminal, so that the product side controls The current remaining usage of the resource pool of the user terminal in the quota center is subtracted from the used quota to obtain the updated remaining usage of the user terminal.

本公开实施例中,在用户多次订购资源的情况下,通过对资源池中的资源进行配额冻结和配额解冻处理,准确地记录用户终端调用资源的资源量,有助于减少出现用户下单成功,但配额开通失败的情况。In the embodiment of the present disclosure, when a user orders resources multiple times, quota freezing and quota unfreezing are performed on the resources in the resource pool to accurately record the amount of resources called by the user terminal, which helps to reduce the occurrence of user orders. Success, but quota activation fails.

本公开实施例提供一种资源配额方法,所述配额指标至少包括配额总量。Embodiments of the present disclosure provide a resource quota method, where the quota indicator at least includes a total quota amount.

如图2所示,该方法包括如下步骤S201至步骤S203:As shown in Figure 2, the method includes the following steps S201 to S203:

步骤S201对应于前述步骤S101,在实施时可以参照前述步骤S101的具体实施方式。Step S201 corresponds to the aforementioned step S101, and during implementation, reference may be made to the specific implementation of the aforementioned step S101.

步骤S202,在所述配额维度为单个维度的情况下,从至少两个候选资源池中,获取满足所述配额总量的所述用户终端的一个所述资源池。Step S202: If the quota dimension is a single dimension, obtain one resource pool of the user terminal that satisfies the total quota from at least two candidate resource pools.

这里,配额总量可以是指用户终端需要使用的资源总量。以预设的移动云配额管理系统架构是一个中心节点(也可以称中心节点网关)、多个属地资源池节点(也可以称为属地资源池)为例进行说明,中心节点负责配额指标等数据的维护,提供相应配额数据的查询、修改等功能,多个属地资源池节点可以提供配额管控功能,供业务调用方使用等。针对配额请求所对应的配额指标,设置携带有针对资源池数量的配额维度的配额指标,使得配额指标在单资源池和多资源配额分开控制,这样有助于实现对不同资源池、不同配额指标的差异化控制,以及实现针对资源池维度用户的配额分配与管控等。Here, the total amount of quota may refer to the total amount of resources that the user terminal needs to use. Take the default mobile cloud quota management system architecture as an example of a central node (also called a central node gateway) and multiple territorial resource pool nodes (also called territorial resource pools). The central node is responsible for data such as quota indicators. maintenance, providing functions such as querying and modifying corresponding quota data. Multiple local resource pool nodes can provide quota management and control functions for use by business callers. For the quota indicator corresponding to the quota request, set the quota indicator that carries the quota dimension for the number of resource pools, so that the quota indicators are controlled separately in single resource pools and multi-resource quotas, which helps to achieve different resource pools and different quota indicators. Differentiated control, as well as quota allocation and control for users in the resource pool dimension, etc.

例如:在确定用户终端身份合法的情况下,可以从配额中心所关联的所有属地资源池中确定每一属地资源池资源的剩余使用量,确定剩余使用量满足用户终端的配置总量的属地资源池,从剩余使用量满足用户终端的配置总量的属地资源池中随机获取任一属地资源池分配给用户终端;其中,单资源池维度配额(也即配额维度为单个维度时的配额)可以理解为控制该用户终端在单个资源池内资源的使用,各资源池之间的资源是相互独立,资源的使用也是在本资源池内有效,其他资源池不受该资源池的影响。For example: when it is determined that the identity of the user terminal is legal, the remaining usage of each territorial resource pool can be determined from all territorial resource pools associated with the quota center, and the territorial resources whose remaining usage meets the total configured amount of the user terminal can be determined Pool, randomly obtain any local resource pool from the local resource pool whose remaining usage meets the total configured amount of the user terminal and assign it to the user terminal; among them, the single resource pool dimension quota (that is, the quota when the quota dimension is a single dimension) can It is understood that it controls the use of resources by the user terminal in a single resource pool. The resources between each resource pool are independent of each other. The use of resources is also valid within this resource pool, and other resource pools are not affected by this resource pool.

步骤S203,在所述配额维度为至少两个维度的情况下,从所述至少两个候选资源池中,获取满足所述配额总量的所述用户终端的至少两个所述资源池。Step S203: If the quota dimension is at least two dimensions, obtain at least two resource pools of the user terminal that meet the total quota from the at least two candidate resource pools.

这里,以在确定用户终端身份合法的情况下,且配额维度为2个维度为例进行说明,可以从配额中心所关联的所有属地资源池中确定每一属地资源池资源的剩余使用量,确定剩余使用量之和满足用户终端的配置总量的2个属地资源池,将获取的2个属地资源池分配给用户终端,用户终端的2资源池的资源是共享的;其中,多资源池维度配额(也即配额维度为多个维度时的配额)可以理解为配额指标量是跨资源池共享的,限制同一个用户终端在多个资源池中订购该资源的总量,各资源池中配额使用量是相互关联的,不是彼此独立,有助于实现多资源池配额分配的联动控制。Here, taking the case where the user terminal identity is determined to be legal and the quota dimension is 2 dimensions as an example, the remaining usage of each territorial resource pool can be determined from all territorial resource pools associated with the quota center. If the sum of the remaining usage meets the total configuration of the user terminal, the two local resource pools will be allocated to the user terminal. The resources of the two resource pools of the user terminal are shared; among them, the multi-resource pool dimension Quotas (that is, quotas when the quota dimension is multiple dimensions) can be understood as the quota indicator amount is shared across resource pools. It limits the total amount of the resource that the same user terminal can order in multiple resource pools. The quota in each resource pool Usage is related to each other, not independent of each other, which helps to achieve linkage control of quota allocation for multiple resource pools.

本公开实施例中,通过配额维度可以准确地对用户终端进行单资源池维度配额或多资源池维度配额,有助于实现对不同资源池、不同配额指标的差异化控制,以及实现针对资源池维度用户的配额分配与管控等。In the embodiments of the present disclosure, the quota dimension can be used to accurately implement single resource pool dimension quotas or multi-resource pool dimension quotas for user terminals, which helps to achieve differentiated control of different resource pools and different quota indicators, and to achieve targeted resource pools. Quota allocation and control of dimension users, etc.

本公开实施例提供一种资源配额方法,如图3所示,该方法包括如下步骤S301至步骤S305:An embodiment of the present disclosure provides a resource quota method, as shown in Figure 3. The method includes the following steps S301 to S305:

步骤S305对应于前述步骤S102,在实施时可以参照前述步骤S102的具体实施方式。Step S305 corresponds to the aforementioned step S102, and during implementation, reference may be made to the specific implementation of the aforementioned step S102.

步骤S301,响应于接收所述用户终端的配额请求,确定所述用户信息所匹配的用户类型。Step S301: In response to receiving a quota request from the user terminal, determine the user type matched by the user information.

这里,可以对用户信息矩阵解析,得到类型标识;基于预设的类型标识与用户类型之间的对应关系,确定与类型标识匹配的用户类型,如,第一类型标识对应第一用户类型,第二类型标识对应第二用户类型;其中,第一用户类型可以为普通用户,第二用户类型可以为会员用户等。Here, the user information matrix can be parsed to obtain the type identification; based on the preset correspondence between the type identification and the user type, the user type matching the type identification is determined. For example, the first type identification corresponds to the first user type, and the first type identification corresponds to the first user type. The second type of identification corresponds to the second user type; wherein, the first user type may be an ordinary user, and the second user type may be a member user, etc.

步骤S302,确定与所述用户类型匹配的候选配额集合。Step S302: Determine a candidate quota set matching the user type.

这里,可以预先设置不同用户类型与不同候选配额集合之间的对应关系,如,第一用户类型对应第一候选配额集合,第二用户类型对应第二候选配额集合。候选配额集合中可以包括至少两个候选配额值,候选配额值用于表征配额指标,如,可以将第一候选配额值确定为当前用户终端的配额总量,也可以将第二候选配额值确定为当前用户终端的配额总量等。Here, the corresponding relationship between different user types and different candidate quota sets can be set in advance. For example, the first user type corresponds to the first candidate quota set, and the second user type corresponds to the second candidate quota set. The candidate quota set may include at least two candidate quota values, and the candidate quota values are used to represent quota indicators. For example, the first candidate quota value may be determined as the total quota of the current user terminal, and the second candidate quota value may also be determined as It is the total quota of the current user terminal, etc.

步骤S303,按照预设的读取等级,从所述候选配额集合中获取与所述读取等级匹配的候选配额值。Step S303: According to the preset reading level, obtain the candidate quota value that matches the reading level from the candidate quota set.

这里,读取等级可以是指从候选配额集合中获取候选配额值的优先级,如,候选配额集合中包括3个候选配额值,每一候选配额值对应不同的读取等级,第一候选配额值的读取等级最高,第二候选配额值的读取等级居中,第三候选配额值的读取等级最低,那么首先可以将第一候选配额值确定为当前用户终端的配额总量。配额中心可以接收用户的控制指令,对读取等级进行调整,如,接收用户的控制指令,将第一优先级调整至第二优先级,那么可以将第二候选配额值确定为当前用户终端的配额总量等。在一些实施例中,还可以确定配额中心所关联的所有资源池资源的剩余使用量,基于预设的剩余使用量范围与读取等级之间的对应关系,确定当前的剩余使用量所对应的当前读取等级,继而基于当前读取等级,确定对应的候选配额值。Here, the read level may refer to the priority of obtaining candidate quota values from the candidate quota set. For example, the candidate quota set includes 3 candidate quota values, and each candidate quota value corresponds to a different read level. The first candidate quota If the reading level of the value is the highest, the reading level of the second candidate quota value is in the middle, and the reading level of the third candidate quota value is the lowest, then the first candidate quota value can first be determined as the total quota of the current user terminal. The quota center can receive the user's control instruction and adjust the reading level. For example, if it receives the user's control instruction and adjusts the first priority to the second priority, then the second candidate quota value can be determined as the current user terminal's Total quota, etc. In some embodiments, the remaining usage of all resource pool resources associated with the quota center can also be determined, and based on the correspondence between the preset remaining usage range and the read level, determine the current remaining usage corresponding to The current read level, and then based on the current read level, the corresponding candidate quota value is determined.

步骤S304,将与所述读取等级匹配的候选配额值确定为所述用户终端的配额总量。Step S304: Determine the candidate quota value matching the reading level as the total quota of the user terminal.

这里,当前的读取等级为第一优先级,那么可将第一候选配额值确定为当前用户终端的配额总量。在一些实施例中,对候选配额值(也可以称为配额默认值)进行读取时,可以设置三个级别:用户级配额限制、用户组配额限制、产品的默认配额限制,优先级可以依次降低,以此实现对用户资源订购的差异化控制,不同用户组的用户享受的配额值可以不同。用户在读取配额指标的配额总量大小时,优先读取用户级配额限制,其次读取用户组配额限制,最后读取产品的默认配额限制,若读到其中之一,则以该限制对应的候选配额值作为用户终端的配额总量。Here, if the current reading level is the first priority level, then the first candidate quota value can be determined as the total quota of the current user terminal. In some embodiments, when reading candidate quota values (which can also be called quota default values), three levels can be set: user-level quota limits, user group quota limits, and product default quota limits. The priorities can be in sequence. Reduce, in order to achieve differentiated control over user resource subscriptions. Users in different user groups can enjoy different quota values. When the user reads the total quota size of the quota indicator, the user-level quota limit is read first, the user group quota limit is read next, and the product's default quota limit is read last. If one of them is read, the corresponding limit is used. The candidate quota value is used as the total quota of the user terminal.

本公开实施例中,通过预设的读取等级获取配额总量,可以实现对资源订购的差异化控制,以及实现不同用户组的用户享受不同的配额值等。In this disclosed embodiment, by obtaining the total quota amount through a preset reading level, differentiated control over resource ordering can be achieved, and users of different user groups can enjoy different quota values, etc.

在一些实施例中,上述步骤S102可以包括如下步骤S311至步骤S313:In some embodiments, the above step S102 may include the following steps S311 to S313:

步骤S311,响应于接收所述用户终端的配额请求,获取校验信息。Step S311: In response to receiving the quota request from the user terminal, obtain verification information.

这里,校验信息可以包括资源池所对应的标识是不是为空、配额操作的配额总量是否大于零、配额指标所对应的名称是不是存在、用户信息是否存在等信息中的一种或多种。例如:配额中心读取资源池所对应的标识,确定该标识不为空等。Here, the verification information may include one or more of information such as whether the identifier corresponding to the resource pool is empty, whether the total quota amount of the quota operation is greater than zero, whether the name corresponding to the quota indicator exists, whether the user information exists, etc. kind. For example: the quota center reads the identifier corresponding to the resource pool and determines that the identifier is not empty, etc.

步骤S312,利用预设的查询接口,对所述校验信息进行校验,得到校验结果。Step S312: Use a preset query interface to verify the verification information and obtain a verification result.

这里,查询接口可以是指用于对校验信息进行验证的接口,如,查询接口(Quota)。可以将获取的校验信息输入至查询接口,得到校验结果;校验结果包括校验成功和校验失败等,查询接口内存在预设的校验方式,在满足预设校验条件的情况下,校验结果为校验成功;在不满足预设校验条件的情况下,校验结果为校验失败等。例如:校验信息为资源池所对应的标识为空,配额指标所对应的名称存在,则校验失败;校验信息为资源池所对应的标识不为空,配额指标所对应的名称存在,则校验成功。Here, the query interface may refer to an interface used to verify verification information, such as a query interface (Quota). The obtained verification information can be input into the query interface to obtain the verification results; the verification results include verification success and verification failure, etc. There are preset verification methods in the query interface. When the preset verification conditions are met, , the verification result is verification success; if the preset verification conditions are not met, the verification result is verification failure, etc. For example: if the verification information is that the identifier corresponding to the resource pool is empty and the name corresponding to the quota indicator exists, then the verification fails; if the verification information is that the identifier corresponding to the resource pool is not empty and the name corresponding to the quota indicator exists, The verification is successful.

步骤S313,在所述校验结果表征校验成功的情况下,确定与所述配额请求中的用户信息所匹配的配额指标。Step S313: If the verification result indicates that the verification is successful, determine the quota indicator that matches the user information in the quota request.

这里,可以将对用户终端进行配额的过程称为配额工程(Op-console-quota),移动云配额工程目前的使用场景可以是在配额中心作资源的配额管控。在实现配额工程后,配额工程可以为存储工程、网络工程、秘钥管理工程、共享流量包工程等其他工程提供资源额度的管理,如,配额工程为其他工程提供用户或资源配额的校验、增加、减少、查询等功能。存储工程(Op-console-openstack-volume)可以提供对象存储等产品相关接口,网络工程(Op-console-openstack-network)提供网络产品如防火墙、安全组、实例(Havip)等产品相关接口,秘钥管理工程(Op-console-openstack-barbican)可以为各工程储存密钥,共享流量包工程(Op-console-shared-network-traffic-packet)可以提供流量包产品订购退订等功能接口等。Here, the process of assigning quotas to user terminals can be called quota engineering (Op-console-quota). The current usage scenario of the mobile cloud quota engineering can be quota management and control of resources in the quota center. After the quota project is implemented, the quota project can provide resource quota management for other projects such as storage projects, network projects, key management projects, shared traffic package projects, etc. For example, the quota project provides user or resource quota verification for other projects. Add, reduce, query and other functions. Storage engineering (Op-console-openstack-volume) can provide product-related interfaces such as object storage, and network engineering (Op-console-openstack-network) can provide product-related interfaces such as firewalls, security groups, instances (Havip), etc. The key management project (Op-console-openstack-barbican) can store keys for each project, and the shared traffic package project (Op-console-shared-network-traffic-packet) can provide functional interfaces such as traffic package product ordering and unsubscription.

本公开实施例中,配额中心通过利用预设的查询接口,对校验信息进行校验,得到校验结果;在校验结果表征校验成功的情况下,可准确快速地确定与配额请求中的用户信息所匹配的配额指标,以及利用已实现的配额工程为预设的其他工程提供资源额度的管理,有助于提高各工程之间的交互效率等。In this disclosed embodiment, the quota center verifies the verification information by using a preset query interface to obtain the verification result; when the verification result indicates that the verification is successful, it can accurately and quickly determine the content of the quota request. The quota indicators matched by the user information, and the use of realized quota projects to provide resource quota management for other preset projects can help improve the efficiency of interaction between projects.

本公开实施例提供一种资源配额方法,所述配额中心包括管理模块。如图4所示,该方法包括如下步骤S401至步骤S404:Embodiments of the present disclosure provide a resource quota method, where the quota center includes a management module. As shown in Figure 4, the method includes the following steps S401 to S404:

步骤S401至步骤S402分别对应于前述步骤S101至步骤S102,在实施时可以参照前述步骤S101至步骤S102的具体实施方式。Steps S401 to S402 respectively correspond to the aforementioned steps S101 to S102. During implementation, reference may be made to the specific implementation of the aforementioned steps S101 to S102.

步骤S403,将所述配额指标、所述配额指标与所述用户终端的资源池之间的对应关系存储至所述管理模块。Step S403: Store the quota indicator, the corresponding relationship between the quota indicator and the resource pool of the user terminal in the management module.

这里,管理模块可以是指只部署在移动云配额管理系统架构中的中心节点上的模块,用于对配额指标等数据进行录入、修改、查询等维护处理。为了方便配额指标等数据(如配额总量、最大值、最小值、报警阈值等)方便维护管理,可以将各属地资源池的配额指标等数据统一迁移至中心节点的管理模块进行维护,使其同配额中心的其他模型的数据(如已使用配额量等)进行隔离。管理模块也可以称为配额管理端,运维人员可以登录运维管理平台,通过运维管理平台,运维人员可以查看、新增、修改配额指标等数据(如配额总量、最大值、最小值、报警阈值等)。运维管理平台可以是指提供给运维人员使用的,可以对用户发起的提升配额操作进行审批,修改用户配额指标等数据,查询用户配额使用详情等功能的设备。Here, the management module may refer to a module that is only deployed on the central node in the mobile cloud quota management system architecture and is used to enter, modify, query and other maintenance processing of data such as quota indicators. In order to facilitate the maintenance and management of data such as quota indicators (such as total quota, maximum value, minimum value, alarm threshold, etc.), the quota indicators and other data of each local resource pool can be uniformly migrated to the management module of the central node for maintenance, so that Isolate the data of other models (such as used quota amount, etc.) from the quota center. The management module can also be called the quota management terminal. Operation and maintenance personnel can log in to the operation and maintenance management platform. Through the operation and maintenance management platform, operation and maintenance personnel can view, add, and modify data such as quota indicators (such as total quota, maximum value, minimum value, alarm threshold, etc.). The operation and maintenance management platform can refer to a device provided for operation and maintenance personnel to approve user-initiated quota increase operations, modify data such as user quota indicators, and query user quota usage details.

步骤S404,响应于针对所述管理模型的操作,所述配额中心的管理模块采用与所述操作匹配的处理方式对所述配额指标进行处理,得到处理后的配额指标。Step S404: In response to the operation on the management model, the management module of the quota center processes the quota indicator using a processing method matching the operation to obtain a processed quota indicator.

这里,操作可以包括以下至少之一:查看、新增、修改。例如:响应于运维人员针对配额指标中的配额总量的修改操作,得到修改后的配额总量;管理模块可以基于修改后的配额总量再次对用户终端进行配额,得到更新后的用户终端的资源池等。Here, the operation may include at least one of the following: view, add, modify. For example: in response to the operation and maintenance personnel's modification operation on the total quota amount in the quota indicator, the modified total quota amount is obtained; the management module can again quota the user terminal based on the modified total quota amount, and obtain the updated user terminal resource pool, etc.

本公开实施例中,通过将配额指标、配额指标与用户终端的资源池之间的对应关系存储至管理模块,有助于实现配额指标同配额中心的其他模型的数据之间的隔离;同时,基于管理模块可以准确快速地地对配额指标等数据进行查看、新增、修改等处理。In this disclosed embodiment, by storing the quota index, the correspondence between the quota index and the resource pool of the user terminal in the management module, it is helpful to realize the isolation between the quota index and the data of other models in the quota center; at the same time, based on The management module can accurately and quickly view, add, and modify data such as quota indicators.

在一些实施例中,所述配额中心包括配额模块。在实施步骤S102之后,该方法还可以包括如下步骤S411至步骤S413:In some embodiments, the quota center includes a quota module. After implementing step S102, the method may also include the following steps S411 to S413:

步骤S411,响应于从所述配额中心的管理模块获取所述配额指标中的配额总量,利用所述配额中心的配额模块确定所述用户终端的资源池的当前使用量。Step S411: In response to obtaining the total amount of quota in the quota indicator from the management module of the quota center, use the quota module of the quota center to determine the current usage of the resource pool of the user terminal.

这里,配额模块,也可以称为用户侧配额模块,可以部署在各属地资源池,用于向配额业务方(也即产品侧)提供调用,负责完成对已使用配额量等数据的校验、增加、减少、冻结、释放、查询等处理。配额模块在计算用户某一资源池的剩余使用量时,可以通过同管理模块进行交互,得到用户对应的配额总量;读取配额属地使用量数据,通过计算得到配额剩余可使用量,配额剩余量的值为总量值减去使用值得到的。Here, the quota module, which can also be called the user-side quota module, can be deployed in each local resource pool to provide calls to the quota business side (that is, the product side) and is responsible for completing the verification of data such as the amount of used quota. Increase, decrease, freeze, release, query and other processing. When the quota module calculates the remaining usage of a user's resource pool, it can interact with the management module to obtain the total quota corresponding to the user; it reads the quota local usage data and calculates the remaining usable amount of the quota. The remaining quota The quantity value is the total quantity value minus the usage value.

步骤S412,利用所述配额中心的配额模块,基于所述配额总量和所述当前使用量,确定所述用户终端的资源池的剩余使用量。Step S412: Use the quota module of the quota center to determine the remaining usage of the resource pool of the user terminal based on the total quota and the current usage.

这里,可以读取用户终端对应的资源池中的当前使用量,将获取的配额总量减去获取的当前使用量,得到资源的剩余使用量。Here, the current usage in the resource pool corresponding to the user terminal can be read, and the obtained current usage is subtracted from the obtained total quota to obtain the remaining usage of the resource.

步骤S413,基于所述剩余使用量,对所述用户终端的资源池的状态进行调整,得到调整后的状态。Step S413: Based on the remaining usage, adjust the status of the resource pool of the user terminal to obtain an adjusted status.

这里,调整可以包括以下至少之一:配额校验、配额更新、配额冻结、配额解冻等。资源池的状态可以包括校验状态、更新状态、冻结状态等,通过对资源池中的资源进行处理,可以改变资源池的状态。例如:得到资源当前的剩余使用量后,将该当前的剩余使用量更新为用户终端对应的剩余使用量,实现将资源池中资源使用情况状态的更新,并将该当前的剩余使用量发送至用户终端等。Here, the adjustment may include at least one of the following: quota verification, quota update, quota freezing, quota unfreezing, etc. The status of the resource pool can include verification status, update status, frozen status, etc. The status of the resource pool can be changed by processing the resources in the resource pool. For example: after obtaining the current remaining usage of the resource, update the current remaining usage to the remaining usage corresponding to the user terminal, update the resource usage status in the resource pool, and send the current remaining usage to User terminal, etc.

本公开实施例中,通过配额模型可以快速准确地对配额校验、配额更新、配额冻结、配额解冻等处理,实现资源池状态的调整,并及时上报至用户终端等。In the disclosed embodiments, the quota model can be used to quickly and accurately handle quota verification, quota update, quota freezing, quota unfreezing, etc., adjust the status of the resource pool, and report it to the user terminal in a timely manner.

下面说明本公开实施例提供的资源配额方法在实际场景中的应用,以基于用户终端和配额中心等设备设置的移动云配额管理系统架构的场景为例进行说明。如图5所示,配额管理系统可以包括用户终端502、中心节点网关503、一级网关节点504、二级网关节点505、产品侧506、配额中心507、属地资源池508等组成部分。The following describes the application of the resource quota method provided by the embodiments of the present disclosure in actual scenarios, taking the scenario of a mobile cloud quota management system architecture based on user terminals, quota centers and other equipment as an example. As shown in Figure 5, the quota management system may include user terminal 502, central node gateway 503, first-level gateway node 504, second-level gateway node 505, product side 506, quota center 507, local resource pool 508 and other components.

用户501可以通过用户终端502上的前端门户页面控制台订购入口生成配额请求,用户终端502将配额请求发送至中心节点网关503,中心节点网关503将配额请求水平转发中一级网关504;或者,用户终端502也可以直接将配额请求发送至一级网关504等;一级网关504再将配额请求转发至二级网关505,二级网关505将配额请求发送至配额中心507等;其中,产品侧可以是指移动云上的各个产品模块,如,主机、硬盘、网际互连协议等,产品侧也可以称为配额的业务调用方;一级网关504、二级网关节点505、产品侧506的数量可以为多个,这里并不限定。The user 501 can generate a quota request through the front-end portal page console ordering entrance on the user terminal 502. The user terminal 502 sends the quota request to the central node gateway 503, and the central node gateway 503 forwards the quota request horizontally to the secondary gateway 504; or, The user terminal 502 can also directly send the quota request to the first-level gateway 504, etc.; the first-level gateway 504 then forwards the quota request to the second-level gateway 505, and the second-level gateway 505 sends the quota request to the quota center 507, etc.; among them, the product side It can refer to various product modules on the mobile cloud, such as hosts, hard disks, Internet interconnection protocols, etc. The product side can also be called the business caller of the quota; the first-level gateway 504, the second-level gateway node 505, and the product side 506 The number can be multiple and is not limited here.

配额中心507可以包括配额管理平台5071、管理模块5072、配额模块5073,运维人员可以通过配额管理平台5071对管理模块5072进行控制,实现管理模块5072对配额指标等数据的处理,以使得配额模块5073对用户终端502进行配额,得到用户终端502所对应的至少一个属地资源池508;其中,管理模块5072可以是指只部署在移动云配额管理系统架构中的中心节点网关503的模块,用于对配额指标等数据进行录入、修改、查询等维护处理;配额模块5073可以部署在各属地资源池508,用于向产品侧506提供调用,负责完成对已使用配额量等数据的校验、增加、减少、冻结、释放、查询等处理;管理模块5072、属地资源池508的数量可以为多个,这里并不限定。如,属地资源池508包括位于第一区域的第一属地资源池、位于第二区域的第二属地资源池等。The quota center 507 can include a quota management platform 5071, a management module 5072, and a quota module 5073. Operation and maintenance personnel can control the management module 5072 through the quota management platform 5071, and realize the processing of data such as quota indicators by the management module 5072, so that the quota module 5073 performs quota on the user terminal 502 to obtain at least one local resource pool 508 corresponding to the user terminal 502; wherein, the management module 5072 may refer to a module that is only deployed on the central node gateway 503 in the mobile cloud quota management system architecture, and is used for Perform maintenance processing such as inputting, modifying, and querying quota indicators and other data; the quota module 5073 can be deployed in each local resource pool 508 to provide calls to the product side 506, and is responsible for completing the verification and addition of data such as the used quota amount. , reduction, freezing, release, query and other processing; the number of management modules 5072 and local resource pools 508 can be multiple, which is not limited here. For example, the territorial resource pool 508 includes a first territorial resource pool located in the first area, a second territorial resource pool located in the second area, etc.

本公开实施例提出了一种高性能分布式统一配额管理的配额管理系统,通过去掉部门级别校验,转换为客户级校验,增强系统的并发性;同时,基于远程字典服务(RemoteDictionary Server,Redis)分布式锁实现配额扣减、修改等管理,满足分布式系统的要求;除此之外,还可以实现多资源池维度的配额管控,实现资源池之间配额总量的约束与共享等。The disclosed embodiment proposes a high-performance distributed unified quota management quota management system, which enhances the concurrency of the system by removing department-level verification and converting it to customer-level verification; at the same time, based on the Remote Dictionary Service (RemoteDictionary Server, Redis) distributed lock implements quota deduction, modification and other management to meet the requirements of distributed systems; in addition, it can also realize quota management and control in multiple resource pool dimensions, and realize the restriction and sharing of the total quota between resource pools.

本公开实施例提供了一种多资源池配额维度处理方法,如图6所示,所述方法可以包括如下步骤S601至S604:The embodiment of the present disclosure provides a method for processing multiple resource pool quota dimensions. As shown in Figure 6, the method may include the following steps S601 to S604:

步骤S601,获取用户终端的配额请求。Step S601: Obtain the quota request of the user terminal.

这里,用户终端响应于用户订购资源的操作,生成配额请求,并将该配额请求通过中心节点网关等设备发送至配额中心,以使得配额中心获取配额请求。Here, the user terminal generates a quota request in response to the user's operation of ordering resources, and sends the quota request to the quota center through a device such as a central node gateway, so that the quota center obtains the quota request.

步骤S602,确定配额请求所对应的配额维度是否为多维度。Step S602: Determine whether the quota dimension corresponding to the quota request is multi-dimensional.

这里,配额中心确定配额请求所对应的配额维度,继而确定配额维度为单维度或多维度,若配额维度为多维度,则进入步骤S603,执行预设的多资源池配额维度处理逻辑;若配额维度为单维度,则进入步骤S604,执行预设的单资源池配额维度处理逻辑。Here, the quota center determines the quota dimension corresponding to the quota request, and then determines whether the quota dimension is single dimension or multi-dimensional. If the quota dimension is multi-dimensional, step S603 is entered to execute the preset multi-resource pool quota dimension processing logic; If the dimension is a single dimension, step S604 is entered to execute the preset single resource pool quota dimension processing logic.

步骤S603,确定用户终端的至少两个资源池。Step S603: Determine at least two resource pools of the user terminal.

这里,多资源池配额维度处理逻辑可以实现用户终端对多个资源池中资源的调用,多个资源池的资源是可以共享的。Here, the multi-resource pool quota dimension processing logic can enable the user terminal to call resources in multiple resource pools, and the resources of multiple resource pools can be shared.

步骤S604,确定用户终端的一个资源池。Step S604: Determine a resource pool for the user terminal.

这里,单资源池配额维度处理逻辑可以实现用户终端对一个资源池中资源的调用。Here, the single resource pool quota dimension processing logic can enable the user terminal to call resources in a resource pool.

本公开实施例提供了一种配额总量的确定方法,如图7所示,配额总量701的默认值读取时可以设置了三个级别:用户级配额限制702、用户组配额限制703、产品的默认配额限制704,优先级依次降低,按照当前的优先级读取当前限制,将当前限制所对应的配额值确定为配额总量,以此实现对资源订购的差异化控制,不同用户组的用户享受的配额值不同。The embodiment of the present disclosure provides a method for determining the total quota. As shown in Figure 7, when the default value of the total quota 701 is read, three levels can be set: user-level quota limit 702, user group quota limit 703, The default quota limit of the product is 704, and the priority is reduced in order. The current limit is read according to the current priority, and the quota value corresponding to the current limit is determined as the total quota, thereby achieving differentiated control of resource ordering for different user groups. users enjoy different quota values.

本公开实施例中,可以对管理模块和配额模块进行分离设置,以使得管理模块中的数据和配额模块中的数据实现隔离。如图8所示,运维人员801可以通过管理模块802对配额指标进行处理,操作包括以下至少之一:查看、新增、修改;其中,管理模块802可以维护中配额指标和已使用配额量等的元数据,元数据可以存储至数据库8021,管理模块802可以利用Redis缓存8022将元数据发送至配额模块803;配额模块803可以将元数据存储至数据库8031,并在数据库8031中确定已使用配额量等数据,配额管理平台8032可以响应于产品经理804等人员的检测(Check)、减少(Minus)、同步(Sync)、获取(Get)、冻结(Freeze)、解冻(Release)、修改等操作,对数据库8031中的元数据进行读、写等处理,以实现用户终端的资源池的配额校验、配额更新、配额冻结、配额解冻等调整;这样,配额的减少、冻结、释放都是通过使用Redis分布式锁,提高业务逻辑操作数据的一致性,减少出现配额扣减量不对,导致超卖或少卖的现象发生,提高配额管控的准确性、高效性等。In the embodiment of the present disclosure, the management module and the quota module can be set separately, so that the data in the management module and the data in the quota module are isolated. As shown in Figure 8, the operation and maintenance personnel 801 can process the quota indicators through the management module 802. The operations include at least one of the following: viewing, adding, and modifying; among which, the management module 802 can maintain the quota indicators and the used quota amount. The metadata can be stored in the database 8021, and the management module 802 can use the Redis cache 8022 to send the metadata to the quota module 803; the quota module 803 can store the metadata in the database 8031, and determine that it has been used in the database 8031. Quota amount and other data, the quota management platform 8032 can respond to the product manager 804 and other personnel's Check, Minus, Sync, Get, Freeze, Release, modification, etc. Operation, read, write and other processes are performed on the metadata in the database 8031 to realize quota verification, quota update, quota freezing, quota unfreezing and other adjustments of the resource pool of the user terminal; in this way, the reduction, freezing and release of quotas are By using Redis distributed locks, we can improve the consistency of business logic operation data, reduce the occurrence of incorrect quota deductions, resulting in overselling or underselling, and improve the accuracy and efficiency of quota management and control.

本公开实施例中,可以将对用户终端进行配额的过程称为配额工程,如图9所示,在实现配额工程901后,配额工程901可以为存储工程902、网络工程903、秘钥管理工程904、共享流量包工程905等其他工程提供资源额度的管理,如,配额工程为其他工程提供用户或资源配额的校验、增加、减少、查询等功能。In the embodiment of the present disclosure, the process of placing quotas on user terminals can be called a quota project. As shown in Figure 9, after the quota project 901 is implemented, the quota project 901 can be a storage project 902, a network project 903, and a key management project. 904, shared traffic package project 905 and other projects provide resource quota management. For example, the quota project provides functions such as verification, increase, decrease, and query of user or resource quotas for other projects.

本公开实施例提供了一种不同维度资源池配额方法,如图10所示,所述方法可以包括如下步骤S1001至S1007:The embodiment of the present disclosure provides a resource pool quota method of different dimensions, as shown in Figure 10. The method may include the following steps S1001 to S1007:

步骤S1001,响应于接收用户终端的配额请求,获取校验信息。Step S1001: In response to receiving a quota request from the user terminal, obtain verification information.

这里,校验信息可以包括资源池所对应的标识是不是为空、配额操作的配额总量是否大于零、配额指标所对应的名称是不是存在、用户信息是否存在等信息中的一种或多种。例如:配额中心读取资源池所对应的标识,确定该标识不为空等。Here, the verification information may include one or more of information such as whether the identifier corresponding to the resource pool is empty, whether the total quota amount of the quota operation is greater than zero, whether the name corresponding to the quota indicator exists, whether the user information exists, etc. kind. For example: the quota center reads the identifier corresponding to the resource pool and determines that the identifier is not empty, etc.

步骤S1002,利用预设的查询接口,确定校验信息是否预设校验条件。Step S1002: Use a preset query interface to determine whether the verification information has preset verification conditions.

这里,查询接口可以是指用于对校验信息进行验证的接口,如,查询接口(Quota)。可以将获取的校验信息输入至查询接口,得到校验结果;校验结果包括校验成功和校验失败等,查询接口内存在预设的校验方式,在满足预设校验条件的情况下,校验结果为校验成功,则进入步骤S1003;在不满足预设校验条件的情况下,校验结果为校验失败等,则结束流程。Here, the query interface may refer to an interface used to verify verification information, such as a query interface (Quota). The obtained verification information can be input into the query interface to obtain the verification results; the verification results include verification success and verification failure, etc. There are preset verification methods in the query interface. When the preset verification conditions are met, If the verification result is verification success, step S1003 is entered; if the preset verification conditions are not met, the verification result is verification failure, etc., the process ends.

步骤S1003,确定配额请求所对应的配额维度是否为多维度。Step S1003: Determine whether the quota dimension corresponding to the quota request is multi-dimensional.

这里,若配额维度为多个维度,则进入步骤S1004;若配额维度为但个维度,则进入步骤S1006。Here, if the quota dimension is multiple dimensions, proceed to step S1004; if the quota dimension is but one dimension, proceed to step S1006.

步骤S1004,执行多资源池配额维度处理逻辑。Step S1004: Execute multi-resource pool quota dimension processing logic.

这里,多资源池配额维度处理逻辑可以实现用户终端对多个资源池中资源的调用,多个资源池的资源是可以共享的。Here, the multi-resource pool quota dimension processing logic can enable the user terminal to call resources in multiple resource pools, and the resources of multiple resource pools can be shared.

步骤S1005,将用户终端的多个资源池的配置信息存储至中心节点网关。Step S1005: Store the configuration information of multiple resource pools of the user terminal in the central node gateway.

这里,确定用户终端分配的多个资源池后,可以将多个资源池的名称以及配额总量等配置信息存储至中心节点网关,如,中心节点网关上部署的管理模块等。Here, after determining the multiple resource pools allocated by the user terminal, configuration information such as the names of the multiple resource pools and the total amount of quotas can be stored in the central node gateway, such as the management module deployed on the central node gateway.

步骤S1006,执行单资源池配额维度处理逻辑。Step S1006: Execute single resource pool quota dimension processing logic.

这里,单资源池配额维度处理逻辑可以实现用户终端对一个资源池中资源的调用。Here, the single resource pool quota dimension processing logic can enable the user terminal to call resources in a resource pool.

步骤S1007,将用户终端的单个资源池的配置信息存储至配额模块。Step S1007: Store the configuration information of a single resource pool of the user terminal in the quota module.

这里,确定用户终端分配的单个资源池后,可以将单个资源池的名称以及配额总量等配置信息存储至配额模块,如,属地资源池中的数据库等。Here, after determining a single resource pool allocated by the user terminal, configuration information such as the name of the single resource pool and the total quota can be stored in the quota module, such as a database in a local resource pool.

本公开实施例提供了一种资源订购方法,如图11所示,所述方法可以包括如下步骤S1101至S1109:This embodiment of the present disclosure provides a resource ordering method, as shown in Figure 11. The method may include the following steps S1101 to S1109:

步骤S1101,利用检测接口进行配额校验。Step S1101: Use the detection interface to perform quota verification.

这里,订购页面可以是指用户终端上可以用于进行资源订购的显示页面,用户可以对订购页面进行操作,从而发送资源订购的流程。检测接口可以为Check接口,用于进行配额校验。配额校验用于验证用户终端已关联的资源池中的剩余配额量是否满足新增的配额指标;若验证结果为验证成功,则用户可以通过订购页面发起产品订购流程,产品侧会预先发起冻结配额操作;若验证失败,则结束产品订购流程等。Here, the ordering page may refer to a display page on the user terminal that can be used for resource ordering, and the user can operate the ordering page to send the resource ordering process. The detection interface can be a Check interface, which is used for quota verification. Quota verification is used to verify whether the remaining quota in the resource pool associated with the user terminal meets the new quota indicators; if the verification result is successful, the user can initiate the product ordering process through the order page, and the product side will initiate a freeze in advance Quota operation; if verification fails, the product ordering process will be ended, etc.

步骤S1102,响应于用户的订购操作,发起产品订购流程。Step S1102: In response to the user's ordering operation, initiate a product ordering process.

这里,订购页面可以响应于用户通过用户终端发起的订购操作,向产品侧发起产品订购流程。产品侧可以是指移动云上的各个产品模块,如,主机、硬盘、公网IP等,产品侧也可以称为配额的业务调用方等,可以理解为产品侧携带有资源。Here, the ordering page may initiate a product ordering process to the product side in response to an ordering operation initiated by the user through the user terminal. The product side can refer to various product modules on the mobile cloud, such as hosts, hard disks, public IPs, etc. The product side can also be called the business caller of quotas, etc. It can be understood that the product side carries resources.

步骤S1103,利用冻结接口对资源池进行冻结处理,得到预占用配额,并生成预占流水号,将预占流水号发送至产品侧。Step S1103: Use the freezing interface to freeze the resource pool, obtain the pre-occupied quota, generate a pre-occupied serial number, and send the pre-occupied serial number to the product side.

这里,产品订购流程可以包括:利用冻结接口从资源池中预占满足新增的配额指标的资源量,得到冻结配额量(也即预占用配额),在预占成功后,配额中心生成一个预占流水号(SerialNo),并将该预占流水号反馈至产品侧。Here, the product ordering process may include: using the freezing interface to pre-occupy the amount of resources that meet the new quota indicator from the resource pool to obtain the frozen quota amount (that is, the pre-occupied quota). After the pre-occupation is successful, the quota center generates a pre-occupied quota. Occupy the serial number (SerialNo) and feed the pre-occupied serial number to the product side.

步骤S1104,执行内部业务逻辑。Step S1104: Execute internal business logic.

这里,内部业务逻辑可以包括读取属地资源池的剩余配额量等。Here, the internal business logic may include reading the remaining quota of the local resource pool, etc.

步骤S1105,基于预占流水号创建资源订单,并在创建成功后将预占流水号传递至产品侧。Step S1105: Create a resource order based on the reserved serial number, and transfer the reserved serial number to the product side after the creation is successful.

这里,产品侧通过向用户终端发送携带有预占流水号的响应,用户终端可以创建资源订单,并生成携带有预占流水号的回调信息,将该回调信息回调至产品侧。Here, the product side sends a response carrying the reserved serial number to the user terminal. The user terminal can create a resource order, generate callback information carrying the reserved serial number, and call back the callback information to the product side.

步骤S1106,在订单创建成功后,将冻结配额量转化为已使用配额量。Step S1106: After the order is successfully created, the frozen quota amount is converted into a used quota amount.

这里,配额中心在确定订单创建成功后,若用户需要使用冻结配额量,可以利用该冻结配额量所对应的预占流水号发起冻结配额量的配额解冻操作,将冻结配额量转化为已使用配额量等。Here, after the quota center determines that the order is successfully created, if the user needs to use the frozen quota, he or she can use the reservation serial number corresponding to the frozen quota to initiate the quota unfreezing operation of the frozen quota, and convert the frozen quota into used quota. Quantity etc.

步骤S1107,生成携带有预占流水号的修复请求,并将修复请求发送至产品侧。Step S1107: Generate a repair request carrying the reserved serial number, and send the repair request to the product side.

这里,在需要对订单进行修复的情况下,用户终端可以发起订单的二次修复,其中发送的修复请求中携带有预占流水号。Here, when the order needs to be repaired, the user terminal can initiate a secondary repair of the order, in which the repair request sent carries the pre-empted serial number.

步骤S1108,执行内部业务逻辑。Step S1108: Execute internal business logic.

这里,内部业务逻辑可以包括对配额指标等数据进行调整等。Here, internal business logic can include adjusting data such as quota indicators, etc.

步骤S1109,利用解冻接口,将冻结配额量转化为已使用配额量。Step S1109: Use the unfreeze interface to convert the frozen quota amount into the used quota amount.

这里,配置中心可以解冻接口,基于该冻结配额量所对应的预占流水号发起冻结配额量的配额解冻操作,将冻结配额量转化为已使用配额量等。冻结接口与解冻接口一定要配合使用,同一个预占流水号可以进行释放多次,直到当前流水冻结的数量释放至零为止,既预占流水号失效。Here, the configuration center can unfreeze the interface, initiate the quota unfreezing operation of the frozen quota amount based on the reservation serial number corresponding to the frozen quota amount, convert the frozen quota amount into used quota amount, etc. The freezing interface and the unfreezing interface must be used together. The same pre-empted serial number can be released multiple times, until the current frozen number is released to zero, and the pre-empted serial number becomes invalid.

本公开实施例提供了一种资源退订方法,如图12所示,所述方法可以包括如下步骤S1201至S1206:This embodiment of the disclosure provides a resource unsubscription method, as shown in Figure 12. The method may include the following steps S1201 to S1206:

步骤S1201,向产品侧发送资源退订请求。Step S1201: Send a resource unsubscription request to the product side.

这里,退订页面可以是指用户终端上可以用于进行资源退订的显示页面,用户可以对退订页面进行操作,从而发送资源退订的流程。通过响应于用户的退订操作,退订页面可以生成携带有预占流水号的资源退订请求。Here, the unsubscribe page may refer to a display page on the user terminal that can be used to unsubscribe resources. The user can operate the unsubscribe page to send the resource unsubscribe process. In response to the user's unsubscription operation, the unsubscription page can generate a resource unsubscription request carrying a reservation serial number.

步骤S1202,执行内部业务逻辑。Step S1202: Execute internal business logic.

这里,内部业务逻辑可以包括读取属地资源池的剩余配额量等。Here, the internal business logic may include reading the remaining quota of the local resource pool, etc.

步骤S1203,利用减少接口,对资源池的资源进行更新处理,得到用户终端更新后的剩余使用量。Step S1203: Use the reduction interface to update the resources in the resource pool to obtain the updated remaining usage of the user terminal.

这里,用户通过用户终端上的退订页面向产品侧发起退订流程,以使得产品侧控制配额中心用户终端的资源池当前的剩余使用量减去已使用配额量,得到用户终端更新后的剩余使用量。Here, the user initiates an unsubscription process to the product side through the unsubscription page on the user terminal, so that the product side controls the current remaining usage of the resource pool of the user terminal in the quota center minus the used quota amount to obtain the updated remaining balance of the user terminal. Usage amount.

步骤S1204,记录更新后的剩余使用量。Step S1204: Record the updated remaining usage amount.

这里,配额中心可以在配额模块或关联模型上对用户终端对于的资源池的剩余使用量进行更新。Here, the quota center can update the remaining usage of the resource pool by the user terminal on the quota module or the association model.

步骤S1205,确定剩余使用量更新成功。Step S1205: It is determined that the remaining usage is updated successfully.

这里,配额中心可以向产品侧发送剩余使用量更新成功的响应。Here, the quota center can send a response to the product side indicating that the remaining usage is successfully updated.

步骤S1206,确定退订成功。Step S1206: Determine that the unsubscription is successful.

这里,产品侧可以向用户终端发送资源退订成功的响应。Here, the product side can send a response to the user terminal indicating that resource unsubscription is successful.

相关技术中,移动云配额提供两套配额逻辑实现配额管控,一套是控制在用户订购资源创建订单过程,通过设置每个配额项的用户总量、每个用户是某个配额指标的使用量实现在下单时的配额管控;当订单创建成功,配额流程扭转到产品侧时,产品侧进行资源开通,当资源开通成功后,才会去调用第二套配额逻辑实现配额的扣减操作等。当配额使用量达到配额总量时,在下单时会提示配额不足,从而到达一个用户资源订购量的限制,实现配额管控的目的。当用户出现配额不足时,需要进行扩大配额值处理;为满足一些特殊用户需求,往往需要修改总配额值大小,这时需要后台运维人员手动对所有资源数据库进行对用户配额总量的一个调整,这样不够灵活、方便。In related technologies, Mobile Cloud Quota provides two sets of quota logic to implement quota control. One is to control the process of creating an order for users to order resources by setting the total number of users for each quota item and the usage of a certain quota indicator for each user. Realize quota control when placing an order; when the order is successfully created and the quota process is transferred to the product side, the product side activates the resources. When the resources are activated successfully, the second set of quota logic will be called to implement quota deduction operations, etc. When the quota usage reaches the total quota, an insufficient quota prompt will be displayed when placing an order, thereby reaching the limit of a user's resource ordering amount and achieving the purpose of quota control. When a user has insufficient quota, the quota value needs to be expanded; in order to meet the needs of some special users, it is often necessary to modify the total quota value. In this case, background operation and maintenance personnel are required to manually adjust the total user quota for all resource databases. , which is not flexible and convenient enough.

本公开实施例中,配额管理功能可以拉通整个移动云的配额管控,对外提供可靠、高效、稳定的配额接口(Application Program Interface,API)能力。相关技术中的移动云配额管控仅限于基础设施即服务(Infrastructure as a Service,IaaS)的主要产品,本公开实施例中的配额中心上线后可纳管整个移动云所有产品的各种配额需求,对配额模块进行独立解耦,提升产品研发、上云、运维的速度和效率等。In this disclosed embodiment, the quota management function can unify the quota management and control of the entire mobile cloud and provide externally reliable, efficient, and stable quota interface (Application Program Interface, API) capabilities. Mobile cloud quota management and control in related technologies is limited to the main products of Infrastructure as a Service (IaaS). The quota center in the embodiment of the present disclosure can manage various quota requirements for all products of the entire mobile cloud after it is online. Independently decouple the quota module to improve the speed and efficiency of product development, cloud migration, and operation and maintenance.

首先:可以将移动云配额功能分成多资源池配额和单资源池配额,多资源池配额可以让用户在多个资源池内共享配额的额度,单资源池配额的额度则在每个资源池内是独立的,互不影响,从而实现资源池配额维度的管控。First of all: the mobile cloud quota function can be divided into multi-resource pool quotas and single-resource pool quotas. Multi-resource pool quotas allow users to share quotas in multiple resource pools, while single-resource pool quotas are independent in each resource pool. , do not affect each other, thereby achieving management and control in the resource pool quota dimension.

其次,在上述基础上,为优化配额内部校验逻辑,本公开实施例中可以去掉耗时的多级部门间的配额校验的流程,并通过是用客户级配额的校验来替换上线流程,让不稳定的校验过来转换成稳定的校验流程,减小了接口的响应时间,提升接口的并发性能。Secondly, based on the above, in order to optimize the internal quota verification logic, the time-consuming multi-level quota verification process between departments can be removed in the embodiment of the present disclosure, and the online process can be replaced with customer-level quota verification. , converting unstable verification into a stable verification process, reducing the response time of the interface and improving the concurrency performance of the interface.

同时,从属地资源池中抽象出管理模块,使得管理模块的数据同配额模块的数据分离,实现各种独立控制以及实现代码层面的解耦,便于后期运维平台的管理和维护;管理模块也可以为用户终端提供基础数据的管理功能,达到相辅相成的效果。在上述特点的基础上,该设计的配额模块同时引入了配额的冻结流程,具体为前端配额校验通过后,资源订购请求到达各个产品侧,产品侧就会立马发起冻结配额配额操作,等待具体资源开通后才会进行具体冻结的配额扣减;若用户下单成功,但一直未支付,配额中心需要释放对应配额。订单创建成功,但资源开通失败后,需要进行订单二次修复,修复成功需要释放对应的配额等。其中,冻结配额成功后会生成一个固定的唯一预占流水号,释放时必须携带该预占流水号进行对应配额的是释放。At the same time, the management module is abstracted from the local resource pool, so that the data of the management module is separated from the data of the quota module, realizing various independent controls and decoupling at the code level, which facilitates the management and maintenance of the later operation and maintenance platform; the management module also It can provide basic data management functions for user terminals to achieve complementary effects. Based on the above characteristics, the quota module of this design also introduces the quota freezing process. Specifically, after the front-end quota verification passes, the resource ordering request reaches each product side, and the product side will immediately initiate the quota freezing operation, waiting for the specific The specific frozen quota will be deducted after the resources are activated; if the user places an order successfully but has not paid, the quota center needs to release the corresponding quota. If the order is created successfully, but the resource activation fails, the order needs to be repaired twice. If the repair is successful, the corresponding quota must be released, etc. Among them, after the quota is successfully frozen, a fixed and unique pre-empted serial number will be generated. When releasing, the pre-empted serial number must be carried to release the corresponding quota.

最后,当用户需要申请扩大配额值时,用户可以自主的发起配额扩大申请,申请完成后,申请流程就会跳转到用户终端上的配额审批页面,等待在配额管理界面进行配额的审批,管理员根据当前资源池资源现状就行审批,结果以短信方式发送给用户。这样,有助于实现用户与管理侧联动,减少运维人员的介入,同时提升用户体验等。Finally, when the user needs to apply for quota expansion, the user can initiate a quota expansion application independently. After the application is completed, the application process will jump to the quota approval page on the user terminal, waiting for quota approval and management in the quota management interface. The administrator will approve the application based on the current resource status of the resource pool, and the result will be sent to the user via SMS. In this way, it helps to achieve linkage between users and the management side, reduce the intervention of operation and maintenance personnel, and improve user experience.

基于前述的实施例,本公开实施例提供一种资源配额装置,该装置包括所包括的各单元、以及各单元所包括的各模块,可以通过计算机设备中的处理器来实现;当然也可通过具体的逻辑电路实现;在实施的过程中,处理器可以为中央处理器(Central ProcessingUnit,CPU)、微处理器(MicroprocessorUnit,MPU)、数字信号处理器(Digital SignalProcessor,DSP)或现场可编程门阵列(FieldProgrammable GateArray,FPGA)等。Based on the foregoing embodiments, embodiments of the present disclosure provide a resource quota device. The device includes each unit included and each module included in each unit. It can be implemented by a processor in a computer device; of course, it can also be implemented by Specific logic circuit implementation; during the implementation process, the processor can be a central processing unit (CPU), a microprocessor (Microprocessor Unit, MPU), a digital signal processor (Digital Signal Processor, DSP) or a field programmable gate Array (FieldProgrammable GateArray, FPGA), etc.

图13为本公开实施例提供的一种资源配额装置的组成结构示意图,如图13所示,资源配额装置1300包括:第一确定模块1310和分配模块1320,其中:Figure 13 is a schematic structural diagram of a resource quota device provided by an embodiment of the present disclosure. As shown in Figure 13, the resource quota device 1300 includes: a first determination module 1310 and an allocation module 1320, wherein:

第一确定模块1310,用于响应于接收用户终端的配额请求,确定与所述配额请求中的用户信息所匹配的配额指标;其中,所述配额指标至少包括配额维度;分配模块1320,用于在所述用户终端身份合法的情况下,采用与所述配额维度相匹配的配额方式,基于所述配额指标对所述用户终端进行配额,得到所述用户终端所对应的至少一个资源池。The first determining module 1310 is configured to respond to receiving a quota request from a user terminal and determine a quota indicator that matches the user information in the quota request; wherein the quota indicator at least includes a quota dimension; the allocation module 1320 is configured to When the identity of the user terminal is legal, a quota method matching the quota dimension is used to perform quota on the user terminal based on the quota indicator to obtain at least one resource pool corresponding to the user terminal.

在一些实施例中,所述配额指标至少包括配额总量;所述分配模块,还用于:在所述配额维度为单个维度的情况下,从至少两个候选资源池中,获取满足所述配额总量的所述用户终端的一个所述资源池;在所述配额维度为至少两个维度的情况下,从所述至少两个候选资源池中,获取满足所述配额总量的所述用户终端的至少两个所述资源池;其中,所述用户终端的至少两个所述资源池的资源是共享的。In some embodiments, the quota indicator at least includes the total amount of quota; the allocation module is also configured to: when the quota dimension is a single dimension, obtain from at least two candidate resource pools that satisfy the One resource pool of the user terminal with a total quota; when the quota dimension is at least two dimensions, obtain the resource pool that meets the total quota from the at least two candidate resource pools. At least two of the resource pools of the user terminal; wherein the resources of the at least two resource pools of the user terminal are shared.

在一些实施例中,所述第一确定模块,还用于:响应于接收所述用户终端的配额请求,确定所述用户信息所匹配的用户类型;确定与所述用户类型匹配的候选配额集合;其中,所述候选配额集合中包括至少两个候选配额值;按照预设的读取等级,从所述候选配额集合中获取与所述读取等级匹配的候选配额值;将与所述读取等级匹配的候选配额值确定为所述用户终端的配额总量。In some embodiments, the first determination module is further configured to: in response to receiving a quota request from the user terminal, determine the user type matched by the user information; determine a candidate quota set matching the user type. ; Wherein, the candidate quota set includes at least two candidate quota values; according to the preset reading level, a candidate quota value matching the reading level is obtained from the candidate quota set; and the reading level is matched with the candidate quota value. The candidate quota value with level matching is determined as the total quota of the user terminal.

在一些实施例中,所述配额中心包括管理模块;所述装置还包括:存储模块,用于将所述配额指标、所述配额指标与所述用户终端的资源池之间的对应关系存储至所述管理模块;其中,所述管理模块用于维护所述配额指标;处理模块,用于响应于针对所述管理模型的操作,所述配额中心的管理模块采用与所述操作匹配的处理方式对所述配额指标进行处理,得到处理后的配额指标;其中,所述操作包括以下至少之一:查看、新增、修改。In some embodiments, the quota center includes a management module; the device further includes: a storage module, configured to store the quota indicator, the corresponding relationship between the quota indicator and the resource pool of the user terminal in the The management module; wherein, the management module is used to maintain the quota indicator; the processing module is used to respond to the operation of the management model, and the management module of the quota center adopts a processing method that matches the operation. The quota indicator is processed to obtain the processed quota indicator; wherein the operation includes at least one of the following: viewing, adding, and modifying.

在一些实施例中,所述配额中心包括配额模块;所述装置还包括:第二确定模块,用于响应于从所述配额中心的管理模块获取所述配额指标中的配额总量,利用所述配额中心的配额模块确定所述用户终端的资源池的当前使用量;第三确定模块,用于利用所述配额中心的配额模块,基于所述配额总量和所述当前使用量,确定所述用户终端的资源池的剩余使用量;调整模块,用于基于所述剩余使用量,对所述用户终端的资源池的状态进行调整,得到调整后的状态;其中,所述调整包括以下至少之一:配额校验、配额更新、配额冻结、配额解冻。In some embodiments, the quota center includes a quota module; the device further includes: a second determination module, configured to use the total quota in the quota indicator in response to obtaining the total amount of quota in the quota indicator from the management module of the quota center. The quota module of the quota center determines the current usage of the resource pool of the user terminal; a third determination module is used to use the quota module of the quota center to determine the current usage based on the total quota and the current usage. The remaining usage of the resource pool of the user terminal; the adjustment module is configured to adjust the status of the resource pool of the user terminal based on the remaining usage to obtain an adjusted status; wherein the adjustment includes at least the following: One: quota verification, quota update, quota freezing, and quota unfreezing.

在一些实施例中,所述第一确定模块,还用于:响应于接收所述用户终端的配额请求,获取校验信息;利用预设的查询接口,对所述校验信息进行校验,得到校验结果;在所述校验结果表征校验成功的情况下,确定与所述配额请求中的用户信息所匹配的配额指标;其中,所述用户终端进行配额所表征的配额工程用于为预设的其他工程提供资源额度的管理,所述其他工程包括以下至少之一:存储工程、网络工程、秘钥管理工程、共享流量包工程。In some embodiments, the first determination module is further configured to: obtain verification information in response to receiving a quota request from the user terminal; use a preset query interface to verify the verification information, Obtain the verification result; when the verification result indicates that the verification is successful, determine the quota index that matches the user information in the quota request; wherein the user terminal performs the quota project represented by the quota for Provide resource quota management for preset other projects, which include at least one of the following: storage projects, network projects, key management projects, and shared traffic package projects.

在一些实施例中,所述装置还包括:冻结模块,用于在所述用户终端的资源池的剩余使用量满足预设条件的情况下,对所述剩余使用量进行配额冻结处理,得到预占用配额量和预占流水号;解冻模块,用于在预设的产品订购成功的情况下,基于所述预占流水号对所述预占用配额量进行配额解冻处理,得到已使用配额量;其中,所述已使用配额量用于在所述产品退订成功后对所述用户终端的资源池的剩余使用量进行更新。In some embodiments, the device further includes: a freezing module, configured to perform quota freezing processing on the remaining usage of the resource pool of the user terminal when it meets preset conditions to obtain the preset The occupied quota amount and pre-occupied serial number; the unfreezing module is used to unfreeze the pre-occupied quota amount based on the pre-occupied serial number when the preset product order is successful, and obtain the used quota amount; The used quota amount is used to update the remaining usage amount of the resource pool of the user terminal after the product is successfully unsubscribed.

以上装置实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上述方法实施例描述的方法,对于本公开装置实施例中未披露的技术细节,请参照本公开方法实施例的描述而理解。The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. In some embodiments, the functions or modules provided by the device provided by the embodiments of the present disclosure can be used to perform the methods described in the above method embodiments. For technical details not disclosed in the embodiments of the device of the present disclosure, please refer to the methods of the present disclosure. be understood from the description of the embodiments.

需要说明的是,本公开实施例中,如果以软件功能模块的形式实现上述的资源配额方法,并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本公开各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read OnlyMemory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本公开实施例不限制于任何特定的硬件、软件或固件,或者硬件、软件、固件三者之间的任意结合。It should be noted that in the embodiments of the present disclosure, if the above resource quota method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present disclosure can be embodied in the form of software products that are essentially or contribute to related technologies. The software product is stored in a storage medium and includes a number of instructions to enable a A computer device (which may be a personal computer, a server, a network device, etc.) executes all or part of the methods described in various embodiments of the present disclosure. The aforementioned storage media include: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), magnetic disk or optical disk and other various media that can store program codes. In this way, the embodiments of the present disclosure are not limited to any specific hardware, software, or firmware, or any combination of hardware, software, and firmware.

本公开实施例提供一种计算机设备,包括存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述方法中的部分或全部步骤。An embodiment of the present disclosure provides a computer device, including a memory and a processor. The memory stores a computer program that can be run on the processor. When the processor executes the program, some or all of the steps in the above method are implemented.

本公开实施例提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述方法中的部分或全部步骤。所述计算机可读存储介质可以是瞬时性的,也可以是非瞬时性的。Embodiments of the present disclosure provide a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, some or all of the steps in the above method are implemented. The computer-readable storage medium may be transient or non-transitory.

本公开实施例提供一种计算机程序,包括计算机可读代码,在所述计算机可读代码在计算机设备中运行的情况下,所述计算机设备中的处理器执行用于实现上述方法中的部分或全部步骤。Embodiments of the present disclosure provide a computer program, which includes computer readable code. When the computer readable code is run in a computer device, the processor in the computer device executes a part for implementing the above method or All steps.

本公开实施例提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序被计算机读取并执行时,实现上述方法中的部分或全部步骤。该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一些实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一些实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。Embodiments of the present disclosure provide a computer program product. The computer program product includes a non-transitory computer-readable storage medium storing a computer program. When the computer program is read and executed by a computer, some of the above methods are implemented or All steps. The computer program product can be implemented specifically through hardware, software or a combination thereof. In some embodiments, the computer program product is embodied as a computer storage medium. In other embodiments, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) and so on.

这里需要指出的是:上文对各个实施例的描述倾向于强调各个实施例之间的不同之处,其相同或相似之处可以互相参考。以上设备、存储介质、计算机程序及计算机程序产品实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本公开设备、存储介质、计算机程序及计算机程序产品实施例中未披露的技术细节,请参照本公开方法实施例的描述而理解。It should be noted here that the above description of various embodiments tends to emphasize the differences between the various embodiments, and the similarities or similarities may be referred to each other. The description of the above embodiments of equipment, storage media, computer programs and computer program products is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the disclosed equipment, storage media, computer programs and computer program products, please refer to the description of the disclosed method embodiments for understanding.

需要说明的是,图14为本公开实施例中计算机设备的一种硬件实体示意图,如图14所示,该计算机设备1400的硬件实体包括:处理器1401、通信接口1402和存储器1403,其中:It should be noted that Figure 14 is a schematic diagram of a hardware entity of a computer device in an embodiment of the present disclosure. As shown in Figure 14, the hardware entity of the computer device 1400 includes: a processor 1401, a communication interface 1402 and a memory 1403, where:

处理器1401通常控制计算机设备1400的总体操作。Processor 1401 generally controls the overall operation of computer device 1400.

通信接口1402可以使计算机设备通过网络与其他终端或服务器通信。Communication interface 1402 may enable the computer device to communicate with other terminals or servers over a network.

存储器1403配置为存储由处理器1401可执行的指令和应用,还可以缓存待处理器1401以及计算机设备1400中各模块待处理或已经处理的数据(例如,图像数据、音频数据、语音通信数据和视频通信数据),可以通过闪存(FLASH)或随机访问存储器(RandomAccessMemory,RAM)实现。处理器1401、通信接口1402和存储器1403之间可以通过总线1404进行数据传输。The memory 1403 is configured to store instructions and applications executable by the processor 1401, and can also cache data to be processed or processed by the processor 1401 and each module in the computer device 1400 (for example, image data, audio data, voice communication data and Video communication data), which can be implemented through flash memory (FLASH) or random access memory (RandomAccessMemory, RAM). Data can be transmitted between the processor 1401, the communication interface 1402 and the memory 1403 through the bus 1404.

应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本公开的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本公开的各种实施例中,上述各步骤/过程的序号的大小并不意味着执行顺序的先后,各步骤/过程的执行顺序应以其功能和内在逻辑确定,而不应对本公开实施例的实施过程构成任何限定。上述本公开实施例序号仅仅为了描述,不代表实施例的优劣。It will be understood that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic associated with the embodiment is included in at least one embodiment of the present disclosure. Thus, the appearances of "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily referring to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that in various embodiments of the present disclosure, the size of the serial numbers of the above steps/processes does not mean the order of execution. The execution order of each step/process should be determined by its functions and internal logic, and should not be The implementation process of the embodiments of the present disclosure constitutes no limitations. The above serial numbers of the embodiments of the present disclosure are only for description and do not represent the advantages and disadvantages of the embodiments.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this document, the terms "comprising", "comprises" or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device that includes a series of elements not only includes those elements, It also includes other elements not expressly listed or inherent in the process, method, article or apparatus. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article or apparatus that includes that element.

在本公开所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided in this disclosure, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components may be combined, or can be integrated into another system, or some features can be ignored, or not implemented. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be electrical, mechanical, or other forms. of.

上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元;既可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated; the components shown as units may or may not be physical units; they may be located in one place or distributed to multiple network units; Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本公开各实施例中的各功能单元可以全部集成在一个处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present disclosure can be all integrated into one processing unit, or each unit can be separately used as a unit, or two or more units can be integrated into one unit; the above-mentioned integration The unit can be implemented in the form of hardware or in the form of hardware plus software functional units.

本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps to implement the above method embodiments can be completed through hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the execution includes: The steps of the above method embodiment; and the aforementioned storage media include: mobile storage devices, read-only memory (Read Only Memory, ROM), magnetic disks or optical disks and other various media that can store program codes.

或者,本公开上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本公开各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。Alternatively, if the above-mentioned integrated units of the present disclosure are implemented in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure can be embodied in the form of a software product in essence or that contributes to related technologies. The computer software product is stored in a storage medium and includes a number of instructions to enable a computer. A computer device (which may be a personal computer, a server, a network device, etc.) executes all or part of the methods described in various embodiments of the present disclosure. The aforementioned storage media include: mobile storage devices, ROMs, magnetic disks or optical disks and other media that can store program codes.

本公开所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。The methods disclosed in several method embodiments provided in this disclosure can be combined arbitrarily without conflict to obtain new method embodiments.

若本公开实施例涉及个人信息,应用本公开实施例的产品在处理个人信息前,已明确告知个人信息处理规则,并取得个人自主同意。若本公开实施例涉及敏感个人信息,应用本公开实施例的产品在处理敏感个人信息前,已取得个人单独同意,并且同时满足“明示同意”的要求。If the embodiments of this disclosure involve personal information, the products using the embodiments of this disclosure will clearly inform the personal information processing rules and obtain the individual's independent consent before processing the personal information. If the disclosed embodiments involve sensitive personal information, the product applying the disclosed embodiments must obtain the individual's separate consent before processing the sensitive personal information, and at the same time meet the "express consent" requirement.

以上所述,仅为本公开的实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本公开的保护范围之内。The above are only embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, and should are covered by the protection scope of this disclosure.

Claims (10)

1.一种资源配额方法,其特征在于,应用于配额中心,包括:1. A resource quota method, characterized in that it is applied to a quota center and includes: 响应于接收用户终端的配额请求,确定与所述配额请求中的用户信息所匹配的配额指标;其中,所述配额指标至少包括配额维度;In response to receiving a quota request from a user terminal, determine a quota indicator that matches the user information in the quota request; wherein the quota indicator at least includes a quota dimension; 在所述用户终端身份合法的情况下,采用与所述配额维度相匹配的配额方式,基于所述配额指标对所述用户终端进行配额,得到所述用户终端所对应的至少一个资源池。When the identity of the user terminal is legal, a quota method matching the quota dimension is used to perform quota on the user terminal based on the quota indicator to obtain at least one resource pool corresponding to the user terminal. 2.根据权利要求1所述的方法,其特征在于,所述配额指标至少包括配额总量;所述采用与所述配额维度相匹配的配额方式,基于所述配额指标对所述用户终端进行配额,得到所述用户终端所对应的至少一个资源池,包括:2. The method according to claim 1, characterized in that the quota indicator at least includes a total amount of quota; the quota method matching the quota dimension is used to perform the evaluation on the user terminal based on the quota indicator. Quota, obtain at least one resource pool corresponding to the user terminal, including: 在所述配额维度为单个维度的情况下,从至少两个候选资源池中,获取满足所述配额总量的所述用户终端的一个所述资源池;If the quota dimension is a single dimension, obtain one of the resource pools of the user terminal that meets the total quota from at least two candidate resource pools; 在所述配额维度为至少两个维度的情况下,从所述至少两个候选资源池中,获取满足所述配额总量的所述用户终端的至少两个所述资源池;其中,所述用户终端的至少两个所述资源池的资源是共享的。When the quota dimension is at least two dimensions, obtain at least two resource pools of the user terminals that meet the total quota from the at least two candidate resource pools; wherein, Resources of at least two resource pools of user terminals are shared. 3.根据权利要求2所述的方法,其特征在于,所述响应于接收用户终端的配额请求,确定与所述配额请求中的用户信息所匹配的配额指标,包括:3. The method according to claim 2, characterized in that, in response to receiving a quota request from a user terminal, determining a quota indicator that matches the user information in the quota request includes: 响应于接收所述用户终端的配额请求,确定所述用户信息所匹配的用户类型;In response to receiving the quota request from the user terminal, determine the user type matched by the user information; 确定与所述用户类型匹配的候选配额集合;其中,所述候选配额集合中包括至少两个候选配额值;Determine a candidate quota set that matches the user type; wherein the candidate quota set includes at least two candidate quota values; 按照预设的读取等级,从所述候选配额集合中获取与所述读取等级匹配的候选配额值;According to the preset reading level, obtain the candidate quota value that matches the reading level from the candidate quota set; 将与所述读取等级匹配的候选配额值确定为所述用户终端的配额总量。The candidate quota value matching the reading level is determined as the total quota of the user terminal. 4.根据权利要求1所述的方法,其特征在于,所述配额中心包括管理模块;所述方法还包括:4. The method according to claim 1, characterized in that the quota center includes a management module; the method further includes: 将所述配额指标、所述配额指标与所述用户终端的资源池之间的对应关系存储至所述管理模块;其中,所述管理模块用于维护所述配额指标;Store the quota indicator, the corresponding relationship between the quota indicator and the resource pool of the user terminal in the management module; wherein the management module is used to maintain the quota indicator; 响应于针对所述管理模型的操作,所述配额中心的管理模块采用与所述操作匹配的处理方式对所述配额指标进行处理,得到处理后的配额指标;其中,所述操作包括以下至少之一:查看、新增、修改。In response to the operation on the management model, the management module of the quota center processes the quota indicator using a processing method that matches the operation to obtain a processed quota indicator; wherein the operation includes at least one of the following: 1: View, add, modify. 5.根据权利要求4所述的方法,其特征在于,所述配额中心包括配额模块;所述方法还包括:5. The method according to claim 4, characterized in that the quota center includes a quota module; the method further includes: 响应于从所述配额中心的管理模块获取所述配额指标中的配额总量,利用所述配额中心的配额模块确定所述用户终端的资源池的当前使用量;In response to obtaining the total amount of quota in the quota indicator from the management module of the quota center, using the quota module of the quota center to determine the current usage of the resource pool of the user terminal; 利用所述配额中心的配额模块,基于所述配额总量和所述当前使用量,确定所述用户终端的资源池的剩余使用量;Utilize the quota module of the quota center to determine the remaining usage of the resource pool of the user terminal based on the total quota and the current usage; 基于所述剩余使用量,对所述用户终端的资源池的状态进行调整,得到调整后的状态;其中,所述调整包括以下至少之一:配额校验、配额更新、配额冻结、配额解冻。Based on the remaining usage, the status of the resource pool of the user terminal is adjusted to obtain an adjusted status; wherein the adjustment includes at least one of the following: quota verification, quota update, quota freezing, and quota unfreezing. 6.根据权利要求1所述的方法,其特征在于,所述响应于接收用户终端的配额请求,确定与所述配额请求中的用户信息所匹配的配额指标,包括:6. The method according to claim 1, characterized in that, in response to receiving a quota request from a user terminal, determining a quota indicator that matches the user information in the quota request includes: 响应于接收所述用户终端的配额请求,获取校验信息;In response to receiving the quota request from the user terminal, obtain verification information; 利用预设的查询接口,对所述校验信息进行校验,得到校验结果;Use a preset query interface to verify the verification information and obtain the verification results; 在所述校验结果表征校验成功的情况下,确定与所述配额请求中的用户信息所匹配的配额指标;其中,所述用户终端进行配额所表征的配额工程用于为预设的其他工程提供资源额度的管理,所述其他工程包括以下至少之一:存储工程、网络工程、秘钥管理工程、共享流量包工程。When the verification result indicates that the verification is successful, determine the quota indicator that matches the user information in the quota request; wherein the user terminal performs the quota project represented by the quota to provide other preset The project provides resource quota management, and the other projects include at least one of the following: storage project, network project, key management project, and shared traffic package project. 7.根据权利要求1至6任一项所述的方法,其特征在于,所述方法还包括:7. The method according to any one of claims 1 to 6, characterized in that the method further includes: 在所述用户终端的资源池的剩余使用量满足预设条件的情况下,对所述剩余使用量进行配额冻结处理,得到预占用配额量和预占流水号;When the remaining usage of the resource pool of the user terminal meets the preset conditions, perform quota freezing processing on the remaining usage to obtain the pre-occupied quota amount and pre-occupied serial number; 在预设的产品订购成功的情况下,基于所述预占流水号对所述预占用配额量进行配额解冻处理,得到已使用配额量;其中,所述已使用配额量用于在所述产品退订成功后对所述用户终端的资源池的剩余使用量进行更新。When the preset product order is successful, the pre-occupied quota amount is subjected to a quota unfreezing process based on the pre-occupied serial number to obtain the used quota amount; wherein the used quota amount is used for the product. After the unsubscription is successful, the remaining usage of the resource pool of the user terminal is updated. 8.一种资源配额装置,其特征在于,应用于配额中心,包括:8. A resource quota device, characterized in that it is applied to a quota center and includes: 第一确定模块,用于响应于接收用户终端的配额请求,确定与所述配额请求中的用户信息所匹配的配额指标;其中,所述配额指标至少包括配额维度;A first determination module, configured to respond to receiving a quota request from a user terminal and determine a quota indicator that matches the user information in the quota request; wherein the quota indicator at least includes a quota dimension; 分配模块,用于在所述用户终端身份合法的情况下,采用与所述配额维度相匹配的配额方式,基于所述配额指标对所述用户终端进行配额,得到所述用户终端所对应的至少一个资源池。An allocation module configured to, when the identity of the user terminal is legal, use a quota method that matches the quota dimension, perform quota on the user terminal based on the quota indicator, and obtain at least the minimum number corresponding to the user terminal. A resource pool. 9.一种计算机设备,包括存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现权利要求1至7任一项所述方法中的步骤。9. A computer device, including a memory and a processor, the memory stores a computer program that can be run on the processor, characterized in that when the processor executes the program, any one of claims 1 to 7 is implemented steps in the method. 10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该计算机程序被处理器执行时实现权利要求1至7任一项所述方法中的步骤。10. A computer-readable storage medium with a computer program stored thereon, characterized in that when the computer program is executed by a processor, the steps in the method of any one of claims 1 to 7 are implemented.
CN202211448668.3A 2022-11-18 2022-11-18 Resource quota methods, devices, equipment and storage media Pending CN116775267A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211448668.3A CN116775267A (en) 2022-11-18 2022-11-18 Resource quota methods, devices, equipment and storage media

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211448668.3A CN116775267A (en) 2022-11-18 2022-11-18 Resource quota methods, devices, equipment and storage media

Publications (1)

Publication Number Publication Date
CN116775267A true CN116775267A (en) 2023-09-19

Family

ID=87984799

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211448668.3A Pending CN116775267A (en) 2022-11-18 2022-11-18 Resource quota methods, devices, equipment and storage media

Country Status (1)

Country Link
CN (1) CN116775267A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117827453A (en) * 2023-12-29 2024-04-05 柏域信息科技(上海)有限公司 Storage resource ordering method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117827453A (en) * 2023-12-29 2024-04-05 柏域信息科技(上海)有限公司 Storage resource ordering method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109710236B (en) Service development and implementation method, device, platform and medium based on shared service
CN111344706B (en) Method and system for managing transactions on blockchain
CN107430528B (en) Opportunistic resource migration to optimize resource placement
US20190324819A1 (en) Distributed-system task assignment method and apparatus
US9813423B2 (en) Trust-based computing resource authorization in a networked computing environment
CN106664321B (en) Allocation of computing resources based on placement strategy
JP5627187B2 (en) Information processing apparatus, information processing method, and program
US9043445B2 (en) Linking instances within a cloud computing environment
US9148426B2 (en) Securely identifying host systems
US10620928B2 (en) Global cloud applications management
CN107895049A (en) Data processing method and device, computer readable storage medium, electronic device
WO2021082649A1 (en) List update method and apparatus, readable medium, and electronic device
WO2021232860A1 (en) Communication method, apparatus and system
CN110381150B (en) Data processing method and device on block chain, electronic equipment and storage medium
US11881996B2 (en) Input and output for target device communication
CN116775267A (en) Resource quota methods, devices, equipment and storage media
KR20210065817A (en) Apparatus for Layer switching of Deep Learning Private Cloud Service
CN115914236B (en) Storage space allocation adjustment method and device, electronic equipment and storage medium
CN117407159A (en) Memory space management method and device, equipment and storage medium
CN115220907A (en) Resource scheduling method, device, electronic device and storage medium
CN116016561A (en) Data synchronization method and device
US11558387B2 (en) Validation of approver identifiers in a cloud computing environment
US11121981B1 (en) Optimistically granting permission to host computing resources
US20240152389A1 (en) Direct launch for asynchronous actions
US12137145B1 (en) Nested resource identity management for cloud resources

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination