Resource processing method and system for cloud services
By obtaining the resource allocation request of the object and determining the resource granularity, sending requests to the server to allocate exclusive resources, solving the resource allocation difficulties caused by noisy neighbors, and achieving efficient resource allocation and reducing resource waste.
Patent Information
- Application Number
- CN202210631717.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-06
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2042-06-06
AI Technical Summary
When allocating resources, the problem of noise neighbors leads to excessive explosion radius, affecting the allocation of effective resources of objects, and the existing technology has not effectively solved it.
By obtaining the resource allocation request of the object, determining the granularity of the exclusive resource, and sending a request to the corresponding server, triggering the server to allocate exclusive resources to the object, supporting fine-grained resource allocation and dynamic recycling, and reducing the explosion radius.
Effective allocation of resources reduces the impact of noisy neighbors on other objects, improves resource utilization efficiency, and reduces the costs caused by resource waste and high isolation.
Smart Images

Figure CN115225714B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of resource processing, and in particular to a resource processing method and system for cloud services. Background Art
[0002] Currently, when allocating resources, multi-tenancy of resources at the cluster level can be implemented statically. However, when encountering the noisy neighbor problem, the blast radius is too large and too many objects are affected, resulting in a technical problem of difficulty in allocating effective resources to objects.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide a resource processing method and system for a cloud service, so as to at least solve the technical problem that it is difficult to allocate effective resources to objects.
[0005] According to one aspect of an embodiment of the present invention, a resource processing method for a cloud service is provided, comprising: obtaining a resource allocation request from an object, wherein the resource allocation request is used to request allocation of exclusive resources in the cloud service to the object, wherein the exclusive resources are resources exclusive to the object; determining the resource granularity of the exclusive resources, wherein the resource granularity is used to represent the level of the exclusive resources; and sending a resource allocation request to a server corresponding to the resource granularity to trigger the server to allocate exclusive resources to the object.
[0006] According to one aspect of an embodiment of the present invention, another resource processing method for a cloud service is provided from the object side, including: sending a resource allocation request to a server, wherein the resource allocation request is used to request allocation of exclusive resources in the cloud service for the object, the exclusive resources being resources exclusive to the object, and the resource granularity of the server corresponds to the exclusive resources; and obtaining the exclusive resources returned by the server in response to the resource allocation request.
[0007] According to another aspect of an embodiment of the present invention, a resource processing device for a cloud service is provided, comprising: a first acquisition unit, used to acquire a resource allocation request from an object, wherein the resource allocation request is used to request allocation of exclusive resources in the cloud service to the object, wherein the exclusive resources are resources exclusive to the object; a determination unit, used to determine the resource granularity of the exclusive resources, wherein the resource granularity is used to represent the level of the exclusive resources; and a first sending unit, used to send the resource allocation request to a server corresponding to the resource granularity, so as to trigger the server to allocate exclusive resources to the object.
[0008] According to another aspect of an embodiment of the present invention, a resource processing device for a cloud service is provided from the object side, including: a second sending unit, used to send a resource allocation request to a server, wherein the resource allocation request is used to request allocation of exclusive resources in the cloud service for the object, the exclusive resources are resources exclusive to the object, and the resource granularity of the server corresponds to the exclusive resources; a second acquisition unit, used to acquire the exclusive resources returned by the server in response to the resource allocation request.
[0009] The embodiment of the present invention further provides a computer-readable storage medium, which includes a stored program, wherein when the program is executed by a processor, the device where the computer-readable storage medium is located is controlled to execute the resource processing method for the cloud service of the embodiment of the present invention.
[0010] The embodiment of the present invention further provides a processor, which is used to run a program, wherein the resource processing method of the cloud service of the embodiment of the present invention is executed when the program is run.
[0011] The embodiment of the present invention also provides a resource processing system for cloud services. The system may include: an interface server, used to obtain a resource allocation request from an object, and determine the resource granularity of exclusive resources in the cloud service, wherein the resource allocation request is used to request allocation of exclusive resources in the cloud service to the object, the exclusive resources are resources exclusive to the object, and the resource granularity is used to indicate the level of the exclusive resources; a server, corresponding to the resource granularity of the exclusive resources, and receiving and responding to the resource allocation request, and allocating exclusive resources to the object.
[0012] In an embodiment of the present invention, a resource allocation request is obtained from an object, wherein the resource allocation request is used to request allocation of exclusive resources in a cloud service to the object, wherein the exclusive resources are resources exclusive to the object; the resource granularity of the exclusive resources is determined, wherein the resource granularity is used to represent the level of the exclusive resources; and a resource allocation request is sent to a server corresponding to the resource granularity to trigger the server to allocate exclusive resources to the object. That is to say, in the present application, exclusive resource allocation is supported by transmitting a resource allocation request initiated by an object (e.g., hardware, application software, client, account, etc.) to a backend, so that a problem with a single account will not affect other accounts, thereby greatly reducing the explosion radius and achieving the technical effect of improving the allocation of effective resources to objects, thereby solving the technical problem of difficulty in allocating effective resources to objects. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this 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 drawings:
[0014] Figure 1is 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;
[0015] Figure 2 is a flow chart of a resource processing method for a cloud service according to an embodiment of the present invention;
[0016] Figure 3 is a flow chart of another data processing method for a power system in a human-computer interaction scenario provided by an embodiment of the present invention;
[0017] Figure 4 It is a schematic diagram of the architecture of a Serverless resource allocation model that realizes low cost and high isolation through dynamic recovery and creation according to an embodiment of the present disclosure;
[0018] Figure 5 is a flow chart of a resource allocation method according to an embodiment of the present disclosure;
[0019] Figure 6 is a schematic diagram of a resource idle-busy monitoring and cleanup detection method according to an embodiment of the present disclosure;
[0020] Figure 7 is a schematic diagram of a resource processing device for a cloud service according to an embodiment of the present invention;
[0021] Figure 8 is a schematic diagram of a resource processing device for a cloud service provided from an object side according to an embodiment of the present invention;
[0022] Fig. 9 is a schematic diagram of a resource processing system for a cloud service according to an embodiment of the present invention;
[0023] Fig.10 is a schematic diagram of a resource processing system for a cloud service according to an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:
[0027] Serverless is an architectural concept and service model that allows developers to focus on the application scenario logic of the application without having to worry about infrastructure, such as servers.
[0028] Multi-tenancy is a resource allocation model in which a single resource instance can provide services to multiple different user groups;
[0029] Noisy Neighbor Problem: In a multi-tenant scenario, one tenant occupies too many resources, which hinders other tenants from using shared resources.
[0030] Fine-grained resources are a concept corresponding to multi-tenancy. For example, for a cluster-level multi-tenancy resource, a single account-level resource is a fine-grained resource. There may be different services under the same account. Therefore, an account-level resource also serves a multi-tenancy account. If a single service-level resource is allocated, the resource is a fine-grained resource relative to the account-level resource.
[0031] Example 1
[0032] According to an embodiment of the present invention, there is also provided an embodiment of a method for resource processing of a cloud service. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0033] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1is an exemplary block diagram of system interaction for implementing a method for resource processing of a cloud service according to an embodiment of the present disclosure, such as Figure 1 As shown, the computer terminal 101 (or mobile device) can be connected to one or more servers (e.g., security servers, resource servers, game servers, etc.) via a data network connection or electronic connection. In an optional embodiment, the computer terminal 101 (or mobile device) can be any mobile computing device, etc. The data network connection can be a local area network connection, a wide area network connection, an Internet connection, or other types of data network connections. The computer terminal 101 (or mobile device) can be executed to connect to a network service performed by a server (e.g., a security server) or a group of servers. The network server 102 is a network-based user service, such as a social network, cloud resources, email, online payment or other online applications. The memory 103 may include a high-speed random access memory, and may also include a 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 103 may further include a memory remotely arranged relative to the processor, and these remote memories can be connected to the computer terminal 101 via a network.
[0034] Under the above operating environment, this application provides Figure 3 A resource processing method for a cloud service is shown.
[0035] Figure 2 FIG. 1 is a flow chart of a resource processing method for a cloud service according to an embodiment of the present invention. Figure 3 As shown, the method may include the following steps:
[0036] Step S202: Obtain a resource allocation request from the object, wherein the resource allocation request is used to request allocation of dedicated resources in the cloud service to the object, where the dedicated resources are resources that are exclusive to the object.
[0037] 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 management and scheduling logic of the user's exclusive resources, while the user only needs to focus on its service logic and code logic.
[0038] In this embodiment, the resource allocation request may be a cloud service resource allocation request initiated by a user in an object. Cloud services may include cloud query, cloud storage, cloud computing, and cloud security, etc., without specific limitations. Cloud service resources may include cloud computing resources, data storage resources, and communication facility resources.
[0039] In this embodiment, the dedicated resources may be cloud computing resources allocated to the user. For example, for a user requesting cloud computing resources, the dedicated resources may be the core of a server, storage space, and network, etc., and no specific limitation is made here. It should be noted that the above is only an example. In fact, the dedicated resources are determined according to the user's request, and the above example is not a limitation of this embodiment.
[0040] In this embodiment, a resource allocation request from an object may be obtained. For example, after a user initiates a cloud computing resource allocation request at an object, the request is passed from the system's application program interface server (API Server) to backend resources. The backend resources may include: dynamic shared resources, account-level exclusive resources, and account-level fine-grained exclusive resources.
[0041] It should be noted that the above-mentioned object of this embodiment can be an account to receive exclusive resources, and the account can log in to the client with different login permissions. The user (customer) of the service will establish the above-mentioned client, and after logging in to the client through the account, it can send an allocation request for exclusive resources to the interface server (API Server). The above-mentioned client can be dedicated to the device or software. Optionally, the above-mentioned account can be an exclusive account.
[0042] Step S204: determine the resource granularity of the exclusive resource, wherein the resource granularity is used to indicate the level of the exclusive resource.
[0043] In the technical solution provided in the above step S204 of the present invention, after obtaining the resource allocation request from the object, the resource granularity of the dedicated resources corresponding to the request may be checked.
[0044] In this embodiment, the levels of exclusive resources may be account level, fine-grained level and single service level, and the highest level of exclusive resources may be account level.
[0045] In this embodiment, a resource granularity check may be performed in the database to determine the resource granularity of the dedicated resource.
[0046] Step S206: Send a resource allocation request to a server corresponding to the resource granularity to trigger the server to allocate exclusive resources to the object.
[0047] 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 backend resources, such as a dynamic shared resource server, an account-level exclusive resource server, and an account-level fine-grained exclusive resource server.
[0048] In this embodiment, a resource allocation request may be sent to a 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, a resource allocation request may be sent to a backend resource server corresponding to the resource granularity to trigger the server to allocate exclusive resources to the object.
[0049] Optionally, when it is determined that the resource granularity of the exclusive resource is at a fine-grained level, a resource allocation request is sent to an account fine-grained level exclusive resource server corresponding to the fine-grained level to trigger the account fine-grained level exclusive resource server to allocate exclusive resources to the object.
[0050] Optionally, when it is determined that the resource granularity of the exclusive resource is the account level, a resource allocation request is sent to an account-level exclusive resource server corresponding to the account level to trigger the account-level exclusive resource server to allocate the exclusive resource to the object.
[0051] 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 a resource allocation request is sent to the account-level exclusive resource server to trigger the account-level exclusive resource server to allocate exclusive resources to the object.
[0052] Optionally, in order to meet the user's demand for high isolation, the customer can specify the isolation granularity according to the demand, and the dynamic shared resources can automatically create resources of the required granularity for the customer.
[0053] Through the above steps S202 to S206 of the present application, a resource allocation request is obtained from the object, wherein the resource allocation request is used to request allocation of exclusive resources in the cloud service to the object, and the exclusive resources are resources exclusive to the object; the resource granularity of the exclusive resources is determined, wherein the resource granularity is used to represent the level of the exclusive resources; and a resource allocation request is sent to a server corresponding to the resource granularity to trigger the server to allocate exclusive resources to the object, thereby achieving the technical effect of improving the allocation of effective resources to the object, thereby solving the technical problem of difficulty in allocating effective resources to the object.
[0054] The above method of this embodiment is further introduced below.
[0055] As an optional implementation, the method further includes: in response to the dedicated resources allocated to the object being in an idle state, reclaiming the dedicated resources.
[0056] In this embodiment, in response to the exclusive resources allocated to the object being in an idle state, the exclusive resources can be reclaimed. For example, when it is detected that the exclusive resources allocated to the object are in an idle state, a signal for indicating this information is generated, and in response to the signal, the exclusive resources are reclaimed.
[0057] Optionally, the present disclosure includes a resource idle-busy monitoring and cleanup detector for scanning idle resources and recycling them in a timely manner, thereby controlling costs and alleviating cost and resource pressures caused by high isolation.
[0058] In this embodiment, the multi-tenanted exclusive resources can be scanned and a determination can be made as to whether the exclusive resources meet preset conditions for cleaning. When the preset conditions for cleaning are met, the exclusive resources that meet the preset conditions for cleaning are reclaimed, wherein the preset condition can be that the exclusive resources allocated to the object are in an idle state.
[0059] As an optional implementation, the database records resource information of recycled exclusive resources, and the method also includes: receiving a resource allocation request again and reading resource information from the database; sending a resource allocation request to a server corresponding to the resource granularity based on the read resource information to trigger the server to allocate exclusive resources to the object again.
[0060] In this embodiment, since the traffic of Noisy Neighbor has a certain regularity, that is, the probability of becoming a Noisy Neighbor again after becoming a Noisy Neighbor once is very high, it is easy to encounter the Noisy Neighbor problem from the same tenant again after simply recycling fine-grained resources.
[0061] In this embodiment, the database will record the relevant information of the fine-grained dedicated resources. Even if the resources themselves are recycled, if there is a new request later, the dynamic shared resources will rebuild or restore the fine-grained shared resources.
[0062] In this embodiment, the resource allocation request may be received again and the resource information may 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 may be read from the database.
[0063] In this embodiment, a resource allocation request can be sent to a server corresponding to the resource granularity based on the read resource information to trigger the server to reallocate exclusive resources to the object again. For example, when the read resource information is an exclusive resource that has encountered a Noisy Neighbor problem, the potential Noisy Neighbor object can be isolated in advance, and a resource allocation request can be sent to a server corresponding to the resource granularity to trigger the server to reallocate exclusive resources to the object again.
[0064] As an optional implementation, step S206, triggering the server to allocate exclusive resources to the object includes: in response to the amount of shared resources occupied by the object being greater than a target threshold, triggering the server to allocate exclusive resources to the object.
[0065] In this embodiment, in response to the amount of shared resources occupied by the object being greater than the target threshold, the server can be triggered to allocate exclusive resources to the object. For example, when it is detected that the amount of shared resources occupied by the object is greater than the target threshold, a signal for indicating the information is generated, and in response to the signal, the server is triggered to allocate exclusive resources to the object.
[0066] In this embodiment, the shared resource can be a dynamic shared resource. The dynamic shared resource mainly acts as a resource regeneration capability provider for the entire solution. It is mainly responsible for resource creation and request handling, and does not perform resource execution, thereby improving the efficiency of creating exclusive resources. At the same time, for tenants with Noisy Neighbor records whose resources are recycled, their fine-grained exclusive resources are restored in time by reading the database.
[0067] In this embodiment, for tenants with Noisy Neighbor records whose resources are reclaimed, their fine-grained exclusive resources can be restored in time by reading the database.
[0068] As an optional implementation, step S204, determining the resource granularity of the dedicated resource includes: determining the resource granularity based on attribute information of the object.
[0069] In this embodiment, the attribute information may include a target type of the object, such as a new user type of the object.
[0070] In this embodiment, the resource granularity may 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-tenant exclusive resource is created for the new user.
[0071] As an optional implementation, the resource granularity is determined based on the attributes of the object. 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 a first resource granularity, wherein the first resource granularity is used to represent that the level of exclusive resources is a level based on account usage.
[0072] In this embodiment, the resource granularity can be determined to be the first resource granularity in response to the attribute information being used to represent the target type of the object. For example, when it is detected that the attribute information is used to represent the target type of the object, a signal for representing the information is generated, and in response to the signal, the resource granularity is determined to be the first resource granularity.
[0073] As an optional implementation, a resource allocation request is sent to a server corresponding to the resource granularity to trigger the server to allocate exclusive resources to the object. The method includes: sending a resource allocation request to a server corresponding to the first resource granularity to trigger the server to create a first exclusive resource for the object, wherein the exclusive resources include the first exclusive resource.
[0074] In this embodiment, the server corresponding to the first resource granularity may be a backend corresponding to the user-level exclusive resource, the first exclusive resource may be an account-level exclusive resource, and the account-level exclusive resource may also be called a multi-tenant exclusive resource.
[0075] In this embodiment, a resource allocation request can be sent to a 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 can be sent to a backend corresponding to an account-level exclusive resource to trigger the backend to create the account-level exclusive resource of the object.
[0076] In this embodiment, the resources with the largest granularity are exclusive resources at the account level, and more fine-grained exclusive resource allocation is supported, so that problems with a single account will not affect other accounts, achieving the technical effect of greatly reducing the explosion radius.
[0077] As an optional implementation, step S204, determining the resource granularity of the exclusive resources, the method includes: determining the resource granularity as a second resource granularity in the resource allocation request, wherein the second resource granularity is used to indicate that the level of the exclusive resources is lower than the level based on account usage.
[0078] 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 is smaller than the account level.
[0079] 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 fine-grained dedicated resources, the client's request is preferentially placed in the fine-grained dedicated resources.
[0080] As an optional implementation, a resource allocation request is sent to a server corresponding to the resource granularity to trigger the server to allocate exclusive resources for the object. The method includes: in response to the second exclusive resource of the second resource granularity having been recycled, a resource allocation request is sent to the server corresponding to the second resource granularity to trigger the server to create a second exclusive resource for the object.
[0081] In this embodiment, in response to the second exclusive resource of the second resource granularity having been recycled, a resource allocation request can be sent to the server corresponding to the second resource granularity 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 indicating 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 second exclusive resource of the object.
[0082] In this embodiment, for a request for a reclaimed fine-grained exclusive resource, its fine-grained exclusive resource can be recreated, thereby achieving the technical effect of isolating potential Noisy Neighbor objects in advance.
[0083] As an optional implementation, 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, wherein the exclusive resource includes the first exclusive resource.
[0084] In this embodiment, in response to the resource allocation request not including the second resource granularity, the server can be triggered to create the first exclusive resource of the object. For example, when it is detected that the resource allocation request does not include the second resource granularity, a signal for representing the information is generated, and in response to the signal, the server is triggered to create the first exclusive resource of the object.
[0085] In this embodiment, if the client's request does not have a fine-grained dedicated resource, the request enters the multi-tenant dedicated resource server and creates a multi-tenant dedicated resource.
[0086] As an optional implementation, step S204, determining the resource granularity of the dedicated resources, the method includes: determining the resource granularity of the dedicated resources to be a third resource granularity, wherein the third resource granularity is used to indicate that the object is cold started or no dedicated resources are allocated.
[0087] In this embodiment, the resource granularity of the exclusive resources can be determined as the third resource granularity. For example, when the customer's request is transmitted from the API Server to the backend resource, the resource granularity of the exclusive resources requested by the cold start or customer without exclusive resources is determined to be the third resource granularity.
[0088] As an optional implementation, a resource allocation request is sent to a server corresponding to the resource granularity to trigger the server to allocate exclusive resources to the object. The method includes: sending a resource allocation request to a server corresponding to a third resource granularity to trigger the server to create a third exclusive resource for the object, wherein the exclusive resources include a third exclusive resource.
[0089] In this embodiment, a resource allocation request can be sent to a server corresponding to the third resource granularity to trigger the server to create a third exclusive resource for the object. For example, for a customer who is cold-starting or has no exclusive resources, his request will be placed in the dynamic shared resource, exclusive resources will be created, and the request will be moved to the newly created exclusive resource for execution.
[0090] In the above embodiments of the present disclosure, dynamic sharing of resources, resource idle and busy monitoring and cleanup detectors, NoisyNeighbor detectors and request handling capabilities are used together to achieve dynamic recovery and regeneration capabilities of exclusive resources of different granularities, thereby maintaining the volume of fine-grained exclusive resources within a controllable range. The Serverless system using this solution can achieve high resource isolation and high stability at low cost, provide customers with a smooth resource usage experience, and solve the technical problem of difficulty in allocating effective resources to objects, thereby achieving the technical effect of improving the allocation of effective resources to objects.
[0091] According to an embodiment of the present invention, another resource processing method of a cloud service on the object side is also provided.
[0092] Figure 3 FIG. 1 is a flow chart of another method for processing data of a power system in a human-computer interaction scenario according to an embodiment of the present invention. Figure 3 As shown, the method may include the following steps:
[0093] Step S302, sending a resource allocation request to the server, wherein the resource allocation request is used to request allocation of exclusive resources in the cloud service for the object, the exclusive resources are resources exclusive to the object, and the server corresponds to the resource granularity of the exclusive resources.
[0094] In the technical solution provided in the above step S302 of the present invention, a resource allocation request can 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, the exclusive resource of the request is determined to be an exclusive resource at the account level.
[0095] Step S304: Acquire the dedicated resources returned by the server in response to the resource allocation request.
[0096] In the technical solution provided in 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 an account-level exclusive resource, the object can obtain the account-level exclusive resource.
[0097] In the above embodiment of the present disclosure, a resource allocation request is sent to the server, wherein the resource allocation request is used to request allocation of 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 corresponds to the exclusive resources; the exclusive resources returned by the server in response to the resource allocation request are obtained, thereby solving the technical problem of difficulty in allocating effective resources to the object and achieving the technical effect of improving the allocation of effective resources to the object.
[0098] Example 2
[0099] The preferred implementation manner of the above method of this embodiment is further introduced below.
[0100] In the field of Serverless services, customers only need to focus on the service logic and code logic, and do not need to pay too much attention to the management and control of underlying resources. As the provider of Serverless services, cloud service providers need to handle the management and scheduling logic of customer resources. When providing underlying resources to multiple customers, it is generally necessary to ensure that the scale and cost of resources are controllable through multi-tenancy, but multi-tenancy will inevitably introduce Serverless problems, which will make the customer's experience worse. Even serious Serverless problems will cause other customer application scenarios in the multi-tenant resources to be damaged and stagnant. Therefore, it is necessary to introduce a certain degree of isolation to ensure the customer's operating experience, but unrestricted isolation will also cause excessive costs and waste of resources. This solution mainly targets the above requirements and proposes a Serverless resource allocation model that dynamically achieves low cost and high isolation.
[0101] In the related art, a static multi-tenancy solution is adopted to statically implement multi-tenancy of resources at the cluster level, or multi-tenancy of resources at the account level or a more fine-grained level.
[0102] However, when this method encounters the Noisy Neighbor problem, the explosion radius of over-leasing resources at the cluster level is too large and too many customers are affected. In addition, over-leasing resources at the account level or finer granularity will cause resource expansion as the number of customers and finer granularity increases. When the number of cold customers increases, it will cause a huge waste of resources.
[0103] In the related technology, a solution combining a static multi-tenancy solution with a passive allocation of fine-grained exclusive resources and a recycling mechanism is adopted. Specifically, cluster-level multi-tenancy resources are statically provided. When encountering a Noisy Neighbor, the Noisy Neighbor is isolated through manual intervention, and the fine-grained isolation resources that have not been used for a long time are recycled.
[0104] However, when this method encounters the Noisy Neighbor problem in cluster-level resource multi-tenancy, the explosion radius is too large, too many customers are affected, and the Noisy Neighbor cannot be automatically separated, and the impact of the Noisy Neighbor on the multi-tenant environment cannot be alleviated in time. Furthermore, the traffic of the Noisy Neighbor has a certain regularity, that is, the probability of becoming a Noisy Neighbor again after becoming a Noisy Neighbor once is very high. Therefore, after simply recycling fine-grained resources, it is easy to encounter the Noisy Neighbor problem from the same tenant again.
[0105] To solve the above problems, this solution realizes the dynamic recovery and regeneration capabilities of exclusive resources of different granularities through the cooperation of dynamic shared resources, resource idle and busy monitoring and cleanup detectors, Noisy Neighbor detectors and request handling capabilities, thereby maintaining the volume of fine-grained exclusive resources within a controllable range. The Serverless system using this solution can achieve high resource isolation and high stability at low cost, providing customers with a smooth resource usage experience.
[0106] Figure 4 Schematic diagram of the architecture of a Serverless resource allocation model that implements low-cost and high-isolation through dynamic recycling and creation according to an embodiment of the present disclosure. Figure 4 As shown, the model includes but is not limited to: application interface server, dynamic shared resources (non-recyclable), customer account-specific resources (recyclable), account-based service-specific resources (recyclable), resource idle and busy monitoring and cleanup detector, and noisy neighbor detector.
[0107] Among them, customer account-exclusive resources include customer account #0-exclusive resources, customer account #1-exclusive resources…customer account #N-exclusive resources, and account-specific service-exclusive resources include account #N-exclusive resources for service #0-exclusive resources…account #N-exclusive resources for service #M-exclusive resources, account #N-service #M group #0-exclusive resources…account #N-exclusive resources for service #M group #X-exclusive resources.
[0108] In this embodiment, the application program interface server can create resources and request to transfer dynamic shared resources. Through the dynamic shared resources, it can run the request for customer account-specific resources (recyclable) and account-based service-specific resources (recyclable).
[0109] Figure 5 FIG. 1 is a flow chart of a resource allocation method according to an embodiment of the present disclosure. Figure 5 As shown, first, the customer's request is passed from the API Server to the backend resources. For customers who are cold-started or do not have exclusive resources, their requests will be placed in dynamic shared resources, exclusive resources will be created, and the requests will be moved to the newly created exclusive resources for execution. 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 recreated. Then, if the customer's request has fine-grained exclusive resources, its request will be placed in the fine-grained exclusive resources first. If not, it will enter the multi-tenant exclusive resources. Finally, the customer can specify the isolation granularity according to demand, and the dynamic shared resources can automatically create resources of the required granularity for the customer to meet the customer's high isolation needs.
[0110] In this embodiment, the dynamic shared resource mainly acts as the resource regeneration capability provider of the entire solution, is mainly responsible for resource creation and request handling, and does not perform resource execution, thereby ensuring the agile creation of dedicated resources. At the same time, for tenants with Noisy Neighbor records whose resources are recycled, their fine-grained dedicated resources are restored in time by reading the database.
[0111] The disclosed embodiment also provides a resource idle-busy monitoring and cleanup detector, which mainly scans idle resources and recycles them in a timely manner, thereby controlling costs and alleviating the cost and resource pressure brought by high isolation.
[0112] Figure 6 FIG. 1 is a schematic diagram of a resource idle-busy monitoring and cleanup detection method according to an embodiment of the present disclosure. Figure 6 As shown, the resource idle-busy monitoring and cleanup detection method may include the following steps:
[0113] Step S602: Scan all multi-tenant dedicated resources.
[0114] Step S604, determining whether the scanned exclusive resources meet the cleaning standard.
[0115] Step S606, clearing the dedicated resource.
[0116] If there are dedicated resources that meet the cleanup criteria, clean up the dedicated resources.
[0117] Step S608, stop the cleaning operation.
[0118] If there are no dedicated resources that meet the cleanup criteria, the cleanup operation stops.
[0119] In the disclosed embodiment, by scanning all the exclusive resources with multiple leases and determining whether the scanned exclusive resources meet the cleanup criteria, the exclusive resources that meet the cleanup criteria are cleaned up and recovered in a timely manner, thereby achieving the technical effect of cost control and alleviating the cost and resource pressure brought by high isolation.
[0120] In the above embodiments of the present disclosure, in order to solve the technical problem that when cluster-level resource multi-tenancy encounters the Noisy Neighbor problem, the explosion radius is too large and too many customers are affected, the maximum multi-tenancy in this solution is account-level, and supports 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 the technical problem that account-level or finer-grained resource multi-tenancy will cause resource expansion as the number of customers and finer granularity increases, and when the number of cold customers increases, it will cause a huge waste of resources, this solution introduces an automatic recovery mechanism to process idle resources in time and reduce the probability of resource idling; for the inability to automatically separate Noisy Neighbors and to timely alleviate the impact of Noisy Neighbors on the multi-tenant environment, this solution can automatically monitor Noisy Neighbors, isolate them in time, and promptly move the requests of Noisy Neighbors to achieve the technical effect of efficiently alleviating the impact of Noisy Neighbors; for the traffic of Noisy Neighbors has a certain regularity, that is, it becomes Noisy Neighbor again after becoming Noisy Neighbor once. The probability of Noisy Neighbor is very high, so if you simply recycle fine-grained resources, you may easily encounter the Noisy Neighbor problem from the same tenant again. The database of this solution will record the relevant information of fine-grained exclusive resources. Even if the resources themselves are recycled, if there are new requests later, the dynamic shared resources will rebuild the fine-grained shared resources, thereby isolating potential Noisy Neighbor objects in advance.
[0121] The disclosed embodiment provides a schematic diagram of a service grid that uses a trusted model to securely identify data.
[0122] Figure 7 FIG. 1 is a schematic diagram of a service grid for performing resource processing of cloud services according to an embodiment of the present invention. Figure 7 As shown, the service grid 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 on different clusters / machines to run.
[0123] like Figure 7 As shown, the microservice may include an application service instance A and an application service instance B, which form a functional application layer of the service grid 700. In one embodiment, the application service instance A runs in a machine / workload container group 714 (POD) in the form of a container / process 708, and the application service instance B runs in a machine / workload container group 717 (POD) in the form of a container / process 710.
[0124] In one implementation, application service instance A may be a product query service, and application service instance B may be a product ordering service.
[0125] Optionally, the above-mentioned application service instance A can be a security identification service for chat messages in a customer scenario, and the application service instance B can be a risk content data output service.
[0126] like Figure 7 As shown, 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 layer (data plane) of service grid 700. Among them, grid proxy 703 and grid proxy 705 are respectively in the form of container / process 704, container / process 704 can receive request 712 for commodity query service, grid proxy 707 is running, and grid proxy 703 and application service instance A can communicate bidirectionally, and grid proxy 705 and application service instance B can communicate bidirectionally. In addition, grid proxy 703 and grid proxy 705 can also communicate bidirectionally.
[0127] In one embodiment, all traffic of application service instance A is routed to a suitable destination through grid proxy 703, and all network traffic of application service instance B is routed to a suitable destination through grid proxy 705. 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 the like.
[0128] In one embodiment, the function of extending the data plane layer can be implemented by writing a custom filter for the proxy (Envoy) in the service grid 700. The service grid proxy configuration can be to enable the service grid to correctly proxy service traffic and achieve service intercommunication and service governance. The grid proxy 703 and the grid proxy 705 can be configured to perform at least one of the following functions: service discovery, health checking, routing, load balancing, authentication and authorization, and observability.
[0129] like Figure 7 As shown, the service grid 700 also includes a control plane layer. The control plane layer can be a group of services running in a dedicated namespace, and these services are hosted by a hosting control plane component 701 in a machine / workload container group (machine / Pod) 702. Figure 7 As shown, the managed control plane component 701 performs bidirectional communication with the grid agent 703 and the grid agent 705. The managed control plane component 701 is configured to perform some control management functions. For example, the managed control plane component 701 receives telemetry data transmitted by the grid agent 703 and the grid agent 705, and can further aggregate the telemetry data. For these services, the managed control plane component 701 can also provide a user-oriented application program interface (API) to more easily manipulate network behavior and provide configuration data to the grid agent 703 and the grid agent 705.
[0130] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described 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, because according to the present invention, certain steps can be performed in other sequences 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.
[0131] Through the description of the above implementation methods, 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 a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a computer-readable storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0132] Example 3
[0133] According to an embodiment of the present invention, there is also provided a method for implementing the above Figure 2 The cloud service resource processing method shown is a cloud service resource processing device.
[0134] Figure 8 Schematic diagram of a resource processing device for a cloud service according to an embodiment of the present invention. Figure 8 As shown, the resource processing device 80 of the cloud service may include: a first obtaining unit 81, a determining unit 82 and a first sending unit 83.
[0135] The first acquisition unit 81 is used to acquire a resource allocation request from an object, wherein the resource allocation request is used to request allocation of exclusive resources in the cloud service to the object, and the exclusive resources are resources exclusive to the object.
[0136] The determining unit 82 is configured to determine a resource granularity of the dedicated resource, wherein the resource granularity is used to indicate a level of the dedicated resource.
[0137] The first sending unit 83 is used to send a resource allocation request to a server corresponding to the resource granularity to trigger the server to allocate exclusive resources to the object.
[0138] Optionally, the resource processing device of the cloud service includes: a response unit, configured to reclaim the dedicated resources in response to the dedicated resources allocated to the object being in an idle state.
[0139] Optionally, the database records resource information of the recycled exclusive resources, and the response unit also includes: a receiving module, used to receive the resource allocation request again and read the resource information from the database; a sending module, used to send a resource allocation request to a server corresponding to the resource granularity based on the read resource information, so as to trigger the server to allocate exclusive resources to the object again.
[0140] Optionally, the first sending unit 83 includes: a response module, configured to trigger the server to allocate exclusive resources to the object in response to the amount of shared resources occupied by the object being greater than a target threshold.
[0141] Optionally, the determining unit 82 includes: a first determining module, configured to determine the resource granularity based on the attribute information of the object.
[0142] Optionally, the first determination module includes: a first response submodule, used to determine the resource granularity as a first resource granularity in response to the attribute information used to represent the target type of the object, wherein the first resource granularity is used to represent that the level of exclusive resources is a level based on account usage.
[0143] Optionally, the first response submodule includes: a sending subunit, used to send a resource allocation request 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.
[0144] Optionally, the determining unit 82 includes: a second determining module, configured to determine that the resource granularity in the resource allocation request is a second resource granularity, wherein the second resource granularity is used to indicate that the level of the exclusive resource is lower than the level based on account usage.
[0145] Optionally, the second determination module includes: a second response submodule, used to send a resource allocation request to a server corresponding to the second resource granularity in response to the second exclusive resource of the second resource granularity having been recycled, so as to trigger the server to create the second exclusive resource of the object.
[0146] Optionally, the second determination module further includes: a third response submodule, 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.
[0147] 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, wherein the third resource granularity is used to indicate that the object is cold started or no dedicated resource is allocated.
[0148] Optionally, the third determination module includes: a sending submodule, configured to send 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 the third exclusive resource.
[0149] In the above embodiment of the present disclosure, a resource allocation request from an object is obtained through a first acquisition unit, wherein the resource allocation request is used to request allocation of exclusive resources in a cloud service to the object, and the exclusive resources are resources exclusive to the object; a determination unit determines the resource granularity of the exclusive resources, wherein the resource granularity is used to represent the level of the exclusive resources; a first sending unit sends a resource allocation request to a server corresponding to the resource granularity to trigger the server to allocate exclusive resources to the object. That is to say, in the present application, exclusive resource allocation is supported by passing the object's request to the backend, so that problems with a single account will not affect other accounts, greatly reducing the explosion radius, achieving the technical effect of improving the allocation of effective resources to objects, thereby solving the technical problem of difficulty in allocating effective resources to objects.
[0150] It should be noted that the first acquisition unit 81, the determination unit 82 and the first sending unit 83 correspond to steps S202 to S206 in Example 1, and the three units and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned units, as part of the device, can run in the system provided in Example 1.
[0151] According to an embodiment of the present invention, another method for implementing the above-mentioned Figure 3 The cloud service resource processing method shown is a cloud service resource processing device.
[0152] Fig. 9 Schematic diagram of a resource processing device for a cloud service provided from an object side according to an embodiment of the present invention. Fig. 9 As shown, the resource processing device 90 of the cloud service may include: a second sending unit 91 and a second obtaining unit 92.
[0153] The first sending unit 91 is used to send a resource allocation request to the server, wherein the resource allocation request is used to request allocation of exclusive resources in the cloud service for the object, the exclusive resources are resources exclusive to the object, and the server corresponds to the resource granularity of the exclusive resources.
[0154] The first acquisition unit 92 is used to acquire the dedicated resource returned by the server in response to the resource allocation request.
[0155] It should be noted that the second sending unit 91 and the second obtaining unit 92 correspond to steps S302 to S304 in Example 1, and the examples and application scenarios implemented by the two units and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned units, as part of the device, can run in the system provided in Example 1.
[0156] In the above embodiment of the present disclosure, a resource allocation request is sent to a server through a first sending unit, wherein the resource allocation request is used to request allocation of exclusive resources in a cloud service to an object, wherein the exclusive resources are resources exclusive to the object, and the resource granularity of the server corresponds to the exclusive resources; a first acquisition unit acquires the exclusive resources returned by the server in response to the resource allocation request, thereby achieving the purpose of acquiring the exclusive resources returned by the server in response to the resource allocation request on the object side, achieving the technical effect of improving the allocation of effective resources to the object, and thereby solving the technical problem of difficulty in allocating effective resources to the object.
[0157] Fig.10 FIG. 1 is a schematic diagram of a resource processing system for a cloud service according to an embodiment of the present invention. Fig.10 As shown, the resource processing system 100 of the cloud service may include: an interface server 1002 and a server 1004 .
[0158] Interface server 1002 is used to obtain a resource allocation request from an object and determine the resource granularity of exclusive resources in the cloud service, wherein the resource allocation request is used to request allocation of exclusive resources in the cloud service for the object, the exclusive resources are resources exclusive to the object, and the resource granularity is used to indicate the level of the exclusive resources.
[0159] The server 1004 corresponds to the resource granularity of the dedicated resource, receives and responds to the resource allocation request, and allocates the dedicated resource to the object.
[0160] In the above-mentioned embodiment of the present disclosure, a resource allocation request is sent through an object, wherein the resource allocation request is used to request allocation of 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 and determines the resource granularity of the exclusive resources, wherein the resource granularity is used to represent the level of the exclusive resources; the server corresponds to the resource granularity of the exclusive resources, receives and responds to the resource allocation request, and allocates exclusive resources to the object, thereby achieving the technical effect of improving the allocation of effective resources to the object, thereby solving the technical problem of difficulty in allocating effective resources to the object.
[0161] Example 4
[0162] The embodiment of the present invention can provide a resource processing system for cloud services, which can include a computer terminal, which can be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal can also be replaced by a terminal device such as a mobile terminal.
[0163] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.
[0164] In this embodiment, the resource processing system of the above-mentioned cloud service may include a processor and a memory, and the resource processing system of the above-mentioned cloud service may execute the program code of the following steps in the resource processing method of the cloud service of the embodiment of the present invention: obtaining a resource allocation request from an object, wherein the resource allocation request is used to request allocation of 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 the exclusive resources; and sending a resource allocation request to a server corresponding to the resource granularity to trigger the server to allocate exclusive resources to the object.
[0165] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the resource processing method and device of the cloud service in the embodiment of the present invention. The processor executes various functional applications and resource processing of the cloud service by running the software programs and modules stored in the memory, that is, realizing the resource processing method of the cloud service mentioned above. The memory may include a high-speed random access memory, and may also include a 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 a memory remotely arranged relative to the processor, and these remote memories can be connected to a computer terminal (or mobile terminal) via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0166] 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 allocation of exclusive resources in the cloud service to the object, and the exclusive resources are resources exclusive to the object; determine the resource granularity of the exclusive resources, wherein the resource granularity is used to indicate the level of the exclusive resources; and send a resource allocation request to a server corresponding to the resource granularity to trigger the server to allocate exclusive resources to the object.
[0167] Optionally, the processor may further execute program code of the following steps: in response to the dedicated resources allocated to the object being in an idle state, reclaiming the dedicated resources.
[0168] Optionally, the processor may also execute the following program code: receiving a resource allocation request again and reading resource information from a database; sending a resource allocation request to a server corresponding to the resource granularity based on the read resource information to trigger the server to allocate exclusive resources to the object again.
[0169] Optionally, the processor may further execute a program code of one of the following steps: in response to the amount of shared resources occupied by the object being greater than a target threshold, triggering the server to allocate exclusive resources to the object.
[0170] Optionally, the processor may also execute program code of the following steps: determining resource granularity based on attribute information of the object.
[0171] Optionally, the processor may also execute 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 to be a first resource granularity, wherein the first resource granularity is used to represent that the level of the exclusive resource is a level based on account usage.
[0172] Optionally, the processor may further execute program code of the following steps: sending a resource allocation request 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.
[0173] Optionally, the processor may further execute a program code of one of the following steps: determining in a resource allocation request that the resource granularity is a second resource granularity, wherein the second resource granularity is used to indicate that a level of exclusive resources is lower than a level based on account usage.
[0174] Optionally, the processor may also execute a program code of one of the following steps: in response to the second exclusive resource of the second resource granularity having been recycled, sending a resource allocation request to a server corresponding to the second resource granularity to trigger the server to create a second exclusive resource for the object.
[0175] Optionally, the processor may further execute a 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, wherein the exclusive resource includes the first exclusive resource.
[0176] Optionally, the processor may further execute a program code of one of the following steps: determining that the resource granularity of the dedicated resource is a third resource granularity, wherein the third resource granularity is used to indicate that the object is cold started or no dedicated resource is allocated.
[0177] Optionally, the processor may further execute a program code of one of 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 the third exclusive resource.
[0178] As an optional implementation of the above, the processor can also call the information and application stored in the memory through the transmission device to perform the following steps: send a resource allocation request to the server, wherein the resource allocation request is used to request allocation of exclusive resources in the cloud service for the object, the exclusive resources are resources exclusive to the object, and the resource granularity of the server corresponds to the exclusive resources; obtain the exclusive resources returned by the server in response to the resource allocation request.
[0179] The embodiment of the present invention provides a solution for resource processing of cloud services. By obtaining a resource allocation request from an object, wherein the resource allocation request is used to request allocation of exclusive resources in the cloud service to 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 the exclusive resources; and 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 technical problem of difficulty in allocating effective resources to the object is solved, and the technical effect of improving the allocation of effective resources to the object is achieved.
[0180] A person of ordinary skill 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, which can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0181] The embodiment of the present invention further provides a computer-readable storage medium. Optionally, in this embodiment, the computer-readable storage medium can be used to store the program code executed by the data processing method for the power system provided in the first embodiment.
[0182] Optionally, in this embodiment, the computer-readable storage medium may be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the mobile terminals in a mobile terminal group.
[0183] Optionally, in this embodiment, a computer-readable storage medium is configured to store program code for performing the following steps: obtaining a resource allocation request from an object, wherein the resource allocation request is used to request allocation of exclusive resources in a cloud service to the object, wherein the exclusive resources are resources exclusive to the object; determining a resource granularity of the exclusive resources, wherein the resource granularity is used to represent a level of the exclusive resources; and sending a resource allocation request to a server corresponding to the resource granularity to trigger the server to allocate exclusive resources to the object.
[0184] Optionally, the computer-readable storage medium is further configured to store a program code for executing the following steps: in response to the dedicated resource allocated to the object being in an idle state, reclaiming the dedicated resource.
[0185] Optionally, the computer-readable storage medium is also configured to store program code for executing the following steps: receiving a resource allocation request again and reading resource information from a database; sending a resource allocation request to a server corresponding to the resource granularity based on the read resource information to trigger the server to allocate exclusive resources to the object again.
[0186] Optionally, the computer-readable storage medium is further configured to store program code for executing the following steps: in response to the amount of shared resources occupied by the object being greater than a target threshold, triggering the server to allocate exclusive resources to the object.
[0187] Optionally, the computer-readable storage medium is further configured to store program code for executing the following steps: determining resource granularity based on attribute information of the object.
[0188] Optionally, the computer-readable storage medium is also configured to store program code for performing the following steps: in response to attribute information being used to represent a target type of an object, determining that the resource granularity is a first resource granularity, wherein the first resource granularity is used to represent a level of exclusive resources as a level based on account usage.
[0189] Optionally, the computer-readable storage medium is further configured to store program code for executing the following steps: sending a resource allocation request 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.
[0190] Optionally, the computer-readable storage medium is further configured to store program code for executing the following steps: determining in the resource allocation request 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 lower than the level based on account usage.
[0191] Optionally, the computer-readable storage medium is also configured to store program code for executing the following steps: in response to a second exclusive resource of the second resource granularity having been recycled, sending a resource allocation request to a server corresponding to the second resource granularity to trigger the server to create a second exclusive resource for the object.
[0192] Optionally, the computer-readable storage medium is further configured to store program code for executing 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 resources include the first exclusive resource.
[0193] Optionally, the computer-readable storage medium is further configured to store program code for executing the following steps: determining that the resource granularity of the dedicated resource is a third resource granularity, wherein the third resource granularity is used to indicate that the object is cold started or is not allocated with dedicated resources.
[0194] Optionally, the computer-readable storage medium is further configured to store program code for executing 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 resources include the third exclusive resource.
[0195] As an optional implementation scheme, the computer-readable storage medium is also configured to store program codes for executing the following steps: sending a resource allocation request to a server, wherein the resource allocation request is used to request allocation of exclusive resources in a cloud service for an object, wherein exclusive resources are resources exclusive to the object, and the resource granularity of the server corresponds to that of the exclusive resources; and obtaining the exclusive resources returned by the server in response to the resource allocation request.
[0196] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0197] In the above 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 can be made to the relevant descriptions of other embodiments.
[0198] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0199] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0200] 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 separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0201] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the relevant technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a computer-readable storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment 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 media that can store program codes.
[0202] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A resource processing method for cloud services, It is characterized in that include: Obtaining a resource allocation request from an object, wherein the resource allocation request is used to request allocation of dedicated resources in a cloud service to the object, and the dedicated resources are resources that are dedicated to the object; Determining a resource granularity of the exclusive resource, wherein the resource granularity is used to represent a level of the exclusive resource; Sending the resource allocation request to a server corresponding to the resource granularity to trigger the server to allocate the dedicated resource to the object; The method further includes: when the exclusive resource is a fine-grained exclusive resource allocated to a noise neighbor object and the fine-grained exclusive resource is recycled, recreating the fine-grained exclusive resource using dynamic shared resources and carrying the request for the noise neighbor object.
2. The method according to claim 1, It is characterized in that 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. The method according to claim 2, It is characterized in that The database records resource information of the recycled exclusive resources, and the method further includes: receiving the resource allocation request again, and reading the resource information from the database; The resource allocation request is sent to the server corresponding to the resource granularity based on the read resource information, so as to trigger the server to reallocate the exclusive resource to the object again.
4. The method according to claim 1, It is characterized in that Triggering the server to allocate the dedicated resource to the object includes: In response to the amount of shared resources occupied by the object being greater than a target threshold, the server is triggered to allocate the exclusive resource to the object.
5. The method according to claim 1, It is characterized in that Determining the resource granularity of the dedicated resource includes: The resource granularity is determined based on the attribute information of the object.
6. The method according to claim 5, It is characterized in that Determining the resource granularity based on the attribute of the object includes: In response to the attribute information being used to represent the target type of the object, the resource granularity is determined to be a first resource granularity, wherein the first resource granularity is used to represent that the level of the exclusive resource is a level based on account usage.
7. The method according to claim 6, It is characterized in that Sending the resource allocation request to a server corresponding to the resource granularity to trigger the server to allocate the dedicated resource to the object includes: The resource allocation request is sent to a server corresponding to the first resource granularity to trigger the server to create a first dedicated resource for the object, wherein the dedicated resource includes the first dedicated resource.
8. The method according to claim 1, It is characterized in that Determining the resource granularity of the dedicated resource includes: The resource granularity is determined in the resource allocation request to be a second resource granularity, wherein the second resource granularity is used to indicate that a level of the dedicated resource is lower than a level based on account usage.
9. The method according to claim 8, It is characterized in that Sending the resource allocation request to a server corresponding to the resource granularity to trigger the server to allocate the dedicated resource to the object includes: In response to the second dedicated resource of the second resource granularity having been recycled, the resource allocation request is sent to the server corresponding to the second resource granularity to trigger the server to create the second dedicated resource of the object.
10. The method according to claim 8, It is characterized in that 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 resources include the first dedicated resource.
11. The method according to claim 1, It is characterized in that Determining the resource granularity of the dedicated resource includes: Determine that the resource granularity of the dedicated resource is a third resource granularity, wherein the third resource granularity is used to indicate that the object is cold started or is not allocated with dedicated resources.
12. The method according to claim 11, It is characterized in that Sending the resource allocation request to a server corresponding to the resource granularity to trigger the server to allocate the dedicated resource to the object includes: The resource allocation request is sent to the server corresponding to the third resource granularity to trigger the server to create a third dedicated resource for the object, wherein the dedicated resources include the third dedicated resource.
13. The method according to any one of claims 1 to 12, It is characterized in that The object is an account that exclusively receives the dedicated resources to be allocated.
14. A resource processing system for cloud services, It is characterized in that The interface server is used to obtain a resource allocation request from an object and determine a resource granularity of a dedicated resource in a cloud service, wherein the resource allocation request is used to request allocation of the dedicated resource to the object, the dedicated resource is a resource dedicated to the object, and the resource granularity is used to indicate a level of the dedicated resource; A 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; The server is further used for: when the exclusive resource is a fine-grained exclusive resource allocated to a noise neighbor object and the fine-grained exclusive resource is recycled, re-creating the fine-grained exclusive resource and carrying the request for the noise neighbor object.
