Movatterモバイル変換


[0]ホーム

URL:


CN115225714A - Resource processing method and system for cloud service - Google Patents

Resource processing method and system for cloud service
Download PDF

Info

Publication number
CN115225714A
CN115225714ACN202210631717.0ACN202210631717ACN115225714ACN 115225714 ACN115225714 ACN 115225714ACN 202210631717 ACN202210631717 ACN 202210631717ACN 115225714 ACN115225714 ACN 115225714A
Authority
CN
China
Prior art keywords
resource
exclusive
granularity
server
resources
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.)
Granted
Application number
CN202210631717.0A
Other languages
Chinese (zh)
Other versions
CN115225714B (en
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.)
Alibaba China Co Ltd
Original Assignee
Alibaba China 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 Alibaba China Co LtdfiledCriticalAlibaba China Co Ltd
Priority to CN202210631717.0ApriorityCriticalpatent/CN115225714B/en
Publication of CN115225714ApublicationCriticalpatent/CN115225714A/en
Application grantedgrantedCritical
Publication of CN115225714BpublicationCriticalpatent/CN115225714B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本发明公开了一种云服务的资源处理方法和系统。其中,该方法包括:获取来自对象的资源分配请求,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源;确定专属资源的资源粒度,其中,资源粒度用于表示专属资源的级别;向与资源粒度对应的服务器发送资源分配请求,以触发服务器为对象分配专属资源。本发明解决了难以向对象分配有效的资源的技术问题,达到了提高向对象分配有效的资源的技术效果。

Figure 202210631717

The invention discloses a resource processing method and system for cloud service. Wherein, the method includes: obtaining a resource allocation request from an object, wherein the resource allocation request is used to request to allocate exclusive resources in the cloud service for the object, and the exclusive resources are resources exclusive to the object; determining the resource granularity of the exclusive resources, wherein, The resource granularity is used to indicate the level of exclusive resources; a resource allocation request is sent to the server corresponding to the resource granularity to trigger the server to allocate exclusive resources to the object. The invention solves the technical problem that it is difficult to allocate effective resources to objects, and achieves the technical effect of improving the allocation of effective resources to objects.

Figure 202210631717

Description

Translated fromChinese
云服务的资源处理方法和系统Resource processing method and system for cloud service

技术领域technical field

本发明涉及资源处理领域,具体而言,涉及一种云服务的资源处理方法和系统。The present invention relates to the field of resource processing, in particular, to a resource processing method and system for cloud services.

背景技术Background technique

目前,在进行资源分配时,可以是静态实现集群级别的资源多租,但在遇到噪声邻居(noisy neighbor)问题的时候,爆炸半径过大,被影响到的对象过多,从而存在难以向对象分配有效的资源的技术问题。At present, when resource allocation is performed, cluster-level resource multi-renting can be implemented statically, but when encountering the problem of noisy neighbors, the explosion radius is too large, and too many objects are affected, which makes it difficult to The technical problem of object allocating efficient resources.

针对上述的问题,目前尚未提出有效的解决方案。For the above problems, no effective solution has been proposed yet.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供了一种云服务的资源处理方法和系统,以至少解决难以向对象分配有效的资源的技术问题。Embodiments of the present invention provide a method and system for processing resources of cloud services, so as to at least solve the technical problem that it is difficult to allocate effective resources to objects.

根据本发明实施例的一个方面,提供了一种云服务的资源处理方法,包括:获取来自对象的资源分配请求,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源;确定专属资源的资源粒度,其中,资源粒度用于表示专属资源的级别;向与资源粒度对应的服务器发送资源分配请求,以触发服务器为对象分配专属资源。According to an aspect of the embodiments of the present invention, a method for processing resources of a cloud service is provided, including: acquiring a resource allocation request from an object, wherein the resource allocation request is used to request to allocate an exclusive resource in the cloud service for the object, and the exclusive resource is the resource exclusive to the object; determines the resource granularity of the exclusive resource, where the resource granularity is used to indicate the level of the exclusive resource; sends a resource allocation request to the server corresponding to the resource granularity to trigger the server to allocate the exclusive resource to the object.

根据本发明实施例的一方面,从对象侧提供了另一种云服务的资源处理方法,包括:向服务器发送资源分配请求,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源,服务器与专属资源的资源粒度相对应;获取服务器响应资源分配请求而返回的专属资源。According to an aspect of the embodiments of the present invention, another method for processing resources of cloud services is provided from the object side, including: sending a resource allocation request to a server, wherein the resource allocation request is used to request to allocate exclusive resources in the cloud service to the object , the exclusive resource is the resource exclusive to the object, and the server corresponds to the resource granularity of the exclusive resource; obtains the exclusive resource returned by the server in response to the resource allocation request.

根据本发明实施例的另一方面,提供了一种云服务的资源处理装置,包括:第一获取单元,用于获取来自对象的资源分配请求,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源;确定单元,用于确定专属资源的资源粒度,其中,资源粒度用于表示专属资源的级别;第一发送单元,用于向与资源粒度对应的服务器发送资源分配请求,以触发服务器为对象分配专属资源。According to another aspect of the embodiments of the present invention, there is provided a resource processing apparatus for cloud services, including: a first obtaining unit, configured to obtain a resource allocation request from an object, wherein the resource allocation request is used for requesting to allocate a cloud for the object The exclusive resource in the service, the exclusive resource is the resource exclusive to the object; the determining unit is used to determine the resource granularity of the exclusive resource, where the resource granularity is used to indicate the level of the exclusive resource; the first sending unit is used to send the resource granularity to the The corresponding server sends a resource allocation request to trigger the server to allocate exclusive resources to the object.

根据本发明实施例的另一方面,从对象侧提供了一种云服务的资源处理装置,包括:第二发送单元,用于向服务器发送资源分配请求,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源,服务器与专属资源的资源粒度相对应;第二获取单元,用于获取服务器响应资源分配请求而返回的专属资源。According to another aspect of the embodiments of the present invention, a resource processing apparatus for cloud services is provided from an object side, including: a second sending unit, configured to send a resource allocation request to a server, wherein the resource allocation request is used to request an object Allocate the exclusive resources in the cloud service, the exclusive resources are the resources exclusive to the object, and the server corresponds to the resource granularity of the exclusive resources; the second obtaining unit is used to obtain the exclusive resources returned by the server in response to the resource allocation request.

本发明实施例还提供了一种计算机可读存储介质。该计算机可读存储介质包括存储的程序,其中,在程序被处理器运行时控制计算机可读存储介质所在设备执行本发明实施例的云服务的资源处理方法。Embodiments of the present invention also provide a computer-readable storage medium. The computer-readable storage medium includes a stored program, wherein when the program is run by the processor, the device where the computer-readable storage medium is located is controlled to execute the resource processing method of the cloud service according to the embodiment of the present invention.

本发明实施例还提供了一种处理器。该处理器用于运行程序,其中,程序运行时执行本发明实施例的云服务的资源处理方法。The embodiment of the present invention also provides a processor. The processor is used for running a program, wherein the method for processing resources of a cloud service according to the embodiment of the present invention is executed when the program is running.

本发明实施例还提供了一种云服务的资源处理系统。该系统可以包括:接口服务器,用于获取来自对象的资源分配请求,确定云服务中的专属资源的资源粒度,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源,资源粒度用于表示专属资源的级别;服务器,与专属资源的资源粒度相对应,且接收并响应资源分配请求,为对象分配专属资源。The embodiment of the present invention also provides a resource processing system for cloud services. The system may include: an interface server, configured to obtain a resource allocation request from an object, and determine the resource granularity of the exclusive resource in the cloud service, wherein the resource allocation request is used to request to allocate the exclusive resource in the cloud service to the object, and the exclusive resource is The resource granularity is used to indicate the level of the exclusive resource by the resource exclusive to the object; the server, corresponding to the resource granularity of the exclusive resource, receives and responds to the resource allocation request, and allocates the exclusive resource to the object.

在本发明实施例中,获取来自对象的资源分配请求,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源;确定专属资源的资源粒度,其中,资源粒度用于表示专属资源的级别;向与资源粒度对应的服务器发送资源分配请求,以触发服务器为对象分配专属资源,也就是说,在本申请中,通过将对象发起(比如,硬件、应用软件、客户端、账户等)的资源分配请求传递到后端,支持专属资源分配,从而单一账户的问题不会影响到其他账户,极大降低爆炸半径,达到了提高向对象分配有效的资源的技术效果,从而难以向对象分配有效的资源的技术问题。In the embodiment of the present invention, a resource allocation request from an object is obtained, wherein the resource allocation request is used to request to allocate an exclusive resource in the cloud service for the object, and the exclusive resource is a resource exclusive to the object; the resource granularity of the exclusive resource is determined, wherein , the resource granularity is used to represent the level of exclusive resources; a resource allocation request is sent to the server corresponding to the resource granularity to trigger the server to allocate exclusive resources to the object, that is, in this application, by sending the object (for example, hardware, The resource allocation request of application software, client, account, etc.) is passed to the backend to support exclusive resource allocation, so that the problem of a single account will not affect other accounts, greatly reducing the explosion radius, and improving the allocation of effective resources to objects. The technical effect of the problem is that it is difficult to allocate effective resources to the object.

附图说明Description of drawings

此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the attached image:

图1是根据本公开实施例的一种用于实现云服务的资源处理的方法的系统交互的示例性框图;1 is an exemplary block diagram of system interactions of a method for implementing resource processing of cloud services according to an embodiment of the present disclosure;

图2是根据本发明实施例的一种云服务的资源处理方法的流程图;2 is a flowchart of a method for processing resources of a cloud service according to an embodiment of the present invention;

图3是根据本发明实施例提供的人机交互场景下的另一种电力系统的数据处理方法的流程图;3 is a flowchart of another data processing method for a power system in a human-computer interaction scenario provided according to an embodiment of the present invention;

图4是根据本公开实施例的一种通过动态回收与创建实现低成本高隔离性的Serverless资源分配模型的架构的示意图;4 is a schematic diagram of an architecture of a serverless resource allocation model that realizes low cost and high isolation through dynamic recycling and creation according to an embodiment of the present disclosure;

图5是根据本公开实施例的一种资源分配方法的流程图;5 is a flowchart of a resource allocation method according to an embodiment of the present disclosure;

图6是根据本公开实施例的一种资源闲忙监测与清理检测方法的示意图;6 is a schematic diagram of a method for monitoring and clearing resource busyness according to an embodiment of the present disclosure;

图7是根据本发明实施例的一种云服务的资源处理装置的示意图;7 is a schematic diagram of a resource processing apparatus for a cloud service according to an embodiment of the present invention;

图8是根据本发明实施例的一种从对象侧提供的云服务的资源处理装置的示意图;8 is a schematic diagram of a resource processing apparatus for a cloud service provided from an object side according to an embodiment of the present invention;

图9是根据本发明实施例的一种云服务的资源处理系统的示意图;9 is a schematic diagram of a resource processing system for a cloud service according to an embodiment of the present invention;

图10是根据本发明实施例的一种云服务的资源处理系统的示意图。FIG. 10 is a schematic diagram of a resource processing system for a cloud service according to an embodiment of the present invention.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to make those skilled in the art better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only Embodiments are part of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second" and the like in the description and claims of the present invention and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used may be interchanged under appropriate circumstances such that the embodiments of the invention described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having" and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those expressly listed Rather, those steps or units may include other steps or units not expressly listed or inherent to these processes, methods, products or devices.

首先,在对本申请实施例进行描述的过程中出现的部分名词或术语适用于如下解释:First of all, some nouns or terms that appear in the process of describing the embodiments of the present application are suitable for the following explanations:

无服务器(Serverless),是一种架构思想和服务模型,可以让开发者无需关心基础设施,比如,服务器等,而是专注到应用程序的应用场景逻辑上;Serverless is an architectural idea and service model that allows developers to focus on the application scenario logic of the application without caring about the infrastructure, such as servers, etc.;

多租,是一种单个资源实例可以为多个不同用户组提供服务的资源分配模式;Multi-tenancy is a resource allocation mode in which a single resource instance can provide services to multiple different user groups;

噪声邻居问题(NoisyNeighborProblem),在多租场景下,由于一个租客占用资源过多导致其他租客对共享资源的使用受阻碍的问题;Noise NeighborProblem, in a multi-tenancy scenario, the use of shared resources by other tenants is hindered because one tenant occupies too many resources;

细粒度资源,细粒度是和多租相对应的一个概念,比如,对于一个集群级别的多租资源,单账户级别的资源就是一种细粒度,同个账户下可能有不同的服务,因此,一个账户级别资源也是服务多租账户,如果分配单服务级别的资源,则该资源是相对于账户级别资源的细粒度资源。Fine-grained resources, fine-grained is a concept corresponding to multi-tenancy. For example, for a cluster-level multi-tenant resource, single-account-level resources are a kind of fine-grained resources. There may be different services under the same account. Therefore, An account-level resource is also a service multi-tenant account. If a single-service-level resource is allocated, the resource is a fine-grained resource relative to account-level resources.

实施例1Example 1

根据本发明实施例,还提供了一种云服务的资源处理的方法实施例,需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。According to an embodiment of the present invention, an embodiment of a method for resource processing of a cloud service is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings may be executed in a computer system such as a set of computer-executable instructions and, although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order different from that herein.

本申请实施例一所提供的方法实施例可以在移动终端、计算机终端或者类似的运算装置中执行。图1是根据本公开实施例的一种用于实现云服务的资源处理的方法的系统交互的示例性框图,如图1所示,计算机终端101(或移动设备)可以经由数据网络连接或电子连接到一个或多个服务器(例如安全服务器、资源服务器、游戏服务器等)。一种可选实施例中,计算机终端101(或移动设备)可以是任意移动计算设备等。数据网络连接可以是局域网连接、广域网连接、因特网连接,或其他类型的数据网络连接。计算机终端101(或移动设备)可以执行以连接到由一个服务器(例如安全服务器)或一组服务器执行的网络服务。网络服务器102是基于网络的用户服务,诸如社交网络、云资源、电子邮件、在线支付或其他在线应用。存储器103可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器103可进一步包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至计算机终端101。The method embodiment provided in Embodiment 1 of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. FIG. 1 is an exemplary block diagram of system interaction of a method for implementing resource processing of cloud services according to an embodiment of the present disclosure. As shown in FIG. 1 , a computer terminal 101 (or a mobile device) can be connected via a data network or electronically Connect to one or more servers (eg, security servers, resource servers, game servers, etc.). In an optional embodiment, the computer terminal 101 (or mobile device) may be any mobile computing device or the like. The data network connection may be a local area network connection, a wide area network connection, an Internet connection, or other type of data network connection. The computer terminal 101 (or mobile device) may execute to connect to a web service executed by a server (eg a security server) or a group of servers. Theweb server 102 is a web-based user service, such as social networking, cloud resources, email, online payments, or other online applications.Memory 103 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, thememory 103 may further include memory located remotely from the processor, and these remote memories may be connected to thecomputer terminal 101 through a network.

在上述运行环境下,本申请提供了如图3所示的一种云服务的资源处理方法。Under the above operating environment, the present application provides a resource processing method for a cloud service as shown in FIG. 3 .

图2是根据本发明实施例的一种云服务的资源处理方法的流程图。如图3所示,该方法可以包括以下步骤:FIG. 2 is a flowchart of a method for processing resources of a cloud service according to an embodiment of the present invention. As shown in Figure 3, the method may include the following steps:

步骤S202,获取来自对象的资源分配请求,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源。Step S202: Obtain a resource allocation request from the object, wherein the resource allocation request is used to request to allocate exclusive resources in the cloud service for the object, and the exclusive resources are resources exclusive to the object.

在本发明上述步骤S202提供的技术方案中,在无服务器(Serverless)的服务领域中,云服务商作为Serverless服务的提供者,需要处理用户的专属资源的管控和调度逻辑,而用户只需要关注其服务逻辑和代码逻辑。In the technical solution provided in the above step S202 of the present invention, in the serverless service field, the cloud service provider, as the provider of the serverless service, needs to handle the control and scheduling logic of the user's exclusive resources, and the user only needs to pay attention to Its service logic and code logic.

在该实施例中,资源分配请求可以是用户在对象发起的云服务资源分配请求,云服务可以包括云查询、云存储、云计算和云安全等,在此不做具体限制,云服务资源可以包括云计算资源,数据存储资源,通信设施资源。In this embodiment, the resource allocation request may be a cloud service resource allocation request initiated by the user on the object, and the cloud service may include cloud query, cloud storage, cloud computing, cloud security, etc. Including cloud computing resources, data storage resources, communication facilities resources.

在该实施例中,专属资源可以是为用户分配的云计算资源,比如,对于请求云计算资源的用户,专属资源可以是服务器的核心、存储空间和网络等,在此不做具体限制。需要注意的是,上述仅为示例,实际上专属资源根据用户的请求来确定,上述示例并非对本实施例的限定。In this embodiment, the exclusive resources may be cloud computing resources allocated for users. For example, for users requesting cloud computing resources, the exclusive resources may be the core of the server, storage space, and network, etc., which are not specifically limited here. It should be noted that the above is only an example, in fact, the exclusive resource is determined according to the user's request, and the above example is not a limitation of this embodiment.

在该实施例中,可以获取来自对象的资源分配请求,比如,用户在对象发起云计算资源分配请求之后,该请求从系统的应用程序接口服务器(API Server)传递到后端资源,后端资源可以包括:动态共享资源、账户级别专属资源和账户细粒度级别专属资源。In this embodiment, the resource allocation request from the object can be obtained. For example, after the user initiates the cloud computing resource allocation request on the object, the request is transmitted from the application program interface server (API Server) of the system to the back-end resource, and the back-end resource It can include: dynamic shared resources, account-level exclusive resources, and account-level fine-grained exclusive resources.

需要说明的是,该实施例的上述对象可以为待接收专属资源的账户,该账户可以以不同的登录权限登录客户端,其中,服务的使用者(客户)会建立上述客户端,并在通过账户登录该客户端后,可以向接口服务器(API Server)发送专属资源的分配请求,上述客户端可以是专属于设备或软件,可选地,上述账户可以为具有专属的账号。It should be noted that the above-mentioned object in this embodiment may be an account that is to receive exclusive resources, and the account may log in to the client terminal with different login rights, wherein the user (client) of the service will establish the above-mentioned client terminal, and pass After the account logs in to the client, it can send an allocation request for exclusive resources to the API Server. The client can be dedicated to equipment or software. Optionally, the account can be an exclusive account.

步骤S204,确定专属资源的资源粒度,其中,资源粒度用于表示专属资源的级别。Step S204: Determine the resource granularity of the exclusive resource, where the resource granularity is used to indicate the level of the exclusive resource.

在本发明上述步骤S204提供的技术方案中,在获取来自对象的资源分配请求后,可以对该请求对应的专属资源进行资源粒度的检查。In the technical solution provided by the above step S204 of the present invention, after the resource allocation request from the object is obtained, the resource granularity check can be performed on the exclusive resource corresponding to the request.

在该实施例中,专属资源的级别可以是账户级别、细粒度级别和单服务级别,专属资源最大的级别可以是账户级别。In this embodiment, the level of the exclusive resource may be the account level, the fine-grained level and the single service level, and the maximum level of the exclusive resource may be the account level.

在该实施例中,可以在数据库中进行资源粒度检查,以确定专属资源的资源粒度。In this embodiment, a resource granularity check may be performed in the database to determine the resource granularity of exclusive resources.

步骤S206,向与资源粒度对应的服务器发送资源分配请求,以触发服务器为对象分配专属资源。Step S206, sending a resource allocation request to the server corresponding to the resource granularity to trigger the server to allocate exclusive resources to the object.

在本发明上述步骤S206提供的技术方案中,服务器可以是提供上述后端资源的云服务器,比如,动态共享资源服务器、账户级别专属资源服务器和账户细粒度级别专属资源服务器。In the technical solution provided in the above step S206 of the present invention, the server may be a cloud server that provides the above-mentioned back-end resources, such as a dynamic shared resource server, an account-level dedicated resource server, and an account-level fine-grained dedicated resource server.

在该实施例中,可以向与资源粒度对应的服务器发送资源分配请求,以触发服务器为对象分配专属资源,比如,在确定专属资源的资源粒度后,向与资源粒度对应的后端资源服务器发送资源分配请求,以触发服务器为对象分配专属资源。In this embodiment, a resource allocation request may be sent to the server corresponding to the resource granularity to trigger the server to allocate exclusive resources to the object. For example, after determining the resource granularity of the exclusive resource, send a request to the backend resource server corresponding to the resource granularity Resource allocation request to trigger the server to allocate exclusive resources to the object.

可选地,当确定专属资源的资源粒度为细粒度级别时,向与细粒度级别对应的账户细粒度级别专属资源服务器发送资源分配请求,以触发账户细粒度级别专属资源服务器为对象分配专属资源。Optionally, when it is determined that the resource granularity of the exclusive resource is at the fine-grained level, a resource allocation request is sent to the account fine-grained level exclusive resource server corresponding to the fine-grained level, so as to trigger the account fine-grained level exclusive resource server to allocate exclusive resources to the object. .

可选地,当确定专属资源的资源粒度为账户级别时,向与账户级别对应的账户级别专属资源服务器发送资源分配请求,以触发账户级别专属资源服务器为对象分配专属资源。Optionally, when it is determined that the resource granularity of the exclusive resource is at the account level, a resource allocation request is sent to the account-level exclusive resource server corresponding to the account level to trigger the account-level exclusive resource server to allocate exclusive resources to the object.

可选地,当确定没有用户的请求对应的专属资源时,向动态共享资源服务器发送资源分配请求,然后再为该用户请求创建对应的账户级别专属资源,并向账户级别专属资源服务器发送资源分配请求,以触发账户级别专属资源服务器为对象分配专属资源。Optionally, when it is determined that there is no exclusive resource corresponding to the user's request, a resource allocation request is sent to the dynamic shared resource server, and then a corresponding account-level exclusive resource is created for the user request, and the resource allocation is sent to the account-level exclusive resource server. Request to trigger the account-level exclusive resource server to allocate exclusive resources to the object.

可选地,为了满足用户高隔离性的需求,客户可以根据需求指定隔离粒度,动态共享资源可以自动为客户创建其所需粒度的资源。Optionally, in order to meet the high isolation requirements of users, customers can specify the isolation granularity according to the requirements, and dynamic shared resources can automatically create resources of the required granularity for customers.

通过本申请上述步骤S202至步骤S206,获取来自对象的资源分配请求,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源;确定专属资源的资源粒度,其中,资源粒度用于表示专属资源的级别;向与资源粒度对应的服务器发送资源分配请求,以触发服务器为对象分配专属资源,达到了提高向对象分配有效的资源的技术效果,进而解决了难以向对象分配有效的资源的技术问题。Through the above steps S202 to S206 of the present application, the resource allocation request from the object is obtained, wherein the resource allocation request is used to request to allocate the exclusive resource in the cloud service for the object, and the exclusive resource is the resource exclusive to the object; determine the resource of the exclusive resource Granularity, in which the resource granularity is used to represent the level of exclusive resources; a resource allocation request is sent to the server corresponding to the resource granularity to trigger the server to allocate exclusive resources to the object, which achieves the technical effect of improving the allocation of effective resources to the object, and then solves the problem of It solves the technical problem that it is difficult to allocate efficient resources to objects.

下面对该实施例的上述方法进行进一步地介绍。The above method of this embodiment will be further described below.

作为一种可选的实施方式,该方法还包括:响应于向对象已分配到的专属资源处于闲置状态,回收专属资源。As an optional implementation manner, the method further includes: in response to the exclusive resource allocated to the object being in an idle state, reclaiming the exclusive resource.

在该实施例中,可以响应于向对象已分配到的专属资源处于闲置状态,回收专属资源,比如,当检测到向对象已分配到的专属资源处于闲置状态,产生用于表示该信息的信号,响应于该信号,回收专属资源。In this embodiment, the exclusive resource can be recovered in response to the exclusive resource allocated to the object being in an idle state, for example, when it is detected that the exclusive resource allocated to the object is in an idle state, a signal representing the information is generated , in response to this signal, reclaim exclusive resources.

可选地,本公开包括资源闲忙监测与清理检测器,用于对闲置资源进行扫描,并且及时回收,从而进行成本控制,缓解高隔离性带来的成本和资源压力。Optionally, the present disclosure includes a resource busy monitoring and cleaning detector, which is used to scan idle resources and recycle them in time, so as to perform cost control and relieve cost and resource pressure caused by high isolation.

在该实施例中,可以扫描存在多租的专属资源,并确定该专属资源是否达到清理的预设条件,在达到清理的预设条件时,回收达到清理的预设条件的专属资源,其中,预设条件可以是向对象已分配到的专属资源处于闲置状态。In this embodiment, a multi-tenant exclusive resource may be scanned, and it may be determined whether the exclusive resource meets the preset conditions for cleaning, and when the preset conditions for cleaning are met, the exclusive resources that meet the preset conditions for cleaning are recovered, wherein, The preset condition can be that the exclusive resource allocated to the object is in an idle state.

作为一种可选的实施方式,数据库中记录有已回收的专属资源的资源信息,该方法还包括:再次接收资源分配请求,从数据库中读取资源信息;基于读取出的资源信息向与资源粒度对应的服务器发送资源分配请求,以触发服务器为对象再次分配专属资源。As an optional implementation manner, the resource information of the exclusive resource that has been recovered is recorded in the database, and the method further includes: receiving the resource allocation request again, and reading the resource information from the database; The server corresponding to the resource granularity sends a resource allocation request to trigger the server to allocate exclusive resources to the object again.

在该实施例中,由于Noisy Neighbor的流量具有一定的规律性,即成为一次NoisyNeighbor后再次成为Noisy Neighbor的几率非常大,因此只是简单的回收细粒度的资源后,容易再次遭遇来自同一个租户的Noisy Neighbor问题。In this embodiment, since the traffic of Noisy Neighbor has a certain regularity, that is, the probability of becoming Noisy Neighbor again after becoming Noisy Neighbor is very high. Therefore, after simply recycling fine-grained resources, it is easy to encounter traffic from the same tenant again. Noisy Neighbor problem.

在该实施例中,数据库中会记录细粒度专属资源的相关信息,即使资源本身被回收,后续有新的请求,动态共享资源会进行细粒度共享资源的重建或恢复。In this embodiment, the relevant information of the fine-grained exclusive resources will be recorded in the database. Even if the resources themselves are reclaimed and new requests are made subsequently, the dynamic shared resources will be reconstructed or restored for the fine-grained shared resources.

在该实施例中,可以再次接收资源分配请求,从数据库中读取资源信息,比如,系统再次接收同一用户新的资源分配请求时,可以从数据库中读取对应的专属资源信息。In this embodiment, the resource allocation request can be received again, and the resource information can be read from the database. For example, when the system receives a new resource allocation request from the same user again, the corresponding exclusive resource information can be read from the database.

