CN111866101B - Access request processing method and device, storage medium and electronic equipment - Google Patents
Access request processing method and device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN111866101B CN111866101B CN202010649575.1A CN202010649575A CN111866101B CN 111866101 B CN111866101 B CN 111866101B CN 202010649575 A CN202010649575 A CN 202010649575A CN 111866101 B CN111866101 B CN 111866101B
- Authority
- CN
- China
- Prior art keywords
- time
- access times
- access
- flow control
- interface
- 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.)
- Active
Links
Images
Classifications
-
- 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/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
- H04L67/025—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
-
- 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/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
- H04L67/62—Establishing a time schedule for servicing the requests
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Telephonic Communication Services (AREA)
Abstract
本公开提供了一种访问请求处理方法、访问请求处理装置、存储介质和电子设备,涉及计算机技术领域。访问请求处理方法包括:响应针对接口的访问请求,获取当前累计访问次数、当前时间、上次接口访问次数以及上次将访问次数清零的时间;上次接口访问次数和上次将访问次数清零的时间均为静态变量;确定当前时间与上次将访问次数清零的时间之间的时间间隔,将时间间隔与时间阈值进行比较,得到第一比较结果,基于第一比较结果,将上次接口访问次数加1,并赋值给当前累计访问次数,以得到流量控制参数值;将流量控制参数值与流量控制阈值进行比较,得到第二比较结果,根据第二比较结果对访问请求进行处理。本公开实现了一种轻量级的接口流量控制方案。
The disclosure provides an access request processing method, an access request processing device, a storage medium and electronic equipment, and relates to the technical field of computers. The access request processing method includes: responding to the access request for the interface, obtaining the current accumulated access times, the current time, the last interface access times, and the time when the last access times were cleared; the last interface access times and the last access times clearing The time of zero is a static variable; determine the time interval between the current time and the time when the number of visits was reset to zero last time, compare the time interval with the time threshold, and obtain the first comparison result. Based on the first comparison result, the above Add 1 to the number of secondary interface visits, and assign it to the current cumulative number of visits to obtain the flow control parameter value; compare the flow control parameter value with the flow control threshold to obtain the second comparison result, and process the access request according to the second comparison result . The present disclosure implements a lightweight interface flow control scheme.
Description
技术领域technical field
本公开涉及计算机技术领域,具体而言,涉及一种访问请求处理方法、访问请求处理装置、存储介质和电子设备。The present disclosure relates to the field of computer technology, and in particular, to an access request processing method, an access request processing device, a storage medium, and electronic equipment.
背景技术Background technique
在人类社会中,随处可见流量控制的应用,例如人流控制、车流控制、水坝的水流控制等。利用流量控制不仅可以保障安全,也可以提高效率。在互联网行业中,流量控制也非常重要,例如对服务器的流量控制,可以保障服务器更加安全,也可以保证服务器不会出现过载的情况。In human society, the application of flow control can be seen everywhere, such as flow control of people, vehicle flow control, water flow control of dams, etc. Using flow control can not only ensure security, but also improve efficiency. In the Internet industry, flow control is also very important. For example, flow control on servers can ensure that the server is more secure, and it can also ensure that the server will not be overloaded.
目前,针对接口业务,存在一些流量控制策略,然而,这些接口流量控制策略均存在实现方式复杂的问题。At present, there are some flow control strategies for interface services, however, these interface flow control strategies all have the problem of complex implementation methods.
发明内容Contents of the invention
本公开的目的在于提供一种访问请求处理方法、访问请求处理装置、存储介质和电子设备,进而至少在一定程度上克服接口流量控制实现方式复杂的问题。The purpose of the present disclosure is to provide an access request processing method, an access request processing device, a storage medium, and an electronic device, so as to overcome the problem of complex implementation of interface flow control at least to a certain extent.
根据本公开的第一方面,提供了一种访问请求处理方法,包括:响应针对接口的访问请求,获取当前累计访问次数、当前时间、上次接口访问次数以及上次将访问次数清零的时间;其中,上次接口访问次数和上次将访问次数清零的时间均为静态变量;确定当前时间与上次将访问次数清零的时间之间的时间间隔,将时间间隔与时间阈值进行比较,得到第一比较结果,基于第一比较结果,将上次接口访问次数加1,并赋值给当前累计访问次数,以得到流量控制参数值;将流量控制参数值与流量控制阈值进行比较,得到第二比较结果,根据第二比较结果对访问请求进行处理。According to the first aspect of the present disclosure, an access request processing method is provided, including: responding to an interface access request, obtaining the current accumulated access times, the current time, the last interface access times, and the time when the last access times were cleared ;Among them, the last interface access times and the time when the last access times were cleared are both static variables; determine the time interval between the current time and the last time when the access times are cleared, and compare the time interval with the time threshold , to get the first comparison result, based on the first comparison result, add 1 to the last interface visit times, and assign it to the current accumulated visit times, to get the flow control parameter value; compare the flow control parameter value with the flow control threshold, get The second comparison result, the access request is processed according to the second comparison result.
根据本公开的第二方面,提供了一种访问请求处理装置,包括:请求响应模块,用于响应针对接口的访问请求,获取当前累计访问次数、当前时间、上次接口访问次数以及上次将访问次数清零的时间;其中,上次接口访问次数和上次将访问次数清零的时间均为静态变量;参数值确定模块,用于确定当前时间与上次将访问次数清零的时间之间的时间间隔,将时间间隔与时间阈值进行比较,得到第一比较结果,基于第一比较结果,将上次接口访问次数加1,并赋值给当前累计访问次数,以得到流量控制参数值;请求处理模块,用于将流量控制参数值与流量控制阈值进行比较,得到第二比较结果,根据第二比较结果对访问请求进行处理。According to the second aspect of the present disclosure, there is provided an access request processing device, including: a request response module, configured to respond to an interface access request, and obtain the current accumulated access times, the current time, the last interface access times, and the last The time when the number of visits is cleared; wherein, the number of last interface visits and the time when the number of visits were last cleared are static variables; the parameter value determination module is used to determine the time between the current time and the time when the number of visits was last cleared The time interval between, compare the time interval with the time threshold to obtain the first comparison result, based on the first comparison result, add 1 to the last interface access times, and assign it to the current accumulated access times, to obtain the flow control parameter value; The request processing module is configured to compare the flow control parameter value with the flow control threshold to obtain a second comparison result, and process the access request according to the second comparison result.
根据本公开的第三方面,提供了一种存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述的访问请求处理方法。According to a third aspect of the present disclosure, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above access request processing method is implemented.
根据本公开的第四方面,提供了一种电子设备,包括处理器;存储器,用于存储处理器的可执行指令;其中,该处理器配置为经由执行可执行指令来执行上述的访问请求处理方法。According to a fourth aspect of the present disclosure, there is provided an electronic device, including a processor; a memory for storing executable instructions of the processor; wherein the processor is configured to perform the above-mentioned access request processing by executing the executable instructions method.
在本公开的一些实施例所提供的技术方案中,确定当前时间与上次将访问次数清零的时间之间的时间间隔,将该时间间隔与时间阈值进行比较,基于比较结果将上次接口访问次数加1,并赋值给当前累计访问次数,得到流量控制参数值,再将该流量控制参数值与流量控制阈值进行比较,然后根据此比较结果对接口的访问请求进行处理。一方面,本公开方案实现方式简单,代码量少,可跨平台使用,不同的编程语言均可实现,是一种轻量级的访问请求控制方案;另一方面,由于方案轻量级的属性,可以集成到前端、客户端、服务端,适用于不同的架构,并且对系统性能的损耗很小,不会增加系统的负担;再一方面,本方案可以根据场景需要,对时间阈值和/或流量控制阈值进行调整,由此,可以提高方案配置的灵活性,使方案的应用场景更广;又一方面,鉴于上次接口访问次数和上次将访问次数清零的时间均为静态变量,可以保证变量的生存周期与进程一致,确保方案实施的有效性。In the technical solution provided by some embodiments of the present disclosure, the time interval between the current time and the last time when the number of visits was reset to zero is determined, the time interval is compared with the time threshold, and the last interface Add 1 to the number of visits and assign it to the current cumulative number of visits to obtain the flow control parameter value, then compare the flow control parameter value with the flow control threshold, and then process the access request of the interface according to the comparison result. On the one hand, the disclosed solution has a simple implementation method, a small amount of code, can be used across platforms, and can be implemented in different programming languages, and is a lightweight access request control solution; on the other hand, due to the lightweight attribute of the solution , can be integrated into the front-end, client, and server, and is suitable for different architectures, and has little loss to system performance and will not increase the burden on the system; on the other hand, this solution can adjust the time threshold and/or Or the flow control threshold can be adjusted, which can improve the flexibility of solution configuration and make the application scenarios of the solution wider; on the other hand, since the last interface access times and the time when the last access times were reset to zero are static variables , which can ensure that the life cycle of the variable is consistent with the process, and ensure the effectiveness of the implementation of the scheme.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。在附图中:The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure. Apparently, the drawings in the following description are only some embodiments of the present disclosure, and those skilled in the art can obtain other drawings according to these drawings without creative efforts. In the attached picture:
图1示出了应用本公开实施例的访问请求处理方案的示例性系统架构的示意图;FIG. 1 shows a schematic diagram of an exemplary system architecture applying the access request processing solution of an embodiment of the present disclosure;
图2示意性示出了根据本公开的示例性实施方式的访问请求处理方法的流程图;Fig. 2 schematically shows a flowchart of an access request processing method according to an exemplary embodiment of the present disclosure;
图3示意性示出了根据本公开实施例的访问请求处理的整个过程的流程图;FIG. 3 schematically shows a flow chart of the entire process of access request processing according to an embodiment of the present disclosure;
图4示意性示出了根据本公开的示例性实施方式的访问请求处理装置的方框图;Fig. 4 schematically shows a block diagram of an access request processing device according to an exemplary embodiment of the present disclosure;
图5示意性示出了根据本公开的示例性实施方式的电子设备的方框图。FIG. 5 schematically shows a block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
具体实施方式Detailed ways
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本公开将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施方式中。在下面的描述中,提供许多具体细节从而给出对本公开的实施方式的充分理解。然而,本领域技术人员将意识到,可以实践本公开的技术方案而省略所述特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知技术方案以避免喧宾夺主而使得本公开的各方面变得模糊。Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided in order to give a thorough understanding of embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details being omitted, or other methods, components, devices, steps, etc. may be adopted. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
此外,附图仅为本公开的示意性图解,并非一定是按比例绘制。图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。附图中所示的一些方框图是功能实体,不一定必须与物理或逻辑上独立的实体相对应。可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different network and/or processor means and/or microcontroller means.
附图中所示的流程图仅是示例性说明,不是必须包括所有的步骤。例如,有的步骤还可以分解,而有的步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。另外,下面所有的术语“第一”、“第二”仅是为了区分的目的,不应作为本公开内容的限制。The flowcharts shown in the figures are illustrative only and do not necessarily include all steps. For example, some steps can be decomposed, and some steps can be combined or partly combined, so the actual execution sequence may be changed according to the actual situation. In addition, all the following terms "first" and "second" are for the purpose of distinction only, and should not be taken as a limitation of the present disclosure.
针对接口业务的流量控制策略,可以采用例如漏桶算法、令牌桶算法、基于Redis(Remote Dictionary Server,远程字典服务)计数功能的算法等方式实现。The traffic control strategy for the interface service can be implemented by means such as leaky bucket algorithm, token bucket algorithm, and algorithm based on the counting function of Redis (Remote Dictionary Server, remote dictionary service).
然而,这些策略均存在实现方式复杂的问题。并且,对于漏桶算法,针对存在突发流量的情况,其处理效率低;对于令牌桶算法,其针对的是整个系统层面进行流量控制,而无法针对单个服务或进程进行控制;对于基于Redis计数功能的算法,实现的方式依赖于Redis集群的搭建,实现起来较复杂。However, these strategies all have the problem of complex implementation methods. Moreover, for the leaky bucket algorithm, its processing efficiency is low in the case of burst traffic; for the token bucket algorithm, it is aimed at flow control at the entire system level, and cannot be controlled for a single service or process; for Redis-based The algorithm of the counting function depends on the construction of the Redis cluster, which is more complicated to implement.
鉴于此,本公开提供了一种新的访问请求处理方案,能够达到控制接口流量的目的,且逻辑简单,易于实施。In view of this, the present disclosure provides a new access request processing solution, which can achieve the purpose of controlling interface traffic, and has simple logic and is easy to implement.
图1示出了应用本公开实施例的访问请求处理方案的示例性系统架构的示意图。Fig. 1 shows a schematic diagram of an exemplary system architecture applying the access request processing solution of the embodiment of the present disclosure.
如图1所示,系统架构1000可以包括终端设备1001、1002、1003中的一种或多种,网络1004和服务器1005。网络1004用以在终端设备1001、1002、1003和服务器1005之间提供通信链路的介质。网络1004可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1 , a
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。比如服务器1005可以是多个服务器组成的服务器集群等。It should be understood that the numbers of terminal devices, networks and servers in Fig. 1 are only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers. For example, the
用户可以使用终端设备1001、1002、1003通过网络1004与服务器1005交互,以接收或发送消息等。终端设备1001、1002、1003可以是具有显示屏的各种电子设备,包括但不限于智能手机、平板电脑、便携式计算机和台式计算机等等。Users can use
服务器1005可以是提供各种服务的服务器,具体可以是web服务器。例如,服务器1005可以响应由终端设备1001、1002、1003经由网络1004发送的针对接口的访问请求,获取当前累计访问次数、当前时间、上次接口访问次数以及上次将访问次数清零的时间,其中,可以预先将上次接口访问次数和上次将访问次数清零的时间定义为静态变量;接下来,服务器1005可以确定当前时间与上次将访问次数清零的时间之间的时间间隔,将时间间隔与时间阈值进行比较,得到第一比较结果,基于第一比较结果,将上次接口访问次数加1,并赋值给当前累计访问次数,以得到流量控制参数值;随后,服务器1005可以将流量控制参数值与流量控制阈值进行比较,得到第二比较结果,根据第二比较结果对访问请求进行处理。The
另外,如果第二比较结果为流量控制参数值大于流量控制阈值,则不对该访问请求进行进一步处理,以实现接口的流量控制。In addition, if the second comparison result is that the flow control parameter value is greater than the flow control threshold, no further processing is performed on the access request, so as to implement flow control on the interface.
需要说明的是,本公开示例性实施方式的访问请求处理方法一般由服务器1005执行,相应地,下面描述的访问请求处理装置一般配置在服务器1005中。It should be noted that the access request processing method in the exemplary embodiment of the present disclosure is generally executed by the
下面将对本公开示例性实施方式的访问请求处理方法进行说明。The access request processing method in the exemplary embodiment of the present disclosure will be described below.
图2示意性示出了本公开的示例性实施方式的访问请求处理方法的流程图。参考图2,访问请求处理方法可以包括以下步骤:Fig. 2 schematically shows a flowchart of an access request processing method in an exemplary embodiment of the present disclosure. Referring to Figure 2, the access request processing method may include the following steps:
S22.响应针对接口的访问请求,获取当前累计访问次数、当前时间、上次接口访问次数以及上次将访问次数清零的时间;其中,上次接口访问次数和上次将访问次数清零的时间均为静态变量。S22. Respond to the access request for the interface, and obtain the current cumulative number of visits, the current time, the last number of interface visits, and the time when the last time the number of visits was cleared; where the last time the number of interface visits and the last time the number of visits was cleared to zero Time is a static variable.
在本公开的示例性实施方式中,针对的接口可以是提供web服务(如查询、调取、下载、修改信息等)的任何接口,本公开对接口的类型不做限制。In an exemplary embodiment of the present disclosure, the targeted interface may be any interface that provides web services (such as querying, invoking, downloading, modifying information, etc.), and the present disclosure does not limit the type of the interface.
当接口调用方有web业务处理需求时,终端设备可以向服务器发送访问请求。其中,接口调用方可以是终端设备,也可以是其他服务器,本公开对此不做限制。When the interface caller has a web service processing requirement, the terminal device can send an access request to the server. Wherein, the interface caller may be a terminal device or other server, which is not limited in the present disclosure.
在本公开的示例性实施方式中,服务器可以响应该访问请求,获取当前累计访问次数(记为num)、当前时间(记为now)、上次接口访问次数(记为count)以及上次将访问次数清零的时间(记为lastTime)。其中,在预先定义类或结构体时,将上次接口访问次数和上次将访问次数清零的时间定义为静态变量。另外,当前累计访问次数可以被定义为局部变量。In an exemplary embodiment of the present disclosure, in response to the access request, the server may obtain the current accumulative access times (marked as num), the current time (marked as now), the last interface access times (marked as count) and the last The time when the number of visits is cleared (recorded as lastTime). Wherein, when the class or structure is defined in advance, the last interface access times and the time when the last access times are cleared are defined as static variables. In addition, the current cumulative access count can be defined as a local variable.
可以理解的是,当前累计访问次数表示的是,从上次将访问次数清零的时间起,距当前时间为止,除本次接收到的访问请求外,累计接收到的访问请求的数量。It can be understood that the current accumulative number of visits represents the cumulative number of access requests received from the time when the visit times were reset last time to the current time, except for the access requests received this time.
上次接口访问次数表示的是,相比于当前,上一次接收到访问请求时,累计接收到的访问请求数量。The last interface access count indicates the accumulative number of access requests received last time compared to the current one.
针对本公开实施例的方案,可以看出,在获取一个访问请求之前或者在一个访问请求被处理之后,当前累计访问次数和上次接口访问次数的变量对应的值相同。With respect to the solutions of the embodiments of the present disclosure, it can be seen that before an access request is obtained or after an access request is processed, the values corresponding to the variables of the current accumulative access times and the last interface access times are the same.
S24.确定当前时间与上次将访问次数清零的时间之间的时间间隔,将时间间隔与时间阈值进行比较,得到第一比较结果,基于第一比较结果,将上次接口访问次数加1,并赋值给当前累计访问次数,以得到流量控制参数值。S24. Determine the time interval between the current time and the time when the number of visits was last cleared, compare the time interval with the time threshold, obtain the first comparison result, and add 1 to the number of interface visits last time based on the first comparison result , and assign it to the current accumulative number of visits to obtain the flow control parameter value.
首先,在获取到当前时间与上一次将访问次数清零的时间之后,服务器可以计算二者之间的时间间隔。First, after obtaining the current time and the time when the number of visits was reset to zero last time, the server can calculate the time interval between the two.
接下来,服务器可以将计算出的时间间隔与一时间阈值进行比较,其中,时间阈值可以由接口处理的场景确定,可以由接口调用方预先约定,也可以在服务器端进行设定,本公开对时间阈值的具体数值不做限制。另外,应当注意的是,随着接口处理场景的变化,时间阈值也可以发生变化。Next, the server can compare the calculated time interval with a time threshold, where the time threshold can be determined by the scene processed by the interface, can be pre-agreed by the interface caller, or can be set on the server side. The specific value of the time threshold is not limited. In addition, it should be noted that as the interface processing scene changes, the time threshold may also change.
将计算出的时间间隔与一时间阈值进行比较后,得到第一比较结果。After comparing the calculated time interval with a time threshold, a first comparison result is obtained.
在第一比较结果为该时间间隔大于时间阈值的情况下,可以将上次接口访问次数加1,并赋值给当前累计访问次数。即,num=++count。例如,上次接口访问次数为99998,加1后变为99999,则赋值后的当前累计访问次数为99999。If the result of the first comparison is that the time interval is greater than the time threshold, the last interface access count may be increased by 1 and assigned to the current accumulated access count. That is, num=++count. For example, if the number of interface accesses last time was 99998, it becomes 99999 after adding 1, then the current accumulative access times after assignment is 99999.
另外,将上次将访问次数清零的时间更新为当前时间,即,lastTime=now。例如,上次将访问次数清零的时间为2020-07-01 19:35,当前时间为2020-07-02 15:30,则更新后的上次将访问次数清零的时间为2020-07-02 15:30。In addition, the time when the number of visits was cleared last time is updated to the current time, that is, lastTime=now. For example, if the last time the number of visits was cleared was 2020-07-01 19:35, and the current time is 2020-07-02 15:30, then the updated time of the last time the number of visits was cleared is 2020-07 -02 15:30.
在将上次接口访问次数加1后的结果赋值给当前累计访问次数之后,可以将上次接口方位次数置为0,即,count=0。也就是说,执行了访问次数清零的操作。After the result of adding 1 to the last interface visit times is assigned to the current accumulative visit times, the last interface orientation times can be set to 0, that is, count=0. That is to say, the operation of clearing the number of visits is performed.
在第一比较结果为该时间间隔大于时间阈值的情况下,仅执行将上次接口访问次数加1并赋值给当前累计访问次数的操作。If the result of the first comparison is that the time interval is greater than the time threshold, only the operation of adding 1 to the last interface access count and assigning it to the current accumulated access count is performed.
在得到赋值后的当前累计访问次数后,可以利用该赋值后的当前累计访问次数确定出流量控制参数值。After the assigned current accumulative access times are obtained, the flow control parameter value may be determined by using the assigned current accumulative access times.
根据本公开的一些实施例,可以直接将赋值后的当前累计访问次数确定为流量控制参数值。也就是说,直接用访问次数作为判断是否进行流量控制的依据。According to some embodiments of the present disclosure, the current accumulative number of visits after assignment may be directly determined as the flow control parameter value. That is to say, the number of visits is directly used as the basis for judging whether to perform flow control.
根据本公开的另一些实施例,首先,将赋值后的当前累计访问次数确定为中间访问次数;接下来,可以用该中间访问次数除以上述计算出的时间间隔,将相除得到的结果作为流量控制参数值。在这种情况下,可以利用QPS(Queries-Per-Second,每秒查询率)作为判断是否进行流量控制的依据。According to other embodiments of the present disclosure, firstly, the current accumulative number of visits after assignment is determined as the intermediate number of visits; next, the intermediate number of visits can be divided by the time interval calculated above, and the result of the division can be used as Flow control parameter value. In this case, QPS (Queries-Per-Second, query rate per second) can be used as a basis for judging whether to perform flow control.
S26.将流量控制参数值与流量控制阈值进行比较,得到第二比较结果,根据第二比较结果对访问请求进行处理。S26. Compare the flow control parameter value with the flow control threshold to obtain a second comparison result, and process the access request according to the second comparison result.
在直接利用访问次数作为判断是否进行流量控制的依据的实施例中,可以将流量控制参数值与流量控制阈值进行比较,其中,该流量控制阈值是表示累计访问次数的一个阈值,本公开对具体的取值不做限制。In the embodiment that directly uses the number of visits as the basis for judging whether to perform flow control, the flow control parameter value can be compared with the flow control threshold, wherein the flow control threshold is a threshold representing the cumulative number of visits. The value of is not limited.
在一个实施例中,可以用上述时间阈值内接口的访问次数除以进程数量,得到该流量控制阈值。例如,一个集群需要控制接口仅允许在1分钟内500次,部署了10个进程,则该流量控制阈值为50。In one embodiment, the flow control threshold may be obtained by dividing the access times of the interface within the above time threshold by the number of processes. For example, if a cluster needs to control the interface to only allow 500 times within 1 minute, and 10 processes are deployed, the flow control threshold is 50.
在利用QPS作为判断是否进行流量控制的依据的实施例中,流量控制阈值表示每秒访问次数的一个阈值,本公开对具体的取值不做限制,例如,可以将流量控制阈值设置为100。In the embodiment that uses QPS as the basis for judging whether to perform flow control, the flow control threshold represents a threshold of access times per second. The present disclosure does not limit the specific value. For example, the flow control threshold can be set to 100.
应当理解的是,本方案可以根据场景需要,对上述时间阈值和/或流量控制阈值进行调整,由此,可以提高方案配置的灵活性,使方案的应用场景更广。It should be understood that this solution can adjust the above-mentioned time threshold and/or flow control threshold according to the needs of the scenarios, thereby improving the flexibility of configuration of the solution and making the application scenarios of the solution wider.
将流量控制参数值与流量控制阈值进行比较后,得到第二比较结果。After comparing the flow control parameter value with the flow control threshold, a second comparison result is obtained.
在第二比较结果为流量控制参数值大于流量控制阈值的情况下,服务器可以向接口调用方发送访问请求处理失败的提示信息。其中,该提示信息中可以包含处理失败的原因,即执行流量控制。另外,该提示信息也可以是空信息或包含其他内容的信息,具体可以根据接口调用方的配置确定出,本公开对此不做限制。If the second comparison result is that the flow control parameter value is greater than the flow control threshold, the server may send a prompt message indicating that the access request processing fails to the interface caller. Wherein, the prompt information may include a reason for processing failure, that is, flow control is performed. In addition, the prompt information may also be empty information or information containing other content, which may be determined according to the configuration of the interface caller, which is not limited in the present disclosure.
另外,也可以提示接口调用方,该访问请求需要排队等待。也就是说,首先,服务器可以计算排队等待的时间,并将该时间写入提示信息;接下来,服务器将提示信息发送给接口调用方。其中,提示信息可以包含需要排队等待的信息以及排队等待的时间。In addition, the interface caller may also be prompted that the access request needs to be queued. That is to say, first, the server can calculate the waiting time in the queue, and write the time into the prompt information; next, the server sends the prompt information to the interface caller. Wherein, the prompt information may include the information that needs to be waited in line and the time for waiting in line.
在第二比较结果为流量控制参数值小于等于流量控制阈值的情况下,服务器可以对该访问请求进行处理,执行相应的web业务。另外,可以将处理后的结果反馈给接口调用方。If the second comparison result is that the flow control parameter value is less than or equal to the flow control threshold, the server may process the access request and execute a corresponding web service. In addition, the processed result can be fed back to the interface caller.
此外,在本公开的另一些实施例中,如果程序是多线程执行的,则在定义类或结构体的过程中,可以增加一个变量,即,配置用于线程读写正确的锁。In addition, in other embodiments of the present disclosure, if the program is executed by multiple threads, a variable may be added during the process of defining the class or structure, that is, a correct lock configured for reading and writing by threads.
下面将参考图3对本公开实施例的访问请求处理的整个过程进行说明。The whole process of processing the access request in the embodiment of the present disclosure will be described below with reference to FIG. 3 .
在步骤S302中,服务器接收访问请求;在步骤S304中,服务器获取当前累计访问次数、当前时间、上次接口访问次数以及上次将访问次数清零的时间。In step S302, the server receives the access request; in step S304, the server acquires the current accumulative access times, the current time, the last interface access times, and the time when the last access times were cleared.
在步骤S306中,服务器确定当前时间与上次将访问次数清零的时间之间的时间间隔;在步骤S308中,服务器将该时间间隔与时间阈值进行比较;在步骤S310中,服务器判断时间间隔是否大于时间阈值,如果大于,则执行步骤S312,如果不大于,则执行步骤S314。In step S306, the server determines the time interval between the current time and the time when the number of visits was reset to zero last time; in step S308, the server compares the time interval with a time threshold; in step S310, the server judges the time interval Whether it is greater than the time threshold, if greater, execute step S312, and if not, execute step S314.
在步骤S312中,一方面,服务器将上次将访问次数清零的时间更新为当前时间,另一方面,服务器将上次接口访问次数加1,并赋值给当前累计访问次数,以得到流量控制参数值;再一方面,在赋值操作之后,服务器将上次接口访问次数置为0。In step S312, on the one hand, the server updates the time when the number of visits was cleared last time to the current time; on the other hand, the server adds 1 to the number of interface visits last time, and assigns the value to the current cumulative number of visits to obtain flow control parameter value; on the other hand, after the assignment operation, the server sets the last interface access times to 0.
在步骤S314中,服务器将上次接口访问次数加1,并赋值给当前累计访问次数,以得到流量控制参数值。In step S314, the server adds 1 to the last interface access times, and assigns the value to the current accumulative access times, so as to obtain the flow control parameter value.
在步骤S316中,服务器判断流量控制参数值是否大于流量控制阈值,如果大于,则执行步骤S318,如果不大于,则执行步骤S320。In step S316, the server judges whether the flow control parameter value is greater than the flow control threshold, if so, executes step S318, and if not, executes step S320.
在步骤S318中,服务器可以向接口调用方发送访问请求处理失败的提示信息。In step S318, the server may send a prompt message indicating that the access request processing fails to the interface caller.
在步骤S320中,服务器对访问请求进行处理,并向接口调用方反馈处理结果。In step S320, the server processes the access request, and feeds back the processing result to the interface caller.
通过上面的示例性说明,应当理解的是,本公开利用静态变量的特性,在服务里面集成流量控制的方案,不需要另外实现一个独立的流量控制器,由此,减少了开发者的开发量,并且可以跨平台、跨语言,轻量高效的特性使得使用者可以不用考虑性能的问题。另外,可以看出,本公开方案控制接口流量的粒度更细,不仅在系统层面,还可以在单个进程中控制。Through the above exemplary description, it should be understood that this disclosure uses the characteristics of static variables to integrate the flow control scheme in the service, without the need to implement an independent flow controller, thereby reducing the amount of development for developers , and can be cross-platform, cross-language, lightweight and efficient features so that users do not need to consider performance issues. In addition, it can be seen that the granularity of interface traffic control in the disclosed solution is finer, not only at the system level, but also in a single process.
应当注意,尽管在附图中以特定顺序描述了本公开中方法的各个步骤,但是,这并非要求或者暗示必须按照该特定顺序来执行这些步骤,或是必须执行全部所示的步骤才能实现期望的结果。附加的或备选的,可以省略某些步骤,将多个步骤合并为一个步骤执行,以及/或者将一个步骤分解为多个步骤执行等。It should be noted that although the various steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in that particular order, or that all illustrated steps must be performed to achieve the desired the result of. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step for execution, and/or one step may be decomposed into multiple steps for execution, etc.
进一步的,本示例实施方式中还提供了一种访问请求处理装置。Further, this example implementation also provides an access request processing apparatus.
图4示意性示出了本公开的示例性实施方式的访问请求处理装置的方框图。参考图4,根据本公开的示例性实施方式的访问请求处理装置4可以包括请求响应模块41、参数值确定模块43和请求处理模块45。Fig. 4 schematically shows a block diagram of an access request processing apparatus according to an exemplary embodiment of the present disclosure. Referring to FIG. 4 , the access
具体的,请求响应模块41可以用于响应针对接口的访问请求,获取当前累计访问次数、当前时间、上次接口访问次数以及上次将访问次数清零的时间;其中,上次接口访问次数和上次将访问次数清零的时间均为静态变量;参数值确定模块43可以用于确定当前时间与上次将访问次数清零的时间之间的时间间隔,将时间间隔与时间阈值进行比较,得到第一比较结果,基于第一比较结果,将上次接口访问次数加1,并赋值给当前累计访问次数,以得到流量控制参数值;请求处理模块45可以用于将流量控制参数值与流量控制阈值进行比较,得到第二比较结果,根据第二比较结果对访问请求进行处理。Specifically, the
根据本公开的示例性实施例,参数值确定模块43可以被配置为执行:在第一比较结果为时间间隔大于时间阈值的情况下,将上次将访问次数清零的时间更新为当前时间。According to an exemplary embodiment of the present disclosure, the parameter
根据本公开的示例性实施例,参数值确定模块43还可以被配置为执行:在第一比较结果为时间间隔大于时间阈值的情况下,在赋值给当前累计访问次数之后,将上次接口访问次数置为0。According to an exemplary embodiment of the present disclosure, the parameter
根据本公开的示例性实施例,请求处理模块45可以被配置为执行:在第二比较结果为流量控制参数值大于流量控制阈值的情况下,向接口调用方发送访问请求处理失败的提示信息;其中,访问请求由接口调用方发送。According to an exemplary embodiment of the present disclosure, the
根据本公开的示例性实施例,请求处理模块45还可以被配置为执行:在第二比较结果为流量控制参数值小于等于流量控制阈值的情况下,对访问请求进行处理,并将处理后的结果反馈给接口调用方。According to an exemplary embodiment of the present disclosure, the
根据本公开的示例性实施例,将赋值后的当前累计访问次数确定为流量控制参数值。According to an exemplary embodiment of the present disclosure, the current accumulative number of visits after assignment is determined as the flow control parameter value.
根据本公开的示例性实施例,参数值确定模块43确定流量控制参数值的过程还可以被配置为执行:将赋值后的当前累计访问次数确定为中间访问次数;用中间访问次数除以时间间隔,将相除得到的结果作为流量控制参数值。According to an exemplary embodiment of the present disclosure, the process of determining the flow control parameter value by the parameter
由于本发明实施方式的访问请求处理装置的各个功能模块与上述方法发明实施方式中相同,因此在此不再赘述。Since each functional module of the access request processing apparatus in the embodiment of the present invention is the same as that in the embodiment of the above-mentioned method invention, it will not be repeated here.
在本公开的示例性实施例中,还提供了一种计算机可读存储介质,其上存储有能够实现本说明书上述方法的程序产品。在一些可能的实施方式中,本发明的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在终端设备上运行时,所述程序代码用于使所述终端设备执行本说明书上述“示例性方法”部分中描述的根据本发明各种示例性实施方式的步骤。In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium on which a program product capable of implementing the above-mentioned method in this specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes program code, and when the program product is run on a terminal device, the program code is used to make the The terminal device executes the steps according to various exemplary embodiments of the present invention described in the "Exemplary Method" section above in this specification.
根据本发明的实施方式的用于实现上述方法的程序产品可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在终端设备,例如个人电脑上运行。然而,本发明的程序产品不限于此,在本文件中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。The program product for implementing the above method according to the embodiment of the present invention may adopt a portable compact disk read-only memory (CD-ROM) and include program codes, and may run on a terminal device such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program, and the program may be used by or in combination with an instruction execution system, apparatus or device.
所述程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光盘、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。The program product may reside on any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: electrical connection with one or more conductors, portable disk, hard disk, random access memory (RAM), read only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical disk, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。A computer readable signal medium may include a data signal carrying readable program code in baseband or as part of a carrier wave. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
可以以一种或多种程序设计语言的任意组合来编写用于执行本发明操作的程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。Program code for carrying out the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural programming languages. Programming language - such as "C" or a similar programming language. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server to execute. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (for example, using an Internet service provider). business to connect via the Internet).
在本公开的示例性实施例中,还提供了一种能够实现上述方法的电子设备。In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
所属技术领域的技术人员能够理解,本发明的各个方面可以实现为系统、方法或程序产品。因此,本发明的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。Those skilled in the art can understand that various aspects of the present invention can be implemented as systems, methods or program products. Therefore, various aspects of the present invention can be embodied in the following forms, that is: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which can be collectively referred to herein as "circuit", "module" or "system".
下面参照图5来描述根据本发明的这种实施方式的电子设备500,对应于上面描述的服务器。图5显示的电子设备500仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。An
如图5所示,电子设备500以通用计算设备的形式表现。电子设备500的组件可以包括但不限于:上述至少一个处理单元510、上述至少一个存储单元520、连接不同系统组件(包括存储单元520和处理单元510)的总线530、显示单元540。As shown in FIG. 5,
其中,所述存储单元存储有程序代码,所述程序代码可以被所述处理单元510执行,使得所述处理单元510执行本说明书上述“示例性方法”部分中描述的根据本发明各种示例性实施方式的步骤。例如,所述处理单元510可以执行如图2中所示的步骤S12至步骤S26。Wherein, the storage unit stores program codes, and the program codes can be executed by the
存储单元520可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)5201和/或高速缓存存储单元5202,还可以进一步包括只读存储单元(ROM)5203。The
存储单元520还可以包括具有一组(至少一个)程序模块5205的程序/实用工具5204,这样的程序模块5205包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。
总线530可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。
电子设备500也可以与一个或多个外部设备600(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设备500交互的设备通信,和/或与使得该电子设备500能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口550进行。并且,电子设备500还可以通过网络适配器560与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器560通过总线530与电子设备500的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备500使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。The
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本公开实施方式的方法。Through the description of the above implementations, those skilled in the art can easily understand that the example implementations described here can be implemented by software, or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of software products, and the software products can be stored in a non-volatile storage medium (which can be CD-ROM, U disk, mobile hard disk, etc.) or on the network , including several instructions to make a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiments of the present disclosure.
此外,上述附图仅是根据本发明示例性实施例的方法所包括的处理的示意性说明,而不是限制目的。易于理解,上述附图所示的处理并不表明或限制这些处理的时间顺序。另外,也易于理解,这些处理可以是例如在多个模块中同步或异步执行的。In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not imply or limit the chronological order of these processes. In addition, it is also easy to understand that these processes may be executed synchronously or asynchronously in multiple modules, for example.
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本公开的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. Actually, according to the embodiment of the present disclosure, the features and functions of two or more modules or units described above may be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided to be embodied by a plurality of modules or units.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其他实施例。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由权利要求指出。Other embodiments of the disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, and these modifications, uses or adaptations follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not disclosed in the present disclosure . The specification and examples are to be considered exemplary only, with the true scope and spirit of the disclosure indicated by the appended claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限。It should be understood that the present disclosure is not limited to the precise constructions which have been described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010649575.1A CN111866101B (en) | 2020-07-08 | 2020-07-08 | Access request processing method and device, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010649575.1A CN111866101B (en) | 2020-07-08 | 2020-07-08 | Access request processing method and device, storage medium and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111866101A CN111866101A (en) | 2020-10-30 |
CN111866101B true CN111866101B (en) | 2023-05-26 |
Family
ID=73152404
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010649575.1A Active CN111866101B (en) | 2020-07-08 | 2020-07-08 | Access request processing method and device, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111866101B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114640700B (en) * | 2020-11-30 | 2023-04-07 | 腾讯科技(深圳)有限公司 | Calling frequency control method and device |
CN113965519B (en) * | 2021-09-06 | 2024-01-26 | 阿里巴巴(中国)有限公司 | Flow control and cluster resource guarantee method, equipment and storage medium |
CN114155093B (en) * | 2022-02-08 | 2022-04-19 | 一方函互联网有限公司 | Block chain-based electronic insurance full-flow management and risk management and control system |
CN116137578A (en) * | 2023-03-21 | 2023-05-19 | 上海中通吉网络技术有限公司 | A method for implementing HTTP service interface |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105100070A (en) * | 2015-06-29 | 2015-11-25 | 北京奇虎科技有限公司 | Method and device for preventing malicious attacks to interface service |
CN108880923A (en) * | 2017-05-16 | 2018-11-23 | 北京京东尚科信息技术有限公司 | The method and apparatus that policer operation applied to application server is requested |
CN110716794A (en) * | 2019-10-14 | 2020-01-21 | 网银在线(北京)科技有限公司 | Information processing method, device, system and readable storage medium |
CN110932988A (en) * | 2019-10-31 | 2020-03-27 | 北京三快在线科技有限公司 | Flow control method and device, electronic equipment and readable storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9571368B2 (en) * | 2013-02-04 | 2017-02-14 | International Business Machines Corporation | Analysis of variance in network page access |
CN107733805B (en) * | 2016-08-12 | 2021-04-16 | 腾讯科技(深圳)有限公司 | Service load scheduling method and device |
-
2020
- 2020-07-08 CN CN202010649575.1A patent/CN111866101B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105100070A (en) * | 2015-06-29 | 2015-11-25 | 北京奇虎科技有限公司 | Method and device for preventing malicious attacks to interface service |
CN108880923A (en) * | 2017-05-16 | 2018-11-23 | 北京京东尚科信息技术有限公司 | The method and apparatus that policer operation applied to application server is requested |
CN110716794A (en) * | 2019-10-14 | 2020-01-21 | 网银在线(北京)科技有限公司 | Information processing method, device, system and readable storage medium |
CN110932988A (en) * | 2019-10-31 | 2020-03-27 | 北京三快在线科技有限公司 | Flow control method and device, electronic equipment and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111866101A (en) | 2020-10-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111866101B (en) | Access request processing method and device, storage medium and electronic equipment | |
US9384114B2 (en) | Group server performance correction via actions to server subset | |
US11157320B2 (en) | Optimizing runtime environments | |
US12149450B2 (en) | Model training-based communication method and apparatus, and system | |
CN113645150B (en) | Transmission rate control method, apparatus, electronic device, and readable storage medium | |
US12008556B2 (en) | Method and apparatus for executing smart contract | |
EP3872630A2 (en) | Request processing method and apparatus, electronic device, and computer storage medium | |
WO2021012795A1 (en) | Network node scheduling method and apparatus, electronic device and storage medium | |
EP4060496A2 (en) | Method, apparatus, device and storage medium for running inference service platform | |
CN114546675A (en) | MQ message processing method, device, equipment and storage medium | |
WO2020024392A1 (en) | Node processing method and apparatus, storage medium and electronic device | |
CN114928572B (en) | A flow control method, device, medium and equipment for a distributed system | |
CN113641688B (en) | Node updating method, related device and computer program product | |
CN113360074B (en) | Soft keyboard display method, related devices and computer program products | |
CN113553074B (en) | Small program distribution control method, device, electronic device and storage medium | |
WO2021139225A1 (en) | Method and apparatus for data usage control for storage system, medium, and electronic device | |
CN116112441B (en) | Service request current limiting method, device, electronic equipment and storage medium | |
CN115098165B (en) | Data processing method, device, chip, equipment and medium | |
CN110262756B (en) | Method and device for caching data | |
CN117009179B (en) | Method and device for realizing monitoring micro-service, storage medium and electronic equipment | |
US20250310413A1 (en) | Applying machine learning to handling interactions between computing systems | |
CN111490864A (en) | Data transmission method, device, computer equipment and storage medium | |
CN115914769A (en) | Text information display method, device, equipment and storage medium | |
CN118689725A (en) | Application monitoring method and device, storage medium and electronic device | |
CN119847557A (en) | Firmware upgrading method, device, equipment, 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |