WO2022110796A1 - Cloud service request responding method and apparatus, electronic device, and storage medium - Google Patents

Cloud service request responding method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2022110796A1
WO2022110796A1 PCT/CN2021/102872 CN2021102872W WO2022110796A1 WO 2022110796 A1 WO2022110796 A1 WO 2022110796A1 CN 2021102872 W CN2021102872 W CN 2021102872W WO 2022110796 A1 WO2022110796 A1 WO 2022110796A1
Authority
WO
WIPO (PCT)
Prior art keywords
quota
cloud service
work
mentioned
node
Prior art date
Application number
PCT/CN2021/102872
Other languages
French (fr)
Chinese (zh)
Inventor
韩秋明
李建
符柱
陈家园
Original Assignee
上海商汤智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海商汤智能科技有限公司 filed Critical 上海商汤智能科技有限公司
Publication of WO2022110796A1 publication Critical patent/WO2022110796A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5013Request control

Definitions

  • the embodiments of the present application relate to the field of computer technologies, and relate to, but are not limited to, a cloud service request response method and apparatus, an electronic device, and a storage medium.
  • the tenant usually applies to the cloud service system for a certain total cloud service quota; and within the scope of the total cloud service quota, initiates a cloud service request.
  • the cloud service system After the cloud service system receives the cloud service request initiated by the tenant, it will only respond to the cloud service request after determining that the tenant's request is within the range of the above-mentioned total cloud service quota.
  • the embodiment of the present application discloses at least one cloud service request response method, and the method is executed by a cloud service system; the above method includes:
  • the above-mentioned cloud service system includes a system constructed based on a distributed architecture
  • a work quota is allocated to the worker nodes corresponding to the tenants included in the distributed architecture, and the work quotas are used to trigger the work nodes to respond to cloud service requests initiated by the tenants according to their corresponding work quotas.
  • the above-mentioned allocating a work quota to each worker node included in the above-mentioned distributed architecture based on the above-mentioned total cloud service quota includes:
  • a work quota is allocated to the worker nodes corresponding to the above-mentioned tenants included in the above-mentioned distributed architecture.
  • the above-mentioned allocating a work quota to each working node corresponding to the above-mentioned distributed architecture including the above-mentioned tenant based on part of the quota in the above-mentioned total cloud service quota includes: according to the processing capability corresponding to the above-mentioned working node, Determine the cloud service request response volume reached by the above-mentioned working node within a preset time period; wherein, the above-mentioned processing capability indicates the cloud service request response volume reached within a unit time length; according to the above-mentioned cloud service request response volume corresponding to the above-mentioned working node, to the above-mentioned working node Allocate work quotas.
  • multiple assignments of work quotas to the working nodes can be realized, thereby reducing the problem of unreasonable assignment caused by one assignment.
  • allocating a work quota to the worker nodes included in the distributed architecture and corresponding to the tenants based on a partial quota in the total cloud service quota includes: determining the worker nodes included in the distributed architecture. Corresponding quota weight; based on part of the quota in the total quota of the cloud service, assign the work quota to the work node that matches the quota weight corresponding to the work node. In this way, work quotas can be reasonably allocated to each work node, so that nodes with high configuration can be allocated more work quotas, thereby improving the response speed of the cloud service system and improving the tenant experience.
  • the above-mentioned determining the quota weight corresponding to each work node included in the distributed architecture includes: based on the configuration information of each work node, and according to a preset quota weight determination rule, determining the corresponding quota weight of each work node. or, based on the processing capability corresponding to each work node, determine the quota weight corresponding to each of the above-mentioned work nodes. In this way, the response speed of the cloud service system can be improved, and the tenant experience can be improved.
  • the above method further includes:
  • the work quota is allocated to the above-mentioned work node; wherein, the above-mentioned residual quota includes: the above-mentioned total cloud service quota after removing the allocated work quota amount of.
  • the above-mentioned allocating a work quota to the above-mentioned working nodes based on the remaining quota includes: based on the remaining quota, allocating to the above-mentioned working nodes according to the cloud service request responses reached by the above-mentioned working nodes within a preset period of time. The amount of work that matches the above cloud service request response volume. In this way, the system can allocate work quotas that match the processing capabilities of the nodes to the working nodes, so that nodes with strong processing capabilities can allocate more work quotas, thereby improving the response speed of the cloud service system and improving the tenant experience.
  • the above-mentioned working node responds to the cloud service request initiated by the above-mentioned tenant according to the work quota corresponding to itself, including: after the above-mentioned working node receives the cloud service request initiated by the tenant In the case of remaining, the cloud service calculation is provided in response to the above cloud service request, and the remaining work quota is adjusted according to the consumption quota corresponding to the above calculation. In this way, the worker node can determine whether to respond to the cloud service request by analyzing its own work quota.
  • the above-mentioned working node responds to the cloud service request initiated by the above-mentioned tenant according to the work quota corresponding to itself, and further includes: after receiving the cloud service request initiated by the tenant, the above-mentioned working node responds to the corresponding work quota by itself. If there is no remaining amount, submit a quota application request to the above-mentioned cloud service system; and in the case that the above-mentioned total cloud service quota is still remaining, receive the work quota allocated by the cloud service system to the above-mentioned working node based on the remaining quota in response to the above-mentioned cloud service. ask. In this way, when the total cloud service quota still remains, the worker node can continue to receive the work quota allocated by the cloud service, thereby speeding up processing efficiency.
  • the above method further includes: after the above-mentioned working node submits a quota application request to the above-mentioned cloud service system, if the above-mentioned total cloud service quota is not left, forwarding the above-mentioned cloud service request to other work quotas There are remaining worker nodes for processing.
  • the cloud service system can be made to provide cloud services to the tenants within the range of the total amount applied by the tenants as much as possible, thereby improving the experience of the tenants.
  • the above-mentioned method further includes: the above-mentioned working node charges the request for using the cloud service initiated by the tenant.
  • the above-mentioned cloud services include artificial intelligence (Artificial Intelligence, AI) cloud services; the above-mentioned obtaining the total amount of cloud services applied by the tenant to the above-mentioned cloud service system includes: AI cloud service total quota; based on the above-mentioned total cloud service quota, a work quota is allocated to the work nodes corresponding to the above tenants included in the distributed architecture, and the work quota is used to trigger the above-mentioned work nodes to respond to the above according to their corresponding work quotas.
  • AI Artificial Intelligence
  • the cloud service request initiated by the tenant includes: based on the above-mentioned total quota of AI cloud services, allocating a work quota to the work nodes corresponding to the above-mentioned tenants included in the above-mentioned distributed architecture, and the work quota is used to trigger the above-mentioned work nodes according to their corresponding work.
  • the quota responds to the AI cloud service requests initiated by the above tenants.
  • the worker node responds to the AI cloud service request according to its own work quota, which can improve the response speed of the AI cloud service system and improve the tenant experience.
  • the embodiment of the present application also proposes a cloud service request response device, wherein the above device includes:
  • an obtaining module configured to obtain the total cloud service quota applied by the tenant to the above-mentioned cloud service system; wherein, the above-mentioned cloud service system includes a system constructed based on a distributed architecture;
  • the allocation module is configured to, based on the above-mentioned total cloud service quota, allocate a work quota to the work nodes corresponding to the above-mentioned tenants included in the above-mentioned distributed architecture, and the work quotas are used to trigger the above-mentioned work nodes to respond to the above-mentioned tenants according to their corresponding work quotas. cloud service requests.
  • the above allocation module is specifically configured as:
  • a work quota is allocated to the worker nodes corresponding to the above-mentioned tenants included in the above-mentioned distributed architecture.
  • the distribution module described above includes:
  • a first determining module configured to determine the cloud service request response volume reached by the working node within a preset duration according to the processing capability corresponding to the working node; wherein the processing capability indicates the cloud service request response volume reached within a unit duration;
  • the allocation sub-module is configured to allocate a work quota to the above-mentioned working nodes according to the above-mentioned cloud service request responses corresponding to the above-mentioned working nodes.
  • the distribution module described above includes:
  • the second determination module is configured to determine the quota weights corresponding to the working nodes included in the distributed architecture
  • the allocation sub-module is configured to allocate a work quota matching the quota weight corresponding to the above-mentioned working node to the above-mentioned working node based on a part of the quota in the above-mentioned total quota of the cloud service.
  • the above-mentioned second determining module is specifically configured as:
  • the quota weight corresponding to each work node is determined.
  • the above allocation module is further configured to:
  • the work quota is allocated to the above-mentioned work node; wherein, the above-mentioned residual quota includes: the above-mentioned total cloud service quota after removing the allocated work quota amount of.
  • the above allocation module is specifically configured as:
  • a work quota matching the cloud service request response volume is allocated to the worker node.
  • the above allocation module is specifically configured as:
  • a work quota is allocated to the work nodes corresponding to the above tenants included in the distributed architecture. After the above work nodes receive the cloud service request initiated by the tenant, there are still remaining work quotas corresponding to their own work quotas. In this case, it provides cloud service calculation in response to the above cloud service request, and adjusts its remaining work quota according to the consumption quota corresponding to the above calculation.
  • the above allocation module is specifically configured as:
  • a work quota is allocated to the work nodes corresponding to the above-mentioned tenants included in the distributed architecture. After the above-mentioned work nodes receive the cloud service request initiated by the tenant, there is no remaining work quota corresponding to themselves. Next, submit a quota application request to the cloud service system; and in the case that the total cloud service quota is still remaining, receive the work quota allocated by the cloud service system to the working node based on the remaining quota to respond to the cloud service request.
  • the above allocation module is specifically configured as:
  • a work quota is allocated to the working nodes corresponding to the above-mentioned tenants included in the above-mentioned distributed architecture.
  • the above-mentioned working node submits a quota application request to the above-mentioned cloud service system, the above-mentioned total cloud service quota is not left.
  • forward the above cloud service request to other working nodes with remaining work quotas for processing.
  • the above-mentioned apparatus further includes:
  • the billing module is configured to charge the cloud service request initiated by the tenant for the above-mentioned working node.
  • the above-mentioned cloud service includes an AI cloud service; the above-mentioned obtaining module is specifically configured as:
  • a work quota is allocated to the work nodes corresponding to the above-mentioned tenants included in the distributed architecture, and the work quotas are used to trigger the above-mentioned work nodes to respond to the AI cloud services initiated by the above-mentioned tenants according to their corresponding work quotas ask.
  • the embodiment of the present application also proposes an electronic device, and the above-mentioned device includes:
  • a memory for storing the above-mentioned processor-executable instructions
  • the processor is configured to invoke the executable instructions stored in the memory to implement the cloud service request response method shown in any of the foregoing embodiments.
  • An embodiment of the present application further provides a computer-readable storage medium, characterized in that, the storage medium stores a computer program, and the computer program is used to execute the cloud service request response method shown in any of the foregoing embodiments.
  • the above-mentioned cloud service system constructed by a distributed architecture can allocate a work quota to each work node included in the above-mentioned distributed architecture based on the total cloud service quota applied by the tenant to the system, so that each of the above-mentioned work nodes can be autonomous Responding to cloud service requests initiated by tenants according to their corresponding work quotas, reducing the amount of cloud service requests that the cloud service system frequently communicates with the above-mentioned working nodes to read and write tenants, thereby reducing the frequent network I/O of the above-mentioned cloud service system
  • the operation and the locking operation of reading and writing public storage improve the response speed of the cloud service request of the system, thereby improving the tenant experience.
  • 1 is a method flowchart of a method for responding to a cloud service request shown in an embodiment of the application
  • FIG. 2 is a schematic diagram of interaction between an AI cloud service system and a tenant according to an embodiment of the application
  • FIG. 3 is a schematic diagram of total cloud service quota allocation shown in an embodiment of the present application.
  • 4A is a schematic diagram of another allocation of total cloud service quotas shown in an embodiment of the application.
  • 4B is a schematic diagram of total cloud service quota allocation shown in an embodiment of the application.
  • FIG. 5 is a schematic structural diagram of a cloud service request response apparatus shown in an embodiment of the application.
  • FIG. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the application.
  • the cloud service system in order to determine whether the cloud service request initiated by the tenant is within the range of the total cloud service quota applied by the tenant, the cloud service system will count the cloud service request amount of the tenant.
  • the above tenant may include multiple users. Users can apply for cloud services using the tenant account assigned to them.
  • the cloud service system may use the number of cloud service invocations as a dimension to count the cloud service request volume of the tenant.
  • the cloud service system can use the number of bytes of processing traffic as the dimension to count the cloud service request volume of the tenant.
  • the following description takes the cloud service request initiated by the tenant as the cloud service invocation request as an example.
  • the above cloud service system can determine whether the currently counted number of cloud service invocation requests of the tenant reaches the total cloud service quota applied by the tenant (the total number of cloud service invocation requests), if not , then respond to the request; otherwise, limit the request.
  • the above-mentioned cloud service system is a single-node system (the above-mentioned single-node system, specifically a system that provides cloud services through only one node), the number of invocations of tenant services or the number of bytes of processing traffic are compared. convenient. Therefore, it is not complicated to count the number of cloud service requests of tenants, and it will not affect the speed of the cloud service system to respond to requests.
  • the above cloud service system is a system based on a distributed architecture, it may be due to the distributed architecture, which makes the statistics of the cloud service requests of the tenants very complicated, which affects the speed of the cloud service system in responding to the requests.
  • the system can allocate a shared space (for example, a shared cache or a shared cache or a shared cache or a shared space) for storing the total cloud service quota applied for by the tenant and a usage quota indicating the number of calls initiated by the tenant to the tenant. shared database).
  • a shared space for example, a shared cache or a shared cache or a shared cache or a shared space
  • the request may be distributed to any node A under the above-mentioned distributed architecture.
  • the node A When the above-mentioned cloud service system receives a cloud service invocation request initiated by a tenant, the request may be distributed to any node A under the above-mentioned distributed architecture.
  • the node A When the node A receives the above request, it will read the total cloud service quota stored in the shared space and the usage quota already used by the tenant (the number of calls initiated by the tenant) through I/O. After reading the above-mentioned total cloud service quota and the above-mentioned usage quota, the tenant can determine whether the above-mentioned total cloud service quota is greater than the above-mentioned usage quota. If so, the above-mentioned node A responds to the call request and increases the above-mentioned usage quota. Then, the node A can write the increased usage quota to the above-mentioned shared space through I/
  • the above cloud service system is a system constructed based on a distributed architecture
  • the cloud service invocation request or traffic processing request initiated by the tenant may be distributed to any node under the distributed architecture. Therefore, the above cloud service system must frequently communicate with each node under the distributed architecture to read and write the cloud service request volume of the tenant. Frequent network I/O operations and locking operations of reading and writing public storage may cause the system's cloud service request response efficiency to become low, with delays, thereby affecting tenant experience.
  • an embodiment of the present application proposes a method for responding to a cloud service request, which is applied to a cloud service system.
  • the above cloud service system includes a system constructed based on a distributed architecture.
  • the method allocates the total cloud service quota applied by the tenant to each working node under the above-mentioned distributed architecture, triggers each working node to independently determine whether to respond to the cloud service request initiated by the tenant, and reduces the frequent communication between the above-mentioned cloud service system and the above-mentioned various working nodes.
  • Communicate to read and write the cloud service request volume of the tenant thereby reducing the frequent network I/O operations of the above cloud service system and the locking operation of reading and writing public storage, improving the response speed of the cloud service request of the system, thereby improving the tenant experience.
  • FIG. 1 is a method flowchart of a method for responding to a cloud service request according to an embodiment of the present application.
  • the method for responding to the cloud service request shown in the embodiment of the present application may include:
  • the above-mentioned cloud service system includes a system constructed based on a distributed architecture
  • S104 Based on the total cloud service quota, assign a work quota to the work nodes included in the distributed architecture and corresponding to the tenants, where the work quotas are used to trigger the work nodes to respond to the cloud service requests initiated by the tenants according to their corresponding work quotas .
  • the above cloud service system (hereinafter referred to as the "system") is specifically a system that provides cloud services to tenants.
  • the foregoing system may include a certain number of hardware devices or software devices to provide cloud services, and the embodiments of the present application do not limit the types of hardware devices and software devices included in the foregoing system.
  • a tenant can apply to the above cloud service system for a certain total cloud service quota.
  • the total number of cloud service calls that can be initiated by the tenant may be used as a dimension to calculate the total cloud service quota.
  • the tenant can initiate a cloud service invocation request to the above cloud service system within the scope of the above-mentioned total cloud service quota, so as to enjoy the services provided by the cloud service system.
  • the above cloud service system includes a system constructed based on a distributed architecture.
  • the above-mentioned distributed architecture may be an architecture including several working nodes.
  • the working node hereinafter referred to as "node”
  • the terminal or server may be a notebook computer, a desktop computer, a tablet computer (Portable Android Device, PAD) terminal, etc., and the embodiments of the present application do not identify the types of devices of the terminal or server. and model number).
  • the above-mentioned distributed architecture provides computing power through its included working nodes, so that the above-mentioned cloud service system can provide cloud services for tenants.
  • the above cloud service type may be cloud service invocation or traffic storage, etc., and the embodiment of the present application does not limit the cloud service type.
  • the above-mentioned cloud service system may include an AI cloud service system.
  • FIG. 2 is a schematic diagram of interaction between an AI cloud service system and a tenant according to an embodiment of the present application.
  • the above AI cloud service system is a system constructed based on a distributed architecture.
  • the above-mentioned distributed architecture includes working nodes A, B, and C.
  • the cloud service system shown in FIG. 2 is only a schematic illustration, and is not particularly limited.
  • the tenant 201 may apply to the AI cloud service system 202 for a total cloud service quota for a certain number of calls. Then, the tenant 201 may initiate a service invocation request such as model training to the above-mentioned AI cloud service system 202 by calling an interface (for example, a Hyper Text Transfer Protocol (Hyper Text Transfer Protocol, HTTP) invocation).
  • a service invocation request such as model training to the above-mentioned AI cloud service system 202 by calling an interface (for example, a Hyper Text Transfer Protocol (Hyper Text Transfer Protocol, HTTP) invocation).
  • HTTP Hyper Text Transfer Protocol
  • the above-mentioned AI cloud service system 202 After the above-mentioned AI cloud service system 202 receives the above-mentioned invocation request, it can distribute the invocation request task to the target working node A under the distributed architecture according to a pre-stored distribution rule (for example, a load balancing distribution rule), so that the node can A can respond to the cloud service request initiated by the tenant according to its corresponding work quota, and return the response result to the tenant.
  • a pre-stored distribution rule for example, a load balancing distribution rule
  • the above-mentioned total amount of cloud services includes the total amount of services provided by the cloud service system that tenants can enjoy.
  • the cloud service system may use the number of cloud service invocations as the dimension to count the above-mentioned total service volume of the tenant. If the cloud service type applied by the tenant is stream data processing, the cloud service system can count the above-mentioned total service volume of the tenant by taking the number of bytes of processed traffic as the dimension.
  • the embodiment of the present application does not limit the statistical dimension of the total amount of cloud services.
  • the following takes the cloud service type as the cloud service invocation request as an example for description.
  • tenants can apply for the above-mentioned total amount through a paid purchase.
  • tenants may apply for the total amount above by applying for a trial.
  • This embodiment of the present application does not limit the manner in which the tenant applies for the total cloud service quota.
  • the above-mentioned work node can respond to the cloud service request initiated by the tenant according to its corresponding work quota.
  • the above-mentioned worker nodes may charge for cloud service requests initiated by tenants.
  • worker nodes can maintain a summary table of quotas corresponding to tenants.
  • the above quota summary table can count the remaining quota, used quota and other information of the combination.
  • the above-mentioned used quota may be increased to complete the billing for the cloud service request initiated by the tenant.
  • the above work quota refers to the amount of cloud service requests that a worker node can respond to.
  • the above-mentioned working node receives the cloud service request initiated by the tenant, it can determine whether it responds to the cloud service request by judging whether there is a remaining work quota.
  • a worker node When a worker node responds to a cloud service request, it can consume the corresponding cloud service request accordingly. For example, when the cloud service request volume is counted by the number of calls, each time a worker node responds to a call request initiated by the tenant, it can respond with a work quota of 1 unit.
  • the above-mentioned work credits may include two credits.
  • the above-mentioned work quota may be the work quota initially allocated by the above-mentioned system to each of the above-mentioned nodes after the tenant applies for the total quota of cloud services, so that each node can operate.
  • the above-mentioned work quota may be the work quota applied to the above-mentioned system when the allocated work quota is exhausted during the operation of each node, so that each node can replenish the work quota and continue to operate.
  • the above cloud service request includes a cloud service request initiated by the tenant to the above system.
  • the above cloud service requests may include cloud service invocation requests and/or stream data processing requests.
  • the type of cloud service request initiated by the tenant is related to the type of cloud service applied for by the tenant.
  • the tenant can initiate a cloud service invocation request.
  • the tenant can initiate both a cloud service invocation request and a traffic processing request.
  • the above-mentioned working node can provide cloud service calculation in response to the above-mentioned cloud service request when the corresponding work quota still remains, and calculate the corresponding consumption quota according to the above-mentioned calculation. Adjust your remaining work quota.
  • the above-mentioned working node A can determine whether its own work quota remains. If its own work quota remains, the above-mentioned node A can respond to the cloud service request and consume 1 unit of work quota. If the above-mentioned work quota is not left, the above-mentioned node A can limit the cloud service request.
  • a worker node may store the amount of work assigned by the system, as well as the amount of cloud service requests that the node has responded to. At this time, when it is determined whether there is a remaining work quota, a corresponding result can be obtained by subtracting the currently responded cloud service request amount from the work quota. If the result is greater than 0, it is determined that the above-mentioned work quota has remaining; otherwise, there is no remaining. In some embodiments, worker nodes may store remaining credits.
  • the initial value of the remaining quota is the work quota allocated by the system, and each time the worker node responds to a cloud service request, the remaining quota value is adjusted. At this time, when it is determined whether there is a remaining amount of work, it can be determined whether the remaining amount is greater than 0, and if so, it is determined that there is a surplus of the above-mentioned amount of work, otherwise, there is no remaining amount.
  • the above-mentioned working node may submit a quota application request to the above-mentioned system, and when the above-mentioned total cloud service quota still remains, Receiving the work quota allocated by the cloud service system to the above-mentioned working node based on the remaining quota in response to the above-mentioned cloud service request.
  • the above-mentioned working node A can determine whether its own work quota remains. If the above-mentioned work quota is not left, the above-mentioned node A may first submit a quota application request to the above-mentioned system. After receiving the above quota application request, the above system can determine whether the total cloud service quota corresponding to the above tenant still remains, and if there is still a residual quota, it will continue to allocate a work quota to the node A. After the above-mentioned node A receives the work quota, it will continue to respond to the cloud service request.
  • the above-mentioned work node submits a quota application request to the above-mentioned cloud service system, if the above-mentioned total cloud service quota is not left, the above-mentioned cloud service request is forwarded to other work nodes with remaining work quotas for processing.
  • the working status of each working node is stored in the above system (the working status refers to whether the node can respond to the request, that is, whether there is still a working quota).
  • the working status refers to whether the node can respond to the request, that is, whether there is still a working quota.
  • the cloud service system can be made to provide cloud services to the tenants within the range of the total amount applied by the tenants as much as possible, thereby improving the experience of the tenants.
  • the cloud service system constructed by the distributed architecture can allocate a work quota to each work node included in the above distributed architecture based on the total cloud service quota applied by the tenant to the system, and each of the above work nodes independently according to their own
  • the corresponding work quota responds to the cloud service request initiated by the tenant, reducing the cloud service request volume of the above-mentioned cloud service system that frequently communicates with the above-mentioned working nodes to read and write the tenant's cloud service, thereby reducing the frequent network I/O operations of the above-mentioned cloud service system and
  • the locking operation of reading and writing public storage improves the response speed of cloud service requests of the system, thereby improving the tenant experience.
  • the above-mentioned total cloud service quota when the above-mentioned system performs the above-mentioned S104, based on the above-mentioned total cloud service quota, when allocating a work quota to the work nodes corresponding to the above-mentioned tenants included in the above-mentioned distributed architecture, the above-mentioned total cloud service quota may be based on part of the quota. , assigning a work quota to the work nodes included in the distributed architecture and corresponding to the tenants.
  • the above-mentioned cloud services are allocated according to the quota weights corresponding to each work node The total quota is distributed to each worker node.
  • the above-mentioned system may first obtain the quota weights corresponding to the working nodes included in the above-mentioned distributed architecture. After determining the quota weights corresponding to the working nodes, the above-mentioned system may allocate a working quota matching the quota weights corresponding to the above-mentioned working nodes to the above-mentioned working nodes based on part of the quotas in the above-mentioned total cloud service quotas.
  • the quota weight corresponding to each of the above working nodes may specifically be a preset fixed value.
  • the quota weight corresponding to each worker node can be set to the same value.
  • the total quota can be equally distributed to each worker node.
  • the quota weight corresponding to each work node is determined based on the configuration information of each work node and according to a preset quota weight determination rule.
  • a configuration information table corresponding to each working node can be maintained. For example, worker node CPU, GPU processing performance, hard disk model, etc.
  • the configuration information table corresponding to each working node may be queried to determine the configuration information of each working node.
  • the system may determine the quota weight corresponding to each working node according to a preset quota weight determination rule.
  • the above-mentioned quota weight determination rule may be to score various configuration information of each working node first. Then the weighted summation of each score is carried out to obtain the total score corresponding to each work node. Finally, the weight of each work node is determined according to the total score corresponding to each work node.
  • the system can determine the quota weight corresponding to each work node based on the configuration information of each work node and a preset quota weight determination rule. Therefore, it is possible to reasonably allocate work quotas to each work node, so that nodes with high configuration can be allocated more work quotas, thereby improving the response speed of the cloud service system and improving the tenant experience.
  • the system may determine the quota weight corresponding to each work node based on the processing capability corresponding to each work node; wherein, the above processing Capability indicates the amount of cloud service request responses that can be achieved within a unit time.
  • the above-mentioned system can determine the cloud service request response amount (processing capacity) that each working node can achieve within a unit time by means of testing. After determining the processing capability corresponding to each working node, the above-mentioned system may determine the quota weight of each working node according to the processing capability corresponding to each working node.
  • the above-mentioned system may, according to the processing capability corresponding to the above-mentioned work node, determine The amount of cloud service request responses that can be reached by the above-mentioned worker nodes within the preset time period.
  • the above-mentioned processing capability indicates the amount of cloud service request responses that can be achieved within a unit time.
  • the system may allocate a work quota to the working node according to the cloud service request response amount corresponding to the working node.
  • the above-mentioned system may determine the value of the above-mentioned partial quota for participating in the initial allocation according to the sum of the cloud service request responses that each working node can reach within a preset time period.
  • the system may determine the cloud service request responses corresponding to the work nodes as the work corresponding to the work nodes. The quota is allocated to each of the above working nodes.
  • the above-mentioned preset duration may specifically be a value set according to experience. For example, 1 minute.
  • FIG. 3 is a schematic diagram of total quota allocation of cloud services according to an embodiment of the present application.
  • the response volume of cloud service requests that can be reached within 1 minute corresponding to the worker node A included in the distributed architecture is a dark gray square.
  • the amount of cloud service request responses that can be reached within 1 minute corresponding to the worker node B is a light gray square.
  • the amount of cloud service request responses that can be reached within 1 minute corresponding to worker node C is a black square.
  • the work node A can be allocated the work quota indicated by the dark gray square
  • the work node B can be allocated the work quota indicated by the light gray square
  • the work node C can be allocated the work quota indicated by the black square. Work quota.
  • the above-mentioned system can determine the above-mentioned work within a preset duration according to the processing capability corresponding to each of the above-mentioned work nodes.
  • the above-mentioned processing capability indicates the amount of cloud service request responses that can be achieved within a unit time.
  • the system may determine the cloud service request responses corresponding to the working nodes as the work quotas corresponding to the working nodes, and assign them to the working nodes. Therefore, it is possible to determine a reasonable part of the quota for participating in the initial allocation, and reasonably allocate the initial work quota to each node, thereby further improving the work efficiency of the cloud service.
  • a worker node with a fast rate can receive work quota assignments multiple times, thereby improving the response speed of the cloud service system and improving the tenant experience.
  • the system may assign work quotas to each work node included in the above-mentioned distributed architecture based on a part of the quota in the above-mentioned total cloud service quota.
  • Worker nodes allocate work quotas.
  • the system receives a quota application request from any of the above-mentioned work nodes, it allocates a work quota to the above-mentioned work nodes based on the remaining quota.
  • the above-mentioned remaining quota includes the remaining quota after deducting the allocated work quota from the above-mentioned total cloud service quota.
  • the value of the initially allocated partial quota and the allocation rule may be determined first. For example, you can specify an initial distribution of one-third of the total quota, as well as an even distribution rule. At this time, the above-mentioned system can evenly distribute one-third of the total quota to each worker node.
  • the above system can check whether there is any remaining quota, and if so, it can allocate the work quota to the above work node.
  • the above-mentioned system may allocate the above-mentioned cloud service to the above-mentioned work node according to the cloud service request response amount that the above-mentioned work node can reach within a preset period of time. The amount of work that matches the request response volume.
  • the above-mentioned preset duration may specifically be a value set according to experience. For example, 1 minute.
  • FIG. 4A is a schematic diagram of another allocation of the total cloud service quota according to an embodiment of the present application.
  • the slashed box represents that the corresponding work quota of the node has been consumed. That is, after the quota on node A is used up, continue to divide a part of the quota from the remaining total quota to this node A until all the total quota is allocated. When the quota of all nodes is exhausted, it means that the total purchase quota of the tenant has been consumed.
  • FIG. 4B is a schematic diagram of total quota allocation of cloud services according to an embodiment of the present application.
  • the slashed box represents that the corresponding work quota of the node has been consumed.
  • the above-mentioned system can divide the cloud service request response amount that node A can reach within 1 minute from the remaining quota. The above system can then allocate a work quota (dark gray box in FIG. 4B ) corresponding to the request response amount to node A.
  • the node When the quota on the node is used up and there is no remaining quota to divide the total quota, the node will write the current state into the shared storage service, and will not process the user's request, but will receive The service request is forwarded to other nodes with quota.
  • the above-mentioned system can allocate the above-mentioned work node to the above-mentioned work quota matching the above-mentioned cloud service request response amount to the above-mentioned working node according to the cloud service request response amount that the above-mentioned working node can reach within a preset time period. Therefore, the above system can allocate work quotas that meet the processing capabilities of the nodes to the working nodes, so that nodes with strong processing capabilities can allocate more work quotas, thereby improving the response speed of the cloud service system and improving the tenant experience.
  • an embodiment of the present application further provides a cloud service request response apparatus.
  • FIG. 5 is a schematic structural diagram of a cloud service request response apparatus according to an embodiment of the present application.
  • the above-mentioned apparatus 50 may include:
  • the obtaining module 51 is configured to obtain the total cloud service quota applied by the tenant to the above-mentioned cloud service system; wherein, the above-mentioned cloud service system includes a system constructed based on a distributed architecture;
  • the allocation module 52 is configured to allocate a work quota to the work nodes corresponding to the tenants included in the distributed architecture based on the above-mentioned total cloud service quota, and the work quotas are used to trigger the above-mentioned work nodes to respond to the above-mentioned tenants according to their corresponding work quotas Initiated cloud service request.
  • the above allocation module 52 is specifically configured as:
  • a work quota is allocated to the worker nodes corresponding to the above-mentioned tenants included in the above-mentioned distributed architecture.
  • the distribution module 52 described above includes:
  • a first determining module configured to determine the cloud service request response volume reached by the working node within a preset duration according to the processing capability corresponding to the working node; wherein the processing capability indicates the cloud service request response volume reached within a unit duration;
  • the allocation sub-module is configured to allocate a work quota to the above-mentioned working nodes according to the above-mentioned cloud service request responses corresponding to the above-mentioned working nodes.
  • the distribution module 52 described above includes:
  • the second determination module is configured to determine the quota weights corresponding to the working nodes included in the distributed architecture
  • the allocation sub-module is configured to allocate a work quota matching the quota weight corresponding to the above-mentioned working node to the above-mentioned working node based on a part of the quota in the above-mentioned total quota of the cloud service.
  • the above-mentioned second determining module is specifically configured as:
  • the quota weight corresponding to each work node is determined.
  • the above allocation module 52 is further configured to:
  • the work quota is allocated to the above-mentioned work node; wherein, the above-mentioned residual quota includes: the above-mentioned total cloud service quota after excluding the work quota that has been allocated, the remaining quota amount of.
  • the above allocation module 52 is specifically configured as:
  • a work quota matching the cloud service request response volume is allocated to the worker node.
  • the above allocation module 52 is specifically configured as:
  • a work quota is allocated to the work nodes corresponding to the above tenants included in the distributed architecture. After the above work nodes receive the cloud service request initiated by the tenant, there are still remaining work quotas corresponding to their own work quotas. In this case, it provides cloud service calculation in response to the above cloud service request, and adjusts its remaining work quota according to the consumption quota corresponding to the above calculation.
  • the above allocation module 52 is specifically configured as:
  • a work quota is allocated to the work nodes corresponding to the above-mentioned tenants included in the distributed architecture. After the above-mentioned work nodes receive the cloud service request initiated by the tenant, there is no remaining work quota corresponding to themselves. Next, submit a quota application request to the cloud service system; and in the case that the total cloud service quota is still remaining, receive the work quota allocated by the cloud service system to the working node based on the remaining quota to respond to the cloud service request.
  • the above allocation module 52 is specifically configured as:
  • a work quota is allocated to the work nodes corresponding to the above-mentioned tenants included in the above-mentioned distributed architecture.
  • the above-mentioned work node submits a quota application request to the above-mentioned cloud service system, the above-mentioned total cloud service quota is not left.
  • forward the above cloud service request to other working nodes with remaining work quotas for processing.
  • the above-mentioned apparatus 50 further includes:
  • the billing module is configured to charge the cloud service request initiated by the tenant for the above-mentioned working node.
  • the above-mentioned cloud service includes an AI cloud service; the above-mentioned obtaining module 51 is specifically configured as:
  • the above allocation module 52 is specifically configured as:
  • a work quota is allocated to the work nodes corresponding to the above-mentioned tenants included in the distributed architecture, and the work quotas are used to trigger the above-mentioned work nodes to respond to the AI cloud services initiated by the above-mentioned tenants according to their corresponding work quotas ask.
  • the embodiments of the cloud service request response apparatus shown in the embodiments of this application may be configured on an electronic device.
  • the embodiment of the present application discloses an electronic device, and the device may include: a processor.
  • a memory configured to store processor executable instructions.
  • the processor is configured to invoke the executable instructions stored in the memory to implement the cloud service request response method shown in any of the foregoing embodiments.
  • FIG. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
  • the electronic device may include a processor for executing instructions, a network interface for network connection, a memory for storing operating data for the processor, and a corresponding instruction for storing the cloud service request response device of non-volatile memory.
  • the embodiment of the cloud service request response apparatus may be implemented by software, or may be implemented by hardware or a combination of software and hardware.
  • a device in a logical sense is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory for operation by the processor of the electronic device where the device is located.
  • the electronic device in which the apparatus in the embodiment is located may also include other electronic devices according to the actual functions of the electronic device. Hardware, no further details on this.
  • the corresponding instructions of the cloud service request response apparatus may also be directly stored in the memory, which is not limited herein.
  • An embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the storage medium, and the computer program is used to execute the cloud service request response method shown in any of the foregoing embodiments.
  • one or more of the embodiments of the present application may be provided as a method, a system or a computer program product. Accordingly, one or more of the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more of the embodiments of the present application may be implemented on one or more computer-usable storage media (which may include, but are not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein in the form of a computer program product.
  • computer-usable storage media which may include, but are not limited to, disk storage, CD-ROM, optical storage, etc.
  • “And/or” in the embodiments of the present application means at least one of the two.
  • “A and/or B” may include three schemes: A, B, and "A and B”.
  • Embodiments of the subject matter and functional operations described in the embodiments of this application can be implemented in digital electronic circuits, computer software or firmware in tangible embodiment, computers that can include the structures disclosed in the embodiments of this application and their structural equivalents hardware, or a combination of one or more of them.
  • Embodiments of the subject matter described in the embodiments of this application may be implemented as one or more computer programs, ie computer program instructions encoded on a tangible non-transitory program carrier for execution by or to control the operation of a data processing apparatus one or more modules.
  • the program instructions may be encoded on an artificially generated propagated signal, such as a machine-generated electrical, optical or electromagnetic signal, which is generated to encode and transmit information to a suitable receiver device for interpretation by the data.
  • the processing device executes.
  • the computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of these.
  • the processes and logic flows described in the embodiments of the present application can be executed by one or more programmable computers executing one or more computer programs to perform corresponding functions by operating according to input data and generating output.
  • the processes and logic flows described above can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, eg, an FPGA (Field Programmable Gate Array) or an ASIC (Application Specific Integrated Circuit).
  • FPGA Field Programmable Gate Array
  • ASIC Application Specific Integrated Circuit
  • a computer suitable for the execution of a computer program may include, for example, a general and/or special purpose microprocessor, or any other type of central processing unit.
  • the central processing unit will receive instructions and data from read only memory and/or random access memory.
  • the basic components of a computer may include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data.
  • a computer will also include, or be operably coupled to, such mass storage devices to receive data therefrom or to include one or more mass storage devices, such as magnetic disks, magneto-optical disks, or optical disks, etc., for storing data. Send data to it, or both.
  • the computer does not have to have such a device.
  • the computer may be embedded in another device, such as a mobile phone, personal digital assistant (PDA), mobile audio or video player, game console, global positioning system (GPS) receiver, or a universal serial bus (USB) ) flash drives for portable storage devices, to name a few.
  • PDA personal digital assistant
  • GPS global positioning system
  • USB universal serial bus
  • Computer readable media suitable for storage of computer program instructions and data may include all forms of non-volatile memory, media, and memory devices, and may include, for example, semiconductor memory devices (eg, EPROM, EEPROM, and flash memory devices), magnetic disks (eg, internal hard disks) or removable discs), magneto-optical discs, and CD-ROM and DVD-ROM discs.
  • semiconductor memory devices eg, EPROM, EEPROM, and flash memory devices
  • magnetic disks eg, internal hard disks
  • removable discs removable discs
  • magneto-optical discs e.g., CD-ROM and DVD-ROM discs.
  • the processor and memory may be supplemented by or incorporated in special purpose logic circuitry.
  • the embodiments of the present application provide a cloud service request response method and device, an electronic device, and a storage medium.
  • the method is executed by the cloud service system.
  • the method may include acquiring the total cloud service quota applied by the tenant to the cloud service system.
  • the above cloud service system includes a system constructed based on a distributed architecture. Based on the total cloud service quota, a work quota is allocated to the work nodes corresponding to the tenants included in the distributed architecture, so that the work nodes respond to cloud service requests initiated by the tenants according to their corresponding work quotas.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

A cloud service request responding method and apparatus, an electronic device, and a storage medium. The method is applied to a cloud service system. The method may comprise: acquiring the total cloud service quota that a tenant applies for from a cloud service system, wherein the cloud service system comprises a system which is constructed on the basis of a distributed architecture (S102); on the basis of the total cloud service quota, allocating a working quota to a work node which is comprised in the distributed architecture and corresponds to the tenant, such that the work node responds, according to the working quota corresponding thereto, to a cloud service request initiated by the tenant (S104). By means of the method, the amount of cloud service requests of tenants that the cloud service system frequently reads and writes by means of communicating with each work node is reduced, such that the cloud service system performs, less frequently, network input and output operations and locking operations for the reading and writing of common storage, thereby increasing the response speed of the system to cloud service requests, and improving the tenant experience.

Description

云服务请求响应方法及装置、电子设备和存储介质Cloud service request response method and apparatus, electronic device and storage medium
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本公开基于申请号为202011331362.0、申请日为2020年11月24日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本公开作为参考。The present disclosure is based on a Chinese patent application with application number 202011331362.0 and an application date of November 24, 2020, and claims the priority of the Chinese patent application, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请实施例涉及计算机技术领域,涉及但不限定于云服务请求响应方法及装置、电子设备和存储介质。The embodiments of the present application relate to the field of computer technologies, and relate to, but are not limited to, a cloud service request response method and apparatus, an electronic device, and a storage medium.
背景技术Background technique
随着互联网越来越发达,越来越多的租户选择云服务。在选择云服务的情况下,租户通常会向云服务系统申请一定的云服务总额度;并在该云服务总额度范围内,发起云服务请求。As the Internet becomes more and more developed, more and more tenants choose cloud services. In the case of choosing a cloud service, the tenant usually applies to the cloud service system for a certain total cloud service quota; and within the scope of the total cloud service quota, initiates a cloud service request.
在云服务系统接收到租户发起的云服务请求后,需要在确定租户的该次请求在上述云服务总额度的范围内之后,才会响应该次云服务请求。After the cloud service system receives the cloud service request initiated by the tenant, it will only respond to the cloud service request after determining that the tenant's request is within the range of the above-mentioned total cloud service quota.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本申请实施例至少公开一种云服务请求响应方法,所述方法由云服务系统执行;上述方法包括:In view of this, the embodiment of the present application discloses at least one cloud service request response method, and the method is executed by a cloud service system; the above method includes:
获取租户向上述云服务系统申请的云服务总额度;其中,上述云服务系统包括基于分布式架构构建的系统;Obtain the total cloud service quota applied by the tenant to the above-mentioned cloud service system; wherein, the above-mentioned cloud service system includes a system constructed based on a distributed architecture;
基于上述云服务总额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度,所工作额度用于触发上述工作节点根据自身对应的工作额度响应上述租户发起的云服务请求。Based on the total cloud service quota, a work quota is allocated to the worker nodes corresponding to the tenants included in the distributed architecture, and the work quotas are used to trigger the work nodes to respond to cloud service requests initiated by the tenants according to their corresponding work quotas.
在示出的一些实施例中,上述基于上述云服务总额度,向上述分布式架构包括的各工作节点分配工作额度,包括:In some of the illustrated embodiments, the above-mentioned allocating a work quota to each worker node included in the above-mentioned distributed architecture based on the above-mentioned total cloud service quota includes:
基于上述云服务总额度中的部分额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度。Based on a part of the above-mentioned total cloud service quota, a work quota is allocated to the worker nodes corresponding to the above-mentioned tenants included in the above-mentioned distributed architecture.
在示出的一些实施例中,上述基于上述云服务总额度中的部分额度,向上述分布式架构包括与上述租户对应的各工作节点分配工作额度,包括:根据上述工作节点对应的处理能力,确定预设时长内上述工作节点达到的云服务请求响应量;其中,上述处理能力指示单位时长内达到的云服务请求响应量;根据上述工作节点对应的上述云服务请求响应量,向上述工作节点分配工作额度。如此,能够实现对工作节点的多次工作额度分配,从而减少由于一次分配带来的分配不合理的问题。In some of the illustrated embodiments, the above-mentioned allocating a work quota to each working node corresponding to the above-mentioned distributed architecture including the above-mentioned tenant based on part of the quota in the above-mentioned total cloud service quota includes: according to the processing capability corresponding to the above-mentioned working node, Determine the cloud service request response volume reached by the above-mentioned working node within a preset time period; wherein, the above-mentioned processing capability indicates the cloud service request response volume reached within a unit time length; according to the above-mentioned cloud service request response volume corresponding to the above-mentioned working node, to the above-mentioned working node Allocate work quotas. In this way, multiple assignments of work quotas to the working nodes can be realized, thereby reducing the problem of unreasonable assignment caused by one assignment.
在示出的一些实施例中,上述基于上述云服务总额度中的部分额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度,包括:确定上述分布式架构包括的工作节点对应的额度权重;基于上述云服务总额度中的部分额度,为上述工作节点分配与上述工作节点对应的额度权重相匹配的工作额度。如此,可以合理的为各工作节点分配工作额度,使得配置高的节点可以分配较多的工作额度,从而提升云服务系统的响应速度,提升租户体验。In some of the illustrated embodiments, allocating a work quota to the worker nodes included in the distributed architecture and corresponding to the tenants based on a partial quota in the total cloud service quota includes: determining the worker nodes included in the distributed architecture. Corresponding quota weight; based on part of the quota in the total quota of the cloud service, assign the work quota to the work node that matches the quota weight corresponding to the work node. In this way, work quotas can be reasonably allocated to each work node, so that nodes with high configuration can be allocated more work quotas, thereby improving the response speed of the cloud service system and improving the tenant experience.
在示出的一些实施例中,上述确定上述分布式架构包括的各工作节点对应的额度权重,包括:基于各工作节点的配置信息,根据预设的额度权重确定规则,确定上述各工作节点对应的额度权重;或,基于各工作节点对应的处理能力,确定上述各工作节点对应的额度权重。如此,能够提升云服务系统的响应速度,提升租户体验。In some of the illustrated embodiments, the above-mentioned determining the quota weight corresponding to each work node included in the distributed architecture includes: based on the configuration information of each work node, and according to a preset quota weight determination rule, determining the corresponding quota weight of each work node. or, based on the processing capability corresponding to each work node, determine the quota weight corresponding to each of the above-mentioned work nodes. In this way, the response speed of the cloud service system can be improved, and the tenant experience can be improved.
在示出的一些实施例中,上述方法还包括:In some of the illustrated embodiments, the above method further includes:
在接收到任一工作节点提出的额度申请请求的情况下,基于剩余额度,向上述工作节点分配工作额度;其中,上述剩余额度包括:上述云服务总额度中除去已经被分配的工作额度之后剩余的额度。如此,使点消耗工作额度的速率快的工作节点可以多次接收工作额度分配,从而提升云服务系统的响 应速度,提升租户体验。In the case of receiving a quota application request from any work node, based on the remaining quota, the work quota is allocated to the above-mentioned work node; wherein, the above-mentioned residual quota includes: the above-mentioned total cloud service quota after removing the allocated work quota amount of. In this way, the worker nodes that consume the work quota at a high rate can receive the work quota allocation multiple times, thereby improving the response speed of the cloud service system and improving the tenant experience.
在示出的一些实施例中,上述基于剩余额度,向上述工作节点分配工作额度,包括:基于剩余额度,根据上述工作节点在预设时长内达到的云服务请求响应量,向上述工作节点分配与上述云服务请求响应量匹配的工作额度。如此,系统可以向工作节点分配符合节点处理能力的工作额度,使处理能力强的节点可以分配较多的工作额度,从而提升云服务系统的响应速度,提升租户体验。In some of the illustrated embodiments, the above-mentioned allocating a work quota to the above-mentioned working nodes based on the remaining quota includes: based on the remaining quota, allocating to the above-mentioned working nodes according to the cloud service request responses reached by the above-mentioned working nodes within a preset period of time. The amount of work that matches the above cloud service request response volume. In this way, the system can allocate work quotas that match the processing capabilities of the nodes to the working nodes, so that nodes with strong processing capabilities can allocate more work quotas, thereby improving the response speed of the cloud service system and improving the tenant experience.
在示出的一些实施例中,上述工作节点根据自身对应的工作额度响应上述租户发起的云服务请求,包括:上述工作节点在接收到租户发起的云服务请求后,在自身对应的工作额度还有剩余的情况下,响应上述云服务请求提供云服务计算,并根据上述计算对应的消耗额度调整自身剩余工作额度。如此,工作节点可通过分析自身的工作额度,确定是否响应本次云服务请求。In some of the illustrated embodiments, the above-mentioned working node responds to the cloud service request initiated by the above-mentioned tenant according to the work quota corresponding to itself, including: after the above-mentioned working node receives the cloud service request initiated by the tenant In the case of remaining, the cloud service calculation is provided in response to the above cloud service request, and the remaining work quota is adjusted according to the consumption quota corresponding to the above calculation. In this way, the worker node can determine whether to respond to the cloud service request by analyzing its own work quota.
在示出的一些实施例中,上述工作节点根据自身对应的工作额度响应上述租户发起的云服务请求,还包括:上述工作节点在接收到租户发起的云服务请求后,在自身对应的工作额度没有剩余的情况下,向上述云服务系统提出额度申请请求;并在上述云服务总额度仍有剩余的情况下,接收云服务系统基于剩余额度向上述工作节点分配的工作额度以响应上述云服务请求。如此,工作节点在云服务总额度仍有剩余的情况下,能够继续接收云服务分配的工作额度,从而可以加快处理效率。In some of the illustrated embodiments, the above-mentioned working node responds to the cloud service request initiated by the above-mentioned tenant according to the work quota corresponding to itself, and further includes: after receiving the cloud service request initiated by the tenant, the above-mentioned working node responds to the corresponding work quota by itself. If there is no remaining amount, submit a quota application request to the above-mentioned cloud service system; and in the case that the above-mentioned total cloud service quota is still remaining, receive the work quota allocated by the cloud service system to the above-mentioned working node based on the remaining quota in response to the above-mentioned cloud service. ask. In this way, when the total cloud service quota still remains, the worker node can continue to receive the work quota allocated by the cloud service, thereby speeding up processing efficiency.
在示出的一些实施例中,上述方法还包括:上述工作节点向上述云服务系统提出额度申请请求后,在上述云服务总额度没有剩余的情况下,将上述云服务请求转发到其他工作额度有剩余的工作节点进行处理。如此,可以使云服务系统尽可能的在租户申请的总额度范围内向租户提供云服务,从而提升租户体验。In some of the illustrated embodiments, the above method further includes: after the above-mentioned working node submits a quota application request to the above-mentioned cloud service system, if the above-mentioned total cloud service quota is not left, forwarding the above-mentioned cloud service request to other work quotas There are remaining worker nodes for processing. In this way, the cloud service system can be made to provide cloud services to the tenants within the range of the total amount applied by the tenants as much as possible, thereby improving the experience of the tenants.
在示出的一些实施例中,上述方法还包括:上述工作节点对租户发起的用云服务请求进行计费。In some of the illustrated embodiments, the above-mentioned method further includes: the above-mentioned working node charges the request for using the cloud service initiated by the tenant.
在示出的一些实施例中,上述云服务包括人工智能(Artificial Intelligence,AI)云服务;上述获取租户向上述云服务系统申请的云服务总额度,包括:获取租户向上述云服务系统申请的AI云服务总额度;上述基于上述云服务总额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度,所述工作额度用于触发上述工作节点根据自身对应的工作额度响应上述租户发起的云服务请求,包括:基于上述AI云服务总额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度,所述工作额度用于触发上述工作节点根据自身对应的工作额度响应上述租户发起的AI云服务请求。如此,对于AI云服务系统,工作节点依据自身的工作额度响应AI云服务请求,能够提升AI云服务系统的响应速度,提升租户体验。In some of the illustrated embodiments, the above-mentioned cloud services include artificial intelligence (Artificial Intelligence, AI) cloud services; the above-mentioned obtaining the total amount of cloud services applied by the tenant to the above-mentioned cloud service system includes: AI cloud service total quota; based on the above-mentioned total cloud service quota, a work quota is allocated to the work nodes corresponding to the above tenants included in the distributed architecture, and the work quota is used to trigger the above-mentioned work nodes to respond to the above according to their corresponding work quotas. The cloud service request initiated by the tenant includes: based on the above-mentioned total quota of AI cloud services, allocating a work quota to the work nodes corresponding to the above-mentioned tenants included in the above-mentioned distributed architecture, and the work quota is used to trigger the above-mentioned work nodes according to their corresponding work. The quota responds to the AI cloud service requests initiated by the above tenants. In this way, for the AI cloud service system, the worker node responds to the AI cloud service request according to its own work quota, which can improve the response speed of the AI cloud service system and improve the tenant experience.
本申请实施例还提出一种云服务请求响应装置,其中,上述装置包括:The embodiment of the present application also proposes a cloud service request response device, wherein the above device includes:
获取模块,配置为获取租户向上述云服务系统申请的云服务总额度;其中,上述云服务系统包括基于分布式架构构建的系统;an obtaining module, configured to obtain the total cloud service quota applied by the tenant to the above-mentioned cloud service system; wherein, the above-mentioned cloud service system includes a system constructed based on a distributed architecture;
分配模块,配置为基于上述云服务总额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度,所述工作额度用于触发上述工作节点根据自身对应的工作额度响应上述租户发起的云服务请求。The allocation module is configured to, based on the above-mentioned total cloud service quota, allocate a work quota to the work nodes corresponding to the above-mentioned tenants included in the above-mentioned distributed architecture, and the work quotas are used to trigger the above-mentioned work nodes to respond to the above-mentioned tenants according to their corresponding work quotas. cloud service requests.
在示出的一些实施例中,上述分配模块具体配置为:In some illustrated embodiments, the above allocation module is specifically configured as:
基于上述云服务总额度中的部分额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度。Based on a part of the above-mentioned total cloud service quota, a work quota is allocated to the worker nodes corresponding to the above-mentioned tenants included in the above-mentioned distributed architecture.
在示出的一些实施例中,上述分配模块包括:In some of the illustrated embodiments, the distribution module described above includes:
第一确定模块,配置为根据上述工作节点对应的处理能力,确定预设时长内上述工作节点达到的云服务请求响应量;其中,上述处理能力指示单位时长内达到的云服务请求响应量;a first determining module, configured to determine the cloud service request response volume reached by the working node within a preset duration according to the processing capability corresponding to the working node; wherein the processing capability indicates the cloud service request response volume reached within a unit duration;
分配子模块,配置为根据上述工作节点对应的上述云服务请求响应量,向上述工作节点分配工作额度。The allocation sub-module is configured to allocate a work quota to the above-mentioned working nodes according to the above-mentioned cloud service request responses corresponding to the above-mentioned working nodes.
在示出的一些实施例中,上述分配模块包括:In some of the illustrated embodiments, the distribution module described above includes:
第二确定模块,配置为确定上述分布式架构包括的工作节点对应的额度权重;The second determination module is configured to determine the quota weights corresponding to the working nodes included in the distributed architecture;
分配子模块,配置为基于上述云服务总额度中的部分额度,为上述工作节点分配与上述工作节点对应的额度权重相匹配的工作额度。The allocation sub-module is configured to allocate a work quota matching the quota weight corresponding to the above-mentioned working node to the above-mentioned working node based on a part of the quota in the above-mentioned total quota of the cloud service.
在示出的一些实施例中,上述第二确定模块具体配置为:In some of the illustrated embodiments, the above-mentioned second determining module is specifically configured as:
基于各工作节点的配置信息,根据预设的额度权重确定规则,确定上述各工作节点对应的额度权重;或,Based on the configuration information of each work node, and according to the preset quota weight determination rule, determine the quota weight corresponding to each work node; or,
基于各工作节点对应的处理能力,确定上述各工作节点对应的额度权重。Based on the processing capability corresponding to each work node, the quota weight corresponding to each work node is determined.
在示出的一些实施例中,上述分配模块还配置为:In some of the illustrated embodiments, the above allocation module is further configured to:
在接收到任一工作节点提出的额度申请请求的情况下,基于剩余额度,向上述工作节点分配工作额度;其中,上述剩余额度包括:上述云服务总额度中除去已经被分配的工作额度之后剩余的额度。In the case of receiving a quota application request from any work node, based on the remaining quota, the work quota is allocated to the above-mentioned work node; wherein, the above-mentioned residual quota includes: the above-mentioned total cloud service quota after removing the allocated work quota amount of.
在示出的一些实施例中,上述分配模块具体配置为:In some illustrated embodiments, the above allocation module is specifically configured as:
基于剩余额度,根据上述工作节点在预设时长内可达到的云服务请求响应量,向上述工作节点分配与上述云服务请求响应量匹配的工作额度。Based on the remaining quota, and according to the cloud service request response volume that the worker node can reach within a preset time period, a work quota matching the cloud service request response volume is allocated to the worker node.
在示出的一些实施例中,上述分配模块具体配置为:In some illustrated embodiments, the above allocation module is specifically configured as:
基于上述云服务总额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度,在上述工作节点在接收到租户发起的云服务请求后,在自身对应的工作额度还有剩余的情况下,响应上述云服务请求提供云服务计算,并根据上述计算对应的消耗额度调整自身剩余工作额度。Based on the above total cloud service quota, a work quota is allocated to the work nodes corresponding to the above tenants included in the distributed architecture. After the above work nodes receive the cloud service request initiated by the tenant, there are still remaining work quotas corresponding to their own work quotas. In this case, it provides cloud service calculation in response to the above cloud service request, and adjusts its remaining work quota according to the consumption quota corresponding to the above calculation.
在示出的一些实施例中,上述分配模块具体配置为:In some illustrated embodiments, the above allocation module is specifically configured as:
基于上述云服务总额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度,在上述工作节点在接收到租户发起的云服务请求后,在自身对应的工作额度没有剩余的情况下,向上述云服务系统提出额度申请请求;并在上述云服务总额度仍有剩余的情况下,接收云服务系统基于剩余额度向上述工作节点分配的工作额度以响应上述云服务请求。Based on the above-mentioned total cloud service quota, a work quota is allocated to the work nodes corresponding to the above-mentioned tenants included in the distributed architecture. After the above-mentioned work nodes receive the cloud service request initiated by the tenant, there is no remaining work quota corresponding to themselves. Next, submit a quota application request to the cloud service system; and in the case that the total cloud service quota is still remaining, receive the work quota allocated by the cloud service system to the working node based on the remaining quota to respond to the cloud service request.
在示出的一些实施例中,上述分配模块具体配置为:In some illustrated embodiments, the above allocation module is specifically configured as:
基于上述云服务总额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度,在上述工作节点向上述云服务系统提出额度申请请求后,在上述云服务总额度没有剩余的情况下,将上述云服务请求转发到其他工作额度有剩余的工作节点进行处理。Based on the above-mentioned total cloud service quota, a work quota is allocated to the working nodes corresponding to the above-mentioned tenants included in the above-mentioned distributed architecture. After the above-mentioned working node submits a quota application request to the above-mentioned cloud service system, the above-mentioned total cloud service quota is not left. Next, forward the above cloud service request to other working nodes with remaining work quotas for processing.
在示出的一些实施例中,上述装置还包括:In some of the illustrated embodiments, the above-mentioned apparatus further includes:
计费模块,配置为上述工作节点对租户发起的用云服务请求进行计费。The billing module is configured to charge the cloud service request initiated by the tenant for the above-mentioned working node.
在示出的一些实施例中,上述云服务包括AI云服务;上述获取模块具体配置为:In some of the illustrated embodiments, the above-mentioned cloud service includes an AI cloud service; the above-mentioned obtaining module is specifically configured as:
获取租户向上述云服务系统申请的AI云服务总额度;Obtain the total amount of AI cloud services applied by the tenant to the above cloud service system;
上述分配模块具体配置为:The specific configuration of the above allocation module is:
基于上述AI云服务总额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度,所述工作额度用于触发上述工作节点根据自身对应的工作额度响应上述租户发起的AI云服务请求。Based on the above-mentioned total quota of AI cloud services, a work quota is allocated to the work nodes corresponding to the above-mentioned tenants included in the distributed architecture, and the work quotas are used to trigger the above-mentioned work nodes to respond to the AI cloud services initiated by the above-mentioned tenants according to their corresponding work quotas ask.
本申请实施例还提出一种电子设备,上述设备包括:The embodiment of the present application also proposes an electronic device, and the above-mentioned device includes:
处理器;processor;
用于存储上述处理器可执行指令的存储器;a memory for storing the above-mentioned processor-executable instructions;
其中,上述处理器被配置为调用上述存储器中存储的可执行指令,实现如前述任一实施例示出的云服务请求响应方法。The processor is configured to invoke the executable instructions stored in the memory to implement the cloud service request response method shown in any of the foregoing embodiments.
本申请实施例还提出一种计算机可读存储介质,其特征在于,上述存储介质存储有计算机程序,上述计算机程序用于执行如前述任一实施例示出的云服务请求响应方法。An embodiment of the present application further provides a computer-readable storage medium, characterized in that, the storage medium stores a computer program, and the computer program is used to execute the cloud service request response method shown in any of the foregoing embodiments.
在上述技术方案中,上述由分布式架构构建的云服务系统可以基于租户向该系统申请的云服务总额度,向上述分布式架构包括的各工作节点分配工作额度,以使上述各工作节点自主根据自身对应的工作额度响应租户发起的云服务请求,减少上述云服务系统频繁地与上述各工作节点进行通讯来读写租户的云服务请求量,从而减少上述云服务系统频繁的网络I/O操作以及读写公共存储的锁定操作,提升了该系统的云服务请求的响应速度,进而提升租户体验。In the above technical solution, the above-mentioned cloud service system constructed by a distributed architecture can allocate a work quota to each work node included in the above-mentioned distributed architecture based on the total cloud service quota applied by the tenant to the system, so that each of the above-mentioned work nodes can be autonomous Responding to cloud service requests initiated by tenants according to their corresponding work quotas, reducing the amount of cloud service requests that the cloud service system frequently communicates with the above-mentioned working nodes to read and write tenants, thereby reducing the frequent network I/O of the above-mentioned cloud service system The operation and the locking operation of reading and writing public storage improve the response speed of the cloud service request of the system, thereby improving the tenant experience.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请实施例。It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit the embodiments of the present application.
附图说明Description of drawings
为了更清楚地说明本申请实施例一个或多个实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请实施例一个或多个实施例中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in one or more embodiments of the embodiments of the present application or related technologies, the following briefly introduces the accompanying drawings used in the description of the embodiments or related technologies. Obviously, in the following description The accompanying drawings are only some of the embodiments described in one or more of the embodiments of the present application. For those of ordinary skill in the art, without creative labor, they can also obtain other Attached.
图1为本申请实施例示出的一种云服务请求的响应方法的方法流程图;1 is a method flowchart of a method for responding to a cloud service request shown in an embodiment of the application;
图2为本申请实施例示出的一种AI云服务系统与租户的交互示意图;FIG. 2 is a schematic diagram of interaction between an AI cloud service system and a tenant according to an embodiment of the application;
图3为本申请实施例示出的云服务总额度分配示意图;3 is a schematic diagram of total cloud service quota allocation shown in an embodiment of the present application;
图4A为本申请实施例示出的云服务总额度另一分配示意图;4A is a schematic diagram of another allocation of total cloud service quotas shown in an embodiment of the application;
图4B为本申请实施例示出的云服务总额度分配示意图;4B is a schematic diagram of total cloud service quota allocation shown in an embodiment of the application;
图5为本申请实施例示出的一种云服务请求响应装置的结构示意图;5 is a schematic structural diagram of a cloud service request response apparatus shown in an embodiment of the application;
图6为本申请实施例示出的一种电子设备的硬件结构示意图。FIG. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the application.
具体实施方式Detailed ways
下面将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请实施例相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请实施例的一些方面相一致的设备和方法的例子。Exemplary embodiments will be described in detail below, examples of which are illustrated in the accompanying drawings. Where the following description refers to the drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the embodiments of the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the embodiments of the present application as recited in the appended claims.
在本申请实施例使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请实施例。在本申请实施例和所附权利要求书中所使用的单数形式的“一种”、“上述”和“该”也旨在可以包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。还应当理解,本文中所使用的词语“如果”,取决于语境,可以被解释成为“在……时”或“当……时”或“响应于确定”。Terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the embodiments of the present application. As used in the embodiments of this application and the appended claims, the singular forms "a," "above," and "the" are intended to include plural forms as well, unless the context clearly dictates otherwise. It will also be understood that the term "and/or" as used herein refers to and includes any and all possible combinations of one or more of the associated listed items. It should also be understood that the word "if", as used herein, can be interpreted as "at the time of" or "when" or "in response to determining", depending on the context.
在相关技术中,云服务系统为了确定租户发起的云服务请求是否在租户申请的云服务总额度范围内,会统计租户的云服务请求量。其中,上述租户可以包括多个用户。用户可以利用为自身分配的租户账号进行云服务申请。In the related art, in order to determine whether the cloud service request initiated by the tenant is within the range of the total cloud service quota applied by the tenant, the cloud service system will count the cloud service request amount of the tenant. The above tenant may include multiple users. Users can apply for cloud services using the tenant account assigned to them.
在实际应用中,在云服务请求的类型为云服务调用的情况下,上述云服务系统可以将云服务调用次数为维度统计租户的云服务请求量。在云服务请求的类型为流数据处理的情况下,云服务系统可以将处理流量的字节数为维度统计租户的云服务请求量。In practical applications, when the type of cloud service request is cloud service invocation, the cloud service system may use the number of cloud service invocations as a dimension to count the cloud service request volume of the tenant. When the type of cloud service request is stream data processing, the cloud service system can use the number of bytes of processing traffic as the dimension to count the cloud service request volume of the tenant.
以下以租户发起的云服务请求为云服务调用请求为例进行说明。The following description takes the cloud service request initiated by the tenant as the cloud service invocation request as an example.
例如,当租户发起云服务调用请求时,上述云服务系统可以确定当前统计的该租户的云服务调用请求次数是否达到该租户申请的云服务总额度(云服务总调用请求次数),如果未达到,则响应该次请求;否则,则限制该次请求。For example, when a tenant initiates a cloud service invocation request, the above cloud service system can determine whether the currently counted number of cloud service invocation requests of the tenant reaches the total cloud service quota applied by the tenant (the total number of cloud service invocation requests), if not , then respond to the request; otherwise, limit the request.
不难理解,当上述云服务系统为单节点系统时(上述单节点系统,具体为仅通过一个节点提供云服务的系统),由于获取租户服务调用次数,或获取处理流量的字节数都比较方便。因此,统计租户的云服务请求量并不复杂,也就不会影响云服务系统对请求响应的速度。而当上述云服务系统为基于分布式架构构建的系统时,则可能由于分布式架构的原因,导致统计租户的云服务请求量变的很复杂,影响到云服务系统对请求响应的速度。It is not difficult to understand that when the above-mentioned cloud service system is a single-node system (the above-mentioned single-node system, specifically a system that provides cloud services through only one node), the number of invocations of tenant services or the number of bytes of processing traffic are compared. convenient. Therefore, it is not complicated to count the number of cloud service requests of tenants, and it will not affect the speed of the cloud service system to respond to requests. However, when the above cloud service system is a system based on a distributed architecture, it may be due to the distributed architecture, which makes the statistics of the cloud service requests of the tenants very complicated, which affects the speed of the cloud service system in responding to the requests.
例如,当上述云服务系统为基于分布式架构构建的系统时,该系统可以为租户分配存储租户申请的云服务总额度,以及指示租户发起调用次数的使用额度的共享空间(例如,共享缓存或共享数据库)。For example, when the above-mentioned cloud service system is a system based on a distributed architecture, the system can allocate a shared space (for example, a shared cache or a shared cache or a shared cache or a shared space) for storing the total cloud service quota applied for by the tenant and a usage quota indicating the number of calls initiated by the tenant to the tenant. shared database).
当上述云服务系统接收到租户发起的云服务调用请求时,该请求可能会被分发至上述分布式架构下的任一节点A。当该节点A接收到上述请求后,将通过I/O读取上述共享空间存储的云服务总额度以及该租户已经使用的使用额度(该租户发起的调用次数)。在读取到上述云服务总额度以及上述使用额度后,该租户可以判断上述云服务总额度是否大于上述使用额度。如果是,上述节点A则响应该次调用请求,并增加上述使用额度。然后,该节点A可以通过I/O将增加后的使用额度写上述共享空间。When the above-mentioned cloud service system receives a cloud service invocation request initiated by a tenant, the request may be distributed to any node A under the above-mentioned distributed architecture. When the node A receives the above request, it will read the total cloud service quota stored in the shared space and the usage quota already used by the tenant (the number of calls initiated by the tenant) through I/O. After reading the above-mentioned total cloud service quota and the above-mentioned usage quota, the tenant can determine whether the above-mentioned total cloud service quota is greater than the above-mentioned usage quota. If so, the above-mentioned node A responds to the call request and increases the above-mentioned usage quota. Then, the node A can write the increased usage quota to the above-mentioned shared space through I/O.
不难发现,当上述云服务系统为基于分布式架构构建的系统时,由于租户发起的云服务调用请求或是流量处理请求,可能会被分发到该分布式架构下的任意节点。因此,上述云服务系统必须频繁地与分布式架构下的各节点进行通讯来读写租户的云服务请求量。而频繁的网络I/O操作、读写公共存储的锁定操作将可能导致该系统的云服务请求的响应效率变低,具有延迟,从而影响租户体验。It is not difficult to find that when the above cloud service system is a system constructed based on a distributed architecture, the cloud service invocation request or traffic processing request initiated by the tenant may be distributed to any node under the distributed architecture. Therefore, the above cloud service system must frequently communicate with each node under the distributed architecture to read and write the cloud service request volume of the tenant. Frequent network I/O operations and locking operations of reading and writing public storage may cause the system's cloud service request response efficiency to become low, with delays, thereby affecting tenant experience.
有鉴于此,本申请实施例提出云服务请求的响应方法,应用于云服务系统。其中,上述云服务系统包括基于分布式架构构建的系统。In view of this, an embodiment of the present application proposes a method for responding to a cloud service request, which is applied to a cloud service system. Wherein, the above cloud service system includes a system constructed based on a distributed architecture.
该方法通过将租户申请的云服务总额度分配至上述分布式架构下的各工作节点,触发各工作节点自主确定是否响应租户发起的云服务请求,减少上述云服务系统频繁地与上述各工作节点进行通讯来读写租户的云服务请求量,从而减少上述云服务系统频繁的网络I/O操作以及读写公共存储的锁定操作,提高了该系统的云服务请求的响应速度,进而提升租户体验。The method allocates the total cloud service quota applied by the tenant to each working node under the above-mentioned distributed architecture, triggers each working node to independently determine whether to respond to the cloud service request initiated by the tenant, and reduces the frequent communication between the above-mentioned cloud service system and the above-mentioned various working nodes. Communicate to read and write the cloud service request volume of the tenant, thereby reducing the frequent network I/O operations of the above cloud service system and the locking operation of reading and writing public storage, improving the response speed of the cloud service request of the system, thereby improving the tenant experience. .
请参见图1,图1为本申请实施例示出的一种云服务请求的响应方法的方法流程图。Please refer to FIG. 1. FIG. 1 is a method flowchart of a method for responding to a cloud service request according to an embodiment of the present application.
如图1所示,本申请实施例示出的云服务请求的响应方法可以包括:As shown in FIG. 1 , the method for responding to the cloud service request shown in the embodiment of the present application may include:
S102,获取租户向上述云服务系统申请的云服务总额度;其中,上述云服务系统包括基于分布式架构构建的系统;S102, obtain the total cloud service quota applied by the tenant to the above-mentioned cloud service system; wherein, the above-mentioned cloud service system includes a system constructed based on a distributed architecture;
S104,基于上述云服务总额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度,所述工作额度用于触发上述工作节点根据自身对应的工作额度响应租户发起的云服务请求。S104: Based on the total cloud service quota, assign a work quota to the work nodes included in the distributed architecture and corresponding to the tenants, where the work quotas are used to trigger the work nodes to respond to the cloud service requests initiated by the tenants according to their corresponding work quotas .
上述云服务系统(以下简称“系统”),具体为向租户提供云服务的系统。上述系统可以包括一定数量的硬件设备或软件装置,用以提供云服务,本申请实施例不对上述系统包括的硬件设备和软件装置的类型做限定。The above cloud service system (hereinafter referred to as the "system") is specifically a system that provides cloud services to tenants. The foregoing system may include a certain number of hardware devices or software devices to provide cloud services, and the embodiments of the present application do not limit the types of hardware devices and software devices included in the foregoing system.
在实际应用中,租户可以向上述云服务系统申请一定的云服务总额度。在一些例子中,可以以租户可以发起的云服务调用次数为维度进行统计云服务总额度。租户可以在上述云服务总额度范围内,向上述云服务系统发起云服务调用请求,从而能够享受云服务系统提供的服务。In practical applications, a tenant can apply to the above cloud service system for a certain total cloud service quota. In some examples, the total number of cloud service calls that can be initiated by the tenant may be used as a dimension to calculate the total cloud service quota. The tenant can initiate a cloud service invocation request to the above cloud service system within the scope of the above-mentioned total cloud service quota, so as to enjoy the services provided by the cloud service system.
上述云服务系统包括基于分布式架构构建的系统。上述分布式架构,可以是包括若干工作节点的架构。其中,工作节点(以下简称“节点”)可以是终端或服务器(终端或服务器可以是笔记本电脑,台式电脑,平板电脑(Portable AndroidDevice,PAD)终端等,本申请实施例不对终端或服务器的设备种类和型号进行限定)。The above cloud service system includes a system constructed based on a distributed architecture. The above-mentioned distributed architecture may be an architecture including several working nodes. Wherein, the working node (hereinafter referred to as "node") may be a terminal or a server (a terminal or server may be a notebook computer, a desktop computer, a tablet computer (Portable Android Device, PAD) terminal, etc., and the embodiments of the present application do not identify the types of devices of the terminal or server. and model number).
上述分布式架构通过其包括的工作节点提供算力,可以使上述云服务系统为租户提供云服务。需要说明的是,上述云服务类型可以是云服务调用或流量存储等,本申请实施例不对云服务类型进行限定。The above-mentioned distributed architecture provides computing power through its included working nodes, so that the above-mentioned cloud service system can provide cloud services for tenants. It should be noted that the above cloud service type may be cloud service invocation or traffic storage, etc., and the embodiment of the present application does not limit the cloud service type.
在一些实施例中,上述云服务系统可以包括AI云服务系统。In some embodiments, the above-mentioned cloud service system may include an AI cloud service system.
请参见图2,图2为本申请实施例示出的一种AI云服务系统与租户的交互示意图。如图2所示,上述AI云服务系统为基于分布式架构构建的系统。其中,上述分布式架构包括工作节点A、B、C。需要说明的是,图2示出的云服务系统仅为示意性说明,不作特别限定。Please refer to FIG. 2, which is a schematic diagram of interaction between an AI cloud service system and a tenant according to an embodiment of the present application. As shown in Figure 2, the above AI cloud service system is a system constructed based on a distributed architecture. Wherein, the above-mentioned distributed architecture includes working nodes A, B, and C. It should be noted that the cloud service system shown in FIG. 2 is only a schematic illustration, and is not particularly limited.
在图2示出的AI云服务场景中,租户201可以向AI云服务系统202申请一定调用次数的云服务总额度。然后,租户201可以通过调用接口(例如,超文本传输协议(Hyper Text Transfer Protocol,HTTP)调用)的方式向上述AI云服务系统202发起诸如模型训练的服务调用请求。上述AI云服务系统202在接收到上述调用请求后,可以按照预存的分发规律(例如,负载均衡分发规律),将该调用请求任务分发至分布式架构下的目标工作节点A,以使该节点A可以根据自身对应的工作额度响应租户发起的云服务请求,并将响应结果返回至租户。In the AI cloud service scenario shown in FIG. 2 , the tenant 201 may apply to the AI cloud service system 202 for a total cloud service quota for a certain number of calls. Then, the tenant 201 may initiate a service invocation request such as model training to the above-mentioned AI cloud service system 202 by calling an interface (for example, a Hyper Text Transfer Protocol (Hyper Text Transfer Protocol, HTTP) invocation). After the above-mentioned AI cloud service system 202 receives the above-mentioned invocation request, it can distribute the invocation request task to the target working node A under the distributed architecture according to a pre-stored distribution rule (for example, a load balancing distribution rule), so that the node can A can respond to the cloud service request initiated by the tenant according to its corresponding work quota, and return the response result to the tenant.
上述云服务总额度,包括为租户可以享受的云服务系统提供的总服务量。The above-mentioned total amount of cloud services includes the total amount of services provided by the cloud service system that tenants can enjoy.
在实际应用中,如果租户申请的云服务类型为云服务调用,上述云服务系统可以将云服务调用次数为维度统计租户的上述总服务量。如果租户申请的云服务类型为流数据处理,云服务系统可以将处理流量的字节数为维度统计租户的上述总服务量。In practical applications, if the type of cloud service applied by the tenant is cloud service invocation, the cloud service system may use the number of cloud service invocations as the dimension to count the above-mentioned total service volume of the tenant. If the cloud service type applied by the tenant is stream data processing, the cloud service system can count the above-mentioned total service volume of the tenant by taking the number of bytes of processed traffic as the dimension.
需要说明的是,一方面,本申请实施例不对云服务总额度的统计维度进行限定。以下以云服务类型为云服务调用请求为例进行说明。另一方面,在一些例子中,租户可以通过付费购买的方式申请上 述总额度。在一些例子中,租户可以通过申请试用申请上述总额度。本申请实施例不对租户申请云服务总额度的方式进行限定。It should be noted that, on the one hand, the embodiment of the present application does not limit the statistical dimension of the total amount of cloud services. The following takes the cloud service type as the cloud service invocation request as an example for description. On the other hand, in some instances, tenants can apply for the above-mentioned total amount through a paid purchase. In some instances, tenants may apply for the total amount above by applying for a trial. This embodiment of the present application does not limit the manner in which the tenant applies for the total cloud service quota.
上述工作节点,可以根据自身对应的工作额度响应租户发起的云服务请求。The above-mentioned work node can respond to the cloud service request initiated by the tenant according to its corresponding work quota.
在一些例子中,上述工作节点可以对租户发起的云服务请求进行计费。例如,工作节点可以维护与租户对应的额度汇总表。上述额度汇总表可以统计组合的剩余额度,已使用额度等信息。当某一工作节点响应该租户发起的云服务请求后,可以增加上述已使用额度以完成对租户发起的云服务请求的计费。In some examples, the above-mentioned worker nodes may charge for cloud service requests initiated by tenants. For example, worker nodes can maintain a summary table of quotas corresponding to tenants. The above quota summary table can count the remaining quota, used quota and other information of the combination. After a worker node responds to the cloud service request initiated by the tenant, the above-mentioned used quota may be increased to complete the billing for the cloud service request initiated by the tenant.
上述工作额度,是指工作节点可以响应的云服务请求量。上述工作节点在接收到租户发起的云服务请求时,可以通过判断工作额度是否有剩余来确定自身是否响应该云服务请求。The above work quota refers to the amount of cloud service requests that a worker node can respond to. When the above-mentioned working node receives the cloud service request initiated by the tenant, it can determine whether it responds to the cloud service request by judging whether there is a remaining work quota.
当工作节点每响应一次云服务请求,可以相应消耗对应的云服务请求量。例如,以调用次数统计云服务请求量时,每当工作节点响应一次该租户发起的调用请求,则可以响应消耗1个单位的工作额度。When a worker node responds to a cloud service request, it can consume the corresponding cloud service request accordingly. For example, when the cloud service request volume is counted by the number of calls, each time a worker node responds to a call request initiated by the tenant, it can respond with a work quota of 1 unit.
在一些例子中,上述工作额度可以包括两方面的额度。其一,上述工作额度可以是,在租户申请云服务总额度之后,由上述系统为上述各节点初始分配的工作额度,这样,各节点可以进行运作。其二,上述工作额度可以是,在各节点运作过程中,当被分配的工作额度消耗完毕后,向上述系统申请的工作额度,这样,各节点可以补充工作额度,继续运作。In some examples, the above-mentioned work credits may include two credits. First, the above-mentioned work quota may be the work quota initially allocated by the above-mentioned system to each of the above-mentioned nodes after the tenant applies for the total quota of cloud services, so that each node can operate. Second, the above-mentioned work quota may be the work quota applied to the above-mentioned system when the allocated work quota is exhausted during the operation of each node, so that each node can replenish the work quota and continue to operate.
上述云服务请求,包括租户向上述系统发起的云服务请求。上述云服务请求可以包括云服务调用请求,和/或流数据处理请求。The above cloud service request includes a cloud service request initiated by the tenant to the above system. The above cloud service requests may include cloud service invocation requests and/or stream data processing requests.
需要说明的是,通常租户发起的云服务请求类型与租户申请的云服务类型有关。It should be noted that, generally, the type of cloud service request initiated by the tenant is related to the type of cloud service applied for by the tenant.
例如,在租户申请的云服务类型为云服务调用的情况下,租户可以发起云服务调用请求。在租户申请的云服务类型既包括云服务调用,也包括流数据处理的情况下,租户既可以发起云服务调用请求,也可以发起流量处理请求。For example, if the cloud service type applied by the tenant is cloud service invocation, the tenant can initiate a cloud service invocation request. When the type of cloud service applied by the tenant includes both cloud service invocation and stream data processing, the tenant can initiate both a cloud service invocation request and a traffic processing request.
在一些实施例中,上述工作节点在接收到租户发起的云服务请求后,可以在自身对应的工作额度还有剩余时,响应上述云服务请求提供云服务计算,并根据上述计算对应的消耗额度调整自身剩余工作额度。In some embodiments, after receiving the cloud service request initiated by the tenant, the above-mentioned working node can provide cloud service calculation in response to the above-mentioned cloud service request when the corresponding work quota still remains, and calculate the corresponding consumption quota according to the above-mentioned calculation. Adjust your remaining work quota.
例如,请参见图2,在接收到租户发起的云服务请求后,上述工作节点A可以判断自身工作额度是否有剩余。如果自身工作额度有剩余,上述节点A则可以响应该次云服务请求,并消耗1个单位的工作额度。如果上述工作额度没有剩余,上述节点A则可以限制该次云服务请求。For example, referring to FIG. 2 , after receiving the cloud service request initiated by the tenant, the above-mentioned working node A can determine whether its own work quota remains. If its own work quota remains, the above-mentioned node A can respond to the cloud service request and consume 1 unit of work quota. If the above-mentioned work quota is not left, the above-mentioned node A can limit the cloud service request.
需要说明的是,本申请实施例不对工作节点确定工作额度是否有剩余的方式进行限定。在一些实施例中,工作节点可以存储被系统分配的工作额度,以及该节点响应过的云服务请求量。此时,在确定工作额度是否有剩余时,可以将工作额度减去当前响应过的云服务请求量得到相应结果。如果该结果大于0则确定上述工作额度有剩余,反之则没有剩余。在一些实施例中,工作节点可以存储剩余额度。即,剩余额度初始值为被系统分配的工作额度,工作节点每响应一次云服务请求,则调整剩余额度值。此时,在确定工作额度是否有剩余时,可以确定剩余额度是否大于0,如果是,则确定上述工作额度有剩余,反之则没有剩余。It should be noted that this embodiment of the present application does not limit the manner in which the working node determines whether there is a remaining work quota. In some embodiments, a worker node may store the amount of work assigned by the system, as well as the amount of cloud service requests that the node has responded to. At this time, when it is determined whether there is a remaining work quota, a corresponding result can be obtained by subtracting the currently responded cloud service request amount from the work quota. If the result is greater than 0, it is determined that the above-mentioned work quota has remaining; otherwise, there is no remaining. In some embodiments, worker nodes may store remaining credits. That is, the initial value of the remaining quota is the work quota allocated by the system, and each time the worker node responds to a cloud service request, the remaining quota value is adjusted. At this time, when it is determined whether there is a remaining amount of work, it can be determined whether the remaining amount is greater than 0, and if so, it is determined that there is a surplus of the above-mentioned amount of work, otherwise, there is no remaining amount.
在一些实施例中,上述工作节点在接收到租户发起的云服务请求后,如果自身对应的工作额度没有剩余,可以向上述系统提出额度申请请求,并在上述云服务总额度仍有剩余时,接收云服务系统基于剩余额度向上述工作节点分配的工作额度以响应上述云服务请求。In some embodiments, after receiving the cloud service request initiated by the tenant, if there is no remaining work quota corresponding to itself, the above-mentioned working node may submit a quota application request to the above-mentioned system, and when the above-mentioned total cloud service quota still remains, Receiving the work quota allocated by the cloud service system to the above-mentioned working node based on the remaining quota in response to the above-mentioned cloud service request.
例如,请参见图2,在接收到租户发起的云服务请求后,上述工作节点A可以判断自身工作额度是否有剩余。如果上述工作额度没有剩余,上述节点A则可以先向上述系统提出额度申请请求。上述系统在接收到上述额度申请请求后,可以确定与上述租户对应的云服务总额度是否仍剩余,如果仍存在剩余额度,则会向该节点A继续分配工作额度。上述节点A在接收到工作额度后,则会继续响应该次云服务请求。For example, referring to FIG. 2 , after receiving the cloud service request initiated by the tenant, the above-mentioned working node A can determine whether its own work quota remains. If the above-mentioned work quota is not left, the above-mentioned node A may first submit a quota application request to the above-mentioned system. After receiving the above quota application request, the above system can determine whether the total cloud service quota corresponding to the above tenant still remains, and if there is still a residual quota, it will continue to allocate a work quota to the node A. After the above-mentioned node A receives the work quota, it will continue to respond to the cloud service request.
在一些实施例中,上述工作节点向上述云服务系统提出额度申请请求后,如果上述云服务总额度没有剩余,则将上述云服务请求转发到其他工作额度有剩余的工作节点进行处理。In some embodiments, after the above-mentioned work node submits a quota application request to the above-mentioned cloud service system, if the above-mentioned total cloud service quota is not left, the above-mentioned cloud service request is forwarded to other work nodes with remaining work quotas for processing.
例如,请参见图2,假设上述系统中存储了各工作节点的工作状态(上述工作状态是指节点是否可以响应请求,即是否仍有工作额度)。当某一工作节点A在接收到租户发起的云服务请求后,如果自身对应的工作额度没有剩余,并且上述云服务总额度没有剩余,该节点A则可以通过上述系统查询其他各工作节点的工作状态。如果查询到仍然可以进行云服务响应的节点B,节点A则可以将上述请求路由至上述节点B,该节点B响应该请求。For example, referring to FIG. 2, it is assumed that the working status of each working node is stored in the above system (the working status refers to whether the node can respond to the request, that is, whether there is still a working quota). When a worker node A receives a cloud service request initiated by a tenant, if its corresponding work quota is not left, and the above-mentioned total cloud service quota is not left, the node A can query the work of other work nodes through the above system. state. If the node B that can still respond to the cloud service is queried, the node A can route the above-mentioned request to the above-mentioned node B, and the node B responds to the request.
在本实施例中,由于各工作节点在接收到租户发起的云服务请求后,如果自身对应的工作额度没有剩余,并且上述云服务总额度没有剩余,则将上述云服务请求转发到其他工作额度有剩余的工作节点进行处理。因此,可以使云服务系统尽可能的在租户申请的总额度范围内向租户提供云服务,从而提升租户体验。In this embodiment, after each worker node receives the cloud service request initiated by the tenant, if there is no remaining work quota corresponding to itself, and the above-mentioned total cloud service quota is not left, the above-mentioned cloud service request is forwarded to other work quotas There are remaining worker nodes for processing. Therefore, the cloud service system can be made to provide cloud services to the tenants within the range of the total amount applied by the tenants as much as possible, thereby improving the experience of the tenants.
当然,上述各工作节点在接收到租户发起的云服务请求后,如果自身对应的工作额度没有剩余,上述云服务总额度也没有剩余,并且也没有工作额度有剩余的工作节点,那么则限制上述租户的该次云服务请求。Of course, after each of the above-mentioned working nodes receives the cloud service request initiated by the tenant, if the corresponding work quota is not left, the total cloud service quota is not left, and there is no work quota with remaining work nodes, then the above restrictions will be imposed. This cloud service request of the tenant.
在上述技术方案中,上述由分布式架构构建的云服务系统可以基于租户向该系统申请的云服务总额度,向上述分布式架构包括的各工作节点分配工作额度,上述各工作节点自主根据自身对应的工作额度响应租户发起的云服务请求,减少上述云服务系统频繁地与上述各工作节点进行通讯来读写租户的云服务请求量,从而减少上述云服务系统频繁的网络I/O操作以及读写公共存储的锁定操作,提高了该系统的云服务请求的响应速度,进而提升租户体验。In the above technical solution, the cloud service system constructed by the distributed architecture can allocate a work quota to each work node included in the above distributed architecture based on the total cloud service quota applied by the tenant to the system, and each of the above work nodes independently according to their own The corresponding work quota responds to the cloud service request initiated by the tenant, reducing the cloud service request volume of the above-mentioned cloud service system that frequently communicates with the above-mentioned working nodes to read and write the tenant's cloud service, thereby reducing the frequent network I/O operations of the above-mentioned cloud service system and The locking operation of reading and writing public storage improves the response speed of cloud service requests of the system, thereby improving the tenant experience.
在一些实施例中,上述系统在执行上述S104,基于上述云服务总额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度时,可以基于上述云服务总额度中的部分额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度。In some embodiments, when the above-mentioned system performs the above-mentioned S104, based on the above-mentioned total cloud service quota, when allocating a work quota to the work nodes corresponding to the above-mentioned tenants included in the above-mentioned distributed architecture, the above-mentioned total cloud service quota may be based on part of the quota. , assigning a work quota to the work nodes included in the distributed architecture and corresponding to the tenants.
在这里,由于在对上述工作节点分配工作额度时仅利用了总额度中的部分额度,因此可以实现对工作节点的多次工作额度分配,从而减少由于一次分配带来的分配不合理的问题。Here, since only a part of the total quota is used when allocating the work quota to the above-mentioned work nodes, multiple work quota allocations to the work nodes can be realized, thereby reducing the problem of unreasonable distribution caused by one-time allocation.
在一些实施例中,在基于上述云服务总额度中的部分额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度时,按照各工作节点对应的额度权重,将上述云服务总额度分发至各工作节点。In some embodiments, when allocating work quotas to the work nodes included in the distributed architecture and corresponding to the tenants based on part of the above-mentioned total cloud service quotas, the above-mentioned cloud services are allocated according to the quota weights corresponding to each work node The total quota is distributed to each worker node.
在实际应用中,上述系统可以先获取上述分布式架构包括的工作节点对应的额度权重。在确定工作节点对应的额度权重后,上述系统可以基于上述云服务总额度中的部分额度,为上述工作节点分配与上述工作节点对应的额度权重相匹配的工作额度。In practical applications, the above-mentioned system may first obtain the quota weights corresponding to the working nodes included in the above-mentioned distributed architecture. After determining the quota weights corresponding to the working nodes, the above-mentioned system may allocate a working quota matching the quota weights corresponding to the above-mentioned working nodes to the above-mentioned working nodes based on part of the quotas in the above-mentioned total cloud service quotas.
上述各工作节点对应的额度权重,具体可以是预设的固定值。例如,可以将各工作节点对应的额度权重设置为相同的数值。此时,在分配工作额度时,可以将总额度平均分给每一个工作节点。The quota weight corresponding to each of the above working nodes may specifically be a preset fixed value. For example, the quota weight corresponding to each worker node can be set to the same value. At this time, when allocating the work quota, the total quota can be equally distributed to each worker node.
在一些实施例中,在确定上述额度权重时,基于各工作节点的配置信息,根据预设的额度权重确定规则,确定上述各工作节点对应的额度权重。In some embodiments, when determining the quota weight, the quota weight corresponding to each work node is determined based on the configuration information of each work node and according to a preset quota weight determination rule.
例如,在构建上述系统时,可以维护各工作节点对应的配置信息表。例如,工作节点CPU、GPU处理性能,硬盘型号等。在确定上述分布式架构包括的各工作节点对应的额度权重时,可以查询各工作节点对应的配置信息表,确定各个工作节点的配置信息。For example, when constructing the above-mentioned system, a configuration information table corresponding to each working node can be maintained. For example, worker node CPU, GPU processing performance, hard disk model, etc. When determining the quota weight corresponding to each working node included in the above-mentioned distributed architecture, the configuration information table corresponding to each working node may be queried to determine the configuration information of each working node.
在确定各工作节点对应的配置信息后,上述系统可以根据预设的额度权重确定规则,确定上述各工作节点对应的额度权重。After determining the configuration information corresponding to each working node, the system may determine the quota weight corresponding to each working node according to a preset quota weight determination rule.
在一些实施例中,上述额度权重确定规则,可以是先对各工作节点的各项配置信息打分。然后再对各分数进行加权求和,得到各工作节点对应的总分。最后,根据各工作节点对应的总分确定各工作节点的权重。In some embodiments, the above-mentioned quota weight determination rule may be to score various configuration information of each working node first. Then the weighted summation of each score is carried out to obtain the total score corresponding to each work node. Finally, the weight of each work node is determined according to the total score corresponding to each work node.
由于在确定上述分布式架构包括的各工作节点对应的额度权重时,上述系统可以基于各工作节点的配置信息,根据预设的额度权重确定规则,确定上述各工作节点对应的额度权重。因此,可以合理的为各工作节点分配工作额度,使得配置高的节点可以分配较多的工作额度,从而提升云服务系统的响应速度,提升租户体验。Because when determining the quota weight corresponding to each work node included in the distributed architecture, the system can determine the quota weight corresponding to each work node based on the configuration information of each work node and a preset quota weight determination rule. Therefore, it is possible to reasonably allocate work quotas to each work node, so that nodes with high configuration can be allocated more work quotas, thereby improving the response speed of the cloud service system and improving the tenant experience.
在一些实施例中,在上述确定上述分布式架构包括的各工作节点对应的额度权重时,上述系统可 以基于各工作节点对应的处理能力,确定上述各工作节点对应的额度权重;其中,上述处理能力指示单位时长内可达到的云服务请求响应量。In some embodiments, when determining the quota weight corresponding to each work node included in the distributed architecture, the system may determine the quota weight corresponding to each work node based on the processing capability corresponding to each work node; wherein, the above processing Capability indicates the amount of cloud service request responses that can be achieved within a unit time.
例如,上述系统可以通过测试的方式,确定各工作节点在单位时长内可达到的云服务请求响应量(处理能力)。在确定各工作节点对应的处理能力后,上述系统可以根据各工作节点对应的处理能力,确定各工作节点的额度权重。For example, the above-mentioned system can determine the cloud service request response amount (processing capacity) that each working node can achieve within a unit time by means of testing. After determining the processing capability corresponding to each working node, the above-mentioned system may determine the quota weight of each working node according to the processing capability corresponding to each working node.
由于在为各工作节点分配工作额度时,可以根据各工作节点的处理能力进行分配。因此,可以合理的为各工作节点分配工作额度,使处理能力强的节点可以分配较多的工作额度,从而提升云服务系统的响应速度,提升租户体验。Because when the work quota is allocated to each work node, the allocation can be performed according to the processing capacity of each work node. Therefore, work quotas can be allocated to each work node reasonably, so that nodes with strong processing capabilities can be allocated more work quotas, thereby improving the response speed of the cloud service system and improving the tenant experience.
在一些例子中,在基于上述云服务总额度中的部分额度,向上述分布式架构包括与上述租户对应的各工作节点分配工作额度时,上述系统可以在根据上述工作节点对应的处理能力,确定预设时长内上述工作节点可达到的云服务请求响应量。其中,上述处理能力指示单位时长内可达到的云服务请求响应量。在确定上述工作节点对应的上述云服务请求响应量后,上述系统可以根据上述工作节点对应的上述云服务请求响应量,向上述工作节点分配工作额度。In some examples, when allocating a work quota to each work node corresponding to the above-mentioned distributed architecture including the above-mentioned tenant based on a partial quota in the above-mentioned total cloud service quota, the above-mentioned system may, according to the processing capability corresponding to the above-mentioned work node, determine The amount of cloud service request responses that can be reached by the above-mentioned worker nodes within the preset time period. Wherein, the above-mentioned processing capability indicates the amount of cloud service request responses that can be achieved within a unit time. After determining the cloud service request response amount corresponding to the working node, the system may allocate a work quota to the working node according to the cloud service request response amount corresponding to the working node.
在一些例子中,上述系统可以根据各工作节点在预设时长内可达到的云服务请求响应量的和,确定为上述参与初始分配的部分额度的值。在根据上述各工作节点对应的上述云服务请求响应量,向上述各工作节点分配工作额度时,上述系统可以将上述各工作节点对应的上述云服务请求响应量确定为上述各工作节点对应的工作额度,分配至上述各工作节点。In some examples, the above-mentioned system may determine the value of the above-mentioned partial quota for participating in the initial allocation according to the sum of the cloud service request responses that each working node can reach within a preset time period. When allocating a work quota to each of the work nodes according to the cloud service request responses corresponding to the work nodes, the system may determine the cloud service request responses corresponding to the work nodes as the work corresponding to the work nodes. The quota is allocated to each of the above working nodes.
上述预设时长,具体可以是根据经验设定的值。例如,1分钟。The above-mentioned preset duration may specifically be a value set according to experience. For example, 1 minute.
请参见图3,图3为本申请实施例示出的云服务总额度分配示意图。Please refer to FIG. 3 , which is a schematic diagram of total quota allocation of cloud services according to an embodiment of the present application.
如图3所示,分布式架构包括的工作节点A对应的1分钟内可达到的云服务请求响应量为深灰色方块。工作节点B对应的1分钟内可达到的云服务请求响应量为浅灰色方块。工作节点C对应的1分钟内可达到的云服务请求响应量为黑色方块。As shown in FIG. 3 , the response volume of cloud service requests that can be reached within 1 minute corresponding to the worker node A included in the distributed architecture is a dark gray square. The amount of cloud service request responses that can be reached within 1 minute corresponding to the worker node B is a light gray square. The amount of cloud service request responses that can be reached within 1 minute corresponding to worker node C is a black square.
上述系统初次进行工作额度分配时,可以从总额度中,向工作节点A分配深灰色方块示意的工作额度,向工作节点B分配浅灰色方块示意的工作额度,向工作节点C分配黑色方块示意的工作额度。When the above-mentioned system allocates the work quota for the first time, from the total quota, the work node A can be allocated the work quota indicated by the dark gray square, the work node B can be allocated the work quota indicated by the light gray square, and the work node C can be allocated the work quota indicated by the black square. Work quota.
由于在基于上述云服务总额度中的部分额度,向上述分布式架构包括的各工作节点分配工作额度时,上述系统可以在根据上述各工作节点对应的处理能力,确定预设时长内上述各工作节点可达到的云服务请求响应量。其中,上述处理能力指示单位时长内可达到的云服务请求响应量。在确定上述各工作节点对应的上述云服务请求响应量后,上述系统可以将上述各工作节点对应的上述云服务请求响应量确定为上述各工作节点对应的工作额度,分配至上述各工作节点。因此,可以确定合理的参与初始分配的部分额度,并合理的向各节点分配初始工作额度,从而进一步提升云服务工作效率。Because when a work quota is allocated to each work node included in the above distributed architecture based on a part of the above-mentioned total cloud service quota, the above-mentioned system can determine the above-mentioned work within a preset duration according to the processing capability corresponding to each of the above-mentioned work nodes. The amount of cloud service request responses that the node can reach. Wherein, the above-mentioned processing capability indicates the amount of cloud service request responses that can be achieved within a unit time. After determining the cloud service request responses corresponding to the working nodes, the system may determine the cloud service request responses corresponding to the working nodes as the work quotas corresponding to the working nodes, and assign them to the working nodes. Therefore, it is possible to determine a reasonable part of the quota for participating in the initial allocation, and reasonably allocate the initial work quota to each node, thereby further improving the work efficiency of the cloud service.
在实际情形中,由于各节点消耗工作额度的速率并不相同,因此,如果将云服务总额度一次性分配完,将可能导致部分工作节点的工作已经消耗完毕,但是还有部分工作节点处于工作额度剩余状态,从而使部分节点闲置,营销云服务系统工作效率。In the actual situation, since the rate at which each node consumes the work quota is not the same, if the total cloud service quota is allocated at one time, the work of some work nodes may have been consumed, but some work nodes are still working. The remaining status of the quota, so that some nodes are idle, and the efficiency of the marketing cloud service system.
为了改善这一情形,在一些实施例中,在为各工作节点分配总额度时,无需一次性分配完,而是在任一工作节点进行额度申请时,再进行分配,从而使点消耗工作额度的速率快的工作节点可以多次接收工作额度分配,从而提升云服务系统的响应速度,提升租户体验。In order to improve this situation, in some embodiments, when allocating the total quota to each worker node, it does not need to be allotted at one time, but is allocated again when any worker node applies for the quota, so that the point consumes 10% of the work quota. A worker node with a fast rate can receive work quota assignments multiple times, thereby improving the response speed of the cloud service system and improving the tenant experience.
在实际应用中,上述系统在基于上述云服务总额度,向上述分布式架构包括的各工作节点分配工作额度时,可以基于上述云服务总额度中的部分额度,向上述分布式架构包括的各工作节点分配工作额度。并且,当上述系统接收到上述各工作节点中的任一工作节点提出的额度申请请求,基于剩余额度,向上述工作节点分配工作额度。In practical applications, when the above-mentioned system allocates a work quota to each working node included in the above-mentioned distributed architecture based on the above-mentioned total cloud service quota, the system may assign work quotas to each work node included in the above-mentioned distributed architecture based on a part of the quota in the above-mentioned total cloud service quota. Worker nodes allocate work quotas. In addition, when the system receives a quota application request from any of the above-mentioned work nodes, it allocates a work quota to the above-mentioned work nodes based on the remaining quota.
其中,上述剩余额度包括,上述云服务总额度中除去已经被分配的工作额度之后剩余的额度。Wherein, the above-mentioned remaining quota includes the remaining quota after deducting the allocated work quota from the above-mentioned total cloud service quota.
在一些实施例中,上述系统在进行总额度分配时,可以先确定初始分配的部分额度的值,以及分配规则。例如,可以指定将总额度的三分之一进行初始分配,以及采用平均分配的规则。此时,上述系统可以将总额度的三分之一额度平均分配至各工作节点。In some embodiments, when the above-mentioned system performs total quota allocation, the value of the initially allocated partial quota and the allocation rule may be determined first. For example, you can specify an initial distribution of one-third of the total quota, as well as an even distribution rule. At this time, the above-mentioned system can evenly distribute one-third of the total quota to each worker node.
之后,上述系统在接收到任一工作节点提出的额度申请请求,可以查询是否还有剩余额度,如果 有,则可以向上述工作节点分配工作额度。After that, after receiving the quota application request from any work node, the above system can check whether there is any remaining quota, and if so, it can allocate the work quota to the above work node.
由于在为各工作节点分配总额度时,无需一次性分配完,而是在任一工作节点进行额度申请时,再进行分配,从而使得消耗工作额度的速率快的工作节点可以多次接收工作额度分配,进而提升云服务系统的响应速度,提升租户体验。When allocating the total quota to each worker node, it does not need to be allotted at one time, but is allocated when any worker node applies for the quota, so that the worker node that consumes the work quota at a high rate can receive the work quota allocation multiple times. , thereby improving the response speed of the cloud service system and improving the tenant experience.
在一些实施例中,在基于剩余额度,向上述工作节点分配工作额度时,上述系统可以根据上述工作节点在预设时长内可达到的云服务请求响应量,向上述工作节点分配与上述云服务请求响应量匹配的工作额度。In some embodiments, when allocating a work quota to the above-mentioned work node based on the remaining quota, the above-mentioned system may allocate the above-mentioned cloud service to the above-mentioned work node according to the cloud service request response amount that the above-mentioned work node can reach within a preset period of time. The amount of work that matches the request response volume.
上述预设时长,具体可以是根据经验设定的值。例如,1分钟。The above-mentioned preset duration may specifically be a value set according to experience. For example, 1 minute.
请参见图4A,图4A为本申请实施例示出的云服务总额度另一分配示意图。在图4A中,斜线框代表节点对应额工作额度被消耗完毕。即节点A上的额度使用完后,从剩余的总额度中继续划分一部分额度给该节点A,直至所有的总额度分配完毕。当所有的节点的额度都消耗殆尽,也就意味着该租户的购买总额度都已经消费完毕。Please refer to FIG. 4A , which is a schematic diagram of another allocation of the total cloud service quota according to an embodiment of the present application. In FIG. 4A , the slashed box represents that the corresponding work quota of the node has been consumed. That is, after the quota on node A is used up, continue to divide a part of the quota from the remaining total quota to this node A until all the total quota is allocated. When the quota of all nodes is exhausted, it means that the total purchase quota of the tenant has been consumed.
请参见图4B,图4B为本申请实施例示出的云服务总额度分配示意图。Please refer to FIG. 4B , which is a schematic diagram of total quota allocation of cloud services according to an embodiment of the present application.
如图4B所示,斜线框代表节点对应额工作额度被消耗完毕。当节点A将分配的工作额度消耗完毕,向上述系统发起额度申请时,上述系统可以从剩余额度中,划分出节点A在1分钟内可达到的云服务请求响应量。然后上述系统可以将与该请求响应量对应的工作额度(图4B中深灰色框)分配至节点A。当节点上的额度使用完毕后,且总额度中也无剩余额度可分,节点会将当前的状态写入共享的存储服务中,同时也将不会处理该用户的请求,而是将接受到的服务请求转发到其他有额度的节点。As shown in FIG. 4B , the slashed box represents that the corresponding work quota of the node has been consumed. When node A consumes the allocated work quota and initiates a quota application to the above-mentioned system, the above-mentioned system can divide the cloud service request response amount that node A can reach within 1 minute from the remaining quota. The above system can then allocate a work quota (dark gray box in FIG. 4B ) corresponding to the request response amount to node A. When the quota on the node is used up and there is no remaining quota to divide the total quota, the node will write the current state into the shared storage service, and will not process the user's request, but will receive The service request is forwarded to other nodes with quota.
由于在向上述工作节点分配工作额度时,上述系统可以根据上述工作节点在预设时长内可达到的云服务请求响应量,向上述工作节点分配与上述云服务请求响应量匹配的工作额度。因此,上述系统可以向工作节点分配符合节点处理能力的工作额度,使处理能力强的节点可以分配较多的工作额度,从而提升云服务系统的响应速度,提升租户体验。Because when allocating the work quota to the above-mentioned working node, the above-mentioned system can allocate the above-mentioned work node to the above-mentioned work quota matching the above-mentioned cloud service request response amount to the above-mentioned working node according to the cloud service request response amount that the above-mentioned working node can reach within a preset time period. Therefore, the above system can allocate work quotas that meet the processing capabilities of the nodes to the working nodes, so that nodes with strong processing capabilities can allocate more work quotas, thereby improving the response speed of the cloud service system and improving the tenant experience.
可以理解的是,当上述总额度被消耗完毕时,则表示租户申请的云服务总额度已消耗完毕。It can be understood that when the above-mentioned total quota is exhausted, it means that the total quota of cloud services applied by the tenant has been exhausted.
与上述任一实施例相对应的,本申请实施例还提出一种云服务请求响应装置。Corresponding to any of the foregoing embodiments, an embodiment of the present application further provides a cloud service request response apparatus.
请参见图5,图5为本申请实施例示出的一种云服务请求响应装置的结构示意图。Please refer to FIG. 5, which is a schematic structural diagram of a cloud service request response apparatus according to an embodiment of the present application.
如图5所示,上述装置50可以包括:As shown in FIG. 5, the above-mentioned apparatus 50 may include:
获取模块51,配置为获取租户向上述云服务系统申请的云服务总额度;其中,上述云服务系统包括基于分布式架构构建的系统;The obtaining module 51 is configured to obtain the total cloud service quota applied by the tenant to the above-mentioned cloud service system; wherein, the above-mentioned cloud service system includes a system constructed based on a distributed architecture;
分配模块52,配置为基于上述云服务总额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度,所述工作额度用于触发上述工作节点根据自身对应的工作额度响应上述租户发起的云服务请求。The allocation module 52 is configured to allocate a work quota to the work nodes corresponding to the tenants included in the distributed architecture based on the above-mentioned total cloud service quota, and the work quotas are used to trigger the above-mentioned work nodes to respond to the above-mentioned tenants according to their corresponding work quotas Initiated cloud service request.
在示出的一些实施例中,上述分配模块52具体配置为:In some of the illustrated embodiments, the above allocation module 52 is specifically configured as:
基于上述云服务总额度中的部分额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度。Based on a part of the above-mentioned total cloud service quota, a work quota is allocated to the worker nodes corresponding to the above-mentioned tenants included in the above-mentioned distributed architecture.
在示出的一些实施例中,上述分配模块52包括:In some of the illustrated embodiments, the distribution module 52 described above includes:
第一确定模块,配置为根据上述工作节点对应的处理能力,确定预设时长内上述工作节点达到的云服务请求响应量;其中,上述处理能力指示单位时长内达到的云服务请求响应量;a first determining module, configured to determine the cloud service request response volume reached by the working node within a preset duration according to the processing capability corresponding to the working node; wherein the processing capability indicates the cloud service request response volume reached within a unit duration;
分配子模块,配置为根据上述工作节点对应的上述云服务请求响应量,向上述工作节点分配工作额度。The allocation sub-module is configured to allocate a work quota to the above-mentioned working nodes according to the above-mentioned cloud service request responses corresponding to the above-mentioned working nodes.
在示出的一些实施例中,上述分配模块52包括:In some of the illustrated embodiments, the distribution module 52 described above includes:
第二确定模块,配置为确定上述分布式架构包括的工作节点对应的额度权重;The second determination module is configured to determine the quota weights corresponding to the working nodes included in the distributed architecture;
分配子模块,配置为基于上述云服务总额度中的部分额度,为上述工作节点分配与上述工作节点对应的额度权重相匹配的工作额度。The allocation sub-module is configured to allocate a work quota matching the quota weight corresponding to the above-mentioned working node to the above-mentioned working node based on a part of the quota in the above-mentioned total quota of the cloud service.
在示出的一些实施例中,上述第二确定模块具体配置为:In some of the illustrated embodiments, the above-mentioned second determining module is specifically configured as:
基于各工作节点的配置信息,根据预设的额度权重确定规则,确定上述各工作节点对应的额度权 重;或,Based on the configuration information of each work node, and according to the preset quota weight determination rule, determine the quota weight corresponding to each of the above work nodes; or,
基于各工作节点对应的处理能力,确定上述各工作节点对应的额度权重。Based on the processing capability corresponding to each work node, the quota weight corresponding to each work node is determined.
在示出的一些实施例中,上述分配模块52还配置为:In some of the illustrated embodiments, the above allocation module 52 is further configured to:
在接收到任一工作节点提出的额度申请请求的情况下,基于剩余额度,向上述工作节点分配工作额度;其中,上述剩余额度包括:上述云服务总额度中除去已经被分配的工作额度之后剩余的额度。In the case of receiving a quota application request from any work node, based on the remaining quota, the work quota is allocated to the above-mentioned work node; wherein, the above-mentioned residual quota includes: the above-mentioned total cloud service quota after excluding the work quota that has been allocated, the remaining quota amount of.
在示出的一些实施例中,上述分配模块52具体配置为:In some of the illustrated embodiments, the above allocation module 52 is specifically configured as:
基于剩余额度,根据上述工作节点在预设时长内可达到的云服务请求响应量,向上述工作节点分配与上述云服务请求响应量匹配的工作额度。Based on the remaining quota, and according to the cloud service request response volume that the worker node can reach within a preset time period, a work quota matching the cloud service request response volume is allocated to the worker node.
在示出的一些实施例中,上述分配模块52具体配置为:In some of the illustrated embodiments, the above allocation module 52 is specifically configured as:
基于上述云服务总额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度,在上述工作节点在接收到租户发起的云服务请求后,在自身对应的工作额度还有剩余的情况下,响应上述云服务请求提供云服务计算,并根据上述计算对应的消耗额度调整自身剩余工作额度。Based on the above total cloud service quota, a work quota is allocated to the work nodes corresponding to the above tenants included in the distributed architecture. After the above work nodes receive the cloud service request initiated by the tenant, there are still remaining work quotas corresponding to their own work quotas. In this case, it provides cloud service calculation in response to the above cloud service request, and adjusts its remaining work quota according to the consumption quota corresponding to the above calculation.
在示出的一些实施例中,上述分配模块52具体配置为:In some of the illustrated embodiments, the above allocation module 52 is specifically configured as:
基于上述云服务总额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度,在上述工作节点在接收到租户发起的云服务请求后,在自身对应的工作额度没有剩余的情况下,向上述云服务系统提出额度申请请求;并在上述云服务总额度仍有剩余的情况下,接收云服务系统基于剩余额度向上述工作节点分配的工作额度以响应上述云服务请求。Based on the above-mentioned total cloud service quota, a work quota is allocated to the work nodes corresponding to the above-mentioned tenants included in the distributed architecture. After the above-mentioned work nodes receive the cloud service request initiated by the tenant, there is no remaining work quota corresponding to themselves. Next, submit a quota application request to the cloud service system; and in the case that the total cloud service quota is still remaining, receive the work quota allocated by the cloud service system to the working node based on the remaining quota to respond to the cloud service request.
在示出的一些实施例中,上述分配模块52具体配置为:In some of the illustrated embodiments, the above allocation module 52 is specifically configured as:
基于上述云服务总额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度,在上述工作节点向上述云服务系统提出额度申请请求后,在上述云服务总额度没有剩余的情况下,将上述云服务请求转发到其他工作额度有剩余的工作节点进行处理。Based on the above-mentioned total cloud service quota, a work quota is allocated to the work nodes corresponding to the above-mentioned tenants included in the above-mentioned distributed architecture. After the above-mentioned work node submits a quota application request to the above-mentioned cloud service system, the above-mentioned total cloud service quota is not left. Next, forward the above cloud service request to other working nodes with remaining work quotas for processing.
在示出的一些实施例中,上述装置50还包括:In some of the illustrated embodiments, the above-mentioned apparatus 50 further includes:
计费模块,配置为上述工作节点对租户发起的用云服务请求进行计费。The billing module is configured to charge the cloud service request initiated by the tenant for the above-mentioned working node.
在示出的一些实施例中,上述云服务包括AI云服务;上述获取模块51具体配置为:In some of the illustrated embodiments, the above-mentioned cloud service includes an AI cloud service; the above-mentioned obtaining module 51 is specifically configured as:
获取租户向上述云服务系统申请的AI云服务总额度;Obtain the total amount of AI cloud services applied by the tenant to the above cloud service system;
上述分配模块52具体配置为:The above allocation module 52 is specifically configured as:
基于上述AI云服务总额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度,所述工作额度用于触发上述工作节点根据自身对应的工作额度响应上述租户发起的AI云服务请求。Based on the above-mentioned total quota of AI cloud services, a work quota is allocated to the work nodes corresponding to the above-mentioned tenants included in the distributed architecture, and the work quotas are used to trigger the above-mentioned work nodes to respond to the AI cloud services initiated by the above-mentioned tenants according to their corresponding work quotas ask.
本申请实施例示出的云服务请求响应装置的实施例可以应配置为电子设备上。相应地,本申请实施例公开了一种电子设备,该设备可以包括:处理器。The embodiments of the cloud service request response apparatus shown in the embodiments of this application may be configured on an electronic device. Correspondingly, the embodiment of the present application discloses an electronic device, and the device may include: a processor.
配置为存储处理器可执行指令的存储器。A memory configured to store processor executable instructions.
其中,上述处理器被配置为调用上述存储器中存储的可执行指令,实现如上述任一实施例示出的云服务请求响应方法。The processor is configured to invoke the executable instructions stored in the memory to implement the cloud service request response method shown in any of the foregoing embodiments.
请参见图6,图6为本申请实施例示出的一种电子设备的硬件结构示意图。Please refer to FIG. 6 , which is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
如图6所示,该电子设备可以包括用于执行指令的处理器,用于进行网络连接的网络接口,用于为处理器存储运行数据的内存,以及用于存储云服务请求响应装置对应指令的非易失性存储器。As shown in FIG. 6 , the electronic device may include a processor for executing instructions, a network interface for network connection, a memory for storing operating data for the processor, and a corresponding instruction for storing the cloud service request response device of non-volatile memory.
其中,云服务请求响应装置的实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在电子设备的处理器将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,除了图6所示的处理器、内存、网络接口、以及非易失性存储器之外,实施例中装置所在的电子设备通常根据该电子设备的实际功能,还可以包括其他硬件,对此不再赘述。The embodiment of the cloud service request response apparatus may be implemented by software, or may be implemented by hardware or a combination of software and hardware. Taking software implementation as an example, a device in a logical sense is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory for operation by the processor of the electronic device where the device is located. From a hardware perspective, in addition to the processor, memory, network interface, and non-volatile memory shown in FIG. 6 , the electronic device in which the apparatus in the embodiment is located may also include other electronic devices according to the actual functions of the electronic device. Hardware, no further details on this.
可以理解的是,为了提升处理速度,云服务请求响应装置对应指令也可以直接存储于内存中,在此不作限定。It can be understood that, in order to improve the processing speed, the corresponding instructions of the cloud service request response apparatus may also be directly stored in the memory, which is not limited herein.
本申请实施例提出一种计算机可读存储介质,上述存储介质存储有计算机程序,上述计算机程序用于执行上述任一实施例示出的云服务请求响应方法。An embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the storage medium, and the computer program is used to execute the cloud service request response method shown in any of the foregoing embodiments.
本领域技术人员应明白,本申请实施例一个或多个实施例可提供为方法、系统或计算机程序产品。因此,本申请实施例一个或多个实施例可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请实施例一个或多个实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(可以包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。It should be understood by those skilled in the art that one or more of the embodiments of the present application may be provided as a method, a system or a computer program product. Accordingly, one or more of the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more of the embodiments of the present application may be implemented on one or more computer-usable storage media (which may include, but are not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein in the form of a computer program product.
本申请实施例中的“和/或”表示至少具有两者中的其中一个,例如,“A和/或B”可以包括三种方案:A、B、以及“A和B”。"And/or" in the embodiments of the present application means at least one of the two. For example, "A and/or B" may include three schemes: A, B, and "A and B".
本申请实施例中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于数据处理设备实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in the embodiments of the present application is described in a progressive manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the data processing device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for related parts, please refer to the partial description of the method embodiment.
上述对本申请实施例特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的行为或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。The above describes specific embodiments of the embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims can be performed in an order different from that in the embodiments and still achieve desirable results. Additionally, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
本申请实施例中描述的主题及功能操作的实施例可以在以下中实现:数字电子电路、有形体现的计算机软件或固件、可以包括本申请实施例中公开的结构及其结构性等同物的计算机硬件、或者它们中的一个或多个的组合。本申请实施例中描述的主题的实施例可以实现为一个或多个计算机程序,即编码在有形非暂时性程序载体上以被数据处理装置执行或控制数据处理装置的操作的计算机程序指令中的一个或多个模块。可替代地或附加地,程序指令可以被编码在人工生成的传播信号上,例如机器生成的电、光或电磁信号,该信号被生成以将信息编码并传输到合适的接收机装置以由数据处理装置执行。计算机存储介质可以是机器可读存储设备、机器可读存储基板、随机或串行存取存储器设备、或它们中的一个或多个的组合。Embodiments of the subject matter and functional operations described in the embodiments of this application can be implemented in digital electronic circuits, computer software or firmware in tangible embodiment, computers that can include the structures disclosed in the embodiments of this application and their structural equivalents hardware, or a combination of one or more of them. Embodiments of the subject matter described in the embodiments of this application may be implemented as one or more computer programs, ie computer program instructions encoded on a tangible non-transitory program carrier for execution by or to control the operation of a data processing apparatus one or more modules. Alternatively or additionally, the program instructions may be encoded on an artificially generated propagated signal, such as a machine-generated electrical, optical or electromagnetic signal, which is generated to encode and transmit information to a suitable receiver device for interpretation by the data. The processing device executes. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of these.
本申请实施例中描述的处理及逻辑流程可以由执行一个或多个计算机程序的一个或多个可编程计算机执行,以通过根据输入数据进行操作并生成输出来执行相应的功能。上述处理及逻辑流程还可以由专用逻辑电路—例如FPGA(现场可编程门阵列)或ASIC(专用集成电路)来执行,并且装置也可以实现为专用逻辑电路。The processes and logic flows described in the embodiments of the present application can be executed by one or more programmable computers executing one or more computer programs to perform corresponding functions by operating according to input data and generating output. The processes and logic flows described above can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, eg, an FPGA (Field Programmable Gate Array) or an ASIC (Application Specific Integrated Circuit).
适合用于执行计算机程序的计算机可以包括,例如通用和/或专用微处理器,或任何其他类型的中央处理单元。通常,中央处理单元将从只读存储器和/或随机存取存储器接收指令和数据。计算机的基本组件可以包括用于实施或执行指令的中央处理单元以及用于存储指令和数据的一个或多个存储器设备。通常,计算机还将可以包括用于存储数据的一个或多个大容量存储设备,例如磁盘、磁光盘或光盘等,或者计算机将可操作地与此大容量存储设备耦接以从其接收数据或向其传送数据,抑或两种情况兼而有之。然而,计算机不是必须具有这样的设备。此外,计算机可以嵌入在另一设备中,例如移动电话、个人数字助理(PDA)、移动音频或视频播放器、游戏操纵台、全球定位系统(GPS)接收机、或例如通用串行总线(USB)闪存驱动器的便携式存储设备,仅举几例。A computer suitable for the execution of a computer program may include, for example, a general and/or special purpose microprocessor, or any other type of central processing unit. Typically, the central processing unit will receive instructions and data from read only memory and/or random access memory. The basic components of a computer may include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include, or be operably coupled to, such mass storage devices to receive data therefrom or to include one or more mass storage devices, such as magnetic disks, magneto-optical disks, or optical disks, etc., for storing data. Send data to it, or both. However, the computer does not have to have such a device. Additionally, the computer may be embedded in another device, such as a mobile phone, personal digital assistant (PDA), mobile audio or video player, game console, global positioning system (GPS) receiver, or a universal serial bus (USB) ) flash drives for portable storage devices, to name a few.
适合于存储计算机程序指令和数据的计算机可读介质可以包括所有形式的非易失性存储器、媒介和存储器设备,例如可以包括半导体存储器设备(例如EPROM、EEPROM和闪存设备)、磁盘(例如内部硬盘或可移动盘)、磁光盘以及CD ROM和DVD-ROM盘。处理器和存储器可由专用逻辑电路补充或并入专用逻辑电路中。Computer readable media suitable for storage of computer program instructions and data may include all forms of non-volatile memory, media, and memory devices, and may include, for example, semiconductor memory devices (eg, EPROM, EEPROM, and flash memory devices), magnetic disks (eg, internal hard disks) or removable discs), magneto-optical discs, and CD-ROM and DVD-ROM discs. The processor and memory may be supplemented by or incorporated in special purpose logic circuitry.
虽然本申请实施例包含许多具体实施细节,但是这些不应被解释为限制任何公开的范围或所要求保护的范围,而是主要用于描述特定公开的具体实施例的特征。本申请实施例内在多个实施例中描述的某些特征也可以在单个实施例中被组合实施。另一方面,在单个实施例中描述的各种特征也可以在多个实施例中分开实施或以任何合适的子组合来实施。此外,虽然特征可以如上上述在某些组合中起作用并且甚至最初如此要求保护,但是来自所要求保护的组合中的一个或多个特征在一些情况下可以从该组合中去除,并且所要求保护的组合可以指向子组合或子组合的变型。Although the present application examples contain many specific implementation details, these should not be construed as limiting the scope of any disclosed or claimed, but rather are used primarily to describe the features of particular disclosed specific embodiments. Certain features that are described in the embodiments herein in the context of multiple embodiments can also be implemented in combination in a single embodiment. On the other hand, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination. Furthermore, although features may function as above in certain combinations and even be originally claimed as such, one or more features from a claimed combination may in some instances be removed from the combination and claimed A combination of can point to a subcombination or a variation of a subcombination.
类似地,虽然在附图中以特定顺序描绘了操作,但是这不应被理解为要求这些操作以所示的特定 顺序执行或顺次执行、或者要求所有例示的操作被执行,以实现期望的结果。在某些情况下,多任务和并行处理可能是有利的。此外,上述实施例中的各种系统模块和组件的分离不应被理解为在所有实施例中均需要这样的分离,并且应当理解,所描述的程序组件和系统通常可以一起集成在单个软件产品中,或者封装成多个软件产品。Similarly, although operations are depicted in the figures in a particular order, this should not be construed as requiring the operations to be performed in the particular order shown or sequentially, or that all illustrated operations be performed, to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of the various system modules and components in the above-described embodiments should not be construed as requiring such separation in all embodiments, and it should be understood that the described program components and systems may generally be integrated together in a single software product , or packaged into multiple software products.
由此,主题的特定实施例已被描述。其他实施例在所附权利要求书的范围以内。在某些情况下,权利要求书中记载的动作可以以不同的顺序执行并且仍实现期望的结果。此外,附图中描绘的处理并非必需所示的特定顺序或顺次顺序,以实现期望的结果。在某些实现中,多任务和并行处理可能是有利的。Thus, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve desirable results. Furthermore, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some implementations, multitasking and parallel processing may be advantageous.
以上仅为本申请实施例一个或多个实施例的较佳实施例而已,并不用以限制本申请实施例一个或多个实施例,凡在本申请实施例一个或多个实施例的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请实施例一个或多个实施例保护的范围之内。The above are only preferred embodiments of one or more embodiments of the embodiments of the present application, and are not intended to limit the one or more embodiments of the embodiments of the present application. Within the principle, any modifications, equivalent replacements, improvements, etc. made should be included within the protection scope of one or more embodiments of the embodiments of the present application.
工业实用性Industrial Applicability
本申请实施例提出一种云服务请求响应方法及装置、电子设备和存储介质。该方法由云服务系统执行。该方法可以包括,获取租户向上述云服务系统申请的云服务总额度。其中,上述云服务系统包括基于分布式架构构建的系统。基于上述云服务总额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度,以使上述工作节点根据自身对应的工作额度响应上述租户发起的云服务请求。The embodiments of the present application provide a cloud service request response method and device, an electronic device, and a storage medium. The method is executed by the cloud service system. The method may include acquiring the total cloud service quota applied by the tenant to the cloud service system. Wherein, the above cloud service system includes a system constructed based on a distributed architecture. Based on the total cloud service quota, a work quota is allocated to the work nodes corresponding to the tenants included in the distributed architecture, so that the work nodes respond to cloud service requests initiated by the tenants according to their corresponding work quotas.

Claims (26)

  1. 一种云服务请求响应方法,所述方法由云服务系统执行;所述方法包括:A cloud service request response method, the method is executed by a cloud service system; the method includes:
    获取租户向所述云服务系统申请的云服务总额度;其中,所述云服务系统包括基于分布式架构构建的系统;Obtain the total cloud service quota applied by the tenant to the cloud service system; wherein, the cloud service system includes a system constructed based on a distributed architecture;
    基于所述云服务总额度,向所述分布式架构包括的与所述租户对应的工作节点分配工作额度,所述工作额度用于触发所述工作节点根据自身对应的工作额度响应所述租户发起的云服务请求。Based on the total cloud service quota, a work quota is allocated to the work nodes included in the distributed architecture and corresponding to the tenant, where the work quota is used to trigger the work node to respond to the tenant's initiation according to its corresponding work quota cloud service requests.
  2. 根据权利要求1所述的方法,其中,所述基于所述云服务总额度,向所述分布式架构包括的各工作节点分配工作额度,包括:The method according to claim 1, wherein, based on the total cloud service quota, allocating a work quota to each work node included in the distributed architecture comprises:
    基于所述云服务总额度中的部分额度,向所述分布式架构包括的与所述租户对应的工作节点分配工作额度。Based on part of the total cloud service quota, a work quota is allocated to the worker nodes included in the distributed architecture and corresponding to the tenant.
  3. 根据权利要求2所述的方法,其中,所述基于所述云服务总额度中的部分额度,向所述分布式架构包括与所述租户对应的各工作节点分配工作额度,包括:The method according to claim 2, wherein the allocating a work quota to the distributed architecture including each work node corresponding to the tenant based on a partial quota in the total cloud service quota comprises:
    根据所述工作节点对应的处理能力,确定预设时长内所述工作节点达到的云服务请求响应量;其中,所述处理能力指示单位时长内达到的云服务请求响应量;According to the processing capability corresponding to the working node, determine the cloud service request response volume reached by the working node within a preset duration; wherein, the processing capability indicates the cloud service request response volume reached within a unit duration;
    根据所述工作节点对应的所述云服务请求响应量,向所述工作节点分配工作额度。A work quota is allocated to the work node according to the cloud service request response amount corresponding to the work node.
  4. 根据权利要求2或3所述的方法,其中,所述基于所述云服务总额度中的部分额度,向所述分布式架构包括的与所述租户对应的工作节点分配工作额度,包括:The method according to claim 2 or 3, wherein the allocating work quotas to the worker nodes corresponding to the tenants included in the distributed architecture based on part of the total cloud service quotas includes:
    确定所述分布式架构包括的工作节点对应的额度权重;determining the quota weights corresponding to the working nodes included in the distributed architecture;
    基于所述云服务总额度中的部分额度,为所述工作节点分配与所述工作节点对应的额度权重相匹配的工作额度。Based on a portion of the total cloud service quota, the worker node is allocated a work quota that matches the quota weight corresponding to the worker node.
  5. 根据权利要求4所述的方法,其中,所述确定所述分布式架构包括的各工作节点对应的额度权重,包括:The method according to claim 4, wherein the determining the quota weight corresponding to each working node included in the distributed architecture comprises:
    基于各工作节点的配置信息,根据预设的额度权重确定规则,确定所述各工作节点对应的额度权重;或,Based on the configuration information of each working node, according to a preset quota weight determination rule, determine the quota weight corresponding to each working node; or,
    基于各工作节点对应的处理能力,确定所述各工作节点对应的额度权重。Based on the processing capability corresponding to each work node, the quota weight corresponding to each work node is determined.
  6. 根据权利要求2至5任一所述的方法,其中,所述方法还包括:The method according to any one of claims 2 to 5, wherein the method further comprises:
    在接收到任一工作节点提出的额度申请请求的情况下,基于剩余额度,向所述工作节点分配工作额度;其中,所述剩余额度包括:所述云服务总额度中除去已经被分配的工作额度之后剩余的额度。In the case of receiving a quota application request from any work node, based on the remaining quota, assign a work quota to the work node; wherein the remaining quota includes: excluding the allocated work from the total cloud service quota The remaining amount after the amount.
  7. 根据权利要求6所述的方法,其中,所述基于剩余额度,向所述工作节点分配工作额度,包括:The method of claim 6, wherein the assigning a work quota to the worker nodes based on the remaining quota comprises:
    基于剩余额度,根据所述工作节点在预设时长内可达到的云服务请求响应量,向所述工作节点分配与所述云服务请求响应量匹配的工作额度。Based on the remaining quota, according to the cloud service request response volume that the worker node can reach within a preset time period, a work quota matching the cloud service request response volume is allocated to the worker node.
  8. 根据权利要求1至7任一所述的方法,其中,所述工作节点根据自身对应的工作额度响应所述租户发起的云服务请求,包括:The method according to any one of claims 1 to 7, wherein the worker node responds to the cloud service request initiated by the tenant according to its corresponding work quota, comprising:
    所述工作节点在接收到租户发起的云服务请求后,在自身对应的工作额度还有剩余的情况下,响应所述云服务请求提供云服务计算,并根据所述计算对应的消耗额度调整自身剩余工作额度。After receiving the cloud service request initiated by the tenant, the working node provides cloud service computing in response to the cloud service request in the case that its corresponding work quota is still remaining, and adjusts itself according to the consumption quota corresponding to the calculation. remaining work quota.
  9. 根据权利要求1至8任一所述的方法,其中,所述工作节点根据自身对应的工作额度响应所述租户发起的云服务请求,还包括:The method according to any one of claims 1 to 8, wherein the worker node responds to the cloud service request initiated by the tenant according to its corresponding work quota, further comprising:
    所述工作节点在接收到租户发起的云服务请求后,在自身对应的工作额度没有剩余的情况下,向所述云服务系统提出额度申请请求;并在所述云服务总额度仍有剩余的情况下,接收云服务系统基于剩余额度向所述工作节点分配的工作额度以响应所述云服务请求。After receiving the cloud service request initiated by the tenant, the working node submits a quota application request to the cloud service system when there is no remaining work quota corresponding to itself; and there are still remaining quotas in the total cloud service quota. In this case, the work quota allocated to the worker node by the cloud service system based on the remaining quota is received in response to the cloud service request.
  10. 根据权利要求9所述的方法,其中,所述方法还包括:The method of claim 9, wherein the method further comprises:
    所述工作节点向所述云服务系统提出额度申请请求后,在所述云服务总额度没有剩余的情况下,将所述云服务请求转发到其他工作额度有剩余的工作节点进行处理。After the working node submits a quota application request to the cloud service system, if the total cloud service quota is not left, the cloud service request is forwarded to other working nodes with remaining work quotas for processing.
  11. 根据权利要求1至10任一所述的方法,其中,所述方法还包括:The method according to any one of claims 1 to 10, wherein the method further comprises:
    所述工作节点对租户发起的用云服务请求进行计费。The working node charges for the cloud service request initiated by the tenant.
  12. 根据权利要求1至11任一所述的方法,其中,所述云服务包括AI云服务;所述获取租户向所述云服务系统申请的云服务总额度,包括:The method according to any one of claims 1 to 11, wherein the cloud service includes an AI cloud service; and the acquiring the total cloud service quota applied by the tenant to the cloud service system includes:
    获取租户向所述云服务系统申请的AI云服务总额度;Obtain the total amount of AI cloud services applied by the tenant to the cloud service system;
    所述基于所述云服务总额度,向所述分布式架构包括的与所述租户对应的工作节点分配工作额度,包括:The allocating a work quota to the work nodes corresponding to the tenant included in the distributed architecture based on the total cloud service quota includes:
    基于所述AI云服务总额度,向所述分布式架构包括的与所述租户对应的工作节点分配工作额度,所述工作额度用于触发所述工作节点根据自身对应的工作额度响应所述租户发起的AI云服务请求。Based on the total AI cloud service quota, a work quota is allocated to the work nodes included in the distributed architecture and corresponding to the tenant, where the work quota is used to trigger the work node to respond to the tenant according to its corresponding work quota The AI cloud service request initiated.
  13. 一种云服务请求响应装置,所述装置包括:A cloud service request response device, the device comprising:
    获取模块,配置为获取租户向所述云服务系统申请的云服务总额度;其中,所述云服务系统包括基于分布式架构构建的系统;an obtaining module, configured to obtain the total cloud service quota applied by the tenant to the cloud service system; wherein the cloud service system includes a system constructed based on a distributed architecture;
    分配模块,配置为基于所述云服务总额度,向所述分布式架构包括的与所述租户对应的工作节点分配工作额度,所述工作额度用于触发所述工作节点根据自身对应的工作额度响应所述租户发起的云服务请求。an allocation module, configured to, based on the total cloud service quota, allocate a work quota to the work nodes included in the distributed architecture and corresponding to the tenants, where the work quota is used to trigger the work nodes according to their corresponding work quotas Respond to a cloud service request initiated by the tenant.
  14. 根据权利要求13所述的装置,其中,所述分配模块还配置为:The apparatus of claim 13, wherein the distribution module is further configured to:
    基于上述云服务总额度中的部分额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度。Based on a part of the above-mentioned total cloud service quota, a work quota is allocated to the worker nodes corresponding to the above-mentioned tenants included in the above-mentioned distributed architecture.
  15. 根据权利要求14所述的装置,其中,所述分配模块包括:The apparatus of claim 14, wherein the distribution module comprises:
    第一确定模块,配置为根据上述工作节点对应的处理能力,确定预设时长内上述工作节点达到的云服务请求响应量;其中,上述处理能力指示单位时长内达到的云服务请求响应量;a first determining module, configured to determine the cloud service request response volume reached by the working node within a preset duration according to the processing capability corresponding to the working node; wherein the processing capability indicates the cloud service request response volume reached within a unit duration;
    分配子模块,配置为根据上述工作节点对应的上述云服务请求响应量,向上述工作节点分配工作额度。The allocation sub-module is configured to allocate a work quota to the above-mentioned working nodes according to the above-mentioned cloud service request responses corresponding to the above-mentioned working nodes.
  16. 根据权利要求14或15所述的装置,其中,所述分配模块包括:The apparatus of claim 14 or 15, wherein the distribution module comprises:
    第二确定模块,配置为确定上述分布式架构包括的工作节点对应的额度权重;The second determination module is configured to determine the quota weights corresponding to the working nodes included in the distributed architecture;
    分配子模块,配置为基于上述云服务总额度中的部分额度,为上述工作节点分配与上述工作节点对应的额度权重相匹配的工作额度。The allocation sub-module is configured to allocate a work quota matching the quota weight corresponding to the above-mentioned working node to the above-mentioned working node based on a part of the quota in the above-mentioned total quota of the cloud service.
  17. 根据权利要求16所述的装置,其中,所述第二确定模块还配置为:The apparatus of claim 16, wherein the second determining module is further configured to:
    基于各工作节点的配置信息,根据预设的额度权重确定规则,确定上述各工作节点对应的额度权重;或,Based on the configuration information of each work node, and according to the preset quota weight determination rule, determine the quota weight corresponding to each of the above work nodes; or,
    基于各工作节点对应的处理能力,确定上述各工作节点对应的额度权重。Based on the processing capability corresponding to each work node, the quota weight corresponding to each work node is determined.
  18. 根据权利要求14至17任一所述的装置,其中,所述分配模块还配置为:The apparatus according to any one of claims 14 to 17, wherein the distribution module is further configured to:
    在接收到任一工作节点提出的额度申请请求的情况下,基于剩余额度,向上述工作节点分配工作额度;其中,上述剩余额度包括:上述云服务总额度中除去已经被分配的工作额度之后剩余的额度。In the case of receiving a quota application request from any work node, based on the remaining quota, the work quota is allocated to the above-mentioned work node; wherein, the above-mentioned residual quota includes: the above-mentioned total cloud service quota after excluding the work quota that has been allocated, the remaining quota amount of.
  19. 根据权利要求18所述的装置,其中,所述分配模块还配置为:The apparatus of claim 18, wherein the distribution module is further configured to:
    基于剩余额度,根据上述工作节点在预设时长内可达到的云服务请求响应量,向上述工作节点分配与上述云服务请求响应量匹配的工作额度。Based on the remaining quota, and according to the cloud service request response volume that the worker node can achieve within a preset time period, a work quota matching the cloud service request response volume is allocated to the worker node.
  20. 根据权利要求13至19任一所述的装置,其中,所述分配模块还配置为:The apparatus according to any one of claims 13 to 19, wherein the distribution module is further configured to:
    基于上述云服务总额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度,在上述工作节点在接收到租户发起的云服务请求后,在自身对应的工作额度还有剩余的情况下,响应上述云服务请求提供云服务计算,并根据上述计算对应的消耗额度调整自身剩余工作额度。Based on the above total cloud service quota, a work quota is allocated to the work nodes corresponding to the above tenants included in the distributed architecture. After the above work nodes receive the cloud service request initiated by the tenant, there are still remaining work quotas corresponding to their own work quotas. In this case, it provides cloud service computing in response to the above cloud service request, and adjusts its remaining work quota according to the consumption quota corresponding to the above calculation.
  21. 根据权利要求13至20任一所述的装置,其中,所述分配模块还配置为:The apparatus according to any one of claims 13 to 20, wherein the distribution module is further configured to:
    基于上述云服务总额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度,在 上述工作节点在接收到租户发起的云服务请求后,在自身对应的工作额度没有剩余的情况下,向上述云服务系统提出额度申请请求;并在上述云服务总额度仍有剩余的情况下,接收云服务系统基于剩余额度向上述工作节点分配的工作额度以响应上述云服务请求。Based on the above-mentioned total cloud service quota, a work quota is allocated to the work nodes corresponding to the above-mentioned tenants included in the distributed architecture. After the above-mentioned work nodes receive the cloud service request initiated by the tenant, there is no remaining work quota corresponding to themselves. Next, submit a quota application request to the cloud service system; and in the case that the total cloud service quota is still remaining, receive the work quota allocated by the cloud service system to the working node based on the remaining quota to respond to the cloud service request.
  22. 根据权利要求21所述的装置,其中,所述分配模块还配置为:The apparatus of claim 21, wherein the distribution module is further configured to:
    基于上述云服务总额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度,在上述工作节点向上述云服务系统提出额度申请请求后,在上述云服务总额度没有剩余的情况下,将上述云服务请求转发到其他工作额度有剩余的工作节点进行处理。Based on the above-mentioned total cloud service quota, a work quota is allocated to the working nodes corresponding to the above-mentioned tenants included in the above-mentioned distributed architecture. After the above-mentioned working node submits a quota application request to the above-mentioned cloud service system, the above-mentioned total cloud service quota is not left. Next, forward the above cloud service request to other working nodes with remaining work quotas for processing.
  23. 根据权利要求13至22任一所述的装置,其中,所述装置还包括:The apparatus of any one of claims 13 to 22, wherein the apparatus further comprises:
    计费模块,配置为上述工作节点对租户发起的用云服务请求进行计费。The billing module is configured to charge the cloud service request initiated by the tenant for the above-mentioned working node.
  24. 根据权利要求13至23任一所述的装置,其中,所述云服务包括AI云服务;所述获取模块还配置为:The apparatus according to any one of claims 13 to 23, wherein the cloud service includes an AI cloud service; the obtaining module is further configured to:
    获取租户向上述云服务系统申请的AI云服务总额度;Obtain the total amount of AI cloud services applied by the tenant to the above cloud service system;
    所述分配模块还配置为:The distribution module is also configured to:
    基于上述AI云服务总额度,向上述分布式架构包括的与上述租户对应的工作节点分配工作额度,所述工作额度用于触发上述工作节点根据自身对应的工作额度响应上述租户发起的AI云服务请求。Based on the above-mentioned total quota of AI cloud services, a work quota is allocated to the work nodes corresponding to the above-mentioned tenants included in the distributed architecture, and the work quotas are used to trigger the above-mentioned work nodes to respond to the AI cloud services initiated by the above-mentioned tenants according to their corresponding work quotas ask.
  25. 一种电子设备,其中,所述设备包括:An electronic device, wherein the device comprises:
    处理器;processor;
    用于存储所述处理器可执行指令的存储器;memory for storing instructions executable by the processor;
    其中,所述处理器被配置为调用所述存储器中存储的可执行指令,实现如权利要求1至12任一所述的云服务请求响应方法。Wherein, the processor is configured to invoke the executable instructions stored in the memory to implement the cloud service request response method according to any one of claims 1 to 12.
  26. 一种计算机可读存储介质,其中,所述存储介质存储有计算机程序,所述计算机程序用于执行如权利要求1至12任一所述的云服务请求响应方法。A computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the cloud service request response method according to any one of claims 1 to 12.
