[go: up one dir, main page]

CN119520398A - A current limiting processing method, device, equipment and storage medium - Google Patents

A current limiting processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN119520398A
CN119520398A CN202311061509.2A CN202311061509A CN119520398A CN 119520398 A CN119520398 A CN 119520398A CN 202311061509 A CN202311061509 A CN 202311061509A CN 119520398 A CN119520398 A CN 119520398A
Authority
CN
China
Prior art keywords
tree
count
resource
database
local
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311061509.2A
Other languages
Chinese (zh)
Inventor
胡宗哲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202311061509.2A priority Critical patent/CN119520398A/en
Publication of CN119520398A publication Critical patent/CN119520398A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/20Traffic policing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请公开了属于计算机技术领域的,应用于流量控制集群包括的服务器的限流处理方法,以及应用于数据库集群的限流处理方法、装置、设备及存储介质。流量控制集群分别与一个数据库集群和至少一个服务集群连接。服务器获取服务集群发送的资源调用请求,修改服务器的本地树的资源请求计数;利用本地树的资源请求计数和服务器的远程树的资源使用计数确定限流结果,并向服务集群反馈限流结果。服务器与数据库集群进行交互,向数据库集群发送本地树,并且获取数据库集群的数据库树更新服务器的远程树。如此在本地进行限流处理,实现限流处理与数据库服务的解耦,避免数据库服务的不稳定对限流处理的影响,实现稳定性较高、延迟较小的限流处理。

The present application discloses a flow limiting processing method applied to a server included in a flow control cluster, and a flow limiting processing method, device, equipment and storage medium applied to a database cluster, which belongs to the field of computer technology. The flow control cluster is connected to a database cluster and at least one service cluster respectively. The server obtains a resource call request sent by the service cluster, modifies the resource request count of the local tree of the server; determines the flow limiting result by using the resource request count of the local tree and the resource usage count of the remote tree of the server, and feeds back the flow limiting result to the service cluster. The server interacts with the database cluster, sends a local tree to the database cluster, and obtains the database tree of the database cluster to update the remote tree of the server. In this way, flow limiting processing is performed locally, and the decoupling of flow limiting processing and database service is realized, the influence of the instability of the database service on the flow limiting processing is avoided, and the flow limiting processing with higher stability and less delay is realized.

Description