在该实施例中,可以基于读取出的资源信息向与资源粒度对应的服务器发送资源分配请求,以触发服务器为对象再次分配专属资源,比如,当读取出的资源信息为遭遇过Noisy Neighbor问题的专属资源时,可以对潜在Noisy Neighbor对象进行提前隔离,向与资源粒度对应的服务器发送资源分配请求,以触发服务器为对象再次分配专属资源。In this embodiment, a resource allocation request may be sent to the server corresponding to the resource granularity based on the read resource information, so as to trigger the server to re-allocate exclusive resources to the object. When there are exclusive resources in question, you can isolate potential noise neighbor objects in advance, and send a resource allocation request to the server corresponding to the resource granularity to trigger the server to re-allocate exclusive resources to the object.

作为一种可选的实施方式,步骤S206,触发服务器为对象分配专属资源包括:响应于对象占用共享资源的量大于目标阈值,触发服务器为对象分配专属资源。As an optional implementation manner, in step S206, triggering the server to allocate the exclusive resource to the object includes: in response to the amount of the shared resource occupied by the object being greater than the target threshold, triggering the server to allocate the exclusive resource to the object.

在该实施例中,可以响应于对象占用共享资源的量大于目标阈值,触发服务器为对象分配专属资源,比如,当检测到对象占用共享资源的量大于目标阈值,产生用于表示该信息的信号,响应于该信号,触发服务器为对象分配专属资源。In this embodiment, the server may be triggered to allocate exclusive resources to the object in response to the amount of shared resources occupied by the object being greater than the target threshold. For example, when it is detected that the amount of shared resources occupied by the object is greater than the target threshold, a signal representing the information is generated , in response to the signal, trigger the server to allocate exclusive resources to the object.

在该实施例中,共享资源可以是动态共享资源,动态共享资源主要作为整个方案资源再生的能力提供者,主要负责资源创建和请求搬运,并不进行资源执行,从而可以提高保证专属资源的创建效率。同时对于被资源回收的有Noisy Neighbor记录的租户,通过读取数据库及时恢复其细粒度专属资源In this embodiment, the shared resource may be a dynamic shared resource. The dynamic shared resource is mainly used as a capability provider for resource regeneration of the entire solution, and is mainly responsible for resource creation and request handling, and does not perform resource execution, thereby improving the guarantee of the creation of exclusive resources. efficiency. At the same time, for tenants with Noisy Neighbor records that have been recovered by resources, their fine-grained exclusive resources can be recovered in time by reading the database.

在该实施例中,对于被资源回收的有Noisy Neighbor记录的租户,可以通过读取数据库及时恢复其细粒度专属资源。In this embodiment, for a tenant with a Noisy Neighbor record that has been reclaimed by resources, its fine-grained exclusive resources can be recovered in time by reading the database.

作为一种可选的实施方式,步骤S204,确定专属资源的资源粒度包括:基于对象的属性信息,确定资源粒度。As an optional implementation manner, in step S204, determining the resource granularity of the exclusive resource includes: determining the resource granularity based on attribute information of the object.

在该实施例中,属性信息可以包括对象的目标类型,对象的目标类型,比如,对象为新用户类型。In this embodiment, the attribute information may include the target type of the object, the target type of the object, for example, the object is a new user type.

在该实施例中,可以基于对象的属性信息,确定资源粒度,比如,对于新用户的资源分配请求,确定资源粒度为账户级别,并为该新用户创建账户级别多租专属资源。In this embodiment, the resource granularity can be determined based on the attribute information of the object. For example, for a resource allocation request of a new user, the resource granularity is determined to be the account level, and an account-level multi-tenancy exclusive resource is created for the new user.

作为一种可选的实施方式,基于对象的属性,确定资源粒度,该方法包括:响应于属性信息用于表示对象的目标类型,确定资源粒度为第一资源粒度,其中,第一资源粒度用于表示专属资源的级别为基于账户使用的级别。As an optional implementation manner, the resource granularity is determined based on the attributes of the object, and the method includes: in response to the attribute information being used to represent the target type of the object, determining the resource granularity to be the first resource granularity, wherein the first resource granularity is defined as a first resource granularity. Indicates that the level of exclusive resources is based on account usage.

在该实施例中,可以响应于属性信息用于表示对象的目标类型,确定资源粒度为第一资源粒度,比如,当检测到属性信息用于表示对象的目标类型,产生用于表示该信息的信号,响应于该信号,确定资源粒度为第一资源粒度。In this embodiment, the resource granularity may be determined as the first resource granularity in response to the attribute information being used to represent the target type of the object. A signal, in response to the signal, the resource granularity is determined to be the first resource granularity.

作为一种可选的实施方式,向与资源粒度对应的服务器发送资源分配请求,以触发服务器为对象分配专属资源,该方法包括:向与第一资源粒度对应的服务器发送资源分配请求,以触发服务器创建对象的第一专属资源,其中,专属资源包括第一专属资源。As an optional implementation manner, sending a resource allocation request to a server corresponding to a resource granularity to trigger the server to allocate exclusive resources to an object, the method includes: sending a resource allocation request to a server corresponding to a first resource granularity to trigger The server creates a first exclusive resource of the object, where the exclusive resource includes the first exclusive resource.

在该实施例中,与第一资源粒度对应的服务器可以是与户级别专属资源对应的后端,第一专属资源可以是账户级别专属资源,账户级别专属资源也可以是称为多租专属资源。In this embodiment, the server corresponding to the first resource granularity may be the backend corresponding to the user-level exclusive resources, the first exclusive resources may be account-level exclusive resources, and the account-level exclusive resources may also be called multi-tenant exclusive resources .

在该实施例中,可以向与第一资源粒度对应的服务器发送资源分配请求,以触发服务器创建对象的第一专属资源,比如,向与账户级别专属资源对应的后端发送资源分配请求,以触发该后端创建对象的账户级别专属资源。In this embodiment, a resource allocation request may be sent to the server corresponding to the first resource granularity to trigger the server to create the first exclusive resource of the object, for example, a resource allocation request may be sent to the backend corresponding to the account-level exclusive resource to The account-level exclusive resource that triggers this backend to create an object.

在该实施例中,最大粒度的资源为账户级别的专属资源,并且支持更细粒度的专属资源分配,因而单一账户的问题不会影响到其他账户,达到了极大降低爆炸半径的技术效果。In this embodiment, the resource with the largest granularity is the exclusive resource at the account level, and supports more fine-grained exclusive resource allocation, so the problem of a single account will not affect other accounts, and the technical effect of greatly reducing the explosion radius is achieved.

作为一种可选的实施方式,步骤S204,确定专属资源的资源粒度,该方法包括:在资源分配请求中确定资源粒度为第二资源粒度,其中,第二资源粒度用于表示专属资源的级别小于基于账户使用的级别。As an optional implementation manner, in step S204, the resource granularity of the exclusive resource is determined, and the method includes: determining in the resource allocation request that the resource granularity is the second resource granularity, where the second resource granularity is used to indicate the level of the exclusive resource Less than the level based on account usage.

在该实施例中,第二资源粒度可以是细粒度专属资源,细粒度专属资源可以是专属资源的级别小于账户级别的专属资源。In this embodiment, the second resource granularity may be a fine-grained exclusive resource, and the fine-grained exclusive resource may be an exclusive resource whose level of the exclusive resource is lower than that of the account level.

在该实施例中,可以在资源分配请求中确定资源粒度为第二资源粒度,比如,如果客户的请求有细粒度专属资源,则优先将其请求放入细粒度专属资源。In this embodiment, the resource granularity may be determined as the second resource granularity in the resource allocation request. For example, if the client's request has a fine-grained exclusive resource, its request is preferentially placed in the fine-grained exclusive resource.

作为一种可选的实施方式,向与资源粒度对应的服务器发送资源分配请求,以触发服务器为对象分配专属资源,该方法包括:响应于第二资源粒度的第二专属资源已回收过,向与第二资源粒度对应的服务器发送资源分配请求,以触发服务器创建对象的第二专属资源。As an optional implementation manner, sending a resource allocation request to a server corresponding to the resource granularity to trigger the server to allocate exclusive resources to the object, the method includes: in response to the second exclusive resource of the second resource granularity having been reclaimed, sending a resource allocation request to the server. The server corresponding to the second resource granularity sends a resource allocation request to trigger the server to create the second exclusive resource of the object.

在该实施例中,可以响应于第二资源粒度的第二专属资源已回收过,向与第二资源粒度对应的服务器发送资源分配请求,以触发服务器创建对象的第二专属资源,比如,当检测到第二资源粒度的第二专属资源已回收过,产生用于表示该信息的信号,响应于该信号,向与第二资源粒度对应的服务器发送资源分配请求,以触发服务器创建对象的第二专属资源。In this embodiment, a resource allocation request may be sent to the server corresponding to the second resource granularity in response to the second exclusive resource of the second resource granularity being reclaimed, so as to trigger the server to create the second exclusive resource of the object, for example, when It is detected that the second exclusive resource of the second resource granularity has been recycled, a signal for representing the information is generated, and in response to the signal, a resource allocation request is sent to the server corresponding to the second resource granularity to trigger the server to create the first step of the object. 2. Exclusive resources.

在该实施例中,对于被回收过细粒度专属资源的请求,可以重新创建其细粒度专属资源,从而达到了对潜在Noisy Neighbor对象进行提前隔离的技术效果。In this embodiment, for requests for fine-grained exclusive resources that have been recycled, the fine-grained exclusive resources can be recreated, thereby achieving the technical effect of pre-isolating potential Noisy Neighbor objects.

作为一种可选的实施方式,该方法还包括:响应于资源分配请求未包括第二资源粒度,触发服务器创建对象的第一专属资源,其中,专属资源包括第一专属资源。As an optional implementation manner, the method further includes: in response to the resource allocation request not including the second resource granularity, triggering the server to create a first exclusive resource of the object, where the exclusive resource includes the first exclusive resource.

在该实施例中,可以响应于资源分配请求未包括第二资源粒度,触发服务器创建对象的第一专属资源,比如,当检测到资源分配请求未包括第二资源粒度,产生用于表示该信息的信号,响应于该信号,触发服务器创建对象的第一专属资源。In this embodiment, the server may be triggered to create the first exclusive resource of the object in response to the resource allocation request not including the second resource granularity. For example, when it is detected that the resource allocation request does not include the second resource granularity, a message indicating the The signal, in response to the signal, triggers the server to create the object's first exclusive resource.

在该实施例中,如果客户的请求没有细粒度专属资源,则该请求进入多租专属资源服务器,并创建多租专属资源。In this embodiment, if the client's request does not have a fine-grained exclusive resource, the request enters the multi-tenant exclusive resource server, and a multi-tenant exclusive resource is created.

作为一种可选的实施方式,步骤S204,确定专属资源的资源粒度,该方法包括:确定专属资源的资源粒度为第三资源粒度,其中,第三资源粒度用于表示对象冷启动或者未分配有专属资源。As an optional implementation manner, in step S204, the resource granularity of the exclusive resource is determined, and the method includes: determining the resource granularity of the exclusive resource as a third resource granularity, where the third resource granularity is used to indicate that the object is cold-started or unallocated have exclusive resources.

在该实施例中,可以确定专属资源的资源粒度为第三资源粒度,比如,在客户的请求从Api Server传递到后端资源,确定冷启动或者没有专属资源的客户请求的专属资源的资源粒度为第三资源粒度。In this embodiment, the resource granularity of the exclusive resource can be determined as the third resource granularity. For example, when the client's request is transmitted from the Api Server to the back-end resource, the resource granularity of the exclusive resource requested by the client that is cold-started or has no exclusive resource is determined. is the third resource granularity.

作为一种可选的实施方式,向与资源粒度对应的服务器发送资源分配请求,以触发服务器为对象分配专属资源,该方法包括:向与第三资源粒度对应的服务器发送资源分配请求,以触发服务器创建对象的第三专属资源,其中,专属资源包括第三专属资源。As an optional implementation manner, sending a resource allocation request to a server corresponding to a resource granularity to trigger the server to allocate exclusive resources to an object, the method includes: sending a resource allocation request to a server corresponding to a third resource granularity to trigger The server creates a third exclusive resource of the object, wherein the exclusive resource includes the third exclusive resource.

在该实施例中,可以向与第三资源粒度对应的服务器发送资源分配请求,以触发服务器创建对象的第三专属资源,比如,对于冷启动或者没有专属资源的客户,其请求会被放置到动态共享资源,进行专属资源的创建,并被搬运到新创建的专属资源中进行执行。In this embodiment, a resource allocation request may be sent to the server corresponding to the third resource granularity, so as to trigger the server to create the third exclusive resource of the object. Dynamically share resources, create exclusive resources, and move them to newly created exclusive resources for execution.

在本公开上述实施例中,通过动态共享资源,资源闲忙监测和清理检测器,NoisyNeighbor检测器和请求搬运能力的共同配合,实现不同粒度专属资源的动态回收和再生能力,从而将细粒度专属资源的体积维持在可控范围,进而使用本方案的Serverless系统可以通过低成本实现资源高隔离性,高稳定性,为客户提供平滑的资源使用体验,进而解决了难以向对象分配有效的资源的技术问题,达到了提高向对象分配有效的资源的技术效果。In the above-mentioned embodiments of the present disclosure, the dynamic recovery and regeneration capabilities of exclusive resources of different granularities are realized through the joint cooperation of dynamic shared resources, resource busy monitoring and cleaning detectors, NoiseyNeighbor detectors and request handling capabilities, so that fine-grained exclusive resources can be dynamically recovered and regenerated. The volume of resources is maintained in a controllable range, and the serverless system using this solution can achieve high resource isolation and high stability at low cost, provide customers with a smooth resource use experience, and solve the problem of difficult to allocate effective resources to objects. The technical problem achieves the technical effect of improving the allocation of effective resources to the object.