PCT/CN2021/102872 2020-11-24 2021-06-28 Cloud service request responding method and apparatus, electronic device, and storage medium WO2022110796A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011331362.0 2020-11-24
CN202011331362.0A CN112395091A (en) 2020-11-24 2020-11-24 Cloud service request response method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2022110796A1 true WO2022110796A1 (en) 2022-06-02

Family

ID=74607060

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/102872 WO2022110796A1 (en) 2020-11-24 2021-06-28 Cloud service request responding method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN112395091A (en)
WO (1) WO2022110796A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112395091A (en) * 2020-11-24 2021-02-23 上海商汤智能科技有限公司 Cloud service request response method and device, electronic equipment and storage medium
CN114157614A (en) * 2021-11-30 2022-03-08 上海派拉软件股份有限公司 Resource management method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170339008A1 (en) * 2016-05-17 2017-11-23 Microsoft Technology Licensing, Llc Distributed operational control in computing systems
CN107424001A (en) * 2017-04-17 2017-12-01 中国工商银行股份有限公司 The control method and system of production marketing amount
CN108446975A (en) * 2018-03-28 2018-08-24 上海数据交易中心有限公司 A kind of quota control method and device
CN109428735A (en) * 2017-08-31 2019-03-05 中国电信股份有限公司 Charging method and charge system
CN111651339A (en) * 2020-06-04 2020-09-11 腾讯科技(深圳)有限公司 Request quantity control method and related device
CN112395091A (en) * 2020-11-24 2021-02-23 上海商汤智能科技有限公司 Cloud service request response method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170339008A1 (en) * 2016-05-17 2017-11-23 Microsoft Technology Licensing, Llc Distributed operational control in computing systems
CN107424001A (en) * 2017-04-17 2017-12-01 中国工商银行股份有限公司 The control method and system of production marketing amount
CN109428735A (en) * 2017-08-31 2019-03-05 中国电信股份有限公司 Charging method and charge system
CN108446975A (en) * 2018-03-28 2018-08-24 上海数据交易中心有限公司 A kind of quota control method and device
CN111651339A (en) * 2020-06-04 2020-09-11 腾讯科技(深圳)有限公司 Request quantity control method and related device
CN112395091A (en) * 2020-11-24 2021-02-23 上海商汤智能科技有限公司 Cloud service request response method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112395091A (en) 2021-02-23

Similar Documents

Publication Publication Date Title
JP7127010B2 (en) Resource allocation methods, apparatus, electronic equipment, computer readable media and computer programs
US9471393B2 (en) Burst-mode admission control using token buckets
KR101826969B1 (en) Burst mode control
WO2022110796A1 (en) Cloud service request responding method and apparatus, electronic device, and storage medium
US9218221B2 (en) Token sharing mechanisms for burst-mode operations
CN107688492B (en) Resource control method and device and cluster resource management system
US20140379922A1 (en) Equitable distribution of excess shared-resource throughput capacity
WO2017166643A1 (en) Method and device for quantifying task resources
US11979336B1 (en) Quota-based resource scheduling
WO2019105379A1 (en) Resource management method and apparatus, electronic device, and storage medium
CN111506434B (en) Task processing method and device and computer readable storage medium
WO2023174037A1 (en) Resource scheduling method, apparatus and system, device, medium, and program product
WO2013123650A1 (en) Method for virtual machine assignment and device for virtual machine assignment
CN108847981A (en) Distributed computer cloud computing processing method
Addya et al. A game theoretic approach to estimate fair cost of VM placement in cloud data center
Manikandan et al. Virtualized load balancer for hybrid cloud using genetic algorithm
CN108241535B (en) Resource management method and device and server equipment
US9769022B2 (en) Timeout value adaptation
CN109426561A (en) A kind of task processing method, device and equipment
CN110096352A (en) Process management method, device and computer readable storage medium
CN111427682A (en) Task allocation method, system, device and equipment
CN110875934B (en) Service grouping method and device based on multi-tenant service
CN110147278A (en) Data processing method and device
CN116074541B (en) Resource processing method, system, device and electronic equipment
CN115328666B (en) Device scheduling method, system, electronic device and computer readable storage medium

Legal Events

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

Ref document number: 21896304

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21896304

Country of ref document: EP

Kind code of ref document: A1

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

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