Current limiting processing method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a current limiting processing method, apparatus, device, and storage medium.
Background
In some business scenarios, it is desirable to invoke downstream resources for business processing. When the downstream resources are limited, the request for calling the downstream resources is required to be limited, so that the normal operation of the downstream resources is prevented from being influenced.
For example, in a security audit service of content, it is required to determine whether the content has a security risk. In the auditing process, a pre-established security auditing model is required to be called to judge the security risk of the content. For different types of content, there are models of corresponding security audits. For example, for text-type content, a model is employed that enables security audits to be made on the text. For the content of the picture type, a model capable of conducting security audit on the picture is adopted. For different types of security projects, a corresponding security audit model is also required. When a call model is requested for security audit, a larger flow may be generated. The resources of the model are limited, and if the flow restriction is not performed in a scene of larger flow, namely flow restriction, the model service is easy to crash.
The current flow limiting method under the large flow scene has the problem of insufficient stability, and the calling of downstream resources is influenced.
Disclosure of Invention
In view of the above, the present application provides a flow restriction processing method, apparatus, device and storage medium, which can realize a more stable flow restriction with lower delay in a larger flow scenario.
Based on the above, the technical scheme provided by the application is as follows:
In a first aspect, the present application provides a current limiting processing method, where the method is applied to a server included in a flow control cluster, where the flow control cluster is connected to one database cluster and at least one service cluster, and the method includes:
The method comprises the steps of obtaining a resource calling request sent by a database cluster, modifying a resource request count of a local tree of a server, determining a current limiting result by utilizing the resource request count of the local tree and a resource use count of a remote tree of the server, wherein the resource use count of the remote tree is determined based on the resource use count of the database tree of the database cluster, the resource use count is the sum of the resource request counts of the local tree of each server included in the flow control cluster obtained by the database cluster, and feeding back the current limiting result to the service cluster sending the resource calling request.
In one possible implementation, the local tree and the remote tree each include only one node, and the determining the current limit result using the resource request count of the local tree and the resource usage count of the remote tree of the server includes:
Calculating the sum of the resource request count of the local tree and the resource use count of the remote tree to obtain a first count, if the first count is smaller than a resource limit, the current limiting result is not current limiting, and if the first count is larger than or equal to the resource limit, the current limiting result is current limiting.
In one possible implementation, the local tree includes a root node and a plurality of leaf nodes, the root node corresponds to an available resource, the leaf nodes correspond to a service requesting to invoke the available resource, the resource request count includes a request count of the root node of the local tree and a request count of each of the leaf nodes of the local tree, the request count of the root node is a sum of the request counts of each of the leaf nodes, the remote tree includes a root node and a plurality of leaf nodes, each of the nodes of the local tree corresponds one-to-one with each of the nodes of the remote tree, the resource usage count of the remote tree includes a usage count of the root node of the remote tree and a usage count of each of the leaf nodes of the remote tree, and the usage count of the root node of the remote tree is a sum of the usage counts of the leaf nodes of each of the remote tree.
In one possible implementation manner, the number of times of the resource call request is 1, the resource call request includes information of a target available resource and information of a target service, and the modifying the resource request count of the local tree of the server includes:
And adding 1 to the request count of the root node corresponding to the target available resources included in the local tree, and adding 1 to the request count of the leaf node corresponding to the target business included in the root node corresponding to the target available resources.
In one possible implementation manner, the determining the current limit result by using the resource request count of the local tree and the resource usage count of the remote tree of the server includes:
And calculating the sum of the request count of the root node corresponding to the target available resource of the local tree and the request count of the root node corresponding to the target available resource of the remote tree to obtain a second count, wherein if the second count is smaller than the root limit of the root node corresponding to the target available resource, the current limiting result is not current limiting, and if the second count is larger than or equal to the root limit of the root node corresponding to the target available resource, the current limiting result is current limiting.
In one possible implementation manner, the determining the current limit result by using the resource request count of the local tree and the resource usage count of the remote tree of the server includes:
The method comprises the steps of obtaining a request count of a root node corresponding to a target available resource of a local tree, obtaining a sum of the request counts of the root node corresponding to the target available resource of a remote tree, obtaining a second count, obtaining a third count of a leaf node corresponding to the target service by calculating the request count of a leaf node corresponding to the target service of the local tree, obtaining the sum of the leaf nodes corresponding to the target service of the remote tree, obtaining a current limiting result as a current limiting result if the second count is smaller than the root limit of the root node corresponding to the target available resource and the third count is smaller than She Xiane of the leaf node corresponding to the target service, and obtaining the current limiting result as the current limiting result if the second count is larger than or equal to the root limit of the root node corresponding to the target available resource or the third count is larger than or equal to She Xiane of the leaf node corresponding to the target service.
In one possible implementation, the existence time of the local tree and the remote tree is a current limiting unit time, and the root quota and the leaf quota of each leaf node are determined based on the resource request count of the local tree and the resource usage count of the remote tree in the historical current limiting unit time, wherein the root quota is the sum of the leaf quota of each leaf node.
In one possible implementation, each leaf node included in the local tree has a priority, and the leaf quota of each leaf node is determined based on the root quota and the priority of each leaf node, where the leaf quota of the leaf node is positively correlated with the priority of the leaf node.
In one possible implementation, the method further includes:
and sending the local tree of the server to the database cluster according to the first frequency, wherein the local tree of the server is used for updating the resource use count of the database tree of the database cluster.
In one possible implementation, the method further includes:
And acquiring the database tree according to the second frequency, and updating the remote tree of the server by using the database tree.
In a second aspect, the present application provides a current limiting processing method, where the method is applied to a database cluster, and the database cluster is connected to a flow control cluster, and the method includes:
The method comprises the steps of obtaining a local tree sent by a server included in the flow control cluster, updating a database tree by utilizing the local tree, wherein the resource use count of the database tree is the sum of resource request counts of the local trees of all servers, and sending the database tree to the server included in the flow control cluster.
In one possible implementation, the local tree and the database tree include only one node, and the updating the database tree with the local tree includes:
and adding the resource request counts of the local trees to obtain the resource use count of the database tree.
In one possible implementation, the local tree includes a root node and a plurality of leaf nodes, the resource request count includes a request count of the root node of the local tree and a request count of each of the leaf nodes of the local tree, the request count of the root node is a sum of the request counts of each of the leaf nodes, the database tree includes a root node and a plurality of leaf nodes, each node of the database tree corresponds to each node of the local tree one-to-one, and the resource usage count of the database tree includes a usage count of the root node of the database tree and a usage count of each of the leaf nodes of the database tree, and the usage count of the root node of the database tree is a sum of the usage counts of the leaf nodes of each of the database tree.
In one possible implementation, the updating the database tree with the local tree includes:
The method comprises the steps of obtaining a request count of a root node of a local tree, calculating a sum of request counts of the root node of each local tree and historical use counts of the root node of a database tree to obtain an updated use count of the root node of the database tree, calculating a historical use count of a target leaf node of the database tree, and a sum of request counts of leaf nodes of each local tree corresponding to the target leaf node of the database tree to obtain an updated use count of the target leaf node of the database tree, wherein the target leaf node of the database tree is one of the leaf nodes included in the database tree.
In a third aspect, the present application provides a current limiting processing apparatus, where the apparatus is applied to a server included in a flow control cluster, where the flow control cluster is connected to one database cluster and at least one service cluster, and the apparatus includes:
an obtaining unit, configured to obtain a resource call request sent by the service cluster, and modify a resource request count of a local tree of the server;
A determining unit, configured to determine a current limiting result by using a resource request count of the local tree and a resource usage count of a remote tree of the server, where the resource usage count of the remote tree is determined based on a resource usage count of a database tree of the database cluster, and the resource usage count is a sum of resource request counts of local trees of respective servers included in the flow control cluster acquired by the database cluster;
and the feedback unit is used for feeding back the current limiting result to the service cluster which sends the resource calling request.
In one possible implementation manner, the local tree and the remote tree each include only one node, and the determining unit is specifically configured to calculate a sum of a resource request count of the local tree and a resource usage count of the remote tree to obtain a first count, if the first count is smaller than a resource allowance, the current limiting result is not current limiting, and if the first count is greater than or equal to the resource allowance, the current limiting result is current limiting.
In one possible implementation, the local tree includes a root node and a plurality of leaf nodes, the root node corresponds to an available resource, the leaf nodes correspond to a service requesting to invoke the available resource, the resource request count includes a request count of the root node of the local tree and a request count of each of the leaf nodes of the local tree, the request count of the root node is a sum of the request counts of each of the leaf nodes, the remote tree includes a root node and a plurality of leaf nodes, each of the nodes of the local tree corresponds one-to-one with each of the nodes of the remote tree, the resource usage count of the remote tree includes a usage count of the root node of the remote tree and a usage count of each of the leaf nodes of the remote tree, and the usage count of the root node of the remote tree is a sum of the usage counts of the leaf nodes of each of the remote tree.
In one possible implementation manner, the number of times of the resource call request is 1, the resource call request includes information of a target available resource and information of a target service, and the obtaining unit is configured to modify a resource request count of a local tree of the server, and includes:
The obtaining unit is configured to add 1 to a request count of a root node corresponding to a target available resource included in the local tree, and add 1 to a request count of a leaf node corresponding to a target service included in the root node corresponding to the target available resource.
In one possible implementation manner, the determining unit is specifically configured to calculate a sum of a request count of a root node corresponding to a target available resource of the local tree and a request count of a root node corresponding to the target available resource of the remote tree, to obtain a second count, if the second count is smaller than a root limit of the root node corresponding to the target available resource, the current limiting result is not current limiting, and if the second count is greater than or equal to the root limit of the root node corresponding to the target available resource, the current limiting result is current limiting.
In one possible implementation manner, the determining unit is specifically configured to calculate a sum of request counts of root nodes corresponding to target available resources of the local tree and request counts of root nodes corresponding to target available resources of the remote tree to obtain a second count, calculate a request count of leaf nodes corresponding to the target service of the local tree, and sum of leaf nodes corresponding to the target service of the remote tree to obtain a third count of leaf nodes corresponding to the target service, and if the second count is less than a root limit of root nodes corresponding to the target available resources and the third count is less than She Xiane of leaf nodes corresponding to the target service, the current limiting result is not current limiting, and if the second count is greater than or equal to a root limit of root nodes corresponding to the target available resources or the third count is greater than or equal to She Xiane of leaf nodes corresponding to the target service, the current limiting result is current limiting.
In one possible implementation, the existence time of the local tree and the remote tree is a current limiting unit time, and the root quota and the leaf quota of each leaf node are determined based on the resource request count of the local tree and the resource usage count of the remote tree in the historical current limiting unit time, wherein the root quota is the sum of the leaf quota of each leaf node.
In one possible implementation, each leaf node included in the local tree has a priority, and the leaf quota of each leaf node is determined based on the root quota and the priority of each leaf node, where the leaf quota of the leaf node is positively correlated with the priority of the leaf node.
In one possible implementation, the apparatus further includes:
and the sending unit is used for sending the local tree of the server to the database cluster according to the first frequency, wherein the local tree of the server is used for updating the resource use count of the database tree of the database cluster.
In one possible implementation, the apparatus further includes:
and the updating unit is used for acquiring the database tree according to the second frequency and updating the remote tree of the server by utilizing the database tree.
In a fourth aspect, the present application provides a current limiting processing apparatus, the apparatus being applied to a database cluster, the database cluster being connected to a flow control cluster, the apparatus comprising:
An obtaining unit, configured to obtain a local tree sent by a server included in the flow control cluster;
An updating unit, configured to update a database tree with the local tree, where a resource usage count of the database tree is a sum of resource request counts of the local trees of the respective servers;
and the sending unit is used for sending the database tree to a server included in the flow control cluster.
In a possible implementation manner, the local tree and the database tree only comprise one node, and the updating unit is specifically configured to add the resource request counts of the local trees to obtain the resource usage count of the database tree.
In one possible implementation, the local tree includes a root node and a plurality of leaf nodes, the resource request count includes a request count of the root node of the local tree and a request count of each of the leaf nodes of the local tree, the request count of the root node is a sum of the request counts of each of the leaf nodes, the database tree includes a root node and a plurality of leaf nodes, each node of the database tree corresponds to each node of the local tree one-to-one, and the resource usage count of the database tree includes a usage count of the root node of the database tree and a usage count of each of the leaf nodes of the database tree, and the usage count of the root node of the database tree is a sum of the usage counts of the leaf nodes of each of the database tree.
In one possible implementation manner, the updating unit is specifically configured to calculate a request count of a root node of each local tree and a sum of historical usage counts of the root node of the database tree, obtain an updated usage count of the root node of the database tree, calculate a historical usage count of a target leaf node of the database tree and a sum of request counts of leaf nodes of each local tree corresponding to the target leaf node of the database tree, obtain an updated usage count of the target leaf node of the database tree, where the target leaf node of the database tree is one of the leaf nodes included in the database tree.
In a fifth aspect, the present application provides an electronic device, comprising:
One or more processors;
a storage device having one or more programs stored thereon,
The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of the first aspect, or the method of any of the second aspect.
In a sixth aspect, the present application provides a computer readable medium having stored thereon a computer program, wherein the program when executed by a processor implements the method of any of the first aspect, or the method of any of the second aspect.
In a seventh aspect, the application provides a computer program product which, when run on a device, causes the device to perform the method of the first aspect, or the method of any of the second aspects.
From this, the application has the following beneficial effects:
The application provides a current limiting processing method for a server included in a flow control cluster, and a current limiting processing method, device, equipment and storage medium applied to a database cluster. The flow control clusters are respectively connected with one database cluster and at least one service cluster. The method comprises the steps that a server obtains a resource calling request sent by a service cluster, modifies a resource request count of a local tree of the server, determines a current limiting result by utilizing the resource request count of the local tree and a resource use count of a remote tree of the server, and feeds back the current limiting result to the service cluster. The server interacts with the database cluster, sends a local tree to the database cluster, and obtains a database tree of the database cluster to update a remote tree of the server. The resource usage count of the remote tree is determined based on the resource usage count of the database tree of the database cluster, and the resource usage count is the sum of the resource request counts of the local trees of the servers included in the flow control cluster acquired by the database cluster. Therefore, the current limiting processing can be carried out locally, the decoupling of the current limiting processing and the database service is realized, the influence of the instability of the database service on the current limiting processing is avoided, the current limiting processing with higher stability is realized, and the current limiting delay is reduced.
Drawings
Fig. 1 is a schematic diagram of a frame of an exemplary application scenario provided in an embodiment of the present application;
Fig. 2 is a schematic diagram of a frame of an exemplary application scenario provided in an embodiment of the present application;
fig. 3 is a flowchart of a current limiting processing method applied to a server of a flow control cluster according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a local tree according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a remote tree according to an embodiment of the present application;
FIG. 6 is a schematic diagram of quota allocation for a local tree according to an embodiment of the present application;
fig. 7 is a flowchart of a current limiting processing method applied to a database cluster according to an embodiment of the present application;
Fig. 8 is a schematic structural diagram of a current limiting processing device applied to a server of a flow control cluster according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a current limiting processing device applied to a database cluster according to an embodiment of the present application;
fig. 10 is a schematic diagram of a basic structure of an electronic device according to an embodiment of the present application.
Detailed Description
In order to facilitate understanding and explanation of the technical solutions provided by the embodiments of the present application, the following description will first explain the background art of the present application.
In the security audit service of the content, in order to audit various security items of various types of content, models for different types of content and different security items are required to be respectively called for audit. Thus, in the process of carrying out security audit on a large amount of contents, a large amount of models are required to be called for audit. Under the condition of limited model resources, the request for calling the model needs to be limited, so that the model can be ensured to normally provide service.
In the current throttling methods, redis (Remote Dictionary Server, remote dictionary service) is utilized to count the inventory of resources. The current limiting process is incompletely decoupled from the dis. In the event that the inventory (stocks) of locally recorded resources is sufficient, the local inventory is deducted and the request is subject to unlimited processing. In the event that local inventory is insufficient, it is necessary to wait for inventory to be pulled from Redis. Whether or not the current limit needs to be dependent on the inventory condition of the Redis feedback, the current limit process is affected by the Redis stability. Under the condition that Redis is unstable, the judgment of whether the request is limited or not is influenced, and the instability of the limitation is further caused.
Based on this, the embodiment of the application provides a current limiting processing method, a device, equipment and a storage medium, wherein the method is applied to a server included in a flow control (flow control) cluster, and the flow control cluster is respectively connected with a database cluster and at least one service cluster. The method comprises the steps of obtaining a resource calling request sent by a service cluster, modifying a resource request count of a local tree of a server, determining a current limiting result by utilizing the resource request count of the local tree and a resource use count of a remote tree of the server, and feeding back the current limiting result to the service cluster. The resource usage count of the remote tree is determined based on the resource usage count of the database tree of the database cluster, and the resource usage count is the sum of the resource request counts of the local trees of the servers included in the flow control cluster acquired by the database cluster. Therefore, the current limiting processing can be carried out locally, decoupling of processing requests and requesting resources from the database is realized, the influence of instability of database services on the current limiting processing is avoided, and the current limiting processing with higher stability is realized.
In order to facilitate understanding of a current limiting processing method provided by an embodiment of the present application, a description is given below of a current limiting processing method provided by an embodiment of the present application with reference to the accompanying drawings, and a description is given below of a scenario example shown in fig. 1 and fig. 2. Referring to fig. 1 and fig. 2, the fig. is a schematic diagram of a frame of an exemplary application scenario provided in an embodiment of the present application.
Those skilled in the art will appreciate that the frame diagrams shown in fig. 1 and 2 are merely examples of one in which embodiments of the present application may be implemented. The scope of applicability of the embodiments of the application is not limited in any way by the framework.
The embodiment of the application provides a current limiting processing method applied to a server included in a flow control cluster and a current limiting processing method applied to a database cluster. Referring to fig. 1, each flow control cluster is connected to one database cluster and a plurality of service clusters, respectively. The database clusters are, for example, distributed clusters, such as Redis clusters. Each service cluster can send a request to invoke a resource, i.e., a resource invocation request, to the flow control cluster. The flow control cluster is used for carrying out flow limiting management on the request of the service cluster. The flow control clusters are in one-to-one correspondence with the database clusters.
Referring to fig. 2, a flow control cluster includes a server 1 that creates a local tree and a remote tree in a local memory. Wherein the local tree includes a root node and a leaf node, the local tree having a resource request count. The resource request count is used to count the number of requests. The remote tree includes a root node and a leaf node. The remote tree includes a resource usage count. The resource usage count is used to count the number of resource uses. The resource usage count of the remote tree is determined based on the resource usage count of the database tree of the database cluster. The resource usage count of the database tree is obtained by counting the resource request count of the database cluster for the local tree of each server in the flow control cluster.
The server acquires a resource calling request sent by the service cluster, and modifies the resource request count of the local tree according to the request. The server transmits the local tree to the database cluster at a first frequency. The database cluster updates the database tree with the acquired local tree of each server included in the flow control cluster. And the database cluster sends the database tree to the server according to the second frequency. The server updates the remote tree with the obtained database tree. The server determines a current limit result by using the resource request count of the local tree and the resource use count of the remote tree, and feeds back the current limit result to the service cluster. The service cluster can determine whether the corresponding resource can be invoked based on the current limit result.
The method has the advantages that the local tree and the remote tree are built in the local memory of the server, the remote tree is updated asynchronously by utilizing the database tree of the database cluster, decoupling of the current limiting process and the database service can be realized, unstable current limiting process caused by unstable database service is avoided, and stability of the current limiting process is improved.
In order to facilitate understanding of the technical solution provided by the embodiments of the present application, the current limiting processing method applied to the server of the flow control cluster provided by the embodiments of the present application is described below with reference to the accompanying drawings. The current limiting processing method provided by the embodiment of the application is applied to the servers included in the flow control cluster. The flow control clusters are respectively connected with one database cluster and at least one service cluster. It should be noted that the current limit processing method can be applied to any instance of implementing a current limit service established based on the server.
Referring to fig. 3, the flow chart of a flow limiting processing method applied to a server of a flow control cluster according to an embodiment of the present application is shown in fig. 3, where the method may include S301 to S303:
s301, acquiring a resource call request sent by a service cluster, and modifying a resource request count of a local tree of a server.
In the process of processing the service, when the service cluster needs to call the resource, the service cluster triggers to send a resource call request to the flow control cluster. In one possible implementation, a service cluster that processes a resource call request is determined by an SDK (Software Development Kit ) of the flow control cluster according to a hash value of a resource name that the resource call request is to request to invoke. This enables resource call requests that call the same resource to be handled by the same service cluster.
The resource call request is used to request the resources required to call the processing service. As one example, the resource call request is an RPC (Remote Procedure Call ) request.
The embodiment of the application is not limited to the specific content included in the resource call request. As one example, a resource call request includes information about a resource that is requested to be called, and information about a service that uses the resource. The flow control cluster can allocate resource call requests to be processed to the servers based on the load conditions of the servers.
The local tree is pre-created in the local memory of the server. The resource request count of the local tree is used to record the condition of the resource request. For example, the resource request count for the local tree is QPS (Queries per second, query rate per second), or is per flow-limiting unit duration, i.e., number of queries per flow-limiting scale. The embodiment of the application limits the time length of the current limiting unit, namely the specific numerical value of the current limiting scale. Those skilled in the art can configure based on the need. As one example, the current limiting unit duration is 10 seconds. The prolonged current limiting unit duration is configured, so that the interaction frequency with database services can be reduced, and the accuracy of the current limiting method is improved.
It should be noted that the local tree can be created for each current limit unit duration. That is, the local tree of each current-limiting unit duration is created in advance before the start time of the current-limiting unit duration. The created local tree is used for recording the condition of the resource request in the time limit unit duration. After the end time of the current limiting unit duration, the local tree can be deleted or a preset time can be reserved so as to configure the quota of the subsequent current limiting unit duration.
In addition, embodiments of the present application do not limit the number of nodes included in the local tree. In one possible implementation, the local tree includes only one node. The node can be created for the available resources. The use of the local tree enables the throttling of requests to invoke the available resources. In another possible implementation, the local tree is a map structure. The local tree includes a root node and a plurality of leaf nodes. Referring to fig. 4, a schematic diagram of a local tree according to an embodiment of the present application is shown. The root node is created for the available resource and the leaf node corresponds to the service requesting to invoke the available resource. Different services can be embodied by different users sending resource call requests. The resource request count of the local tree includes a request count of a root node of the local tree and a request count of each leaf node of the local tree. The request count of the root node is the sum of the request counts of the individual leaf nodes. The local tree with the multi-node structure can realize the current limiting processing of the request for calling the available resource and realize the current limiting processing of the multi-service under the condition that the multi-service request calls the available resource.
After the server acquires the resource call request sent by the service cluster, the resource request count of the local tree is modified. In particular, the resource request count of the local tree can be modified with the counter of the local tree.
In the case where the local tree includes only one node, the resource request count for that node is modified. For example, the resource request count is incremented by 1 based on a request acquired this time.
In the case where the local tree includes a root node and a leaf node, the resource call request includes information of a target available resource and information of a target service. And modifying the request count of the root node corresponding to the target available resources included in the local tree and the request count of the leaf node corresponding to the target service included under the root node. For example, based on a request acquired this time, the request count of the root node corresponding to the target available resource included in the local tree is increased by 1, and the request count of the leaf node corresponding to the target service included in the root node is increased by 1.
S302, determining a current limit result by utilizing the resource request count of the local tree and the resource use count of the remote tree of the server.
The local memory of the server also pre-establishes a remote tree. The resource usage count of the remote tree is used to record the resource usage of the database cluster.
The remote tree is a mirror image of the database tree established for the database cluster. And the database tree of the database cluster is used for recording the resource request condition of each server of the flow control cluster. The resource usage count of the database tree is the sum of the resource request counts of the local trees of the individual servers included in the flow control cluster acquired by the database cluster. For a way to update the database tree of the database cluster, please refer to the following.
In one possible implementation, a database tree is obtained from a database cluster at a preset frequency, and a remote tree is updated with the database tree. As one example, the remote tree is overwritten with the database tree. The embodiment of the application does not limit the specific numerical value of the frequency of acquiring the database tree. For example, in the case of a current limit unit duration of 10 seconds, the database tree is acquired 1 time every 100 milliseconds in frequency. In the case of a high frequency of database tree acquisition, the remote tree in the server's local memory is infinitely similar to the database tree. Therefore, the remote tree can be used for more accurately carrying out the current limiting processing, decoupling with the database service can be realized, and the stability of the current limiting processing is ensured.
It should be noted that the remote tree can also be created for each current limit unit duration. That is, the local tree and the remote tree of each current-limiting unit duration are created in advance before the start time of the current-limiting unit duration. The created remote tree is used to record the resource usage within the current-limiting unit duration. After the end time of the current limit unit duration, the remote tree can be deleted or a preset time can be reserved to configure the quota of the subsequent current limit unit duration.
In addition, embodiments of the present application do not limit the number of nodes included in the remote tree. The remote tree is identical to the nodes comprised by the local tree. In one possible implementation, the local tree and the remote tree include only one node. In another possible implementation, the remote tree is a map structure. The remote tree includes a root node and a plurality of leaf nodes. Referring to fig. 5, a schematic diagram of a remote tree according to an embodiment of the present application is shown. The remote tree shown in fig. 5 corresponds to the local tree shown in fig. 4. Each node included in the remote tree corresponds to each node included in the local tree one by one. The resource usage count of the remote tree includes a usage count of a root node of the remote tree and a usage count of each leaf node of the remote tree. The usage count of the root node of the remote tree is the sum of the usage counts of the individual leaf nodes.
Whether the current request is limited can be judged according to the resource request count of the local tree and the resource use count of the remote tree.
As one possible implementation, the quota is pre-configured. The quota is used to represent the highest count that can invoke the resource. And when the resource request count, the resource use count or the sum of the resource request count and the resource use count is greater than or equal to the limit, determining that the current limit result is the current limit, and carrying out current limit processing on the current request.
The manner of determining whether to limit the current is different for different configurations of local and remote trees. The embodiments of the present application provide several specific implementations of determining the current limit result by using the resource request count of the local tree and the resource usage count of the remote tree of the server, which are described in detail below.
As another possible implementation, the resource request count and the resource usage count can be processed using a pre-trained artificial intelligence model to determine the current limit result. The artificial intelligence model can be trained beforehand using training samples. The training samples include a resource request count sample, a resource usage count sample, and a tag corresponding to the resource request count sample and the resource usage count sample. The label is a pre-labeled current limit result.
S303, feeding back a current limiting result to the service cluster which sends the resource calling request.
And after the current limiting result is determined, feeding back the current limiting result to the service cluster which sends the resource calling request. As an example, the current limit results in no current limit. The service cluster can invoke the corresponding resource based on the current limit result. As another example, the current limit results in a current limit. The service cluster is denied access to the corresponding resource.
Based on the above-mentioned content related to S301-S303, a local tree and a remote tree are built in the local memory of the server. The local tree can record the condition of the resource request. The remote tree is used as a mirror image of the database tree of the database cluster, so that the use condition of the resources of the database cluster can be embodied. After the server acquires the resource calling request, the judgment on whether the current limit is performed can be realized based on the local tree and the remote tree of the local memory. Therefore, the current limiting process is decoupled from the service provided by the database cluster, the stability of the database cluster does not influence the stability of the current limiting process, and the stable current limiting process is realized. In addition, the current limiting processing is realized based on the local tree and the remote tree in the local memory of the server, so that the current limiting processing efficiency can be improved, and the current limiting time delay can be reduced. Especially, aiming at the ultra-large flow scene, stable, low-delay and high-precision flow restriction can be realized.
The method for determining the current limiting result by utilizing the resource request count of the local tree and the resource use count of the remote tree is different for the local tree and the remote tree with different structures. As some examples, embodiments of the present application provide three specific implementations of determining a current limit result using a local tree's resource request count and a remote tree's resource usage count.
First, both the local tree and the remote tree include only one node.
In the case that the local tree and the remote tree have only one node, the sum of the resource request count of the local tree and the resource use count of the remote tree is calculated to obtain a first count. The first count is a count of resources that have been currently used and requested. If the first count is less than the resource limit, indicating that the currently used and requested resource does not exceed the limit, the current limit results in no current limit. If the first count is greater than or equal to the resource quota, indicating that the currently used and requested resource has exceeded the limit, the result of the throttling is a throttling. Wherein the resource quota is a preconfigured quota.
Second, the local tree and the remote tree each include a root node and a leaf node.
The request count of the root node of the local tree is the sum of the request counts of the individual leaf nodes. The usage count of the root node of the remote tree is the sum of the usage counts of the individual leaf nodes.
The request count of the root node of the local tree and the usage count of the root node of the remote tree can reflect the sum of the resources that have been currently used and requested. The resource call request acquired by the server comprises information of the target available resources and information of the target service.
And calculating the sum of the request count of the root node corresponding to the target available resource of the local tree and the request count of the root node corresponding to the target available resource of the remote tree to obtain a second count. The second count is a count of the target available resources that have been currently used and requested. The second count is compared to the root limit. The root quota is a quota preset for the count of the root node, and the resource limitation can be performed on the target available resources by using the root quota. The root quota is used to represent the total amount of resources available for the target. If the second count is less than the root limit, indicating that the currently used and requested target available resources do not exceed the total limit, the current limit results in a current limit. If the second count is greater than or equal to the root limit, indicating that the currently used and requested target available resources have exceeded a limit, the current limit results in a current limit.
Third, the local tree and the remote tree each include a root node and a leaf node.
The request count of the root node of the local tree is the sum of the request counts of the individual leaf nodes. The usage count of the root node of the remote tree is the sum of the usage counts of the individual leaf nodes.
The request count of the root node of the local tree and the usage count of the root node of the remote tree can reflect the sum of the resources that have been currently used and requested. The resource call request acquired by the server comprises information of the target available resources and information of the target service.
And calculating the sum of the request count of the root node corresponding to the target available resource of the local tree and the request count of the root node corresponding to the target available resource of the remote tree to obtain a second count. The second count is a count of available resources for the target that have been currently used and requested.
And calculating the request count of the leaf nodes corresponding to the target service of the local tree, and obtaining the third count by the sum of the leaf nodes corresponding to the target service of the remote tree. The third count is a count for the target traffic that has been currently used and requested.
And comparing the second count with the root quota of the root node corresponding to the target available resource, and comparing the third count with the leaf quota of the leaf node corresponding to the target service.
The root quota is a quota preset for the count of the root node corresponding to the target available resource, and the resource limitation can be carried out on the target available resource by utilizing the root quota. The root quota is used to represent the total amount of resources available for the target. The leaf quota is a quota preset for the count of leaf nodes corresponding to the target service for calling the target available resources, and the resource limitation can be carried out on the target service by utilizing the leaf quota. She Xiane are used to represent restrictions on invoking the target available resources for the target service.
If the second count is less than the root limit and the third count is less than She Xiane, indicating that the current target service has been used and that the requested target available resources do not exceed the limit, the result of the throttling is unrestricted. If the second count is greater than or equal to the root limit, indicating that the currently used and requested target available resources exceed the limit, the current limit results in a current limit. If the third count is greater than or equal to She Xiane, indicating that the target service has currently used and the requested target available resource exceeds the limit, the result of the throttling is a throttling. The root limit and the leaf limit are utilized to realize the flow limiting control of two dimensions of the resource and the service, and the flow limiting under the scene of calling the same resource for a plurality of service requests is realized.
It should be noted that, as one implementation, the root quota and the leaf quota can be fixed values that are configured in advance. Root and leaf limits can be configured based on the current limiting needs of resources and traffic. As another implementation, the existence time of the local tree and the remote tree is one current limiting unit time. The root quota and the leaf quota for each leaf node are determined based on the resource request count for the local tree and the resource usage count for the remote tree for the historical current limit unit time duration. Wherein the root quota is the sum of the leaf quota of each leaf node. The historical current limiting unit duration is specifically, for example, a current limiting unit duration that is the previous current limiting unit duration, or a plurality of current limiting unit durations. Based on the resource request count of the local tree and the resource use count of the remote tree in the historical current limiting unit time, the request and the use condition of the resources in the historical current limiting unit time can be determined, and then the specific numerical values of the root limit and the leaf limit in the current limiting unit time are determined.
As an example, based on the resource request count of the local tree and the resource usage count of the remote tree within the historical current unit time period, if an unlimited current can be determined, the root and leaf limits within the current unit time period can be either not adjusted or the values of the root and leaf limits within the current unit time period can be reduced. If it can be determined that the current limit has been exceeded, the values of the root and leaf limits for the current unit duration can be increased. The added value can be a preset added step length, or an added step length corresponding to a value that the resource request count of the local tree and the resource use count of the remote tree exceed the limit in the historical current limiting unit duration.
Further, the priorities of the available resources of different service requests may be different, and each leaf node included in the local tree has a priority of the corresponding available resources of the service request. After the root quota is determined, the leaf quota of each leaf node is determined according to the priority of each leaf node. In one possible implementation, she Xiane of the leaf nodes are positively correlated with the priority of the leaf nodes. Higher priority leaves are higher in quota. Lower priority leaves are lower in quota.
In another possible implementation, the requirements of resource usage and requests of higher priority leaf nodes are satisfied first, and the requirements of resource usage and requests of lower priority leaf nodes are reconfigured. For leaf nodes of the same priority, the leaf quota of the leaf node can be the same.
As an example, referring to fig. 6, a schematic diagram of quota allocation for a local tree is provided in an embodiment of the present application. The root node includes 4 leaf nodes. The root quota of the root node is 10000. The priority of the leaf node 1 is 1 level at the highest, the priority of the leaf node 2 and the leaf node 3 is 2 level at the next highest, and the priority of the leaf node 4 is 3 level at the lowest. The sum of the resource request count and the resource usage count in the historical current limit unit time length of the leaf node 1 is 7000, that is, the demand for calling resources in the historical current limit unit time length of the leaf node 1 is 7000. The sum of the resource request count and the resource usage count within the historical current limit unit duration of leaf node 2 is 2500. The sum of the resource request count and the resource usage count within the historic current limit unit duration of the leaf node 3 is 1500. The sum of the resource request count and the resource usage count within the historic current limit unit duration of the leaf node 4 is 1000. Leaf node 1 is assigned a leaf quota of value 7000. Leaf limits of 1500 are assigned to leaf node 2 and leaf node 3, respectively. Leaf node 3 is assigned a leaf quota of 0.
Determining the leaf quota using the priority enables dynamic allocation of the leaf quota. The leaf quota thus obtained can more meet the requirement of service request resources, reasonable allocation of the quota is realized, and limited resources are utilized to a greater extent.
In addition, it should be noted that, the method for determining whether the limit is exceeded by using the limit provided by the embodiment of the application can reduce the condition of current limiting in advance, reduce the possibility of misjudging the current limiting, and improve the accuracy of current limiting.
The above is a specific implementation of the server of the flow control cluster to determine if the limit is exceeded or not and to determine the limit is possible. In some implementations, the flow control cluster includes a server that sends a local tree of the server to the database cluster at a frequency. The embodiment of the application does not limit the specific value of the frequency of transmitting the local tree. For example, in the case where the current limit unit duration is 10 seconds, the frequency is 1 local tree per 200 milliseconds.
The server sends a local tree to the database cluster for updating the resource usage count of the database tree of the database cluster.
Correspondingly, the embodiment of the application also provides a current limiting processing method applied to the database cluster. The database cluster is connected with the flow control cluster. Referring to fig. 7, which is a flowchart of a current limiting processing method applied to a database cluster according to an embodiment of the present application, as shown in fig. 7, the method may include S701-S703.
And S701, acquiring a local tree sent by a server included in the flow control cluster.
The flow control cluster includes a plurality of servers. Each server included in the flow control cluster sends a local tree to the database cluster according to a certain frequency. The database cluster acquires a local tree sent by each server.
S702, updating a database tree by using the local tree, wherein the resource use count of the database tree is the sum of the resource request counts of the local tree of each server.
The database cluster builds a database tree in advance. As one example, a database tree is built for each type of available resource. The resource usage count of the database tree is used to count the already used resources determined based on the flow control cluster. The resource use count of the database tree is obtained by superposing the resource request count of the local tree of each server acquired by the database cluster. That is, the database tree is augmented by local trees acquired by the database cluster. The way in which the database tree is updated is different for the local tree and database tree of servers of different structures. The embodiments of the present application provide two methods for updating database trees, please refer to the following.
And S703, sending the database tree to a server included in the flow control cluster.
The database cluster can also send a database tree to a server of the flow control cluster. The server is thus able to update the remote tree of the server with the acquired database tree.
In one possible implementation, a server of a flow control cluster sends a query request to a database cluster. In response to a query request to obtain the database tree, the database cluster feeds back the database tree to the server. In another possible implementation, the frequency at which the database clusters send the database tree is preconfigured. The database cluster sends a database tree to each server of the flow control cluster according to the frequency.
Based on the knowledge of S701-S703, the flow control cluster and the database cluster interact to implement the flow limiting process and service decoupling provided by the database cluster. Therefore, the stability of the database cluster does not influence the stability of the current limiting process, and the stable current limiting process is realized.
In one possible implementation, the local tree and the database tree include only one node. And updating the database tree by using the local tree, specifically adding the resource request counts of each local tree to obtain the resource use count of the database tree.
In another possible implementation, the local tree includes a root node and a plurality of leaf nodes. The resource request count of the local tree includes a request count of a root node of the local tree and a request count of each leaf node of the local tree. The request count of the root node is the sum of the request counts of the individual leaf nodes. Correspondingly, the database tree comprises a root node and a plurality of leaf nodes. Each node of the database tree corresponds to each node of the local tree one by one. The resource usage count of the database tree includes a usage count of a root node of the database tree and a usage count of each leaf node of the database tree. The usage count of the root node of the database tree is the sum of the usage counts of the leaf nodes of the respective database tree.
In the case where the local tree and the database tree each include a root node and a leaf node, the database tree is updated with the local tree, including an update of the usage count of the root node of the database tree and an update of the usage count of each leaf node.
And for updating the usage count of the root node of the database tree, calculating the request count of the root node of each local tree and the sum of the historical usage counts of the root nodes of the database tree to obtain the updated usage count of the root node of the database tree. It should be noted that, as an example, the initial usage count of the root node of the database tree that is initially created is an initial value. The initial value is, for example, 0.
For updating the usage count of each leaf node of the database tree, calculating a historical usage count of the leaf nodes of the database tree and a sum of the request counts of the corresponding leaf nodes of the respective local trees, and obtaining the updated usage count of the target leaf node of the database tree. It should be noted that, as an example, the initial usage count of each leaf node of the database tree that is initially created is an initial value. The initial value is, for example, 0.
Based on the method provided by the embodiment of the method, the embodiment of the application also provides a current limiting processing device applied to the server of the flow control cluster. The device is applied to a server included in a flow control cluster, and the flow control cluster is respectively connected with one database cluster and at least one service cluster. A flow restriction processing device applied to a server of a flow control cluster will be described with reference to the accompanying drawings.
Referring to fig. 8, the schematic structural diagram of a current limiting processing device applied to a server of a flow control cluster according to an embodiment of the present application is shown. As shown in fig. 8, the current limiting processing apparatus applied to a server of a flow control cluster includes:
An obtaining unit 801, configured to obtain a resource call request sent by the service cluster, and modify a resource request count of a local tree of the server;
A determining unit 802, configured to determine a current limiting result by using a resource request count of the local tree and a resource usage count of a remote tree of the server, where the resource usage count of the remote tree is determined based on a resource usage count of a database tree of the database cluster, and the resource usage count is a sum of resource request counts of local trees of respective servers included in the flow control cluster acquired by the database cluster;
and the feedback unit 803 is configured to feed back the current limiting result to the service cluster that sends the resource calling request.
In one possible implementation manner, the local tree and the remote tree each include only one node, and the determining unit 802 is specifically configured to calculate a sum of a resource request count of the local tree and a resource usage count of the remote tree to obtain a first count, if the first count is less than a resource limit, the current limiting result is not current limiting, and if the first count is greater than or equal to the resource limit, the current limiting result is current limiting.
In one possible implementation, the local tree includes a root node and a plurality of leaf nodes, the root node corresponds to an available resource, the leaf nodes correspond to a service requesting to invoke the available resource, the resource request count includes a request count of the root node of the local tree and a request count of each of the leaf nodes of the local tree, the request count of the root node is a sum of the request counts of each of the leaf nodes, the remote tree includes a root node and a plurality of leaf nodes, each of the nodes of the local tree corresponds one-to-one with each of the nodes of the remote tree, the resource usage count of the remote tree includes a usage count of the root node of the remote tree and a usage count of each of the leaf nodes of the remote tree, and the usage count of the root node of the remote tree is a sum of the usage counts of the leaf nodes of each of the remote tree.
In a possible implementation manner, the number of times of the resource call request is 1, the resource call request includes information of a target available resource and information of a target service, and the obtaining unit 801 is configured to modify a resource request count of a local tree of the server, and includes:
The obtaining unit 801 is configured to increment a request count of a root node corresponding to a target available resource included in the local tree by 1, and increment a request count of a leaf node corresponding to a target service included in the root node corresponding to the target available resource by 1.
In one possible implementation manner, the determining unit 802 is specifically configured to calculate a sum of a request count of a root node corresponding to a target available resource of the local tree and a request count of a root node corresponding to the target available resource of the remote tree, to obtain a second count, where if the second count is less than a root quota of the root node corresponding to the target available resource, the current limiting result is no current limitation. And if the second count is greater than or equal to the root limit of the root node corresponding to the target available resource, the current limiting result is current limiting.
In one possible implementation manner, the determining unit 802 is specifically configured to calculate a sum of request counts of root nodes corresponding to target available resources of the local tree and request counts of root nodes corresponding to target available resources of the remote tree to obtain a second count, calculate a sum of request counts of leaf nodes corresponding to the target service of the local tree and leaf nodes corresponding to the target service of the remote tree to obtain a third count of leaf nodes corresponding to the target service, and if the second count is less than a root limit of the root nodes corresponding to the target available resources and the third count is less than She Xiane of leaf nodes corresponding to the target service, the current limiting result is no current limiting, and if the second count is greater than or equal to a root limit of the root nodes corresponding to the target available resources or the third count is greater than or equal to She Xiane of leaf nodes corresponding to the target service, the current limiting result is current limiting.
In one possible implementation, the existence time of the local tree and the remote tree is a current limiting unit time, and the root quota and the leaf quota of each leaf node are determined based on the resource request count of the local tree and the resource usage count of the remote tree in the historical current limiting unit time, wherein the root quota is the sum of the leaf quota of each leaf node.
In one possible implementation, each leaf node included in the local tree has a priority, and the leaf quota of each leaf node is determined based on the root quota and the priority of each leaf node, where the leaf quota of the leaf node is positively correlated with the priority of the leaf node.
In one possible implementation, the apparatus further includes:
and the sending unit is used for sending the local tree of the server to the database cluster according to the first frequency, wherein the local tree of the server is used for updating the resource use count of the database tree of the database cluster.
In one possible implementation, the apparatus further includes:
and the updating unit is used for acquiring the database tree according to the second frequency and updating the remote tree of the server by utilizing the database tree.
Based on the current limiting processing method applied to the database cluster provided by the embodiment of the method, the embodiment of the application also provides a current limiting processing device applied to the database cluster. The device is applied to a database cluster, and the database cluster is connected with a flow control cluster. The current limiting processing device applied to the database cluster will be described with reference to the accompanying drawings.
Referring to fig. 9, the schematic structural diagram of a current limiting processing device applied to a database cluster according to an embodiment of the present application is shown. As shown in fig. 9, the current limiting processing apparatus applied to a database cluster includes:
an obtaining unit 901, configured to obtain a local tree sent by a server included in the flow control cluster;
an updating unit 902, configured to update a database tree with the local tree, where a resource usage count of the database tree is a sum of resource request counts of the local trees of the respective servers;
a sending unit 903, configured to send the database tree to a server included in the flow control cluster.
In a possible implementation manner, the local tree and the database tree include only one node, and the updating unit 902 is specifically configured to add the resource request counts of the local trees to obtain the resource usage count of the database tree.
In one possible implementation, the local tree includes a root node and a plurality of leaf nodes, the resource request count includes a request count of the root node of the local tree and a request count of each of the leaf nodes of the local tree, the request count of the root node is a sum of the request counts of each of the leaf nodes, the database tree includes a root node and a plurality of leaf nodes, each node of the database tree corresponds to each node of the local tree one-to-one, and the resource usage count of the database tree includes a usage count of the root node of the database tree and a usage count of each of the leaf nodes of the database tree, and the usage count of the root node of the database tree is a sum of the usage counts of the leaf nodes of each of the database tree.
In a possible implementation manner, the updating unit 902 is specifically configured to calculate a sum of a request count of a root node of each local tree and a historical usage count of the root node of the database tree, obtain an updated usage count of the root node of the database tree, calculate a historical usage count of a target leaf node of the database tree, and calculate a sum of a request count of a leaf node of each local tree corresponding to the target leaf node of the database tree, obtain an updated usage count of the target leaf node of the database tree, where the target leaf node of the database tree is one of the leaf nodes included in the database tree.
The application further provides electronic equipment, which comprises one or more processors and a storage device, wherein one or more programs are stored in the storage device, and when the one or more programs are executed by the one or more processors, the one or more processors realize the flow limiting processing method applied to the servers of the flow control cluster or the flow limiting processing method applied to the database cluster.
Referring now to fig. 10, a schematic diagram of an electronic device 1000 suitable for use in implementing embodiments of the present application is shown. The terminal device in the embodiment of the present application may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (Personal DIGITAL ASSISTANT ), a PAD (Portable android device, a tablet computer), a PMP (Portable MEDIA PLAYER, a Portable multimedia player), a car-mounted terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV (television), a desktop computer, and the like. The electronic device shown in fig. 10 is merely an example, and should not impose any limitation on the functionality and scope of use of embodiments of the present application.
As shown in fig. 10, the electronic device 1000 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 1001 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1002 or a program loaded from a storage means 1008 into a Random Access Memory (RAM) 1003. In the RAM1003, various programs and data necessary for the operation of the electronic apparatus 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM1003 are connected to each other by a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
In general, devices including input devices 1008 such as touch screens, touch pads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc., output devices 1007 including Liquid Crystal Displays (LCD), speakers, vibrators, etc., storage devices 1008 including magnetic tape, hard disk, etc., and communication devices 1009 may be connected to the I/O interface 1005. The communication means 1009 may allow the electronic device 1000 to communicate wirelessly or by wire with other devices to exchange data. While fig. 10 shows an electronic device 1000 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 1009, or installed from the storage device 1008, or installed from the ROM 1002. When being executed by the processing means 1001, performs the above-described functions defined in the method of the embodiment of the present application.
The electronic device provided by the embodiment of the present application belongs to the same inventive concept as the current limiting processing method applied to the server of the flow control cluster or the current limiting processing method applied to the database cluster provided by the above embodiment, and technical details not described in detail in the present embodiment can be seen from the above embodiment, and the present embodiment has the same beneficial effects as the above embodiment.
Based on the current limiting processing method applied to the server of the flow control cluster and the current limiting processing method applied to the database cluster provided in the above method embodiments, the embodiment of the application provides a computer storage medium, on which a computer program is stored, wherein the program when executed by a processor implements the current limiting processing method applied to the server of the flow control cluster or the current limiting processing method applied to the database cluster as described in any one of the embodiments.
The computer readable medium of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor apparatus or device, or a combination of any of the foregoing. More specific examples of a computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution apparatus or device. In the present application, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution apparatus or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to electrical wiring, fiber optic cable, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (Hyper Text Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be included in the electronic device or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the above-described flow-limiting processing method applied to the server of the flow control cluster or the flow-limiting processing method applied to the database cluster.
Computer program code for carrying out operations of the present application may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented in software or in hardware. The name of the unit/module is not limited to the unit itself in some cases, and, for example, the voice data acquisition module may also be described as a "data acquisition module".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic that may be used include Field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems-on-a-chip (SOCs), complex Programmable Logic Devices (CPLDs), and the like.
In the context of the present application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution apparatus or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor devices or apparatuses, or any suitable combination of the above. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It should be noted that, in the present description, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different manner from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the system or device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the relevant points refer to the description of the method section.
It should be understood that in the present application, "at least one (item)" means one or more, and "a plurality" means two or more. "and/or" is used to describe an association relationship of an associated object, and indicates that three relationships may exist, for example, "a and/or B" may indicate that only a exists, only B exists, and three cases of a and B exist simultaneously, where a and B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one of a, b or c may represent a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
It is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (18)

1.一种限流处理方法,其特征在于,所述方法应用于流量控制集群包括的服务器,所述流量控制集群分别与一个数据库集群和至少一个服务集群连接,所述方法包括:1. A flow limiting processing method, characterized in that the method is applied to a server included in a flow control cluster, the flow control cluster is respectively connected to a database cluster and at least one service cluster, and the method comprises: 获取所述服务集群发送的资源调用请求,修改所述服务器的本地树的资源请求计数;Obtaining a resource call request sent by the service cluster, and modifying a resource request count of a local tree of the server; 利用所述本地树的资源请求计数和所述服务器的远程树的资源使用计数确定限流结果,所述远程树的资源使用计数基于所述数据库集群的数据库树的资源使用计数确定,所述资源使用计数为所述数据库集群获取的所述流量控制集群包括的各个服务器的本地树的资源请求计数的和;Determine the flow limiting result by using the resource request count of the local tree and the resource usage count of the remote tree of the server, wherein the resource usage count of the remote tree is determined based on the resource usage count of the database tree of the database cluster, and the resource usage count is the sum of the resource request counts of the local trees of the servers included in the flow control cluster acquired by the database cluster; 向发送所述资源调用请求的服务集群反馈所述限流结果。Feedback the current limiting result to the service cluster that sent the resource call request. 2.根据权利要求1所述的方法,其特征在于,所述本地树和所述远程树均只包括一个节点,所述利用所述本地树的资源请求计数和所述服务器的远程树的资源使用计数确定限流结果,包括:2. The method according to claim 1, characterized in that the local tree and the remote tree each include only one node, and the determining of the current limiting result by using the resource request count of the local tree and the resource usage count of the remote tree of the server comprises: 计算所述本地树的资源请求计数与所述远程树的资源使用计数的和,得到第一计数;Calculate the sum of the resource request count of the local tree and the resource usage count of the remote tree to obtain a first count; 若所述第一计数小于资源限额,则限流结果为不限流;If the first count is less than the resource limit, the flow limiting result is no flow limiting; 若所述第一计数大于或者等于所述资源限额,则所述限流结果为限流。If the first count is greater than or equal to the resource limit, the current limiting result is current limiting. 3.根据权利要求1所述的方法,其特征在于,所述本地树包括根节点和多个叶节点,所述根节点与可用资源对应,所述叶节点与请求调用所述可用资源的业务对应,所述资源请求计数包括所述本地树的根节点的请求计数和所述本地树的各个所述叶节点的请求计数,所述根节点的请求计数是各个所述叶节点的请求计数的和,所述远程树包括根节点和多个叶节点,所述本地树的各个节点与所述远程树的各个节点一一对应,所述远程树的资源使用计数包括所述远程树的根节点的使用计数和所述远程树的各个所述叶节点的使用计数,所述远程树的根节点的使用计数是各个所述远程树的叶节点的使用计数的和。3. The method according to claim 1 is characterized in that the local tree includes a root node and multiple leaf nodes, the root node corresponds to available resources, the leaf nodes correspond to services requesting to call the available resources, the resource request count includes the request count of the root node of the local tree and the request count of each of the leaf nodes of the local tree, the request count of the root node is the sum of the request counts of each of the leaf nodes, the remote tree includes a root node and multiple leaf nodes, each node of the local tree corresponds one-to-one to each node of the remote tree, the resource usage count of the remote tree includes the usage count of the root node of the remote tree and the usage count of each of the leaf nodes of the remote tree, the usage count of the root node of the remote tree is the sum of the usage counts of each of the leaf nodes of the remote tree. 4.根据权利要求3所述的方法,其特征在于,所述资源调用请求的次数为1,所述资源调用请求包括目标可用资源的信息和目标业务的信息,所述修改所述服务器的本地树的资源请求计数,包括:4. The method according to claim 3, characterized in that the number of resource call requests is 1, the resource call request includes information of target available resources and information of target services, and the resource request count of the local tree of the server is modified, comprising: 将所述本地树包括的目标可用资源对应的根节点的请求计数加1,将所述目标可用资源对应的根节点包括的目标业务对应的叶节点的请求计数加1。The request count of the root node corresponding to the target available resource included in the local tree is increased by 1, and the request count of the leaf node corresponding to the target service included in the root node corresponding to the target available resource is increased by 1. 5.根据权利要求4所述的方法,其特征在于,所述利用所述本地树的资源请求计数和所述服务器的远程树的资源使用计数确定限流结果,包括:5. The method according to claim 4, characterized in that the determining of the current limiting result by using the resource request count of the local tree and the resource usage count of the remote tree of the server comprises: 计算所述本地树的目标可用资源对应的根节点的请求计数与所述远程树的所述目标可用资源对应的根节点的请求计数的和,得到第二计数;Calculate the sum of the request count of the root node corresponding to the target available resource of the local tree and the request count of the root node corresponding to the target available resource of the remote tree to obtain a second count; 若所述第二计数小于所述目标可用资源对应的根节点的根限额,则限流结果为不限流;If the second count is less than the root limit of the root node corresponding to the target available resource, the flow limiting result is no flow limiting; 若所述第二计数大于或者等于所述目标可用资源对应的根节点的根限额,则限流结果为限流。If the second count is greater than or equal to the root limit of the root node corresponding to the target available resource, the flow limiting result is flow limiting. 6.根据权利要求4所述的方法,其特征在于,所述利用所述本地树的资源请求计数和所述服务器的远程树的资源使用计数确定限流结果,包括:6. The method according to claim 4, characterized in that the determining of the current limiting result by using the resource request count of the local tree and the resource usage count of the remote tree of the server comprises: 计算所述本地树的目标可用资源对应的根节点的请求计数与所述远程树的目标可用资源对应的根节点的请求计数的和,得到第二计数;Calculate the sum of the request count of the root node corresponding to the target available resource of the local tree and the request count of the root node corresponding to the target available resource of the remote tree to obtain a second count; 计算所述本地树的所述目标业务对应的叶节点的请求计数,与所述远程树的所述目标业务对应的叶节点的和,得到所述目标业务对应的叶节点的第三计数;Calculate the request count of the leaf node corresponding to the target business of the local tree and the sum of the request count of the leaf node corresponding to the target business of the remote tree to obtain a third count of the leaf node corresponding to the target business; 若所述第二计数小于所述目标可用资源对应的根节点的根限额,且所述第三计数小于所述目标业务对应的叶节点的叶限额,则限流结果为不限流;If the second count is less than the root limit of the root node corresponding to the target available resource, and the third count is less than the leaf limit of the leaf node corresponding to the target service, the flow limiting result is no flow limiting; 若所述第二计数大于或者等于所述目标可用资源对应的根节点的根限额,或者所述第三计数大于或者等于所述目标业务对应的叶节点的叶限额,则限流结果为限流。If the second count is greater than or equal to the root limit of the root node corresponding to the target available resources, or the third count is greater than or equal to the leaf limit of the leaf node corresponding to the target service, the flow limiting result is flow limiting. 7.根据权利要求3所述的方法,其特征在于,所述本地树和所述远程树的存在时长为一个限流单位时长,根限额和各个叶节点的叶限额基于历史限流单位时长内本地树的资源请求计数和远程树的资源使用计数确定,所述根限额为各个所述叶节点的叶限额的和。7. The method according to claim 3 is characterized in that the existence duration of the local tree and the remote tree is a flow limiting unit duration, the root limit and the leaf limit of each leaf node are determined based on the resource request count of the local tree and the resource usage count of the remote tree within the historical flow limiting unit duration, and the root limit is the sum of the leaf limits of each leaf node. 8.根据权利要求7所述的方法,其特征在于,所述本地树包括的各个叶节点具有优先级,各个所述叶节点的叶限额是基于所述根限额以及各个所述叶节点的优先级确定的,所述叶节点的叶限额与所述叶节点的优先级呈正相关。8. The method according to claim 7 is characterized in that each leaf node included in the local tree has a priority, the leaf quota of each leaf node is determined based on the root quota and the priority of each leaf node, and the leaf quota of the leaf node is positively correlated with the priority of the leaf node. 9.根据权利要求1所述的方法,其特征在于,所述方法还包括:9. The method according to claim 1, characterized in that the method further comprises: 按照第一频率向所述数据库集群发送所述服务器的本地树,所述服务器的本地树用于更新所述数据库集群的数据库树的资源使用计数。The local tree of the server is sent to the database cluster at a first frequency, and the local tree of the server is used to update the resource usage count of the database tree of the database cluster. 10.根据权利要求1所述的方法,其特征在于,所述方法还包括:10. The method according to claim 1, characterized in that the method further comprises: 按照第二频率获取所述数据库树,利用所述数据库树更新所述服务器的远程树。The database tree is obtained at a second frequency, and the remote tree of the server is updated using the database tree. 11.一种限流处理方法,其特征在于,所述方法应用于数据库集群,所述数据库集群与流量控制集群连接,所述方法包括:11. A flow limiting processing method, characterized in that the method is applied to a database cluster, the database cluster is connected to a flow control cluster, and the method comprises: 获取所述流量控制集群包括的服务器发送的本地树;Obtaining a local tree sent by a server included in the flow control cluster; 利用所述本地树更新数据库树,所述数据库树的资源使用计数为所述各个服务器的本地树的资源请求计数的和;Using the local tree to update the database tree, the resource usage count of the database tree is the sum of the resource request counts of the local trees of the respective servers; 向所述流量控制集群包括的服务器发送所述数据库树。The database tree is sent to a server included in the traffic control cluster. 12.根据权利要求11所述的方法,其特征在于,所述本地树和所述数据库树仅包括一个节点,所述利用所述本地树更新数据库树,包括:12. The method according to claim 11, wherein the local tree and the database tree only include one node, and the updating of the database tree using the local tree comprises: 将各个所述本地树的资源请求计数相加,得到所述数据库树的资源使用计数。The resource request counts of the local trees are added together to obtain the resource usage count of the database tree. 13.根据权利要求11所述的方法,其特征在于,所述本地树包括根节点和多个叶节点,所述资源请求计数包括所述本地树的根节点的请求计数和所述本地树的各个所述叶节点的请求计数,所述根节点的请求计数是各个所述叶节点的请求计数的和,所述数据库树包括根节点和多个叶节点,所述数据库树的各个节点与所述本地树的各个节点一一对应,所述数据库树的资源使用计数包括所述数据库树的根节点的使用计数和所述数据库树的各个所述叶节点的使用计数,所述数据库树的根节点的使用计数是各个所述数据库树的叶节点的使用计数的和。13. The method according to claim 11 is characterized in that the local tree includes a root node and multiple leaf nodes, the resource request count includes the request count of the root node of the local tree and the request count of each of the leaf nodes of the local tree, the request count of the root node is the sum of the request counts of each of the leaf nodes, the database tree includes a root node and multiple leaf nodes, each node of the database tree corresponds one-to-one to each node of the local tree, the resource usage count of the database tree includes the usage count of the root node of the database tree and the usage count of each of the leaf nodes of the database tree, the usage count of the root node of the database tree is the sum of the usage counts of each of the leaf nodes of the database tree. 14.根据权利要求13所述的方法,其特征在于,所述利用所述本地树更新数据库树,包括:14. The method according to claim 13, wherein the updating of the database tree by using the local tree comprises: 计算各个所述本地树的根节点的请求计数,以及所述数据库树的根节点的历史使用计数的和,得到更新后的所述数据库树的根节点的使用计数;Calculate the request count of the root node of each local tree and the sum of the historical usage count of the root node of the database tree to obtain the updated usage count of the root node of the database tree; 计算所述数据库树的目标叶节点的历史使用计数,以及各个所述本地树的与所述数据库树的目标叶节点对应的叶节点的请求计数的和,得到更新后的所述数据库树的目标叶节点的使用计数,所述数据库树的目标叶节点为所述数据库树包括的叶节点中的一个。Calculate the historical usage count of the target leaf node of the database tree and the sum of the request counts of the leaf nodes of each local tree corresponding to the target leaf node of the database tree to obtain the usage count of the updated target leaf node of the database tree, where the target leaf node of the database tree is one of the leaf nodes included in the database tree. 15.一种限流处理装置,其特征在于,所述装置应用于流量控制集群包括的服务器,所述流量控制集群分别与一个数据库集群和至少一个服务集群连接,所述装置包括:15. A flow limiting processing device, characterized in that the device is applied to a server included in a flow control cluster, the flow control cluster is connected to a database cluster and at least one service cluster respectively, and the device comprises: 获取单元,用于获取所述服务集群发送的资源调用请求,修改所述服务器的本地树的资源请求计数;An acquisition unit, configured to acquire a resource call request sent by the service cluster and modify a resource request count of a local tree of the server; 确定单元,用于利用所述本地树的资源请求计数和所述服务器的远程树的资源使用计数确定限流结果,所述远程树的资源使用计数基于所述数据库集群的数据库树的资源使用计数确定,所述资源使用计数为所述数据库集群获取的所述流量控制集群包括的各个服务器的本地树的资源请求计数的和;a determining unit, configured to determine a flow limiting result by using a resource request count of the local tree and a resource usage count of a remote tree of the server, wherein the resource usage count of the remote tree is determined based on a resource usage count of a database tree of the database cluster, and the resource usage count is a sum of resource request counts of local trees of various servers included in the flow control cluster acquired by the database cluster; 反馈单元,用于向发送所述资源调用请求的服务集群反馈所述限流结果。A feedback unit is used to feed back the current limiting result to the service cluster that sends the resource call request. 16.一种限流处理装置,其特征在于,所述装置应用于数据库集群,所述数据库集群与流量控制集群连接,所述装置包括:16. A flow limiting processing device, characterized in that the device is applied to a database cluster, the database cluster is connected to a flow control cluster, and the device comprises: 获取单元,用于获取所述流量控制集群包括的服务器发送的本地树;An acquiring unit, configured to acquire a local tree sent by a server included in the flow control cluster; 更新单元,用于利用所述本地树更新数据库树,所述数据库树的资源使用计数为所述各个服务器的本地树的资源请求计数的和;An updating unit, configured to update a database tree using the local tree, wherein the resource usage count of the database tree is the sum of the resource request counts of the local trees of the respective servers; 发送单元,用于向所述流量控制集群包括的服务器发送所述数据库树。A sending unit is used to send the database tree to the server included in the traffic control cluster. 17.一种电子设备,其特征在于,包括:17. An electronic device, comprising: 一个或多个处理器;one or more processors; 存储装置,其上存储有一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-10中任一项所述的限流处理方法,或者如权利要求11-14中任一项所述的限流处理方法。A storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the current limiting processing method as described in any one of claims 1-10, or the current limiting processing method as described in any one of claims 11-14. 18.一种计算机可读介质,其特征在于,其上存储有计算机程序,其中,所述程序被处理器执行时实现如权利要求1-10中任一项所述的限流处理方法,或者如权利要求11-14中任一项所述的限流处理方法。18. A computer-readable medium, characterized in that a computer program is stored thereon, wherein when the program is executed by a processor, the current limiting processing method according to any one of claims 1 to 10 or the current limiting processing method according to any one of claims 11 to 14 is implemented.
CN202311061509.2A 2023-08-22 2023-08-22 A current limiting processing method, device, equipment and storage medium Pending CN119520398A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311061509.2A CN119520398A (en) 2023-08-22 2023-08-22 A current limiting processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311061509.2A CN119520398A (en) 2023-08-22 2023-08-22 A current limiting processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN119520398A true CN119520398A (en) 2025-02-25

Family

ID=94647183

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311061509.2A Pending CN119520398A (en) 2023-08-22 2023-08-22 A current limiting processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN119520398A (en)

Similar Documents

Publication Publication Date Title
CN112019625B (en) Method, system, device and medium for pushing messages based on websocket
CN111258670B (en) Method and device for managing component data, electronic equipment and storage medium
CN113821352B (en) A remote service calling method and device
CN110768861B (en) Method, device, medium and electronic equipment for obtaining overtime threshold
CN114817409B (en) A label generation method, device, equipment and medium
CN112379982A (en) Task processing method and device, electronic equipment and computer readable storage medium
CN111163324A (en) Information processing method and device and electronic equipment
CN114780263B (en) Service invocation methods, devices, equipment, and storage media
CN112084042A (en) Message processing method and device
WO2021139383A1 (en) Live broadcast room gift resource updating method and apparatus, and medium and electronic device
CN115022106A (en) A group information processing method, device, equipment and medium
CN113472638A (en) Edge gateway control method, system, device, electronic equipment and storage medium
CN109669720B (en) Chain type asynchronous request processing method and device based on Promise and electronic equipment
CN115604191B (en) Business flow control methods, devices, electronic equipment and readable storage media
CN111352872A (en) Execution engine, data processing method, apparatus, electronic device, and medium
CN110401731A (en) Method and apparatus for distributing content distribution nodes
KR20200091917A (en) Resource processing method and system, storage medium, electronic device
CN110750242B (en) File deployment method, system, medium and electronic equipment
CN119520398A (en) A current limiting processing method, device, equipment and storage medium
JP7721673B2 (en) Information interaction method, device and electronic device
CN111797160B (en) Method, system and electronic device for sharing intelligent contract
CN111444457B (en) Data release method and device, storage medium and electronic equipment
WO2024007770A1 (en) Video resource management method and apparatus, and electronic device and storage medium
CN119030982B (en) Task scheduling method, device and equipment for multi-tenant isolation on cloud
CN114143325A (en) DNS scheduling method, apparatus, device, storage medium and program product

Legal Events

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