根据本发明实施例,还提供了对象侧的另一种云服务的资源处理方法。According to the embodiment of the present invention, another method for processing resources of a cloud service on the object side is also provided.

图3是根据本发明实施例提供的人机交互场景下的另一种电力系统的数据处理方法的流程图。如图3所示,该方法可以包括以下步骤:FIG. 3 is a flowchart of another data processing method for a power system in a human-computer interaction scenario provided according to an embodiment of the present invention. As shown in Figure 3, the method may include the following steps:

步骤S302,向服务器发送资源分配请求,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源,服务器与专属资源的资源粒度相对应。Step S302 , sending a resource allocation request to the server, wherein the resource allocation request is used to request to allocate exclusive resources in the cloud service to the object, the exclusive resources are resources exclusive to the object, and the server corresponds to the resource granularity of the exclusive resources.

在本发明上述步骤S302提供的技术方案中,可以向服务器发送资源分配请求,服务器在接收到该请求后,基于对象的属性信息,确定该请求的资源粒度,比如,确定对象为新用户,则确定该请求的专属资源为账户级别的专属资源。In the technical solution provided by the above step S302 of the present invention, a resource allocation request may be sent to the server. After receiving the request, the server determines the resource granularity of the request based on the attribute information of the object. For example, if the object is determined to be a new user, then Determine that the requested exclusive resource is an account-level exclusive resource.

步骤S304,获取服务器响应资源分配请求而返回的专属资源。Step S304: Obtain the exclusive resource returned by the server in response to the resource allocation request.

在本发明上述步骤S304提供的技术方案中,可以获取服务器响应资源分配请求而返回的专属资源,比如,在确定该资源分配请求的专属资源为账户级别的专属资源时,对象可以获取该账户级别的专属资源。In the technical solution provided in the above step S304 of the present invention, the exclusive resource returned by the server in response to the resource allocation request can be obtained. For example, when it is determined that the exclusive resource of the resource allocation request is the exclusive resource of the account level, the object can obtain the account level exclusive resource. exclusive resources.

在本公开上述实施例中,通过向服务器发送资源分配请求,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源,服务器与专属资源的资源粒度相对应;获取服务器响应资源分配请求而返回的专属资源,解决了难以向对象分配有效的资源的技术问题,达到了提高向对象分配有效的资源的技术效果。In the above embodiments of the present disclosure, a resource allocation request is sent to the server, wherein the resource allocation request is used to request to allocate exclusive resources in the cloud service to the object, the exclusive resource is the resource exclusive to the object, the resource granularity between the server and the exclusive resource Correspondingly; obtaining the exclusive resources returned by the server in response to the resource allocation request solves the technical problem that it is difficult to allocate effective resources to the object, and achieves the technical effect of improving the allocation of effective resources to the object.

实施例2Example 2

下面对该实施例的上述方法的优选实施方式进行进一步介绍。The preferred implementation of the above method of this embodiment will be further described below.

在Serverless服务领域,客户只需要关注其服务逻辑和代码逻辑,而不需要过多关注底层资源的管控。云服务商作为Serverless服务的提供者,则需要处理客户资源的管控和调度逻辑。在为多个客户提供底层资源的时候,一般需要通过多租来保证资源的规模与成本可控,但是多租必然会引入Serverless的问题,让客户的使用体验变差,甚至严重的Serverless问题会造成多租资源内其他客户应用场景服务受损,停滞。因此又需要引入一定的隔离性保证客户的运行体验,但不加限制的隔离性也会造成过高成本和资源浪费。本方案主要针对以上需求,提出了一个动态实现低成本,高隔离性的Serverless资源分配模型。In the serverless service field, customers only need to pay attention to their service logic and code logic, and do not need to pay too much attention to the management and control of underlying resources. As a provider of serverless services, cloud service providers need to handle the control and scheduling logic of customer resources. When providing underlying resources for multiple customers, it is generally necessary to use multi-renting to ensure that the scale and cost of resources are controllable. However, multi-renting will inevitably introduce serverless problems, which will make the customer experience worse, and even serious serverless problems will As a result, the services of other customer application scenarios in the multi-tenant resource are damaged and stagnant. Therefore, it is necessary to introduce a certain isolation to ensure the operating experience of customers, but unrestricted isolation will also cause excessive costs and waste of resources. This solution mainly aims at the above requirements, and proposes a serverless resource allocation model that dynamically realizes low cost and high isolation.

在相关技术中,采用一种静态多租方案,通过静态实现集群级别的资源多租,或者账户以及更细粒度级别的资源多租。In the related art, a static multi-tenancy scheme is adopted, and the multi-tenancy of resources at the cluster level or the multi-tenancy of resources at the account and more fine-grained level is implemented statically.

然而,该方法在集群级别的资源多租在遇到Noisy Neighbor问题的时候,爆炸半径过大,被影响到的客户过多,且账户级别或更细粒度的资源多租,会随着客户和更细粒度的增长,造成资源膨胀,当冷客户数量上升的时候,会造成极大的资源浪费。However, when this method encounters the Noisy Neighbor problem in cluster-level resource multi-renting, the explosion radius is too large, and too many customers are affected, and account-level or finer-grained resource multi-renting will vary with customer and More fine-grained growth will cause resource expansion. When the number of cold customers increases, it will cause a huge waste of resources.

在相关技术中,采用一种静态多租方案与被动分配细粒度专属资源及回收机制相结合的方案,具体地,静态提供集群级别多租的资源,在遇到Noisy Neighbor后,通过人工干预隔离出Noisy Neighbor,同时对长期不使用的细粒度隔离资源进行回收。In the related art, a static multi-tenancy scheme combined with a passive allocation of fine-grained exclusive resources and a recovery mechanism is adopted. Specifically, cluster-level multi-tenant resources are statically provided, and after encountering Noisy Neighbor, they are isolated through manual intervention. Remove Noise Neighbor and recycle fine-grained isolated resources that have not been used for a long time.

然而,该方法在集群级别的资源多租在遇到Noisy Neighbor问题的时候,爆炸半径过大,被影响到的客户过多,且无法自动分隔Noisy Neighbor,不能及时缓解NoisyNeighbor对多租环境造成的影响,进一步地,Noisy Neighbor的流量具有一定的规律性,即成为一次Noisy Neighbor后再次成为Noisy Neighbor的几率非常大,因此只是简单的回收细粒度的资源后,容易再次遭遇来自同一个租户的Noisy Neighbor问题。However, when the cluster-level resource multi-tenancy encounters the Noisy Neighbor problem, the explosion radius is too large, and too many customers are affected, and the Noisy Neighbor cannot be automatically separated, and the noise caused by the Noisy Neighbor to the multi-tenant environment cannot be alleviated in time. Influence, further, the traffic of Noisy Neighbor has a certain regularity, that is, the probability of becoming Noisy Neighbor again after becoming a Noisy Neighbor is very high, so after simply recycling fine-grained resources, it is easy to encounter Noisy Neighbor from the same tenant again. Neighbor problem.

为了解决上述问题,本方案中通过动态共享资源,资源闲忙监测和清理检测器,Noisy Neighbor检测器和请求搬运能力的共同配合,实现不同粒度专属资源的动态回收和再生能力,从而将细粒度专属资源的体积维持在可控范围,进而使用本方案的Serverless系统可以通过低成本实现资源高隔离性,高稳定性,为客户提供平滑的资源使用体验。In order to solve the above problems, in this scheme, through the joint cooperation of dynamic shared resources, resource busy monitoring and cleaning detectors, noise neighbor detectors and request handling capabilities, the dynamic recovery and regeneration capabilities of exclusive resources of different granularities are realized, so that fine-grained resources can be dynamically recovered and regenerated. The volume of exclusive resources is maintained within a controllable range, and the serverless system using this solution can achieve high resource isolation and high stability at low cost, and provide customers with a smooth resource usage experience.

图4是根据本公开实施例的一种通过动态回收与创建实现低成本高隔离性的Serverless资源分配模型的架构的示意图。如图4所示,该模型包括但不限于:应用程序接口服务器、动态共享资源(不可回收)、客户账户专属资源(可回收)、账号下服务专属资源(可回收)、资源闲忙监测和清理检测器、噪声邻居(Noisy Neighbor)检测器。FIG. 4 is a schematic diagram of an architecture of a serverless resource allocation model that realizes low cost and high isolation through dynamic recycling and creation according to an embodiment of the present disclosure. As shown in Figure 4, the model includes but is not limited to: application program interface server, dynamic shared resources (non-recyclable), customer account-specific resources (recyclable), service-specific resources under the account (recyclable), resource busy monitoring and Cleanup detector, Noise Neighbor detector.

其中,客户账户专属资源包括客户账号#0专属资源、客户账号#1专属资源……客户账号#N专属资源,账号下服务专属资源包括账号#N下服务#0专属资源……账号#N下服务#M专属资源、账号#N下服务#M分组#0专属资源……账号#N下服务#M分组#X专属资源。Among them, the exclusive resources of the customer account include the exclusive resources of the customer account #0, the exclusive resources of the customer account #1...the exclusive resources of the customer account #N, the exclusive resources of the service under the account include the exclusive resources of the service #0 under the account #N...under the account #N The exclusive resources of service #M, the exclusive resources of service #M group #0 under account #N...the exclusive resources of service #M group #X under account #N.

在该实施例中,应用程序接口服务器可以创建资源和请求搬运动态共享资源,通过动态共享资源可以运行请求客户账户专属资源(可回收)、账号下服务专属资源(可回收)。In this embodiment, the application program interface server can create resources and request to transfer dynamic shared resources, and through the dynamic shared resources, it is possible to run and request client account exclusive resources (recyclable) and service exclusive resources (recyclable) under the account.

图5是根据本公开实施例的一种资源分配方法的流程图。如图5所示,首先,客户的请求从Api Server传递到后端资源,对于冷启动或者没有专属资源的客户,其请求会被放置到动态共享资源,进行专属资源的创建,并被搬运到新创建的专属资源中进行执行,其中,对于冷启动客户或者新客户,会优先创建账户级别多租专属资源;其次,对于被回收过细粒度专属资源的请求,将重新创建其细粒度专属资源;然后,如果客户的请求有细粒度专属资源,则优先将其请求放入细粒度专属资源,如果没有则进入多租专属资源;最后,客户可以根据需求指定隔离粒度,动态共享资源可以自动为客户创建其所需粒度的资源,满足客户高隔离性的需求。FIG. 5 is a flowchart of a resource allocation method according to an embodiment of the present disclosure. As shown in Figure 5, first, the customer's request is passed from the Api Server to the back-end resources. For customers who are cold-started or do not have dedicated resources, their requests will be placed in dynamic shared resources, and dedicated resources will be created and moved to Executed in newly created exclusive resources, among which, for cold-start customers or new customers, account-level multi-tenant exclusive resources will be created first; secondly, for requests for fine-grained exclusive resources that have been recycled, their fine-grained exclusive resources will be re-created; Then, if the customer's request has a fine-grained exclusive resource, its request will be placed in the fine-grained exclusive resource first, and if not, it will enter the multi-tenant exclusive resource; finally, the customer can specify the isolation granularity according to the demand, and the dynamic shared resource can automatically be used for the customer. Create resources at the granularity they need to meet customers' high isolation requirements.

在该实施例中,动态共享资源主要作为整个方案资源再生的能力提供者,主要负责资源创建和请求搬运,并不进行资源执行,进而保证专属资源的敏捷创建。同时对于被资源回收的有Noisy Neighbor记录的租户,通过读取数据库及时恢复其细粒度专属资源。In this embodiment, the dynamic shared resource is mainly used as a capability provider for resource regeneration of the entire solution, and is mainly responsible for resource creation and request handling, and does not perform resource execution, thereby ensuring the agile creation of exclusive resources. At the same time, for tenants with Noisy Neighbor records that have been recovered by resources, their fine-grained exclusive resources can be recovered in time by reading the database.

本公开实施例还提供了一种资源闲忙监测与清理检测器,该检测器主要对闲置资源进行扫描,并且及时回收,从而进行成本控制,缓解高隔离性带来的成本和资源压力。Embodiments of the present disclosure also provide a resource busy monitoring and cleaning detector, which mainly scans idle resources and recycles them in time, so as to perform cost control and relieve cost and resource pressure caused by high isolation.

图6是根据本公开实施例的一种资源闲忙监测与清理检测方法的示意图。如图6所示,该资源闲忙监测与清理检测方法可以包括以下步骤:FIG. 6 is a schematic diagram of a method for monitoring and clearing resource busyness according to an embodiment of the present disclosure. As shown in FIG. 6 , the method for monitoring and clearing resource busyness may include the following steps:

步骤S602,扫描所有存在多租的专属资源。Step S602, scan all multi-tenant exclusive resources.

步骤S604,判断扫描到的专属资源是否满足清理标准。Step S604, it is judged whether the scanned exclusive resources meet the cleaning standard.

步骤S606,清理该专属资源。Step S606, clearing the exclusive resource.

