CN114765592A - Flow control method, device, storage medium, service equipment and service cluster - Google Patents
Flow control method, device, storage medium, service equipment and service cluster Download PDFInfo
- Publication number
- CN114765592A CN114765592A CN202110057576.1A CN202110057576A CN114765592A CN 114765592 A CN114765592 A CN 114765592A CN 202110057576 A CN202110057576 A CN 202110057576A CN 114765592 A CN114765592 A CN 114765592A
- Authority
- CN
- China
- Prior art keywords
- service device
- service
- token
- access request
- mode
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/215—Flow control; Congestion control using token-bucket
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明提供一种流量控制方法、装置、存储介质、服务设备和服务集群,该方法包括:服务集群中的第一服务设备接收用户发送的访问请求,若确定第一服务设备的令牌桶内没有用于处理所述访问请求的令牌,则将访问请求存入到第一服务设备的缓冲队列中,将第一服务设备和服务集群中的第二服务设备切换为中心化模式,中心化模式是指服务集群中的管理设备参与流量控制的模式。当第二服务设备的令牌桶补给满时,第二服务设备将自身多余的令牌发送至管理设备中存储。第一服务设备使用从管理设备获取的令牌处理第一服务设备的缓冲队列中存储的访问请求。在中心化模式下,才通过管理设备在不同服务设备间拆借令牌,以实现低成本、精确地分布式流量控制。
The present invention provides a flow control method, device, storage medium, service device and service cluster. The method includes: a first service device in the service cluster receives an access request sent by a user, and if it is determined that the token bucket of the first service device is in the token bucket of the first service device If there is no token for processing the access request, the access request is stored in the buffer queue of the first service device, and the first service device and the second service device in the service cluster are switched to the centralized mode. Mode refers to the mode in which the management device in the service cluster participates in flow control. When the token bucket of the second service device is full, the second service device sends its redundant tokens to the management device for storage. The first service device uses the token obtained from the management device to process the access request stored in the buffer queue of the first service device. In the centralized mode, tokens are borrowed and lent between different service devices through management devices to achieve low-cost and accurate distributed flow control.
Description
技术领域technical field
本发明涉及互联网技术领域,尤其涉及一种流量控制方法、装置、存储介质、服务设备和服务集群。The present invention relates to the field of Internet technologies, and in particular, to a flow control method, device, storage medium, service device and service cluster.
背景技术Background technique
在很多应用场景中,都会面对需要对用户的访问请求进行流量控制(通常也称为对用户的访问流量进行限速)的需求,比如,在服务器为用户提供服务的场景中,在网关为用户提供网络转发服务的场景中。In many application scenarios, there is a need to control the flow of the user's access request (usually also referred to as speed-limiting the user's access traffic). For example, in the scenario where the server provides services for the user, the gateway is In scenarios where users provide network forwarding services.
为了高可用性,目前一般都是以服务集群的方式为用户提供服务的,比如由多个服务器构成的集群,由多个网关构成的集群。此时,如何保证用户的访问流量在整个集群中以一种低成本(更低的资源消耗成本)的方式被精确的限速,是亟待解决的问题。For high availability, services are generally provided to users in the form of service clusters, such as clusters composed of multiple servers and clusters composed of multiple gateways. At this time, how to ensure that the user's access traffic is accurately limited in a low-cost (lower resource consumption cost) manner in the entire cluster is an urgent problem to be solved.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供一种流量控制方法、装置、存储介质、服务设备和服务集群,可以实现低成本、精确地流量控制。Embodiments of the present invention provide a flow control method, apparatus, storage medium, service device and service cluster, which can realize low-cost and accurate flow control.
第一方面,本发明实施例提供一种流量控制方法,应用于服务集群中的第一服务设备,所述第一服务设备是所述服务集群中的任一服务设备,该方法包括:In a first aspect, an embodiment of the present invention provides a flow control method, which is applied to a first service device in a service cluster, where the first service device is any service device in the service cluster, and the method includes:
接收用户发送的访问请求;Receive access requests sent by users;
若确定所述第一服务设备的令牌桶内没有用于处理所述访问请求的令牌,则将所述访问请求存入到所述第一服务设备的缓冲队列中;If it is determined that there is no token for processing the access request in the token bucket of the first service device, storing the access request in the buffer queue of the first service device;
将所述第一服务设备和所述服务集群中的第二服务设备切换为中心化模式,所述中心化模式是指所述服务集群中的管理设备参与流量控制的模式;switching the first service device and the second service device in the service cluster to a centralized mode, where the centralized mode refers to a mode in which the management device in the service cluster participates in flow control;
使用从所述管理设备获取的令牌,处理所述第一服务设备的缓冲队列中存储的访问请求,其中,当所述第二服务设备的令牌桶补给满时,所述第二服务设备将自身多余的令牌发送至所述管理设备中存储。Using the token obtained from the management device, the access request stored in the buffer queue of the first service device is processed, wherein when the token bucket of the second service device is replenished, the second service device Send its own redundant tokens to the management device for storage.
第二方面,本发明实施例提供一种流量控制装置,位于服务集群中的第一服务设备中,所述第一服务设备是所述服务集群中的任一服务设备,该装置包括:In a second aspect, an embodiment of the present invention provides a flow control device, which is located in a first service device in a service cluster, where the first service device is any service device in the service cluster, and the device includes:
请求接收模块,用于接收用户发送的访问请求;The request receiving module is used to receive the access request sent by the user;
请求缓存模块,用于若确定所述第一服务设备的令牌桶内没有用于处理所述访问请求的令牌,则将所述访问请求存入到所述第一服务设备的缓冲队列中;A request cache module, configured to store the access request in the buffer queue of the first service device if it is determined that there is no token for processing the access request in the token bucket of the first service device ;
模式设置模块,用于将所述第一服务设备和所述服务集群中的第二服务设备切换为中心化模式,所述中心化模式是指所述服务集群中的管理设备参与流量控制的模式;A mode setting module for switching the first service device and the second service device in the service cluster to a centralized mode, where the centralized mode refers to a mode in which the management device in the service cluster participates in flow control ;
请求处理模块,用于使用从所述管理设备获取的令牌,处理所述第一服务设备的缓冲队列中存储的访问请求,其中,当所述第二服务设备的令牌桶补给满时,所述第二服务设备将自身多余的令牌发送至所述管理设备中存储。a request processing module, configured to use the token obtained from the management device to process the access request stored in the buffer queue of the first service device, wherein when the token bucket of the second service device is full, The second service device sends its own redundant tokens to the management device for storage.
第三方面,本发明实施例提供一种服务设备,所述服务设备是服务集群中的任一服务设备,所述服务设备包括:存储器、处理器、通信接口;其中,所述存储器上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器执行:In a third aspect, an embodiment of the present invention provides a service device, where the service device is any service device in a service cluster, and the service device includes: a memory, a processor, and a communication interface; wherein, the memory stores executable code that, when executed by the processor, causes the processor to execute:
接收用户发送的访问请求;Receive access requests sent by users;
若确定所述服务设备的令牌桶内没有用于处理所述访问请求的令牌,则将所述访问请求存入到所述服务设备的缓冲队列中;If it is determined that there is no token for processing the access request in the token bucket of the service device, the access request is stored in the buffer queue of the service device;
将所述服务设备和所述服务集群中的其他服务设备切换为中心化模式,所述中心化模式是指所述服务集群中的管理设备参与流量控制的模式;Switching the service device and other service devices in the service cluster to a centralized mode, where the centralized mode refers to a mode in which management devices in the service cluster participate in flow control;
使用从所述管理设备获取的令牌,处理所述服务设备的缓冲队列中存储的访问请求,其中,当所述其他服务设备的令牌桶补给满时,所述其他服务设备将自身多余的令牌发送至所述管理设备中存储。Use the token obtained from the management device to process the access request stored in the buffer queue of the service device, wherein when the token bucket of the other service device is replenished, the other service device will use its own redundant The token is sent to the management device for storage.
第四方面,本发明实施例提供了一种非暂时性机器可读存储介质,非暂时性机器可读存储介质上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使处理器至少可以实现如第一方面所述的流量控制方法。In a fourth aspect, an embodiment of the present invention provides a non-transitory machine-readable storage medium, where executable code is stored on the non-transitory machine-readable storage medium, and when the executable code is executed by a processor of an electronic device , so that the processor can at least implement the flow control method described in the first aspect.
第五方面,本发明实施例提供了一种服务集群,包括:In a fifth aspect, an embodiment of the present invention provides a service cluster, including:
第一服务设备、第二服务设备和管理设备;a first service device, a second service device and a management device;
所述第一服务设备,用于接收用户发送的访问请求,若确定所述第一服务设备的令牌桶内没有用于处理所述访问请求的令牌,则将所述访问请求存入到所述第一服务设备的缓冲队列中;以及,将所述第一服务设备和所述第二服务设备切换为中心化模式,所述中心化模式是指所述管理设备参与流量控制的模式;以及,使用从所述管理设备获取的令牌,处理所述第一服务设备的缓冲队列中存储的访问请求;The first service device is configured to receive the access request sent by the user, and if it is determined that there is no token for processing the access request in the token bucket of the first service device, the access request is stored in the in the buffer queue of the first service device; and, switching the first service device and the second service device to a centralized mode, where the centralized mode refers to a mode in which the management device participates in flow control; and, using the token obtained from the management device, process the access request stored in the buffer queue of the first service device;
所述第二服务设备,用于在所述中心化模式下,当所述第二服务设备的令牌桶补给满时,将自身多余的令牌发送至所述管理设备中存储;The second service device is configured to, in the centralized mode, send its own redundant tokens to the management device for storage when the token bucket of the second service device is full;
所述管理设备,用于存储所述第二服务设备发送的令牌,以及,响应于所述第一服务设备的获取请求,将所述令牌提供给所述第一服务设备。The management device is configured to store the token sent by the second service device, and, in response to an acquisition request of the first service device, provide the token to the first service device.
在本发明实施例中,假设通过服务集群中的各个服务设备为用户提供服务,并采用令牌桶(Token Bucket)机制对用户的访问流量进行限制。在令牌桶机制下,每个服务设备中包括三个功能模块:补给器、令牌桶和缓冲队列。以服务集群中的第一服务设备为例,第一服务设备的补给器以设定时间间隔不断向第一服务设备的令牌桶补给设定数量的令牌。当第一服务设备接收到用户发送的访问请求时,去第一服务设备的令牌桶内获取用于处理该访问请求的令牌,如果没有拿到令牌,说明第一服务设备的令牌桶为空,此时,第一服务设备将接收的访问请求存入到第一服务设备的缓冲队列中,并将第一服务设备和服务集群中的第二服务设备(是服务集群中除第一服务设备外的其他服务设备的统称)切换为中心化模式,其中,中心化模式是指服务集群中的管理设备参与流量控制的模式。也就是说,在非中心化模式下,管理设备不参与流量控制,而是由各个服务设备自行独立地进行各自的流量控制,而在中心化模式下,由管理设备统一协调各服务设备以实现流量控制。In the embodiment of the present invention, it is assumed that each service device in the service cluster provides services to the user, and a token bucket (Token Bucket) mechanism is used to limit the access traffic of the user. Under the token bucket mechanism, each service device includes three functional modules: replenisher, token bucket and buffer queue. Taking the first service device in the service cluster as an example, the replenisher of the first service device continuously replenishes a set number of tokens to the token bucket of the first service device at set time intervals. When the first service device receives the access request sent by the user, it goes to the token bucket of the first service device to obtain a token for processing the access request. If the token is not obtained, the token of the first service device is indicated. The bucket is empty. At this time, the first service device stores the received access request into the buffer queue of the first service device, and sends the first service device and the second service device in the service cluster (which is the second service device in the service cluster except the first service device in the service cluster). A general term for other service devices other than a service device) is switched to a centralized mode, where the centralized mode refers to a mode in which the management devices in the service cluster participate in flow control. That is to say, in the decentralized mode, the management device does not participate in the flow control, but each service device independently performs its own flow control, while in the centralized mode, the management device uniformly coordinates the service devices to achieve flow control.
具体来说,在第一服务设备和第二服务设备都处于中心化模式的情形下,如果第二服务设备的令牌桶中已经存满令牌,那么后续第二服务设备产生的多余的令牌可以发送至管理设备中存储。基于此,由于此时第一服务设备本地没有可以使用的令牌,所以,在中心化模式下,第一服务设备可以从管理设备中获取第二服务设备分享的令牌,使用从管理设备中获得的令牌来处理本地缓冲队列中存储的访问请求。Specifically, in the case where both the first service device and the second service device are in the centralized mode, if the token bucket of the second service device is full of tokens, the subsequent redundant tokens generated by the second service device Cards can be sent to the management device for storage. Based on this, since the first service device does not have a locally usable token at this time, in the centralized mode, the first service device can obtain the token shared by the second service device from the management device, and use the token from the management device. The token obtained to process the access request stored in the local buffer queue.
由此可见,在本发明实施例中,在中心化模式下,不同的服务设备之间可以拆借令牌,以实现精确地分布式流量控制。另外,管理设备并不是一直工作的,只有在某服务设备本地没有可用的令牌(即访问流量超过这个服务设备的流量限制上限)的情况下才开始工作,有助于降低服务集群的资源消耗量,提高整体的服务效率。It can be seen that, in the embodiment of the present invention, in the centralized mode, tokens can be borrowed and lent between different service devices, so as to realize accurate distributed flow control. In addition, the management device does not work all the time. It only starts to work when a service device does not have a locally available token (that is, the access traffic exceeds the upper limit of the traffic limit of the service device), which helps to reduce the resource consumption of the service cluster. to improve overall service efficiency.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort.
图1为本发明实施例提供的一种服务集群的组成架构的示意图;1 is a schematic diagram of a composition architecture of a service cluster according to an embodiment of the present invention;
图2为本发明实施例提供的一种流量控制过程的示意图;2 is a schematic diagram of a flow control process provided by an embodiment of the present invention;
图3为本发明实施例提供的一种流量控制方法的流程图;3 is a flowchart of a flow control method according to an embodiment of the present invention;
图4为本发明实施例提供的另一种流量控制过程的示意图;4 is a schematic diagram of another flow control process provided by an embodiment of the present invention;
图5为本发明实施例提供的一种流量控制装置的结构示意图;5 is a schematic structural diagram of a flow control device according to an embodiment of the present invention;
图6为与图5所示实施例提供的流量控制装置对应的服务设备的结构示意图。FIG. 6 is a schematic structural diagram of a service device corresponding to the flow control apparatus provided in the embodiment shown in FIG. 5 .
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义,“多种”一般包含至少两种。The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a," "the," and "the" as used in the embodiments of the present invention and the appended claims are intended to include the plural forms as well, unless the context clearly dictates otherwise, "a plurality" Generally at least two are included.
取决于语境,如在此所使用的词语“如果”、“若”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。Depending on the context, the words "if", "if" as used herein may be interpreted as "at" or "when" or "in response to determining" or "in response to detecting". Similarly, the phrases "if determined" or "if detected (the stated condition or event)" can be interpreted as "when determined" or "in response to determining" or "when detected (the stated condition or event)," depending on the context )" or "in response to detection (a stated condition or event)".
另外,下述各方法实施例中的步骤时序仅为一种举例,而非严格限定。In addition, the sequence of steps in the following method embodiments is only an example, and is not strictly limited.
在通过服务集群中的N个服务设备为用户提供服务的场景中,N>1,假设针对某用户的整体流量限制额度为每秒limit个访问请求。那么,如果流量均匀分配到每个服务设备上,每个服务设备的流量上限为每秒limit/N。In the scenario of providing services to users through N service devices in the service cluster, N>1, it is assumed that the overall traffic limit for a user is limited access requests per second. Then, if the traffic is evenly distributed to each service device, the upper limit of the traffic of each service device is limit/N per second.
其中,本发明实施例中,服务设备可以是提供某种服务的服务器,也可以是诸如网关、路由器、交换机、边缘网络的转发设备、内容分发网络(Content Delivery Network,简称CDN)节点等网络设备。Wherein, in this embodiment of the present invention, the service device may be a server that provides a certain service, or may be a network device such as a gateway, a router, a switch, a forwarding device of an edge network, a Content Delivery Network (CDN) node, etc. .
本发明实施例中,用户是指使用服务设备的任一主体。比如,用户可以是特定的某个或某些人,可以以其对应的IP地址来作为用户标识。再比如,用户还可以是某种客户端,比如通过某种客户端与服务设备进行数据交互的场景中,服务设备对该客户端进行流量限制。In this embodiment of the present invention, the user refers to any subject who uses the service device. For example, the user may be a specific person or persons, and the corresponding IP address may be used as the user identifier. For another example, the user may also be some kind of client. For example, in the scenario of data interaction with the service device through a certain client, the service device restricts the traffic of the client.
假设在服务集群中有N个服务设备时,在每个服务设备进行每秒limit/N的限速控制的方式,虽然简单方便,但是当用户流量在不同服务设备上的分布不均匀时,实际上的限速效果会比较差。举例来说,比如N=2,对某用户来说,假设整体的限速要求是:每秒不超过100个访问请求,此时,两个服务设备都是每秒50个访问请求的容量上限。假设1秒内先后接收到100个访问请求,其中80个访问请求分配给了服务设备1,20个访问请求分配给了服务设备2,此时,显而易见,由于访问请求数80大于服务设备1的容量上限,而导致超出的30个访问请求被拒绝,但是,服务设备2接收的访问请求数小于其容量上限,由此可见,从服务设备1和服务设备2的整体角度来说,实际上用户流量并未超过整体的流量上限(每秒100个访问请求),但是在上述流量控制机制下,却使得用户即使未触发超过上述流量限制的访问请求也会有部分访问请求被拒绝的情形发生,流量控制的精确度不高,用户体验不佳。Assuming that there are N service devices in the service cluster, the method of performing limit/N speed limit control per second on each service device is simple and convenient, but when the user traffic is unevenly distributed on different service devices, the actual The speed limit effect will be worse. For example, if N=2, for a user, assuming that the overall speed limit requirement is: no more than 100 access requests per second, at this time, both service devices have a capacity limit of 50 access requests per second . Assuming that 100 access requests are received successively within 1 second, 80 access requests are allocated to service device 1, and 20 access requests are allocated to service device 2. At this time, it is obvious that the number of access requests is 80 larger than that of service device 1. However, the number of access requests received by service device 2 is less than the upper limit of its capacity. It can be seen that from the overall point of view of service device 1 and service device 2, in fact, the user The traffic does not exceed the overall traffic limit (100 access requests per second), but under the above flow control mechanism, some access requests will be rejected even if the user does not trigger an access request exceeding the above traffic limit. The accuracy of flow control is not high, and the user experience is not good.
为了能够以较低的成本实现精确地流量控制,提供了本发明实施例提出的流量控制方案。基于该方案,即使用户流量在多个服务设备上分配不均匀时,也可以执行准确的流量控制。In order to realize accurate flow control at a lower cost, the flow control solution proposed by the embodiments of the present invention is provided. Based on this scheme, accurate flow control can be performed even when user traffic is unevenly distributed across multiple service devices.
在介绍本发明实施例提供的流量控制方案的执行过程之前,先介绍下本发明实施例中所涉及的一些概念。在本发明实施例中,采用令牌桶(Token Bucket)方法来进行流量控制,因此先简单介绍下为使用令牌桶方法,服务集群的组成架构。Before introducing the execution process of the flow control solution provided by the embodiments of the present invention, some concepts involved in the embodiments of the present invention are first introduced. In the embodiment of the present invention, the token bucket (Token Bucket) method is used for traffic control, so first, the composition structure of the service cluster using the token bucket method is briefly introduced.
如图1中所示,假设服务集群中包括第一服务设备和第二服务设备,以及管理设备。As shown in FIG. 1 , it is assumed that the service cluster includes a first service device and a second service device, as well as a management device.
在每个服务设备中可以设有一个限流器,每个限流器中可以包括补给器、令牌桶和缓冲队列。可以理解的是,上述限流器以及限流器中包含的补给器、令牌桶、缓冲队列,实际上是在服务设备中设置的功能模块。Each service device may be provided with a current limiter, and each current limiter may include a replenisher, a token bucket and a buffer queue. It can be understood that the above-mentioned current limiter and the replenisher, token bucket, and buffer queue included in the current limiter are actually functional modules set in the service device.
如图1中所示,将第一服务设备中的限流器表示为第一限流器,将第二服务设备中的限流器表示为第二限流器。第一限流器中包括:第一补给器、第一令牌桶和第一缓冲队列。第二限流器中包括:第二补给器、第二令牌桶和第二缓冲队列。As shown in FIG. 1 , the current limiter in the first service device is denoted as the first current limiter, and the current limiter in the second service device is denoted as the second current limiter. The first current limiter includes: a first feeder, a first token bucket and a first buffer queue. The second current limiter includes: a second feeder, a second token bucket and a second buffer queue.
另外,每个限流器可以配置有对应的设备标识,比如图1中示意的第一限流器的设备标识为name1@nodeA,第二限流器的设备标识为name1@nodeB。其中,name1表示用户标识,用以表明限流器是用于针对哪个用户进行流量控制的,nodeA和nodeB是用于区分对应于同一用户标识的不同限流器的。In addition, each current limiter may be configured with a corresponding device identifier, for example, the device identifier of the first current limiter shown in FIG. 1 is name1@nodeA, and the device identifier of the second current limiter is name1@nodeB. Among them, name1 represents the user ID, which is used to indicate which user the current limiter is used for flow control, and nodeA and nodeB are used to distinguish different current limiters corresponding to the same user ID.
可以理解的是,当一个服务设备中仅包含一个限流器时,该限流器的设备标识即可以是该服务设备的设备标识。但是实际应用中,也可能存在一个服务设备中包含多个限流器的情形,此时,当面对不同用户进行流量控制时,选用服务设备中与之对应的限流器。It can be understood that when a service device includes only one current limiter, the device identifier of the current limiter may be the device identifier of the service device. However, in practical applications, there may also be a situation where a service device includes multiple current limiters. At this time, when performing flow control for different users, the corresponding current limiter in the service device is selected.
由于在一个服务设备中包含多个限流器的情形下,各个限流器的工作是独立的,而且工作过程是相似的,因此,为便于描述,本发明实施例中假设一个服务设备中仅包含一个限流器。In the case where a service device includes multiple current limiters, the work of each current limiter is independent, and the working process is similar. Therefore, for the convenience of description, it is assumed in this embodiment of the present invention that only one service device has Contains a current limiter.
补给器,用于向令牌桶内补给令牌,补给器定期运行,即每个设定时间间隔向令牌桶内补给设定数量的令牌。基于上述假设的预设流量阈值limit、服务集群中包含的服务设备的数量N的前提,假设上述设定时间间隔为deltaTime,则补给器每隔deltaTime向令牌桶内补给的令牌数量可以由上述流量阈值limit、服务设备数量N以及deltaTime确定,比如可以是limit/N*deltaTime。The replenisher is used to replenish tokens into the token bucket. The replenisher runs periodically, that is, replenishes a set number of tokens into the token bucket at each set time interval. Based on the premise of the preset traffic threshold limit and the number N of service devices included in the service cluster, and assuming that the above set time interval is deltaTime, the number of tokens replenished by the replenisher to the token bucket every deltaTime can be determined by The above-mentioned traffic threshold limit, the number N of service devices, and deltaTime are determined, for example, limit/N*deltaTime.
令牌桶,用于存放补给器补给的令牌。令牌桶具有容量上限,可选地,令牌桶的容量上限由上述预设的流量阈值limit、服务集群中服务设备数量N和预设的突发流量参数Brust%确定。Brust%用于设置服务设备的突发流量限制值,Brust%值越大,允许突发的网络流量越大。一般地,Brust%可以设为50%等数值。可选地,令牌桶的容量上限可以表示为:limit/N*Brust%。The token bucket is used to store the tokens supplied by the dispenser. The token bucket has an upper limit of capacity. Optionally, the upper limit of the capacity of the token bucket is determined by the preset traffic threshold limit, the number N of service devices in the service cluster, and the preset burst traffic parameter Brust%. Brust% is used to set the burst traffic limit value of the service device. The larger the Brust% value is, the larger the burst network traffic is allowed. Generally, Brust% can be set to a value such as 50%. Optionally, the upper limit of the capacity of the token bucket can be expressed as: limit/N*Brust%.
一般来说,当服务设备接收到用户发出的访问请求后,首先会去自身的令牌桶内取令牌(需要取出的令牌个数与接收到的访问请求个数相关,比如相等),如果能够取出用于处理该访问请求的令牌,即令牌桶内存储的令牌数量足够用于处理接收到的访问请求,那么直接对访问请求进行处理即可,并在令牌桶内减去对应的令牌。但是,如果令牌桶内没有可用于处理该访问请求的令牌,则该访问请求会被存入缓冲队列中暂存,当补给器后续产生新的令牌后,新产生的令牌优先用于处理缓冲队列中存储的访问请求,只有在缓冲队列为空后,新产生的令牌才会补给到令牌桶内。Generally speaking, when the service device receives the access request from the user, it will first get the token from its own token bucket (the number of tokens to be taken out is related to the number of received access requests, such as equal), If the token used to process the access request can be taken out, that is, the number of tokens stored in the token bucket is sufficient to process the received access request, then the access request can be processed directly, and the amount of tokens stored in the token bucket is reduced. to the corresponding token. However, if there is no token available for processing the access request in the token bucket, the access request will be temporarily stored in the buffer queue. When the replenisher subsequently generates new tokens, the newly generated tokens will be used first. To process the access requests stored in the buffer queue, the newly generated tokens will be replenished into the token bucket only after the buffer queue is empty.
缓冲队列的容量上限由上述流量阈值limit、服务设备数量N和预设的缓冲流量参数Queue%确定。Queue%决定缓冲队列的长度,Queue%越大,队列的存储量越大。可选地,缓冲队列的容量上限可以表示为:limit/N*Queue%。The upper limit of the capacity of the buffer queue is determined by the above-mentioned traffic threshold limit, the number N of service devices, and the preset buffer traffic parameter Queue%. Queue% determines the length of the buffer queue, the greater the Queue%, the greater the storage capacity of the queue. Optionally, the upper limit of the capacity of the buffer queue can be expressed as: limit/N*Queue%.
可以理解的是,本发明实施例中所说的对访问请求进行处理,是指对访问请求进行响应处理。比如,如果访问请求指示的是返回某个页面,则响应结果即为跳转至该页面。It can be understood that, the processing of the access request in the embodiment of the present invention refers to the processing of the response to the access request. For example, if the access request indicates to return to a certain page, the response result is to jump to this page.
以上介绍了服务集群的组成架构,基于上述组成架构,假设当前第一服务设备接收到用户发送的访问请求,此时,服务集群中的各组成部分可以执行如下操作来完成流量控制:The above describes the composition structure of the service cluster. Based on the above composition structure, it is assumed that the current first service device receives the access request sent by the user. At this time, each component in the service cluster can perform the following operations to complete the flow control:
第一服务设备:接收用户发送的访问请求,若确定第一服务设备的令牌桶内没有用于处理该访问请求的令牌,则将该访问请求存入到第一服务设备的缓冲队列中,以及,将第一服务设备和第二服务设备切换为中心化模式,中心化模式是指管理设备参与流量控制的模式;以及,使用从管理设备获取的令牌处理第一服务设备的缓冲队列中存储的访问请求。The first service device: receives the access request sent by the user, and if it is determined that there is no token for processing the access request in the token bucket of the first service device, the access request is stored in the buffer queue of the first service device , and, switching the first service device and the second service device to a centralized mode, where the centralized mode refers to a mode in which the management device participates in flow control; and, using the token obtained from the management device to process the buffer queue of the first service device Access requests stored in .
第二服务设备:在中心化模式下,当第二服务设备的令牌桶补给满时,将自身多余的令牌发送至管理设备中存储。Second service device: in the centralized mode, when the token bucket of the second service device is full, it will send its redundant tokens to the management device for storage.
管理设备:存储第二服务设备发送的令牌,以及,响应于第一服务设备的获取请求,将第二服务设备发送的令牌提供给第一服务设备。Management device: storing the token sent by the second service device, and providing the token sent by the second service device to the first service device in response to an acquisition request from the first service device.
为便于理解,下面结合图2来示例性说明上述流量控制方案的执行过程。For ease of understanding, the execution process of the above flow control scheme is exemplarily described below with reference to FIG. 2 .
如图2中所示,假设当前第一服务设备的令牌桶为空,第一服务设备的缓冲队列为空,并假设第二服务设备的令牌桶内不为空,第二服务设备的缓冲队列为空。之后,第一服务设备接收到用户发送的访问请求X,第一服务设备首先去其令牌桶内取令牌,发现此时令牌桶内为空,即没有可用的令牌,便将访问请求X存入到第一服务设备的缓冲队列。此时,由于第一服务设备没有可用的令牌,所以不能即时处理访问请求X,所以第一服务设备可以将自己以及服务集群中的其他服务设备(本文中假设为第二服务设备)的工作模式切换为中心化模式。As shown in FIG. 2 , it is assumed that the token bucket of the first service device is currently empty, the buffer queue of the first service device is empty, and it is assumed that the token bucket of the second service device is not empty, and the token bucket of the second service device is empty. The buffer queue is empty. After that, the first service device receives the access request X sent by the user, and the first service device first goes to its token bucket to get the token, and finds that the token bucket is empty at this time, that is, there is no available token, and will access the Request X is stored in the buffer queue of the first service device. At this time, since the first service device does not have an available token, the access request X cannot be processed immediately, so the first service device can use the work of itself and other service devices in the service cluster (assumed to be the second service device in this paper) The mode is switched to centralized mode.
可选地,第一服务设备可以在原本处于非中心化模式,并且自身的令牌桶为空的情况下,将自身以及第二服务设备的工作模式切换为中心化模式。可选地,第一服务设备可以在原本处于非中心化模式,并且自身的令牌桶为空,并且自身的缓冲队列中缓存的访问请求数量达到设定阈值的情形下,将自身以及第二服务设备的工作模式切换为中心化模式。Optionally, the first service device may switch the working mode of itself and the second service device to the centralized mode when the first service device is originally in the decentralized mode and its own token bucket is empty. Optionally, when the first service device is originally in a decentralized mode, its own token bucket is empty, and the number of access requests cached in its own buffer queue reaches a set threshold, it can send itself and the second service device The working mode of the service device is switched to the centralized mode.
本发明实施例中,服务设备的工作模式被划为两种模式:中心化模式和非中心化模式。其中,中心化模式是指管理设备参与流量控制的模式,相反的,非中心化模式是指管理设备不参与流量控制的模式。In the embodiment of the present invention, the working mode of the service device is divided into two modes: a centralized mode and a non-centralized mode. Among them, the centralized mode refers to the mode in which the management device participates in flow control, on the contrary, the decentralized mode refers to the mode in which the management device does not participate in the flow control.
概括来说,在中心化模式下,如果某服务设备产生了多余的令牌,则将多余的令牌发送至管理设备中存储,反之,如果某服务设备没有可用的令牌,则可以从管理设备获取其存储的令牌。In general, in the centralized mode, if a service device generates excess tokens, the excess tokens will be sent to the management device for storage. The device gets its stored token.
在非中心化模式下,每个服务设备仅使用本地产生的令牌来处理本地接收到的访问请求。In the decentralized mode, each service device uses only locally generated tokens to process locally received access requests.
其中,一个服务设备产生的多余的令牌是指该服务设备的令牌桶被补给满之后而产生的多余的令牌。举例来说,以第一服务设备为例,第一服务设备中的补给器以设定时间间隔不断给第一服务设备的令牌桶补给令牌,假设该令牌桶的容量上限为100个令牌,当令牌桶内已经存满100个令牌之后,假设第一服务设备的补给器随后又产生5个令牌,这5个令牌已经无法再存入令牌桶中了,所以这5个令牌便是多余的令牌,发送至管理设备以共享给其他服务设备使用。The redundant tokens generated by a service device refer to the redundant tokens generated after the token bucket of the service device is fully replenished. For example, taking the first service device as an example, the replenisher in the first service device continuously replenishes tokens to the token bucket of the first service device at set time intervals, assuming that the upper limit of the token bucket capacity is 100 Tokens, when the token bucket is full of 100 tokens, suppose the supply device of the first service device subsequently generates 5 tokens, these 5 tokens can no longer be stored in the token bucket, so These 5 tokens are redundant tokens, which are sent to the management device to be shared with other service devices.
在图2示意的假设情形下,由于第一服务设备当前的令牌桶为空,第一服务设备触发将自己和第二服务设备的工作模式都切换为中心化模式,此时,会触发管理设备执行流量控制的相关操作。In the hypothetical situation shown in FIG. 2 , since the current token bucket of the first service device is empty, the first service device triggers to switch the working modes of itself and the second service device to the centralized mode. At this time, the management will be triggered. The device performs operations related to flow control.
实际应用中,每个服务设备内可以存储有表明当前所处工作模式的标志位,标志位置为不同的取值,表示处于不同的工作模式,比如,中心化模式为01,非中心化模式为00。第一服务设备可以在满足工作模式切换条件时将自己的工作模式切换为中心化模式,并向第二服务设备发送通知消息,以使第二服务设备根据该通知消息也切换为中心化模式。其中,结合上文所述,这里的工作模式切换条件是指第一服务设备的令牌桶为空,此时开始需要使用第一服务设备的缓冲队列。In practical applications, each service device can store a flag bit indicating the current working mode, and the flag position is a different value, indicating that it is in a different working mode, for example, the centralized mode is 01, and the decentralized mode is 00. The first service device can switch its own working mode to the centralized mode when the working mode switching conditions are met, and send a notification message to the second service device, so that the second service device also switches to the centralized mode according to the notification message. Wherein, in combination with the above, the working mode switching condition here means that the token bucket of the first service device is empty, and at this time, the buffer queue of the first service device needs to be used.
可选地,第一服务设备可以向管理设备发送通知消息,以通过管理设备将该通知消息发送至第二服务设备。Optionally, the first service device may send a notification message to the management device, so as to send the notification message to the second service device through the management device.
在图2中,由于第二服务设备的令牌桶不为空,第二服务设备的补给器每隔设定时间间隔向第二服务设备的令牌桶内补给设定数量的令牌,假设第二服务设备接收到的访问请求的数量比较少,而上述设定时间间隔比较短,所以很快第二服务设备的令牌桶便会被补给满,在第二服务设备的令牌桶被补给满后,第二服务设备的补给器后续产生的多余的令牌便会发送至管理设备中存储。在图2中,假设第二服务设备的令牌桶已满后,第二服务设备将多余的10个令牌发送至管理设备中存储。In FIG. 2, since the token bucket of the second service device is not empty, the replenisher of the second service device replenishes a set number of tokens into the token bucket of the second service device every set time interval, assuming that The number of access requests received by the second service device is relatively small, and the above-mentioned set time interval is relatively short, so the token bucket of the second service device will be replenished soon, and the token bucket of the second service device will be filled. After the replenishment is full, the excess tokens subsequently generated by the replenisher of the second service device will be sent to the management device for storage. In FIG. 2, it is assumed that after the token bucket of the second service device is full, the second service device sends the excess 10 tokens to the management device for storage.
其中,第二服务设备将多余的10个令牌发送至管理设备中存储,可以是通过在管理设备中启动一个计数器,管理设备根据接收到的令牌数量设置计数器的数值=10。The second service device sends the extra 10 tokens to the management device for storage, which may be by starting a counter in the management device, and the management device sets the value of the counter=10 according to the number of tokens received.
之后,第一服务设备在将自身置为中心化模式后,可以不断向管理设备发送获取请求,以获取管理设备中存储的令牌。在上述举例中,第一服务设备可以获得管理设备中存储的10个令牌,假设处理访问请求X需要使用1个令牌,那么第一服务设备将对这10个令牌执行一次减一操作,以表示取出一个令牌用于处理访问请求X,将剩下的9个令牌存入第一服务设备的令牌桶内。After that, after placing itself in the centralized mode, the first service device can continuously send an acquisition request to the management device to acquire the token stored in the management device. In the above example, the first service device can obtain 10 tokens stored in the management device. Assuming that 1 token needs to be used to process the access request X, the first service device will perform a subtraction operation on these 10 tokens at a time , to indicate that one token is taken out for processing the access request X, and the remaining 9 tokens are stored in the token bucket of the first service device.
假设在第一服务设备的补给器再次向第一服务设备的令牌桶内补给令牌之前,第一服务设备依次又接收到9个访问请求,则第一服务设备此时可以直接使用自身令牌桶内已经存储的上述9个令牌来处理这9个访问请求。Assuming that before the replenisher of the first service device replenishes tokens into the token bucket of the first service device again, the first service device receives 9 access requests in turn, then the first service device can directly use its own token at this time. The above 9 tokens already stored in the bucket are used to process these 9 access requests.
可以理解的是,服务设备初始情况下工作于非中心化模式下,上文介绍了服务设备由非中心化模式切换到中心化模式的条件,可选地,服务设备在切换到中心化模式后,若在中心化模式下的持续时长已经达到设定时长,则可以自动切换回非中心化模式。It can be understood that the service device initially works in the decentralized mode. The conditions for switching the service device from the decentralized mode to the centralized mode are described above. Optionally, after the service device switches to the centralized mode , if the duration in the centralized mode has reached the set time, it can automatically switch back to the decentralized mode.
基于此,在将第一服务设备和第二服务设备切换为中心化模式后的持续时长达到设定时长时,将第一服务设备和第二服务设备切换为非中心化模式。Based on this, when the duration after switching the first service device and the second service device to the centralized mode reaches the set duration, the first service device and the second service device are switched to the decentralized mode.
综上可见,本发明实施例中,通过引入上述中心化模式,通过管理设备可以协调不同服务设备产生的令牌在不同服务设备之间进行共享,这样,在服务设备的令牌桶满时归还多余的令牌给管理设备,在服务设备的缓冲队列非空时消费其他服务设备贡献的余量令牌,使得从服务集群整体的角度来说,实现了用户流量的精确化分布式控制,不至于出现用户整体访问流量实际远未达到容量限制上限便会被限制访问的情形。另外,只有在特定条件(服务设备本地令牌桶为空,即达到了单机的限速条件时)下才触发中心化模式的执行,其他时候服务设备都只是工作在非中心化模式下,这样降低了管理设备的参与度。管理设备参与度越高,整体的资源消耗量越大,因此,在上述特定条件下才触发管理设备参与流量控制过程,可以有效较低资源消耗情况。To sum up, in this embodiment of the present invention, by introducing the above-mentioned centralized mode, the management device can coordinate the sharing of tokens generated by different service devices among different service devices, so that when the token bucket of the service device is full, it is returned. The excess tokens are given to the management device, and the remaining tokens contributed by other service devices are consumed when the buffer queue of the service device is not empty, so that from the perspective of the service cluster as a whole, precise distributed control of user traffic is realized. As for the situation where the user's overall access traffic is actually far from reaching the upper limit of the capacity limit, the access will be restricted. In addition, the execution of the centralized mode is only triggered under certain conditions (the local token bucket of the service device is empty, that is, when the speed limit condition of a single machine is reached), and at other times, the service device only works in the decentralized mode, so Reduced involvement in managing devices. The higher the participation of the management device, the greater the overall resource consumption. Therefore, the management device is only triggered to participate in the flow control process under the above-mentioned specific conditions, which can effectively reduce the resource consumption.
图3为本发明实施例提供的一种流量控制方法的流程图,如图3所示,该方法可以包括如下步骤:FIG. 3 is a flowchart of a flow control method provided by an embodiment of the present invention. As shown in FIG. 3 , the method may include the following steps:
301、第一服务设备接收用户发送的访问请求。301. The first service device receives an access request sent by a user.
302、第一服务设备若确定第一服务设备的令牌桶内没有用于处理访问请求的令牌,则将访问请求存入到第一服务设备的缓冲队列中。302. If the first service device determines that there is no token for processing the access request in the token bucket of the first service device, the first service device stores the access request in the buffer queue of the first service device.
303、第一服务设备将第一服务设备和服务集群中的第二服务设备切换为中心化模式,中心化模式是指服务集群中的管理设备参与流量控制的模式。303. The first service device switches the first service device and the second service device in the service cluster to a centralized mode, where the centralized mode refers to a mode in which the management device in the service cluster participates in flow control.
304、第一服务设备使用从管理设备获取的令牌,处理第一服务设备的缓冲队列中存储的访问请求,其中,当第二服务设备的令牌桶补给满时,第二服务设备将自身多余的令牌发送至管理设备中存储。304. The first service device uses the token obtained from the management device to process the access request stored in the buffer queue of the first service device, wherein, when the token bucket of the second service device is full, the second service device will The excess tokens are sent to the management device for storage.
本实施例中假设服务集群中包括第一服务设备、第二服务设备以及管理设备。本实施例提供的流量控制方案是以第一服务设备的角度来描述的,即在执行流量控制的过程中,第一服务设备的具体执行步骤可以参考本实施例来实现。In this embodiment, it is assumed that the service cluster includes a first service device, a second service device, and a management device. The flow control solution provided in this embodiment is described from the perspective of the first service device, that is, in the process of executing flow control, the specific execution steps of the first service device may be implemented with reference to this embodiment.
本实施例的执行过程中的相关细节可以参考上文中的相关描述,在此不重复赘述。For the relevant details of the execution process of this embodiment, reference may be made to the relevant descriptions above, which will not be repeated here.
假设T1时刻第一服务设备接收到访问请求1,此时发现自身令牌桶为空,将访问请求1放入缓冲队列中暂存,并将自身以及第二服务设备切换到中心化模式。Assuming that the first service device receives access request 1 at time T1 and finds that its token bucket is empty, it puts access request 1 in the buffer queue for temporary storage, and switches itself and the second service device to the centralized mode.
假设短暂时间后的T2时刻第一服务设备接收到访问请求2,此时若发现自身令牌桶仍旧为空,将访问请求2也放入缓冲队列中暂存。Assuming that the first service device receives the access request 2 at time T2 after a short time, if it finds that its own token bucket is still empty at this time, the access request 2 is also put into the buffer queue for temporary storage.
假设第一服务设备在之后的T3时刻从管理设备获得了10个令牌,则取出其中的两个,用于处理缓冲队列中存储的访问请求1和访问请求2,将剩下的8个令牌存入第一服务设备的令牌桶内。也就是说,若第一服务设备从管理设备获取的令牌的第一数量(上述举例中为10个)大于第一服务设备的缓冲队列中存储的访问请求的第二数量(上述举例中为2个),则使用第二数量的令牌处理第二数量的访问请求,将剩余的令牌(上述举例中为8个)存入第一服务设备的令牌桶内。Assuming that the first service device obtains 10 tokens from the management device at the following time T3, it takes out two of them for processing access request 1 and access request 2 stored in the buffer queue, and uses the remaining 8 tokens The token is stored in the token bucket of the first service device. That is, if the first number of tokens (10 in the above example) acquired by the first service device from the management device is greater than the second number of access requests stored in the buffer queue of the first service device (in the above example, 2), then use the second number of tokens to process the second number of access requests, and store the remaining tokens (8 in the above example) into the token bucket of the first service device.
可以理解的是,在上述假设情形中,实际上还假设了如下的条件:第一,在T1至T2期间第一服务设备并未从管理设备获得令牌,可能是由于T2时刻与T1时刻相距太近而导致第一服务设备还未及向管理设备发送用于获取令牌的获取请求,可能是触发了该获取请求但是管理设备此时没有令牌;第二,第一服务设备的补给器在T1至T2期间并未产生令牌补给到令牌桶内。It can be understood that, in the above-mentioned hypothetical situation, the following conditions are actually also assumed: first, the first service device does not obtain a token from the management device during the period from T1 to T2, which may be due to the distance between time T2 and time T1. It is too close, so that the first service device has not yet sent an acquisition request to the management device for obtaining the token, it may be that the acquisition request was triggered but the management device does not have a token at this time; second, the replenisher of the first service device During the period from T1 to T2, no token is generated to be replenished into the token bucket.
值得说明的是,在步骤303中,第一服务设备可以将自身的工作模式切换为中心化模式,并向第二服务设备发送通知消息,以使第二服务设备根据该通知消息切换为中心化模式。具体地,该通知消息中可以包括与发送访问请求的用户相对应的标识信息,这样,第二服务设备在确定自身的设备标识与该标识信息匹配时切换为中心化模式。It is worth noting that in
如前文所述,若一个服务设备中仅包含一个限流器,则服务设备的设备标识可以与该限流器的设备标识为同一标识,设备标识可以由两部分构成,一部分是与用户对应的标识信息,可以称为用户标识;另一部分是用于区别对应于同一用户的不同服务设备的标识信息,可以称为节点标识。比如前文中举例的name1@nodeA,其中,name1为用户标识,nodeA为节点标识。As mentioned above, if a service device contains only one current limiter, the device identification of the service device and the device identification of the current limiter can be the same identification, and the device identification can be composed of two parts, one part is corresponding to the user The identification information may be referred to as a user identification; the other part is identification information used to distinguish different service devices corresponding to the same user, and may be referred to as a node identification. For example, name1@nodeA in the example above, where name1 is the user ID and nodeA is the node ID.
第一服务设备可以向服务集群中的其他各个服务设备(假设服务集群中除第二服务设备外还有其他服务设备)发送携带name1这个用户标识的通知消息,从而,接收到该通知消息的服务设备对比自己的设备标识中是否包含该用户标识name1,若不包含,则忽略该通知消息,若包含,则根据该通知消息将自身的工作模式切换为中心化模式。The first service device may send a notification message carrying the user ID of name1 to each other service device in the service cluster (assuming that there are other service devices in the service cluster besides the second service device), so that the service receiving the notification message The device compares whether the user ID name1 is included in its own device ID. If it does not, it ignores the notification message. If it does, it switches its own working mode to the centralized mode according to the notification message.
另外,值得说明的是,当第一服务设备和第二服务设备都工作在中心化模式下时,针对每个服务设备来说,其令牌来源有两个:一个是自身的补给器不断补给的令牌,另一个是从管理设备获取的其他服务设备贡献出的多余令牌。针对上述举例情形下的第一服务设备来说,在中心化模式下,开始的时候,由于本地的令牌桶为空,需要从管理设备获取第二服务设备贡献出的多余令牌以处理访问请求。但是,随着第一服务设备的补给器不断向其令牌桶内补给令牌,并假设第一服务设备后续接收到的访问请求的数量比较少,那么逐渐地,在第一服务设备的令牌桶内会不断增加令牌,后续可能使用本地产生的令牌便足以应对本地接收的访问请求的处理需求。在通过第一服务设备的补给器将第一服务设备的令牌桶补给满后,第一服务设备可以将自身多余的令牌发送至管理设备中存储,这样,如果后续第二服务设备因为突发用户流量而导致第二服务设备的令牌桶内令牌不够用时,可以通过管理设备获取并使用第一服务设备贡献出的多余令牌。In addition, it is worth noting that when both the first service device and the second service device work in the centralized mode, for each service device, there are two sources of tokens: one is the continuous supply of its own replenisher , and the other is the excess tokens contributed by other service devices obtained from the management device. For the first service device in the above example, in the centralized mode, at the beginning, since the local token bucket is empty, it is necessary to obtain the redundant tokens contributed by the second service device from the management device to process the access ask. However, as the replenisher of the first service device continuously replenishes tokens into its token bucket, and assuming that the number of access requests subsequently received by the first service device is relatively small, gradually, in the command of the first service device Tokens will continue to increase in the bucket, and the locally generated tokens may be used in the future to meet the processing requirements of locally received access requests. After the token bucket of the first service device is replenished through the replenisher of the first service device, the first service device can send its own excess tokens to the management device for storage, so that if the second service device subsequently fails due to a sudden When the tokens in the token bucket of the second service device are insufficient due to user traffic, the management device can obtain and use the excess tokens contributed by the first service device.
如上文所述,若将第一服务设备和第二服务设备切换为中心化模式后的持续时长达到设定时长,则将第一服务设备和第二服务设备切换为非中心化模式。As described above, if the duration after the first service device and the second service device are switched to the centralized mode reaches the set duration, the first service device and the second service device are switched to the decentralized mode.
前述实施例中介绍的是当第一服务设备接收到访问请求后发现本地的令牌桶为空即令牌桶内不存在用于处理该访问请求的令牌时的处理情形。但是,如上文所述,初始情况下,各个服务设备都工作在非中心化模式下,以第一服务设备为例,第一服务设备处于非中心化模式下时,当第一服务设备接收到用户发送的访问请求时,若确定当前第一服务设备的令牌桶内存在用于处理该访问请求的令牌,则使用从第一服务设备的令牌桶内获取的令牌处理该访问请求即可。直到后续某时刻接收到用户触发的访问请求,发现此时第一服务设备的令牌桶为空时,才切换到中心化模式。The foregoing embodiment describes the processing situation when the first service device finds that the local token bucket is empty after receiving the access request, that is, there is no token in the token bucket for processing the access request. However, as mentioned above, initially, each service device works in the decentralized mode. Taking the first service device as an example, when the first service device is in the decentralized mode, when the first service device receives When the user sends an access request, if it is determined that a token for processing the access request exists in the token bucket of the current first service device, the access request is processed using the token obtained from the token bucket of the first service device That's it. It will not switch to the centralized mode until an access request triggered by the user is received at a later time and it is found that the token bucket of the first service device is empty at this time.
为了能够更加直观的对比中心化模式下和非中心化模式下服务设备的工作过程的差异性,下面结合图4来示例性说明一种流量控制方案的执行过程。In order to more intuitively compare the differences in the working process of the service device in the centralized mode and the non-centralized mode, an execution process of a flow control scheme is exemplarily described below with reference to FIG. 4 .
在图4中,首先假设第一服务设备的令牌桶内存储有10个令牌,第一服务设备的缓冲队列为空,第二服务设备的令牌桶内有80个令牌,第二服务设备的缓冲队列为空。并假设此时第一服务设备和第二服务设备都处于非中心化模式。In Fig. 4, it is assumed that there are 10 tokens stored in the token bucket of the first service device, the buffer queue of the first service device is empty, the token bucket of the second service device has 80 tokens, and the second service device has 80 tokens in the token bucket. The buffer queue of the service device is empty. And it is assumed that both the first service device and the second service device are in a decentralized mode at this time.
某时刻,假设第一服务设备接收到用户触发的访问请求A1,由于此时第一服务设备的令牌桶不为空,第一服务设备对其令牌桶内令牌数执行减一操作,之后处理访问请求A1,此时,第一服务设备的令牌桶内的令牌数变为9个。At a certain moment, it is assumed that the first service device receives the access request A1 triggered by the user. Since the token bucket of the first service device is not empty at this time, the first service device performs an operation of decrementing the number of tokens in its token bucket by one. After that, the access request A1 is processed. At this time, the number of tokens in the token bucket of the first service device becomes 9.
同理,假设接下来第一服务设备依次接收到访问请求A2~A10,依次执行上述操作,以逐个对这9个访问请求进行处理,此时,第一服务设备的令牌桶将变为空。In the same way, assuming that the first service device receives the access requests A2 to A10 in sequence, and performs the above operations in sequence to process the nine access requests one by one, at this time, the token bucket of the first service device will become empty. .
另外,假设由于第二服务设备的补给器不断给第二服务设备的令牌桶进行令牌补给,以及第二服务设备接收到的访问请求的数量比较少,第二服务设备的令牌桶已满,达到100个令牌。此时,如果第二服务设备的补给器再产生新的令牌,则可以丢弃新产生的令牌。In addition, it is assumed that since the replenisher of the second service device continuously replenishes the token bucket of the second service device and the number of access requests received by the second service device is relatively small, the token bucket of the second service device has been Full, reaches 100 tokens. At this time, if the feeder of the second service device generates a new token again, the newly generated token may be discarded.
之后,假设第一服务设备接收到用户触发的访问请求A11,由于此时第一服务设备的令牌桶为空,所以将访问请求A11存入第一服务设备的缓冲队列中,并且,第一服务设备切换到中心化模式,并通知第二服务设备也切换到中心化模式。After that, it is assumed that the first service device receives the access request A11 triggered by the user. Since the token bucket of the first service device is empty at this time, the access request A11 is stored in the buffer queue of the first service device, and the first The service device switches to the centralized mode, and notifies the second service device to also switch to the centralized mode.
在切换到中心化模式后,假设第二服务设备的补给器又产生了5个令牌,由于第二服务设备的令牌桶此时是满的,因此新产生的这5个令牌会被第二服务设备发送至管理设备中。管理设备启动一个计数器,将计数器的计数值设为5,表明获得了5个令牌。After switching to the centralized mode, it is assumed that the feeder of the second service device has generated 5 more tokens. Since the token bucket of the second service device is full at this time, the newly generated 5 tokens will be The second service device is sent to the management device. The management device starts a counter and sets the count value of the counter to 5, indicating that 5 tokens have been obtained.
而第一服务设备可以定时轮询管理设备,以获取管理设备中存储的令牌。在第一服务设备获得管理设备中存储的5个令牌后,首先,先用获得的令牌处理第一服务设备的缓冲队列中存储的访问请求A11,由于处理访问请求A11仅需要一个令牌即可,所以第一服务设备将剩余的4个令牌存入第一服务设备的令牌桶内。可以理解的是,此时,管理设备的计数器的值执行减5操作。On the other hand, the first service device may periodically poll the management device to obtain the token stored in the management device. After the first service device obtains the five tokens stored in the management device, first, the obtained token is used to process the access request A11 stored in the buffer queue of the first service device, since only one token is required to process the access request A11 That is, so the first service device stores the remaining 4 tokens into the token bucket of the first service device. It can be understood that, at this time, the value of the counter of the management device is decremented by 5.
由此可知,在本发明实施例提供的流量控制方案中,相当于设置了非中心化模式向中心化模式切换的中心化开关机制,一般情况下,用户触发的访问流量达不到服务设备的限速上限,此时,中心化开关为关,各服务设备的行为为单机模式,即使用本地产生的令牌处理本地接收的访问请求,不消耗管理设备的资源。但是,在用户触发的访问流量达到某个服务设备的限速上限时,中心化开关打开,通过管理设备的同步执行精确地分布式流量控制,即满足了精确限速的需求,也规避了对资源的额外消耗。It can be seen from this that, in the traffic control scheme provided by the embodiment of the present invention, it is equivalent to setting a centralized switching mechanism for switching from a decentralized mode to a centralized mode. The upper limit of the speed limit. At this time, the centralized switch is off, and the behavior of each service device is the stand-alone mode, that is, the locally generated token is used to process the access request received locally, without consuming the resources of the management device. However, when the access traffic triggered by the user reaches the upper limit of the speed limit of a certain service device, the centralized switch is turned on, and precise distributed traffic control is performed through the synchronization of the management device, which not only meets the needs of precise speed limit, but also avoids the need for Additional consumption of resources.
以下将详细描述本发明的一个或多个实施例的流量控制装置。本领域技术人员可以理解,这些流量控制装置均可使用市售的硬件组件通过本方案所教导的步骤进行配置来构成。The flow control device of one or more embodiments of the present invention will be described in detail below. Those skilled in the art can understand that these flow control devices can be configured by using commercially available hardware components through the steps taught in this solution.
图5为本发明实施例提供的一种流量控制装置的结构示意图,该流量控制装置位于服务集群中的第一服务设备中,第一服务设备是服务集群中的任一服务设备。如图5所示,该装置包括:请求接收模块11、请求缓存模块12、模式设置模块13、请求处理模块14。5 is a schematic structural diagram of a flow control apparatus according to an embodiment of the present invention. The flow control apparatus is located in a first service device in a service cluster, and the first service device is any service device in the service cluster. As shown in FIG. 5 , the apparatus includes: a
请求接收模块11,用于接收用户发送的访问请求。The
请求缓存模块12,用于若确定所述第一服务设备的令牌桶内没有用于处理所述访问请求的令牌,则将所述访问请求存入到所述第一服务设备的缓冲队列中。The
模式设置模块13,用于将所述第一服务设备和所述服务集群中的第二服务设备切换为中心化模式,所述中心化模式是指所述服务集群中的管理设备参与流量控制的模式。The
请求处理模块14,用于使用从所述管理设备获取的令牌,处理所述第一服务设备的缓冲队列中存储的访问请求,其中,当所述第二服务设备的令牌桶补给满时,所述第二服务设备将自身多余的令牌发送至所述管理设备中存储。The
可选地,请求处理模块14还用于:若确定所述第一服务设备的令牌桶内存在用于处理所述访问请求的令牌,则使用从所述第一服务设备的令牌桶内获取的令牌处理所述访问请求,所述第一服务设备处于非中心化模式,所述非中心化模式是指所述管理设备不参与流量控制的模式。Optionally, the
可选地,模式设置模块13还用于:若将所述第一服务设备和所述第二服务设备切换为中心化模式后的持续时长达到设定时长,则将所述第一服务设备和所述第二服务设备切换为非中心化模式。Optionally, the
可选地,请求处理模块14还用于:若从所述管理设备获取的令牌的第一数量大于所述第一服务设备的缓冲队列中存储的访问请求的第二数量,则使用所述第二数量的令牌处理所述第二数量的访问请求,将剩余的令牌存入所述第一服务设备的令牌桶内。Optionally, the
可选地,模式设置模块13还用于:在所述中心化模式下,在通过所述第一服务设备的补给器将所述第一服务设备的令牌桶补给满后,将自身多余的令牌发送至所述管理设备中存储。Optionally, the
可选地,请求缓存模块12具体可以用于:将所述第一服务设备切换为所述中心化模式;向所述第二服务设备发送通知消息,以使所述第二服务设备根据所述通知消息切换为所述中心化模式。Optionally, the
其中,可选地,请求缓存模块12具体可以用于:向所述第二服务设备发送包括与所述用户对应的标识信息的通知消息,以使所述第二服务设备确定自身的设备标识与所述标识信息匹配时切换为所述中心化模式。Wherein, optionally, the
可选地,所述第一服务设备的令牌桶的容量上限由预设的流量阈值、所述服务集群中包含的服务设备的数量和预设的突发流量参数确定;所述第一服务设备的缓冲队列的容量上限由所述流量阈值、所述服务设备的数量和预设的缓冲流量参数确定;所述第一服务设备的补给器每隔所述设定时间间隔补给的令牌数量由所述流量阈值、所述服务设备的数量和所述设定时间间隔确定。Optionally, the upper limit of the capacity of the token bucket of the first service device is determined by a preset traffic threshold, the number of service devices included in the service cluster, and a preset burst traffic parameter; the first service The upper limit of the capacity of the buffer queue of the device is determined by the traffic threshold, the number of the service devices and the preset buffer traffic parameter; the number of tokens replenished by the replenisher of the first service device every the set time interval Determined by the traffic threshold, the number of service devices, and the set time interval.
图5所示装置可以执行前述图1至图4所示实施例中提供的流量控制方案,详细的执行过程和技术效果参见前述实施例中的描述,在此不再赘述。The apparatus shown in FIG. 5 can implement the flow control scheme provided in the embodiments shown in the foregoing FIG. 1 to FIG. 4 . For the detailed execution process and technical effects, refer to the descriptions in the foregoing embodiments, which will not be repeated here.
在一个可能的设计中,上述图5所示流量控制装置的结构可实现为一服务设备,该服务设备是服务集群中的任一服务设备,该服务集群中还包括管理设备和其他服务设备。如图6所示,该服务设备可以包括:处理器21、存储器22、通信接口23。其中,存储器22上存储有可执行代码,当所述可执行代码被处理器21执行时,使处理器21至少可以实现:In a possible design, the structure of the flow control apparatus shown in FIG. 5 can be implemented as a service device, the service device is any service device in a service cluster, and the service cluster also includes management devices and other service devices. As shown in FIG. 6 , the service device may include: a
接收用户发送的访问请求;Receive access requests sent by users;
若确定所述服务设备的令牌桶内没有用于处理所述访问请求的令牌,则将所述访问请求存入到所述服务设备的缓冲队列中;If it is determined that there is no token for processing the access request in the token bucket of the service device, the access request is stored in the buffer queue of the service device;
将所述服务设备和所述服务集群中的其他服务设备切换为中心化模式,所述中心化模式是指所述服务集群中的管理设备参与流量控制的模式;Switching the service device and other service devices in the service cluster to a centralized mode, where the centralized mode refers to a mode in which management devices in the service cluster participate in flow control;
使用从所述管理设备获取的令牌,处理所述服务设备的缓冲队列中存储的访问请求,其中,当所述其他服务设备的令牌桶补给满时,所述其他服务设备将自身多余的令牌发送至所述管理设备中存储。Use the token obtained from the management device to process the access request stored in the buffer queue of the service device, wherein when the token bucket of the other service device is replenished, the other service device will use its own redundant The token is sent to the management device for storage.
另外,本发明实施例提供了一种非暂时性机器可读存储介质,所述非暂时性机器可读存储介质上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器至少可以实现如前述图1至图4所示实施例中提供的流量控制方案。In addition, an embodiment of the present invention provides a non-transitory machine-readable storage medium, where executable codes are stored on the non-transitory machine-readable storage medium, and when the executable codes are executed by a processor of an electronic device , so that the processor can at least implement the flow control scheme provided in the above-mentioned embodiments shown in FIG. 1 to FIG. 4 .
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The apparatus embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment. Those of ordinary skill in the art can understand and implement it without creative effort.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助加必需的通用硬件平台的方式来实现,当然也可以通过硬件和软件结合的方式来实现。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以计算机产品的形式体现出来,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。From the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and certainly can also be implemented by combining hardware and software. Based on this understanding, the above-mentioned technical solutions can be embodied in the form of computer products in essence or that make contributions to the prior art. In the form of a computer program product embodied on a medium (including but not limited to disk storage, CD-ROM, optical storage, etc.).
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that it can still be The technical solutions described in the foregoing embodiments are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (12)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110057576.1A CN114765592A (en) | 2021-01-15 | 2021-01-15 | Flow control method, device, storage medium, service equipment and service cluster |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110057576.1A CN114765592A (en) | 2021-01-15 | 2021-01-15 | Flow control method, device, storage medium, service equipment and service cluster |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN114765592A true CN114765592A (en) | 2022-07-19 |
Family
ID=82364837
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110057576.1A Pending CN114765592A (en) | 2021-01-15 | 2021-01-15 | Flow control method, device, storage medium, service equipment and service cluster |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114765592A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119030931A (en) * | 2024-07-02 | 2024-11-26 | 箭牌家居集团股份有限公司 | System current limiting method, server, readable storage medium and computer program product |
Citations (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20080084824A1 (en) * | 2006-10-09 | 2008-04-10 | Agere Systems Inc. | Dual Leaky Bucket Flow Control Method and System |
| CN101803330A (en) * | 2007-09-14 | 2010-08-11 | 国际商业机器公司 | Method, system and computer program for balancing the access to shared resources with credit-based tokens |
| CN101834786A (en) * | 2010-04-15 | 2010-09-15 | 华为技术有限公司 | Queue scheduling method and device |
| US20140380330A1 (en) * | 2013-06-25 | 2014-12-25 | Amazon Technologies, Inc. | Token sharing mechanisms for burst-mode operations |
| CN105376175A (en) * | 2015-12-03 | 2016-03-02 | 北京浩瀚深度信息技术股份有限公司 | Token bucket cascading implementation method with function of bandwidth guarantee |
| CN105409171A (en) * | 2013-06-25 | 2016-03-16 | 亚马逊科技公司 | Burst mode control |
| CN107786460A (en) * | 2017-09-08 | 2018-03-09 | 北京科东电力控制系统有限责任公司 | A kind of management of electricity transaction system request and current-limiting method based on token bucket algorithm |
| CN108494703A (en) * | 2018-03-08 | 2018-09-04 | 腾讯科技(深圳)有限公司 | A kind of access frequency control method, device and storage medium |
| CN110611623A (en) * | 2019-08-30 | 2019-12-24 | 江苏苏宁物流有限公司 | Current limiting method and device |
| WO2020014954A1 (en) * | 2018-07-20 | 2020-01-23 | 威富通科技有限公司 | Data control method and terminal device |
| CN112104568A (en) * | 2020-11-17 | 2020-12-18 | 北京达佳互联信息技术有限公司 | Data transmission control method and gateway |
-
2021
- 2021-01-15 CN CN202110057576.1A patent/CN114765592A/en active Pending
Patent Citations (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20080084824A1 (en) * | 2006-10-09 | 2008-04-10 | Agere Systems Inc. | Dual Leaky Bucket Flow Control Method and System |
| CN101803330A (en) * | 2007-09-14 | 2010-08-11 | 国际商业机器公司 | Method, system and computer program for balancing the access to shared resources with credit-based tokens |
| CN101834786A (en) * | 2010-04-15 | 2010-09-15 | 华为技术有限公司 | Queue scheduling method and device |
| US20140380330A1 (en) * | 2013-06-25 | 2014-12-25 | Amazon Technologies, Inc. | Token sharing mechanisms for burst-mode operations |
| CN105409171A (en) * | 2013-06-25 | 2016-03-16 | 亚马逊科技公司 | Burst mode control |
| CN105376175A (en) * | 2015-12-03 | 2016-03-02 | 北京浩瀚深度信息技术股份有限公司 | Token bucket cascading implementation method with function of bandwidth guarantee |
| CN107786460A (en) * | 2017-09-08 | 2018-03-09 | 北京科东电力控制系统有限责任公司 | A kind of management of electricity transaction system request and current-limiting method based on token bucket algorithm |
| CN108494703A (en) * | 2018-03-08 | 2018-09-04 | 腾讯科技(深圳)有限公司 | A kind of access frequency control method, device and storage medium |
| WO2020014954A1 (en) * | 2018-07-20 | 2020-01-23 | 威富通科技有限公司 | Data control method and terminal device |
| CN110611623A (en) * | 2019-08-30 | 2019-12-24 | 江苏苏宁物流有限公司 | Current limiting method and device |
| CN112104568A (en) * | 2020-11-17 | 2020-12-18 | 北京达佳互联信息技术有限公司 | Data transmission control method and gateway |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119030931A (en) * | 2024-07-02 | 2024-11-26 | 箭牌家居集团股份有限公司 | System current limiting method, server, readable storage medium and computer program product |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP2577459B1 (en) | Applying policies to schedule network bandwidth among virtual machines | |
| CN105743995B (en) | System and method for transplantable high-availability deployment and management of container cluster | |
| US9729488B2 (en) | On-demand mailbox synchronization and migration system | |
| US8386512B2 (en) | System for managing data collection processes | |
| CN104685852B (en) | Systems and methods for using mini-batches of requests | |
| EP3745678B1 (en) | Storage system, and method and apparatus for allocating storage resources | |
| CN110225146B (en) | Intranet and extranet mapping method and device, electronic equipment, medium and video conference system | |
| CN105159782A (en) | Cloud host based method and apparatus for allocating resources to orders | |
| CN109802895B (en) | Data processing system, method and token management method | |
| WO2022188578A1 (en) | Method and system for multiple services to share same gpu, and device and medium | |
| CN114911602B (en) | A server cluster load balancing method, device, equipment and storage medium | |
| CN112600761B (en) | Resource allocation method, device and storage medium | |
| CN102045321A (en) | Flow control method and system for software downloading | |
| CN111857992B (en) | Method and device for allocating linear resources in Radosgw module | |
| CN112219191B (en) | Self-configuration of services and servers in data centers | |
| CN119415273A (en) | Reasoning service management method, device, medium and computer program product | |
| CN113660178A (en) | CDN content management system | |
| WO2017024965A1 (en) | Method and system for limiting data traffic | |
| CN114765592A (en) | Flow control method, device, storage medium, service equipment and service cluster | |
| CN111835809B (en) | Work order message distribution method, work order message distribution device, server and storage medium | |
| CN113132266A (en) | IO request scheduling method and device | |
| CN111343290A (en) | Cloud platform system with load balancing function | |
| CN115914236A (en) | Storage space allocation and adjustment method, device, electronic device and storage medium | |
| CN118433255B (en) | Quota pre-application method and device based on timestamp | |
| HK40121282A (en) | Instance scheduling method, data processing system, equipment, medium and 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 | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20220719 |
|
| RJ01 | Rejection of invention patent application after publication |