如果存在专属资源满足清理标准,则清理该专属资源。If there is an exclusive resource that meets the cleanup criteria, the exclusive resource is cleaned up.

步骤S608,停止清理操作。Step S608, stop the cleaning operation.

如果不存在专属资源满足清理标准,则停止清理操作。If there is no exclusive resource that meets the cleanup criteria, the cleanup operation is stopped.

在本公开实施例中,通过扫描所有存在多租的专属资源,并判断扫描到的专属资源是否满足清理标准,将满足清理标准的专属资源进行清理,并且及时回收,从而达到了进行成本控制,缓解高隔离性带来的成本和资源压力的技术效果。In the embodiment of the present disclosure, by scanning all the exclusive resources with multi-tenancy, and judging whether the scanned exclusive resources meet the cleaning standards, the exclusive resources that meet the cleaning standards are cleaned up and recycled in time, so as to achieve cost control, The technical effect of alleviating the cost and resource pressure brought by high isolation.

在本公开上述实施例中,针对当集群级别的资源多租在遇到Noisy Neighbor问题的时候,爆炸半径过大,被影响到的客户过多的技术问题,本方案中最大为账户粒度的多租,并且支持更细粒度的专属资源分配,从而单一账户的问题不会影响到其他账户,极大降低爆炸半径;针对账户级别或更细粒度的资源多租,会随着客户和更细粒度的增长,造成资源膨胀,当冷客户数量上升的时候,会造成极大的资源浪费的技术问题,本方案引入自动回收机制,及时处理闲置资源,降低资源空转几率;针对无法自动分隔Noisy Neighbor,不能及时缓解Noisy Neighbor对多租环境造成的影响,本方案可以自动监测Noisy Neighbor,及时隔离,并及时对Noisy Neighbor的请求进行搬运,以达到高效缓解Noisy Neighbor的影响的技术效果;针对Noisy Neighbor的流量具有一定的规律性,即成为一次NoisyNeighbor后再次成为Noisy Neighbor的几率非常大,因此只是简单的回收细粒度的资源后,容易再次遭遇来自同一个租户的Noisy Neighbor问题,本方案的数据库中会记录细粒度专属资源的相关信息,即使资源本身被回收,后续有新的请求,动态共享资源会进行细粒度共享资源的重建,从而对潜在Noisy Neighbor对象进行提前隔离。In the above-mentioned embodiments of the present disclosure, when multi-tenancy of cluster-level resources encounters the Noisy Neighbor problem, the explosion radius is too large and the number of affected customers is too large. rent, and support more fine-grained exclusive resource allocation, so that the problem of a single account will not affect other accounts, greatly reducing the explosion radius; for account-level or more fine-grained resource multi-renting, it will change with customers and more fine-grained resources. When the number of cold customers increases, it will cause a huge technical problem of wasting resources. This solution introduces an automatic recycling mechanism to deal with idle resources in a timely manner and reduce the probability of resource idling; for the inability to automatically separate Noisy Neighbor, If the impact of Noisy Neighbor on the multi-tenant environment cannot be alleviated in time, this solution can automatically monitor Noisy Neighbor, isolate it in time, and handle the request of Noisy Neighbor in time to achieve the technical effect of effectively alleviating the impact of Noisy Neighbor; The traffic has a certain regularity, that is, the probability of becoming a Noisy Neighbor again after becoming a Noisy Neighbor is very high. Therefore, after simply recycling fine-grained resources, it is easy to encounter the Noisy Neighbor problem from the same tenant again. Records the relevant information of fine-grained exclusive resources. Even if the resource itself is reclaimed and there is a new request in the future, the dynamic shared resource will reconstruct the fine-grained shared resource, thereby isolating potential noise neighbor objects in advance.

本公开实施例提供了一种利用可信模型进行数据的安全识别的服务网格的示意图。An embodiment of the present disclosure provides a schematic diagram of a service mesh that utilizes a trusted model for secure identification of data.

图7是根据本发明实施例的一种进行云服务的资源处理的服务网格的示意图。如图7所示,该服务网格700主要用于方便多个微服务之间进行安全和可靠的通信,微服务是指将应用程序分解为多个较小的服务或者实例,并分布在不同的集群/机器上运行。FIG. 7 is a schematic diagram of a service mesh for resource processing of cloud services according to an embodiment of the present invention. As shown in Figure 7, theservice mesh 700 is mainly used to facilitate secure and reliable communication between multiple microservices. Microservices refer to decomposing an application into multiple smaller services or instances and distributing them in different running on the cluster/machine.

如图7所示,微服务可以包括应用服务实例A和应用服务实例B,应用服务实例A和应用服务实例B形成服务网格700的功能应用层。在一种实施方式中,应用服务实例A以容器/进程708的形式运行在机器/工作负载容器组714(POD),应用服务实例B以容器/进程710的形式运行在机器/工作负载容器组717(POD)。As shown in FIG. 7 , the microservice may include an application service instance A and an application service instance B, and the application service instance A and the application service instance B form a functional application layer of theservice mesh 700 . In one embodiment, application service instance A runs in the form of a container/process 708 in the machine/workload container group 714 (POD), and application service instance B runs in the form of a container/process 710 in the machine/workload container group 714 717 (POD).

在一种实施方式中,应用服务实例A可以是商品查询服务,应用服务实例B可以是商品下单服务。In one embodiment, the application service instance A may be a commodity query service, and the application service instance B may be a commodity ordering service.

可选地,上述应用服务实例A可以是客户场景下的聊天消息的安全识别服务,应用服务实例B可以是输出风险内容数据服务。Optionally, the above application service instance A may be a security identification service for chat messages in a customer scenario, and the application service instance B may be a service for outputting risk content data.

如图7所示,应用服务实例A和网格代理(sidecar)703共存于机器工作负载容器组714,应用服务实例B和网格代理705共存于机器工作负载容器714。网格代理703和网格代理705形成服务网格700的数据平面层(data plane)。其中,网格代理703和网格代理705分别以容器/进程704,容器/进程704可以接收请求712,以用于进行商品查询服务,网格代理707的形式在运行,并且网格代理703和应用服务实例A之间可以双向通信,网格代理705和应用服务实例B之间可以双向通信。此外,网格代理703和网格代理705之间还可以双向通信。As shown in FIG. 7 , application service instance A and grid proxy (sidecar) 703 coexist in machine workload container group 714 , and application service instance B and grid proxy 705 coexist in machine workload container 714 . Grid proxy 703 and grid proxy 705 form the data plane ofservice mesh 700 . The grid agent 703 and the grid agent 705 are respectively in the form of a container/process 704, the container/process 704 can receive therequest 712 for commodity query service, the grid agent 707 is running, and the grid agent 703 and Two-way communication is possible between application service instances A, and two-way communication is possible between grid proxy 705 and application service instance B. In addition, two-way communication between grid proxy 703 and grid proxy 705 is also possible.

在一种实施方式中,应用服务实例A的所有流量都通过网格代理703被路由到合适的目的地,应用服务实例B的所有网络流量都通过网格代理705被路由到合适的目的地。需要说明的是,在此提及的网络流量包括但不限于超文本传输协议(Hyper Text TransferProtocol,简称为HTTP),表述性状态传递(Representational State Transfer,简称为REST),高性能、通用的开源框架(GRPC),开源的内存中的数据结构存储系统(Redis)等形式。In one embodiment, all traffic for application service instance A is routed through mesh proxy 703 to the appropriate destination, and all network traffic for application service instance B is routed through mesh proxy 705 to the appropriate destination. It should be noted that the network traffic mentioned here includes but is not limited to Hyper Text Transfer Protocol (HTTP), Representational State Transfer (REST), high-performance, general-purpose open source Framework (GRPC), open source in-memory data structure storage system (Redis) and other forms.

在一种实施方式中,可以通过为服务网格700中的代理(Envoy)编写自定义的过滤器(Filter)来实现扩展数据平面层的功能,服务网格代理配置可以是为了使服务网格正确地代理服务流量,实现服务互通和服务治理。网格代理703和网格代理705可以被配置成执行至少如下功能中的一种:服务发现(service discovery),健康检查(health checking),路由(Routing),负载均衡(Load Balancing),认证和授权(authentication andauthorization),以及可观测性(observability)。In one embodiment, the function of extending the data plane layer may be implemented by writing a custom filter (Filter) for the proxy (Envoy) in theservice mesh 700, and the service mesh proxy configuration may be to enable the service mesh Properly proxy service traffic to achieve service interoperability and service governance. Grid proxy 703 and grid proxy 705 may be configured to perform at least one of the following functions: service discovery, health checking, routing, load balancing, authentication, and Authorization (authentication and authorization), and observability (observability).

如图7所示,该服务网格700还包括控制平面层。其中,控制平面层可以是由一组在一个专用的命名空间中运行的服务,在机器/工作负载容器组(machine/Pod)702中由托管控制面组件701来托管这些服务。如图7所示,托管控制面组件701与网格代理703和网格代理705进行双向通信。托管控制面组件701被配置成执行一些控制管理的功能。例如,托管控制面组件701接收网格代理703和网格代理705传送的遥测数据,可以进一步对这些遥测数据做聚合。这些服务,托管控制面组件701还可以提供面向用户的应用程序接口(API),以便较容易地操纵网络行为,以及向网格代理703和网格代理705提供配置数据等。As shown in FIG. 7, theservice mesh 700 also includes a control plane layer. The control plane layer may be a set of services running in a dedicated namespace, which are hosted by the hosting control plane component 701 in a machine/workload container group (machine/Pod) 702 . As shown in FIG. 7 , hosted control plane component 701 is in bidirectional communication with grid proxy 703 and grid proxy 705 . Managed control plane component 701 is configured to perform some control management functions. For example, hosted control plane component 701 receives telemetry data transmitted by grid proxy 703 and grid proxy 705, and can further aggregate the telemetry data. For these services, the hosted control plane component 701 may also provide user-facing application programming interfaces (APIs) for easier manipulation of network behavior, as well as provision of configuration data to grid proxy 703 and grid proxy 705, and the like.

需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。It should be noted that, for the sake of simple description, the foregoing method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence. As in accordance with the present invention, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个计算机可读存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present invention can be embodied in the form of software products that are essentially or contribute to related technologies, and the computer software products are stored in a computer-readable storage medium (such as ROM/RAM, magnetic CD, CD), including several instructions to make a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.

实施例3Example 3

根据本发明实施例,还提供了一种用于实施上述图2所示的云服务的资源处理方法的云服务的资源处理装置。According to an embodiment of the present invention, a resource processing apparatus for a cloud service for implementing the resource processing method for a cloud service shown in FIG. 2 is also provided.

图8是根据本发明实施例的一种云服务的资源处理装置的示意图。如图8所示,该云服务的资源处理装置80可以包括:第一获取单元81、确定单元82和第一发送单元83。FIG. 8 is a schematic diagram of a resource processing apparatus for a cloud service according to an embodiment of the present invention. As shown in FIG. 8 , theresource processing apparatus 80 of the cloud service may include: a first obtainingunit 81 , a determining unit 82 and a first sendingunit 83 .

第一获取单元81,用于获取来自对象的资源分配请求,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源。The first obtainingunit 81 is configured to obtain a resource allocation request from an object, wherein the resource allocation request is used to request to allocate an exclusive resource in the cloud service to the object, and the exclusive resource is a resource exclusive to the object.

确定单元82,用于确定专属资源的资源粒度,其中,资源粒度用于表示专属资源的级别。The determining unit 82 is configured to determine the resource granularity of the exclusive resource, where the resource granularity is used to represent the level of the exclusive resource.

第一发送单元83,用于向与资源粒度对应的服务器发送资源分配请求,以触发服务器为对象分配专属资源。The first sendingunit 83 is configured to send a resource allocation request to the server corresponding to the resource granularity, so as to trigger the server to allocate exclusive resources to the object.

可选地,所述云服务的资源处理装置包括:响应单元,用于响应于向对象已分配到的专属资源处于闲置状态,回收专属资源。Optionally, the resource processing apparatus of the cloud service includes: a response unit, configured to recover the dedicated resource in response to the dedicated resource allocated to the object being in an idle state.

可选地,数据库中记录有已回收的专属资源的资源信息,响应单元还包括:接收模块,用于再次接收资源分配请求,从数据库中读取资源信息;发送模块,用于基于读取出的资源信息向与资源粒度对应的服务器发送资源分配请求,以触发服务器为对象再次分配专属资源。Optionally, the resource information of the exclusive resource that has been recycled is recorded in the database, and the response unit further includes: a receiving module, used to receive the resource allocation request again, and read the resource information from the database; sends a resource allocation request to the server corresponding to the resource granularity to trigger the server to re-allocate exclusive resources to the object.

可选地,第一发送单元83包括:响应模块,用于响应于对象占用共享资源的量大于目标阈值,触发服务器为对象分配专属资源。Optionally, the first sendingunit 83 includes: a response module, configured to trigger the server to allocate an exclusive resource to the object in response to the amount of the shared resource occupied by the object being greater than the target threshold.

可选地,确定单元82包括:第一确定模块,用于基于对象的属性信息,确定资源粒度。Optionally, the determining unit 82 includes: a first determining module, configured to determine the resource granularity based on the attribute information of the object.

可选地,第一确定模块包括:第一响应子模块,用于响应于属性信息用于表示对象的目标类型,确定资源粒度为第一资源粒度,其中,第一资源粒度用于表示专属资源的级别为基于账户使用的级别。Optionally, the first determining module includes: a first response sub-module, configured to determine the resource granularity as the first resource granularity in response to the attribute information used to represent the target type of the object, where the first resource granularity is used to represent exclusive resources The level is based on account usage.

可选地,第一响应子模块包括:发送子单元,用于向与第一资源粒度对应的服务器发送资源分配请求,以触发服务器创建对象的第一专属资源,其中,专属资源包括第一专属资源。Optionally, the first response submodule includes: a sending subunit, configured to send a resource allocation request to a server corresponding to the first resource granularity, so as to trigger the server to create a first exclusive resource of the object, wherein the exclusive resource includes the first exclusive resource. resource.

可选地,确定单元82包括:第二确定模块,用于在资源分配请求中确定资源粒度为第二资源粒度,其中,第二资源粒度用于表示专属资源的级别小于基于账户使用的级别。Optionally, the determining unit 82 includes: a second determining module, configured to determine the resource granularity in the resource allocation request to be the second resource granularity, where the second resource granularity is used to indicate that the level of the exclusive resource is smaller than the level based on account usage.

可选地,第二确定模块包括:第二响应子模块,用于响应于第二资源粒度的第二专属资源已回收过,向与第二资源粒度对应的服务器发送资源分配请求,以触发服务器创建对象的第二专属资源。Optionally, the second determination module includes: a second response sub-module, configured to send a resource allocation request to the server corresponding to the second resource granularity in response to the second exclusive resource of the second resource granularity having been reclaimed, to trigger the server Creates a second exclusive resource for the object.

可选地,第二确定模块还包括:第三响应子模块,用于响应于资源分配请求未包括第二资源粒度,触发服务器创建对象的第一专属资源,其中,专属资源包括第一专属资源。Optionally, the second determination module further includes: a third response sub-module, configured to trigger the server to create a first exclusive resource of the object in response to the resource allocation request not including the second resource granularity, wherein the exclusive resource includes the first exclusive resource .

可选地,确定单元82包括:第三确定模块,用于确定专属资源的资源粒度为第三资源粒度,其中,第三资源粒度用于表示对象冷启动或者未分配有专属资源。Optionally, the determining unit 82 includes: a third determining module, configured to determine that the resource granularity of the dedicated resource is a third resource granularity, where the third resource granularity is used to indicate that the object is cold-started or that no dedicated resource is allocated.

可选地,第三确定模块包括:发送子模块,用于向与第三资源粒度对应的服务器发送资源分配请求,以触发服务器创建对象的第三专属资源,其中,专属资源包括第三专属资源。Optionally, the third determining module includes: a sending submodule, configured to send a resource allocation request to a server corresponding to a third resource granularity, so as to trigger the server to create a third exclusive resource of the object, wherein the exclusive resource includes a third exclusive resource .

在本公开上述实施例中,通过第一获取单元,获取来自对象的资源分配请求,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源;确定单元,确定专属资源的资源粒度,其中,资源粒度用于表示专属资源的级别;第一发送单元,向与资源粒度对应的服务器发送资源分配请求,以触发服务器为对象分配专属资源,也就是说,在本申请中,通过将对象的请求传递到后端,支持专属资源分配,从而单一账户的问题不会影响到其他账户,极大降低爆炸半径,达到了提高向对象分配有效的资源的技术效果,从而解决了难以向对象分配有效的资源的技术问题。In the above-mentioned embodiment of the present disclosure, the resource allocation request from the object is obtained through the first obtaining unit, wherein the resource allocation request is used to request to allocate the exclusive resource in the cloud service for the object, and the exclusive resource is the resource exclusive to the object; determine unit, to determine the resource granularity of the exclusive resource, where the resource granularity is used to indicate the level of the exclusive resource; the first sending unit sends a resource allocation request to the server corresponding to the resource granularity to trigger the server to allocate the exclusive resource to the object, that is to say , in this application, by passing the request of the object to the backend, it supports the allocation of exclusive resources, so that the problem of a single account will not affect other accounts, greatly reducing the explosion radius, and achieving the technology of improving the allocation of effective resources to the object Therefore, the technical problem that it is difficult to allocate effective resources to objects is solved.

此处需要说明的是,上述第一获取单元81、确定单元82和第一发送单元83对应于实施例1中的步骤S202至步骤S206,三个单元与对应的步骤所实现的实例和应用场景相同,但不限于上述实施例一所公开的内容。需要说明的是,上述单元作为装置的一部分可以运行在实施例一提供的系统中。It should be noted here that the above-mentioned first obtainingunit 81 , determining unit 82 and first sendingunit 83 correspond to steps S202 to S206 in Embodiment 1, and examples and application scenarios implemented by the three units and corresponding steps The same, but not limited to the content disclosed in the first embodiment. It should be noted that, as a part of the device, the above unit may run in the system provided in the first embodiment.

根据本发明实施例,从对象侧提供了另一种用于实施上述图3所示的云服务的资源处理方法的云服务的资源处理装置。According to an embodiment of the present invention, another resource processing apparatus for a cloud service for implementing the resource processing method for a cloud service shown in FIG. 3 is provided from the object side.

图9是根据本发明实施例的一种从对象侧提供的云服务的资源处理装置的示意图。如图9所示,该云服务的资源处理装置90可以包括:第二发送单元91和第二获取单元92。FIG. 9 is a schematic diagram of a resource processing apparatus for a cloud service provided from an object side according to an embodiment of the present invention. As shown in FIG. 9 , theresource processing apparatus 90 of the cloud service may include: asecond sending unit 91 and a second obtainingunit 92 .

第一发送单元91,用于向服务器发送资源分配请求,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源,服务器与专属资源的资源粒度相对应。The first sendingunit 91 is configured to send a resource allocation request to the server, wherein the resource allocation request is used to request to allocate exclusive resources in the cloud service to the object, the exclusive resources are resources exclusive to the object, and the resource granularity of the server and the exclusive resources is the same. correspond.

第一获取单元92,用于获取服务器响应资源分配请求而返回的专属资源。The first obtainingunit 92 is configured to obtain the exclusive resource returned by the server in response to the resource allocation request.

此处需要说明的是,上述第二发送单元91和第二获取单元92对应于实施例1中的步骤S302至步骤S304,两个单元与对应的步骤所实现的实例和应用场景相同,但不限于上述实施例一所公开的内容。需要说明的是,上述单元作为装置的一部分可以运行在实施例一提供的系统中。It should be noted here that the above-mentioned second sendingunit 91 and second obtainingunit 92 correspond to steps S302 to S304 in Embodiment 1, and the examples and application scenarios implemented by the two units and the corresponding steps are the same, but not the same. It is limited to the content disclosed in the first embodiment above. It should be noted that, as a part of the device, the above unit may run in the system provided in the first embodiment.

在本公开上述实施例中,通过第一发送单元,向服务器发送资源分配请求,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源,服务器与专属资源的资源粒度相对应;第一获取单元,获取服务器响应资源分配请求而返回的专属资源,从而实现了在对象侧获取服务器响应资源分配请求而返回的专属资源的目的,达到了提高向对象分配有效的资源的技术效果,进而解决了难以向对象分配有效的资源的技术问题。In the above-mentioned embodiments of the present disclosure, a resource allocation request is sent to the server through the first sending unit, wherein the resource allocation request is used to request to allocate exclusive resources in the cloud service to the object, the exclusive resources are resources exclusive to the object, and the server is connected to the object. The resource granularity of the exclusive resources corresponds; the first acquisition unit obtains the exclusive resources returned by the server in response to the resource allocation request, thereby realizing the purpose of acquiring the exclusive resources returned by the server in response to the resource allocation request on the object side, and improving the target The technical effect of allocating effective resources further solves the technical problem that it is difficult to allocate effective resources to objects.

图10是根据本发明实施例的一种云服务的资源处理系统的示意图。如图10所示,该云服务的资源处理系统100可以包括:接口服务器1002和服务器1004。FIG. 10 is a schematic diagram of a resource processing system for a cloud service according to an embodiment of the present invention. As shown in FIG. 10 , theresource processing system 100 of the cloud service may include: aninterface server 1002 and a server 1004 .

接口服务器1002,用于获取来自对象的资源分配请求,确定云服务中的专属资源的资源粒度,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源,资源粒度用于表示专属资源的级别。Theinterface server 1002 is used to obtain a resource allocation request from the object, and determine the resource granularity of the exclusive resource in the cloud service, wherein the resource allocation request is used to request to allocate the exclusive resource in the cloud service for the object, and the exclusive resource is the exclusive resource of the object. Resource, resource granularity is used to represent the level of exclusive resources.

服务器1004,与专属资源的资源粒度相对应,且接收并响应资源分配请求,为对象分配专属资源。The server 1004, corresponding to the resource granularity of the exclusive resource, receives and responds to the resource allocation request, and allocates the exclusive resource to the object.

在本公开上述实施例中,通过对象,发送资源分配请求,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源;接口服务器,获取资源分配请求,确定专属资源的资源粒度,其中,资源粒度用于表示专属资源的级别;服务器,与专属资源的资源粒度相对应,且接收并响应资源分配请求,为对象分配专属资源,达到了提高向对象分配有效的资源的技术效果,进而解决了难以向对象分配有效的资源的技术问题。In the above embodiments of the present disclosure, a resource allocation request is sent through an object, wherein the resource allocation request is used to request to allocate exclusive resources in the cloud service to the object, and the exclusive resources are resources exclusive to the object; the interface server obtains the resource allocation request , determine the resource granularity of exclusive resources, where the resource granularity is used to represent the level of exclusive resources; the server, corresponding to the resource granularity of exclusive resources, receives and responds to resource allocation requests, allocates exclusive resources to objects, and achieves the improvement of The technical effect of allocating effective resources further solves the technical problem that it is difficult to allocate effective resources to objects.

实施例4Example 4

本发明的实施例可以提供一种云服务的资源处理系统,该云服务的资源处理系统可以包括计算机终端,该计算机终端可以是计算机终端群中的任意一个计算机终端设备。可选地,在本实施例中,上述计算机终端也可以替换为移动终端等终端设备。Embodiments of the present invention may provide a resource processing system for cloud services. The resource processing system for cloud services may include a computer terminal, and the computer terminal may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the above-mentioned computer terminal may also be replaced by a terminal device such as a mobile terminal.

可选地,在本实施例中,上述计算机终端可以位于计算机网络的多个网络设备中的至少一个网络设备。Optionally, in this embodiment, the above-mentioned computer terminal may be located in at least one network device among multiple network devices of a computer network.

在本实施例中,上述云服务的资源处理系统可以包括处理器和存储器,上述云服务的资源处理系统可以执行本发明实施例的云服务的资源处理方法中以下步骤的程序代码:获取来自对象的资源分配请求,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源;确定专属资源的资源粒度,其中,资源粒度用于表示专属资源的级别;向与资源粒度对应的服务器发送资源分配请求,以触发服务器为对象分配专属资源。In this embodiment, the resource processing system of the cloud service may include a processor and a memory, and the resource processing system of the cloud service may execute the program code of the following steps in the resource processing method of the cloud service according to the embodiment of the present invention: obtaining the data from the object The resource allocation request is used to request the allocation of exclusive resources in the cloud service for the object, and the exclusive resource is the resource exclusive to the object; determine the resource granularity of the exclusive resource, where the resource granularity is used to indicate the level of the exclusive resource ; Send a resource allocation request to the server corresponding to the resource granularity to trigger the server to allocate exclusive resources to the object.

其中,存储器可用于存储软件程序以及模块,如本发明实施例中的云服务的资源处理方法和装置对应的程序指令/模块,处理器通过运行存储在存储器内的软件程序以及模块,从而执行各种功能应用以及云服务的资源处理,即实现上述的云服务的资源处理方法。存储器可包括高速随机存储器,还可以包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器可进一步包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至计算机终端(或移动终端)。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory can be used to store software programs and modules, such as program instructions/modules corresponding to the resource processing method and apparatus for cloud services in the embodiments of the present invention, and the processor executes each software program and modules stored in the memory by running the software programs and modules. A function application and resource processing of a cloud service, that is, the resource processing method for realizing the above-mentioned cloud service. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory located remotely from the processor, and these remote memories may be connected to the computer terminal (or mobile terminal) through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

处理器可以通过传输装置调用存储器存储的信息及应用程序,以执行下述步骤:获取来自对象的资源分配请求,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源;确定专属资源的资源粒度,其中,资源粒度用于表示专属资源的级别;向与资源粒度对应的服务器发送资源分配请求,以触发服务器为对象分配专属资源。The processor can call the information and application programs stored in the memory through the transmission device to perform the following steps: obtain a resource allocation request from the object, wherein the resource allocation request is used to request the object to allocate exclusive resources in the cloud service, and the exclusive resources are: Determine the resource granularity of the exclusive resource, where the resource granularity is used to represent the level of the exclusive resource; send a resource allocation request to the server corresponding to the resource granularity to trigger the server to allocate the exclusive resource to the object.

可选地,上述处理器还可以执行如下步骤的程序代码:响应于向对象已分配到的专属资源处于闲置状态,回收专属资源。Optionally, the above-mentioned processor may further execute the program code of the following steps: in response to the exclusive resource allocated to the object being in an idle state, reclaiming the exclusive resource.

可选地,上述处理器还可以执行如下步骤的程序代码:再次接收资源分配请求,从数据库中读取资源信息;基于读取出的资源信息向与资源粒度对应的服务器发送资源分配请求,以触发服务器为对象再次分配专属资源。Optionally, the above-mentioned processor can also execute the program code of the following steps: receive the resource allocation request again, and read the resource information from the database; send the resource allocation request to the server corresponding to the resource granularity based on the read resource information, to obtain the resource allocation request. Trigger the server to allocate exclusive resources to the object again.

可选地,上述处理器还可以执行如下步骤之一的程序代码:响应于对象占用共享资源的量大于目标阈值,触发服务器为对象分配专属资源。Optionally, the above processor may further execute the program code of one of the following steps: in response to the amount of shared resources occupied by the object being greater than the target threshold, trigger the server to allocate exclusive resources to the object.

可选地,上述处理器还可以执行如下步骤的程序代码:基于对象的属性信息,确定资源粒度。Optionally, the above-mentioned processor may further execute the program code of the following steps: determining the resource granularity based on the attribute information of the object.

可选地,上述处理器还可以执行如下步骤的程序代码:响应于属性信息用于表示对象的目标类型,确定资源粒度为第一资源粒度,其中,第一资源粒度用于表示专属资源的级别为基于账户使用的级别。Optionally, the above processor may also execute the program code of the following steps: in response to the attribute information being used to represent the target type of the object, determining the resource granularity as the first resource granularity, where the first resource granularity is used to represent the level of the exclusive resource is the level used based on the account.

可选地,上述处理器还可以执行如下步骤的程序代码:向与第一资源粒度对应的服务器发送资源分配请求,以触发服务器创建对象的第一专属资源,其中,专属资源包括第一专属资源。Optionally, the above-mentioned processor may also execute the program code of the following steps: sending a resource allocation request to the server corresponding to the first resource granularity to trigger the server to create the first exclusive resource of the object, wherein the exclusive resource includes the first exclusive resource .

可选地,上述处理器还可以执行如下步骤之一的程序代码:在资源分配请求中确定资源粒度为第二资源粒度,其中,第二资源粒度用于表示专属资源的级别小于基于账户使用的级别。Optionally, the above-mentioned processor may further execute the program code of one of the following steps: determining the resource granularity in the resource allocation request to be the second resource granularity, wherein the second resource granularity is used to indicate that the level of the exclusive resource is smaller than that based on account use. level.

可选地,上述处理器还可以执行如下步骤之一的程序代码:响应于第二资源粒度的第二专属资源已回收过,向与第二资源粒度对应的服务器发送资源分配请求,以触发服务器创建对象的第二专属资源。Optionally, the above-mentioned processor may also execute the program code of one of the following steps: in response to the second exclusive resource of the second resource granularity having been recycled, send a resource allocation request to the server corresponding to the second resource granularity to trigger the server. Creates a second exclusive resource for the object.

可选地,上述处理器还可以执行如下步骤之一的程序代码:响应于资源分配请求未包括第二资源粒度,触发服务器创建对象的第一专属资源,其中,专属资源包括第一专属资源。Optionally, the processor may further execute the program code of one of the following steps: in response to the resource allocation request not including the second resource granularity, triggering the server to create a first exclusive resource of the object, where the exclusive resource includes the first exclusive resource.

可选地,上述处理器还可以执行如下步骤之一的程序代码:确定专属资源的资源粒度为第三资源粒度,其中,第三资源粒度用于表示对象冷启动或者未分配有专属资源。Optionally, the above-mentioned processor may further execute the program code of one of the following steps: determining the resource granularity of the dedicated resource as a third resource granularity, where the third resource granularity is used to indicate that the object is cold-started or that no dedicated resource is allocated.

可选地,上述处理器还可以执行如下步骤之一的程序代码:向与第三资源粒度对应的服务器发送资源分配请求,以触发服务器创建对象的第三专属资源,其中,专属资源包括第三专属资源。Optionally, the above-mentioned processor may also execute the program code of one of the following steps: sending a resource allocation request to the server corresponding to the third resource granularity, so as to trigger the server to create a third exclusive resource of the object, wherein the exclusive resource includes the third resource. Exclusive resources.

作为一种可选地上述实施方式,上述处理器还可以通过传输装置调用存储器存储的信息及应用程序,以执行下述步骤:向服务器发送资源分配请求,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源,服务器与专属资源的资源粒度相对应;获取服务器响应资源分配请求而返回的专属资源。As an optional above-mentioned implementation manner, the above-mentioned processor can also call the information and application program stored in the memory through the transmission device, so as to perform the following steps: send a resource allocation request to the server, wherein the resource allocation request is used for the request as the object Allocate exclusive resources in cloud services. Exclusive resources are resources exclusive to objects. The server corresponds to the resource granularity of exclusive resources. Obtain exclusive resources returned by the server in response to resource allocation requests.

采用本发明实施例,提供了一种云服务的资源处理的方案。通过获取来自对象的资源分配请求,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源;确定专属资源的资源粒度,其中,资源粒度用于表示专属资源的级别;向与资源粒度对应的服务器发送资源分配请求,以触发服务器为对象分配专属资源,解决了难以向对象分配有效的资源的技术问题,达到了提高向对象分配有效的资源的技术效果。By adopting the embodiments of the present invention, a solution for resource processing of cloud services is provided. By obtaining the resource allocation request from the object, the resource allocation request is used to request to allocate the exclusive resource in the cloud service for the object, and the exclusive resource is the resource exclusive to the object; the resource granularity of the exclusive resource is determined, wherein the resource granularity is used to represent The level of exclusive resources; send a resource allocation request to the server corresponding to the resource granularity to trigger the server to allocate exclusive resources to the object, solve the technical problem that it is difficult to allocate effective resources to the object, and achieve the technology of improving the allocation of effective resources to the object Effect.

本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令终端设备相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,计算机可读存储介质可以包括:闪存盘、只读存储器(Read-Only Memory,ROM)、随机存取器(Random Access Memory,RAM)、磁盘或光盘等。Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the computer-readable The storage medium may include: a flash disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.

本发明的实施例还提供了一种计算机可读存储介质。可选地,在本实施例中,上述计算机可读存储介质可以用于保存上述实施例一所提供的电力系统的数据处理方法所执行的程序代码。Embodiments of the present invention also provide a computer-readable storage medium. Optionally, in this embodiment, the above-mentioned computer-readable storage medium may be used to store the program code executed by the data processing method of the power system provided in the above-mentioned first embodiment.

可选地,在本实施例中,上述计算机可读存储介质可以位于计算机网络中计算机终端群中的任意一个计算机终端中,或者位于移动终端群中的任意一个移动终端中。Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

可选地,在本实施例中,计算机可读存储介质被设置为存储用于执行以下步骤的程序代码:获取来自对象的资源分配请求,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源;确定专属资源的资源粒度,其中,资源粒度用于表示专属资源的级别;向与资源粒度对应的服务器发送资源分配请求,以触发服务器为对象分配专属资源。Optionally, in this embodiment, a computer-readable storage medium is configured to store program code for performing the steps of: obtaining a resource allocation request from an object, wherein the resource allocation request is used to request that the object be allocated in a cloud service. The exclusive resource is the resource exclusive to the object; determine the resource granularity of the exclusive resource, where the resource granularity is used to indicate the level of the exclusive resource; send a resource allocation request to the server corresponding to the resource granularity to trigger the server to allocate the object Exclusive resources.

可选地,计算机可读存储介质还被设置为存储用于执行以下步骤的程序代码:响应于向对象已分配到的专属资源处于闲置状态,回收专属资源。Optionally, the computer-readable storage medium is further configured to store program code for performing the steps of: reclaiming the dedicated resource in response to the dedicated resource allocated to the object being in an idle state.

可选地,计算机可读存储介质还被设置为存储用于执行以下步骤的程序代码:再次接收资源分配请求,从数据库中读取资源信息;基于读取出的资源信息向与资源粒度对应的服务器发送资源分配请求,以触发服务器为对象再次分配专属资源。Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: receiving a resource allocation request again, and reading resource information from a database; The server sends a resource allocation request to trigger the server to allocate exclusive resources to the object again.

可选地,计算机可读存储介质还被设置为存储用于执行以下步骤的程序代码:响应于对象占用共享资源的量大于目标阈值,触发服务器为对象分配专属资源。Optionally, the computer-readable storage medium is further configured to store program code for performing the step of triggering the server to allocate the exclusive resource to the object in response to the object occupying the shared resource in an amount greater than the target threshold.

可选地,计算机可读存储介质还被设置为存储用于执行以下步骤的程序代码:基于对象的属性信息,确定资源粒度。Optionally, the computer-readable storage medium is further configured to store program code for performing the steps of: determining resource granularity based on attribute information of the object.

可选地,计算机可读存储介质还被设置为存储用于执行以下步骤的程序代码:响应于属性信息用于表示对象的目标类型,确定资源粒度为第一资源粒度,其中,第一资源粒度用于表示专属资源的级别为基于账户使用的级别。Optionally, the computer-readable storage medium is further configured to store program code for performing the following steps: in response to the attribute information being used to represent the target type of the object, determining the resource granularity as the first resource granularity, wherein the first resource granularity The levels used to represent exclusive resources are based on account usage.

可选地,计算机可读存储介质还被设置为存储用于执行以下步骤的程序代码:向与第一资源粒度对应的服务器发送资源分配请求,以触发服务器创建对象的第一专属资源,其中,专属资源包括第一专属资源。Optionally, the computer-readable storage medium is further configured to store program code for performing the following steps: sending a resource allocation request to a server corresponding to the first resource granularity, to trigger the server to create the first exclusive resource of the object, wherein, The exclusive resource includes the first exclusive resource.

可选地,计算机可读存储介质还被设置为存储用于执行以下步骤的程序代码:在资源分配请求中确定资源粒度为第二资源粒度,其中,第二资源粒度用于表示专属资源的级别小于基于账户使用的级别。Optionally, the computer-readable storage medium is further configured to store program codes for performing the following steps: determining the resource granularity in the resource allocation request to be the second resource granularity, where the second resource granularity is used to represent the level of the exclusive resource Less than the level based on account usage.

可选地,计算机可读存储介质还被设置为存储用于执行以下步骤的程序代码:响应于第二资源粒度的第二专属资源已回收过,向与第二资源粒度对应的服务器发送资源分配请求,以触发服务器创建对象的第二专属资源。Optionally, the computer-readable storage medium is further configured to store program code for performing the following steps: in response to the second exclusive resource of the second resource granularity having been reclaimed, sending a resource allocation to a server corresponding to the second resource granularity request to trigger the server to create a second dedicated resource for the object.

可选地,计算机可读存储介质还被设置为存储用于执行以下步骤的程序代码:响应于资源分配请求未包括第二资源粒度,触发服务器创建对象的第一专属资源,其中,专属资源包括第一专属资源。Optionally, the computer-readable storage medium is further configured to store program code for performing the following steps: in response to the resource allocation request not including the second resource granularity, triggering the server to create a first exclusive resource of the object, wherein the exclusive resource includes The first exclusive resource.

可选地,计算机可读存储介质还被设置为存储用于执行以下步骤的程序代码:确定专属资源的资源粒度为第三资源粒度,其中,第三资源粒度用于表示对象冷启动或者未分配有专属资源。Optionally, the computer-readable storage medium is further configured to store program codes for performing the following steps: determining the resource granularity of the exclusive resource to be a third resource granularity, where the third resource granularity is used to indicate that the object is cold-started or unallocated have exclusive resources.

可选地,计算机可读存储介质还被设置为存储用于执行以下步骤的程序代码:向与第三资源粒度对应的服务器发送资源分配请求,以触发服务器创建对象的第三专属资源,其中,专属资源包括第三专属资源。Optionally, the computer-readable storage medium is further configured to store program code for performing the following steps: sending a resource allocation request to a server corresponding to a third resource granularity, to trigger the server to create a third exclusive resource of the object, wherein, The exclusive resource includes a third exclusive resource.

作为一种可选的上述实施方式,上述计算机可读存储介质还被设置为存储用于执行以下步骤的程序代码:向服务器发送资源分配请求,其中,资源分配请求用于请求为对象分配云服务中的专属资源,专属资源为由对象专属的资源,服务器与专属资源的资源粒度相对应;获取服务器响应资源分配请求而返回的专属资源。As an optional implementation manner, the computer-readable storage medium is further configured to store program codes for performing the following steps: sending a resource allocation request to the server, wherein the resource allocation request is used for requesting to allocate cloud services to an object The exclusive resources in , the exclusive resources are the resources exclusive to the object, and the server corresponds to the resource granularity of the exclusive resources; obtain the exclusive resources returned by the server in response to the resource allocation request.

上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages or disadvantages of the embodiments.

在本发明的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.

在本申请所提供的几个实施例中,应该理解到,所揭露的技术内容,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The apparatus embodiments described above are only illustrative, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components may be combined or Integration into another system, or some features can be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of units or modules may be in electrical or other forms.

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

另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。基于这样的理解,本发明的技术方案本质上或者说对相关技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个计算机可读存储介质中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的计算机可读存储介质包括:U盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention can be embodied in the form of a software product in essence, or the part that contributes to the related technology, or the whole or part of the technical solution, and the computer software product is stored in a computer-readable storage The medium includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned computer-readable storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other various programs that can store program codes medium.

以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above are only the preferred embodiments of the present invention. It should be pointed out that for those skilled in the art, without departing from the principles of the present invention, several improvements and modifications can be made. It should be regarded as the protection scope of the present invention.

Claims (14)

Translated fromChinese
1.一种云服务的资源处理方法,其特征在于,包括:1. a resource processing method of cloud service, is characterized in that, comprises:获取来自对象的资源分配请求,其中,所述资源分配请求用于请求为所述对象分配云服务中的专属资源,所述专属资源为由所述对象专属的资源;obtaining a resource allocation request from an object, wherein the resource allocation request is used to request to allocate an exclusive resource in the cloud service for the object, and the exclusive resource is a resource exclusive to the object;确定所述专属资源的资源粒度,其中,所述资源粒度用于表示所述专属资源的级别;determining the resource granularity of the exclusive resource, wherein the resource granularity is used to represent the level of the exclusive resource;向与所述资源粒度对应的服务器发送所述资源分配请求,以触发所述服务器为所述对象分配所述专属资源。The resource allocation request is sent to a server corresponding to the resource granularity to trigger the server to allocate the exclusive resource to the object.2.根据权利要求1所述的方法,其特征在于,所述方法还包括:2. The method according to claim 1, wherein the method further comprises:响应于向所述对象已分配到的所述专属资源处于闲置状态,回收所述专属资源。In response to the dedicated resource allocated to the object being in an idle state, the dedicated resource is reclaimed.3.根据权利要求2所述的方法,其特征在于,数据库中记录有已回收的所述专属资源的资源信息,所述方法还包括:3. The method according to claim 2, wherein the resource information of the reclaimed exclusive resource is recorded in the database, and the method further comprises:再次接收所述资源分配请求,从所述数据库中读取所述资源信息;Receive the resource allocation request again, and read the resource information from the database;基于读取出的所述资源信息向与所述资源粒度对应的所述服务器发送所述资源分配请求,以触发所述服务器为所述对象再次分配所述专属资源。Based on the read resource information, the resource allocation request is sent to the server corresponding to the resource granularity, so as to trigger the server to re-allocate the exclusive resource to the object.4.根据权利要求1所述的方法,其特征在于,触发所述服务器为所述对象分配所述专属资源,包括:4. The method according to claim 1, wherein triggering the server to allocate the exclusive resource to the object comprises:响应于所述对象占用共享资源的量大于目标阈值,触发所述服务器为所述对象分配所述专属资源。The server is triggered to allocate the exclusive resource to the object in response to the object occupying the shared resource in an amount greater than a target threshold.5.根据权利要求1所述的方法,其特征在于,确定所述专属资源的资源粒度,包括:5. The method according to claim 1, wherein determining the resource granularity of the exclusive resource comprises:基于所述对象的属性信息,确定所述资源粒度。The resource granularity is determined based on the attribute information of the object.6.根据权利要求5所述的方法,其特征在于,基于所述对象的属性,确定所述资源粒度,包括:6. The method according to claim 5, wherein determining the resource granularity based on an attribute of the object comprises:响应于所述属性信息用于表示所述对象的目标类型,确定所述资源粒度为第一资源粒度,其中,所述第一资源粒度用于表示所述专属资源的级别为基于账户使用的级别。In response to the attribute information being used to indicate the target type of the object, determining that the resource granularity is a first resource granularity, wherein the first resource granularity is used to indicate that the level of the exclusive resource is a level based on account usage .7.根据权利要求6所述的方法,其特征在于,向与所述资源粒度对应的服务器发送所述资源分配请求,以触发所述服务器为所述对象分配所述专属资源,包括:7. The method according to claim 6, wherein sending the resource allocation request to a server corresponding to the resource granularity to trigger the server to allocate the exclusive resource to the object comprises:向与所述第一资源粒度对应的服务器发送所述资源分配请求,以触发所述服务器创建所述对象的第一专属资源,其中,所述专属资源包括所述第一专属资源。The resource allocation request is sent to a server corresponding to the first resource granularity to trigger the server to create a first exclusive resource of the object, wherein the exclusive resource includes the first exclusive resource.8.根据权利要求1所述的方法,其特征在于,确定所述专属资源的资源粒度,包括:8. The method according to claim 1, wherein determining the resource granularity of the exclusive resource comprises:在所述资源分配请求中确定所述资源粒度为第二资源粒度,其中,所述第二资源粒度用于表示所述专属资源的级别小于基于账户使用的级别。In the resource allocation request, it is determined that the resource granularity is a second resource granularity, wherein the second resource granularity is used to indicate that the level of the exclusive resource is smaller than the level based on account usage.9.根据权利要求8所述的方法,其特征在于,向与所述资源粒度对应的服务器发送所述资源分配请求,以触发所述服务器为所述对象分配所述专属资源,包括:9. The method according to claim 8, wherein sending the resource allocation request to a server corresponding to the resource granularity to trigger the server to allocate the exclusive resource to the object comprises:响应于所述第二资源粒度的第二专属资源已回收过,向与所述第二资源粒度对应的所述服务器发送所述资源分配请求,以触发所述服务器创建所述对象的所述第二专属资源。In response to that the second exclusive resource of the second resource granularity has been reclaimed, the resource allocation request is sent to the server corresponding to the second resource granularity, so as to trigger the server to create the first resource of the object. 2. Exclusive resources.10.根据权利要求8所述的方法,其特征在于,所述方法还包括:10. The method according to claim 8, wherein the method further comprises:响应于所述资源分配请求未包括所述第二资源粒度,触发所述服务器创建所述对象的第一专属资源,其中,所述专属资源包括所述第一专属资源。In response to the resource allocation request not including the second resource granularity, the server is triggered to create a first dedicated resource for the object, wherein the dedicated resource includes the first dedicated resource.11.根据权利要求1所述的方法,其特征在于,确定所述专属资源的资源粒度,包括:11. The method according to claim 1, wherein determining the resource granularity of the exclusive resource comprises:确定所述专属资源的资源粒度为第三资源粒度,其中,所述第三资源粒度用于表示所述对象冷启动或者未分配有专属资源。The resource granularity of the dedicated resource is determined to be a third resource granularity, where the third resource granularity is used to indicate that the object is cold-started or that no dedicated resource is allocated.12.根据权利要求11所述的方法,其特征在于,向与所述资源粒度对应的服务器发送所述资源分配请求,以触发所述服务器为所述对象分配所述专属资源,包括:12. The method according to claim 11, wherein sending the resource allocation request to a server corresponding to the resource granularity to trigger the server to allocate the exclusive resource to the object comprises:向与所述第三资源粒度对应的所述服务器发送所述资源分配请求,以触发所述服务器创建所述对象的第三专属资源,其中,所述专属资源包括所述第三专属资源。The resource allocation request is sent to the server corresponding to the third resource granularity to trigger the server to create a third exclusive resource of the object, wherein the exclusive resource includes the third exclusive resource.13.根据权利要求1至12中任意一项所述的方法,其特征在于,所述对象为专属接收待分配的所述专属资源的账户。13. The method according to any one of claims 1 to 12, wherein the object is an account that exclusively receives the exclusive resource to be allocated.14.一种云服务的资源处理系统,其特征在于,14. A resource processing system for cloud services, characterized in that:接口服务器,用于获取来自对象的资源分配请求,确定云服务中的专属资源的资源粒度,其中,所述资源分配请求用于请求为所述对象分配所述专属资源,所述专属资源为由所述对象专属的资源,所述资源粒度用于表示所述专属资源的级别;The interface server is used to obtain the resource allocation request from the object, and determine the resource granularity of the exclusive resource in the cloud service, wherein the resource allocation request is used to request to allocate the exclusive resource to the object, and the exclusive resource is the reason the resource specific to the object, and the resource granularity is used to represent the level of the specific resource;服务器,与所述专属资源的资源粒度相对应,且接收并响应所述资源分配请求,为所述对象分配所述专属资源。The server, corresponding to the resource granularity of the dedicated resource, receives and responds to the resource allocation request, and allocates the dedicated resource to the object.
CN202210631717.0A2022-06-062022-06-06 Resource processing method and system for cloud servicesActiveCN115225714B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202210631717.0ACN115225714B (en)2022-06-062022-06-06 Resource processing method and system for cloud services

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202210631717.0ACN115225714B (en)2022-06-062022-06-06 Resource processing method and system for cloud services

Publications (2)

Publication NumberPublication Date
CN115225714Atrue CN115225714A (en)2022-10-21
CN115225714B CN115225714B (en)2024-12-10

Family

ID=83607431

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202210631717.0AActiveCN115225714B (en)2022-06-062022-06-06 Resource processing method and system for cloud services

Country Status (1)

CountryLink
CN (1)CN115225714B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN117971113A (en)*2023-11-302024-05-03中科驭数(北京)科技有限公司 Dynamic resource allocation method, device, electronic device, and medium for storage array

Citations (12)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103377402A (en)*2012-04-182013-10-30国际商业机器公司Multi-user analysis system and corresponding apparatus and method
CN106664321A (en)*2014-08-082017-05-10甲骨文国际公司Placement policy-based allocation of computing resources
CN107003887A (en)*2014-12-222017-08-01英特尔公司Overloaded cpu setting and cloud computing workload schedules mechanism
CN108279974A (en)*2017-01-062018-07-13阿里巴巴集团控股有限公司A kind of cloud resource distribution method and device
US20190065078A1 (en)*2017-08-242019-02-28Hewlett Packard Enterprise Development LpAcquisition of iops and mbps limits independently at a scheduler in a scheduler hierarchy
US20190354388A1 (en)*2018-05-182019-11-21Adobe Inc.Tenant-side detection, classification, and mitigation of noisy-neighbor-induced performance degradation
CN112737827A (en)*2020-12-232021-04-30西安万像电子科技有限公司Resource allocation method, device and system
US20210218690A1 (en)*2020-07-202021-07-15Beijing Baidu Netcom Science And Technology Co., Ltd.Method and apparatus for allocating server resource, electronic device and storage medium
CN113315642A (en)*2020-07-272021-08-27阿里巴巴集团控股有限公司Resource metering processing method and device and cloud service system
CN113890826A (en)*2020-07-022022-01-04瞻博网络公司Method for computer network, network device and storage medium
US20220124167A1 (en)*2021-09-212022-04-21Necati CanpolatMechanism to enable a federated onboarding service in an openroaming framework
CN114500221A (en)*2021-12-282022-05-13阿里巴巴(中国)有限公司Cloud system, public cloud control method, equipment and storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103377402A (en)*2012-04-182013-10-30国际商业机器公司Multi-user analysis system and corresponding apparatus and method
CN106664321A (en)*2014-08-082017-05-10甲骨文国际公司Placement policy-based allocation of computing resources
CN107003887A (en)*2014-12-222017-08-01英特尔公司Overloaded cpu setting and cloud computing workload schedules mechanism
CN108279974A (en)*2017-01-062018-07-13阿里巴巴集团控股有限公司A kind of cloud resource distribution method and device
US20190065078A1 (en)*2017-08-242019-02-28Hewlett Packard Enterprise Development LpAcquisition of iops and mbps limits independently at a scheduler in a scheduler hierarchy
US20190354388A1 (en)*2018-05-182019-11-21Adobe Inc.Tenant-side detection, classification, and mitigation of noisy-neighbor-induced performance degradation
CN113890826A (en)*2020-07-022022-01-04瞻博网络公司Method for computer network, network device and storage medium
US20210218690A1 (en)*2020-07-202021-07-15Beijing Baidu Netcom Science And Technology Co., Ltd.Method and apparatus for allocating server resource, electronic device and storage medium
CN113315642A (en)*2020-07-272021-08-27阿里巴巴集团控股有限公司Resource metering processing method and device and cloud service system
CN112737827A (en)*2020-12-232021-04-30西安万像电子科技有限公司Resource allocation method, device and system
US20220124167A1 (en)*2021-09-212022-04-21Necati CanpolatMechanism to enable a federated onboarding service in an openroaming framework
CN114500221A (en)*2021-12-282022-05-13阿里巴巴(中国)有限公司Cloud system, public cloud control method, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN117971113A (en)*2023-11-302024-05-03中科驭数(北京)科技有限公司 Dynamic resource allocation method, device, electronic device, and medium for storage array

Also Published As

Publication numberPublication date
CN115225714B (en)2024-12-10

Similar Documents

PublicationPublication DateTitle
US12175266B1 (en)Virtual provisioning with implementation resource boundary awareness
CN104270417B (en)A kind of integrated service based on cloud computing provides system and method
US11902173B2 (en)Dynamic allocation of network resources using external inputs
CN109274782B (en)Method and device for collecting website data
CN111585887B (en)Communication method and device based on multiple networks, electronic equipment and storage medium
CN105049268A (en)Distributed computing resource allocation system and task processing method
CN110071965B (en)Data center management system based on cloud platform
CA2811020A1 (en)Virtual resource cost tracking with dedicated implementation resources
US9591079B2 (en)Method and apparatus for managing sessions of different websites
CN105978938A (en)Service processing equipment service status determining method and scheduling equipment
CN114866416A (en)Multi-cluster unified management system and deployment method
CN114338684A (en)Energy management system and method
US10348814B1 (en)Efficient storage reclamation for system components managing storage
CN115225714A (en)Resource processing method and system for cloud service
CN109361675B (en)Information security protection method, system and related components
CN113765871A (en)Fortress management method and device
CN106506568A (en) information interaction system
CN107819754B (en)Anti-hijacking method, monitoring server, terminal and system
Fazio et al.Managing volunteer resources in the cloud
CN113794755A (en)Shared service pushing method and system based on micro-service architecture
CN110049065B (en)Attack defense method, device, medium and computing equipment of security gateway
CN111181929A (en) Heterogeneous hybrid cloud architecture and management method based on shared virtual machine files
CN111625375A (en)Account reservation method and device, storage medium and electronic equipment
CN110011850A (en) Service management method and device in cloud computing system
CN113127191B (en) Resource update method, storage medium and related device

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp