CN117768396A - Access restriction method of server, electronic device and storage medium - Google Patents

Access restriction method of server, electronic device and storage medium Download PDF

Info

Publication number
CN117768396A
CN117768396A CN202311801130.0A CN202311801130A CN117768396A CN 117768396 A CN117768396 A CN 117768396A CN 202311801130 A CN202311801130 A CN 202311801130A CN 117768396 A CN117768396 A CN 117768396A
Authority
CN
China
Prior art keywords
client
access frequency
server
limit
current limit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311801130.0A
Other languages
Chinese (zh)
Inventor
虞力
管宏伟
夏凌莉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Xinzhi Software Co ltd
Original Assignee
Shenzhen Xinzhi Software Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Xinzhi Software Co ltd filed Critical Shenzhen Xinzhi Software Co ltd
Priority to CN202311801130.0A priority Critical patent/CN117768396A/en
Publication of CN117768396A publication Critical patent/CN117768396A/en
Pending legal-status Critical Current

Links

Abstract

The application provides an access restriction method of a server, electronic equipment and a storage medium. The method comprises the following steps: determining the access frequency of a client; judging whether the access frequency is greater than a dynamic limit, wherein the dynamic limit is obtained by dynamically calculating the maximum processing limit of a server and the access frequency of the client; and limiting the current of the client under the condition that the access frequency is greater than the dynamic current limit. The dynamic current limit is obtained by dynamically calculating the maximum processing limit of the server and the access frequency of the client, and the access frequencies of different clients are usually different, and even the same client is usually different in access frequency at different times, so that the dynamic current limit of the client is dynamically changed, different dynamic current limit can be set for different clients by the method, and the clients are limited based on the dynamic current limit, so that the current limiting effect can be improved.

Description

Access restriction method of server, electronic device and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to an access restriction method for a server, an electronic device, and a storage medium.
Background
When a large number of access requests are received by the server, the number of the access requests is generally required to be reduced in a current limiting mode, so that the operation pressure of the server is reduced, and the phenomenon that the server runs slowly or even is down due to the large number of access requests is prevented.
The current throttling mode generally sets a fixed throttling limit, so as to target the access requests of each client, and limit the frequency of the access requests to the clients exceeding the throttling limit. However, this current limiting method of setting the fixed current limit is to use the fixed current limit to target each client without distinction, so the current limiting effect is generally poor.
Disclosure of Invention
The embodiment of the application aims to provide an access current limiting method of a server, electronic equipment and a storage medium, which are used for solving the problem that the current limiting mode is poor in effect.
An embodiment of the present application provides a method for limiting access to a server, including:
determining the access frequency of a client;
judging whether the access frequency is greater than a dynamic limit, wherein the dynamic limit is obtained by dynamically calculating the maximum processing limit of a server and the access frequency of the client;
and limiting the current of the client under the condition that the access frequency is greater than the dynamic current limit.
Preferably, the method further comprises:
and calculating the dynamic current limit according to the maximum processing limit of the server and the access frequency of the client.
Preferably, the calculating the dynamic current limit according to the maximum processing limit of the server and the access frequency of the client specifically includes:
determining a network status score for the client;
and calculating the dynamic current limit according to the maximum processing limit of the server, the network state score of the client and the access frequency of the client.
Preferably, the calculating the dynamic current limit according to the maximum processing limit of the server, the network status score of the client and the access frequency of the client specifically includes calculating the dynamic current limit by the following first dynamic current limit calculation formula:
wherein: l is the calculated dynamic current limit; m is the maximum processing limit of the server; f (f) 1 An access frequency for the client; k (k) 1 Amplifying the coefficient for the access frequency; a is a resource allocation coefficient used for representing the importance level of the client; b is the network status score of the client.
Preferably, the calculating the dynamic current limit according to the maximum processing limit of the server, the network status score of the client and the access frequency of the client specifically includes calculating the dynamic current limit by the following second dynamic current limit calculation formula:
wherein: l is the calculated dynamic current limit; m is the maximum processing limit of the server; a is a resource allocation coefficient used for representing the importance level of the client; b is the network state grading of the client; f (f) i The access frequency of the client in the ith period is the access frequency of the client; k (k) i Amplifying the coefficient for the access frequency of the ith period; n is the number of accumulated cycles.
Preferably, determining the network status score of the client specifically includes:
sending a network state detection signal to the client;
determining the network state grade of the client according to the response time of the client to the network state detection signal;
and querying a network state scoring table by using the network state grade of the client to determine the network state score of the client.
Preferably, the calculating the dynamic current limit according to the maximum processing limit of the server and the access frequency of the client specifically includes:
and under the condition that the access frequency of the client is greater than a preset threshold, calculating the dynamic current limit according to the maximum processing limit of the server and the access frequency of the client, wherein the preset threshold is smaller than the dynamic current limit.
Preferably, before determining the access frequency of the client, the method further comprises:
acquiring an access request of a client, wherein the access request carries authorization information;
judging whether the client has access rights or not according to the authorization information; the method comprises the steps of,
the method for determining the access frequency of the client specifically comprises the following steps:
and under the condition that the client has access authority, determining the access frequency of the client.
A second aspect of an embodiment of the present application provides an electronic device, including:
a memory for storing a computer program;
a processor configured to perform a method according to any one of the method embodiments of the present application.
A third aspect of the present embodiment provides a storage medium, including: a program which, when run on an electronic device, causes the electronic device to perform a method as described in any one of the method embodiments of the present application.
The access flow limiting method of the server provided by the embodiment of the application comprises the steps of determining the access frequency of a client, judging whether the access frequency of the client is larger than the dynamic flow limiting limit, and limiting the flow of the client under the condition that the access frequency is larger than the dynamic flow limiting limit. In the method, the dynamic current limit is dynamically calculated through the maximum processing limit of the server and the access frequency of the client, the access frequencies of different clients are usually different, and even the same client is used, the access frequencies of different times are usually different, so that the dynamic current limit of the client can be dynamically changed, different dynamic current limit can be set for different clients by the method, and the current limit is limited for the client based on the dynamic current limit, so that the current limit effect can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a specific flow diagram of an access throttling method of a server according to an embodiment of the present application;
fig. 2 is a schematic diagram of a specific structure of an access restriction device of a server according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the present application, terms such as "first," "second," "third," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance or order.
As mentioned above, the current throttling mode generally sets a fixed limiting limit, so as to limit the access requests of each client, and limits the frequency of the access requests to the clients exceeding the limiting limit. However, this current limiting method of setting the fixed current limit is to use the fixed current limit to target each client without distinction, so the current limiting effect is generally poor.
In view of this, embodiments of the present application provide a method, apparatus, electronic device, and storage medium for limiting access to a server, which can be used to solve the technical problem. The method can be applied to gateway equipment in a server, and further the gateway equipment is used for executing the method provided by the embodiment of the application to limit the access request of the client. Fig. 1 is a schematic flow chart of a method for limiting access to a server according to an embodiment of the present application, where the method includes the following steps:
step S11: the access frequency of the client is determined.
In practical applications, a server is typically connected with a plurality of clients, and each of these clients may send an access request to the server, so the server may typically perform a current limit for any one or several of these clients. Therefore, the client in step S11 may be any client connected to the server, or may be a selected client, for example, each client that sends an access request to the server may be used as a selected client, and further, the client is limited by the method provided in the embodiments of the present application.
For example, after the client transmits an access request to the server, the gateway device in the server receives the access request, and in this case, when the access request of the client is received, the gateway device can determine the access frequency of the client by using the gateway device as the selected client for the client that transmitted the access request, in step S11.
The access frequency of the client may be the number of times that the client sends an access request to the server in a preset time period, where the preset time period may be 1 minute, 30 minutes, 1 hour, 1 day, 3 days, or other time period. Generally, the number of times that the client sends an access request to the server in a preset period of time can be determined by querying an access record of the client, so as to obtain the access frequency of the client. For example, the preset period of time is 1 hour, and in the preset period of time, the number of times that a certain client sends an access request to a server is 30, and at this time, the access frequency of the client is 30.
In addition, the server is usually connected to a plurality of clients, each client may send an access request to the server, where the gateway device of the server may obtain the access request of the client for the access request sent by each client, and in order to improve security, the access request may also carry authorization information, so that the gateway device may determine whether the client has access rights according to the authorization information, and if the client has access rights, perform the above step S11 to determine the access frequency of the client.
Step S12: and judging whether the access frequency of the client is greater than the dynamic current limit.
The dynamic limit is obtained by dynamically calculating the maximum processing limit of the server and the access frequency of the client. In practical application, the access frequencies of different clients are usually different, so that the dynamic current limit obtained by dynamic calculation is usually different according to the maximum processing limit of the server and the access frequency of the client among different clients; and even for the same client, the dynamic limit of the client will also be dynamically changed, since the access frequency of the client will typically be different at different times.
In practical applications, the method provided in the embodiments of the present application may calculate the dynamic current limit, for example, after determining the access frequency of the client in step S11, the maximum processing limit of the server may be further obtained, where the maximum processing limit of the server may specifically be the maximum number of access requests that the server can process in a preset time period, and if the number of access requests that the server needs to process exceeds the maximum processing limit, blocking or even downtime of the server is easily caused, and in general, the maximum processing limit of the server may be calculated through performance parameters and current load of the server; after obtaining the maximum processing limit of the server and the access frequency of the client, the dynamic current limit may be further calculated according to the maximum processing limit of the server and the access frequency of the client, for example, the maximum processing limit and the access frequency may be substituted into a dynamic current limit calculation formula, so as to calculate the dynamic current limit.
In addition, a preset threshold may be set, after the access frequency of the client is determined in the step S11, whether the access frequency is greater than the preset threshold may be determined, if yes, it is indicated that current limiting is required by the method provided in the embodiment of the present application, and then the dynamic current limit is calculated according to the maximum processing limit of the server and the access frequency of the client only if the access frequency of the client is greater than the preset threshold, where the preset threshold is smaller than the dynamic current limit. Of course, if the access frequency is determined to be less than or equal to the preset threshold, it is indicated that the method provided by the embodiment of the present application is not required to perform current limiting on the client, so that the dynamic current limiting unit is not required to be calculated according to the maximum processing unit of the server and the access frequency of the client.
In practical applications, the dynamic current limit calculation formula may be various, for example, the dynamic current limit calculation formula may be a dynamic current limit calculation formula as shown in formula one:
in the formula I, L is the calculated dynamic current limit; m is the maximum processing limit of the server; f (f) 1 The access frequency of the client; k (k) 1 Amplifying the coefficient for the access frequency; a is a resource allocation coefficient used to characterize the importance level of a client.
For the access frequency amplification factor k in equation one 1 The size of the gateway device may be generally set according to actual needs, for example, when the total amount of access requests received by the gateway device in a preset time period is greater than the overall preset upper limit value of each client, or when the access frequency of the client is too high (greater than the preset upper limit value of a single client)The k can be 1 Larger than this, e.g. selecting the k from the interval of (1, 10) 1 Thereby amplifying the influence of the access frequency of the client on the dynamic current limit; conversely, when the total amount of access requests received by the gateway device in the preset time period is smaller than the overall preset upper limit value, and the access frequency of the client is smaller than the preset upper limit value of the single client, the k can be calculated 1 The setting being relatively small, e.g. the k is selected from the interval of (0, 1) 1 Is a value of (2).
A in the formula one is a resource allocation coefficient, which is a resource allocation coefficient for representing the importance level of the client. In practical applications, the clients are generally of multiple types, for example, for taxi taking software, there are driver clients, passenger clients and the like, and the importance levels of the clients of different types are generally different, so that the type of the client can be determined first, the type is associated with a corresponding importance level, and then a resource allocation coefficient table is queried according to the importance level of the client, so as to determine the resource allocation coefficient corresponding to the importance level of the client. The resource allocation coefficient table specifically describes the resource allocation coefficients corresponding to the clients with different importance levels. The value range of the resource allocation coefficient a is generally greater than 0 and less than 1.
Thus, the resource allocation coefficient a and the access frequency amplification coefficient k are obtained 1 Maximum processing limit M of server and access frequency f of client 1 And then substituting the dynamic current limit value into the formula I so as to calculate the dynamic current limit value of the client.
In the dynamic limit calculation formula shown in the formula one, the maximum processing limit M of the server and the access frequency f of the client are mainly used 1 And combines the client importance level and the access frequency magnification factor k 1 To comprehensively calculate and obtain the dynamic current limit of the client. In practical applications, the network status of the client is also one of the important factors affecting the dynamic limit of the client, so that the maximum processing limit of the server and the access of the client are determinedThe frequency may be used to calculate the dynamic current limit, or the network state score of the client may be determined first, and then the dynamic current limit may be calculated according to the maximum processing limit of the server, the network state score of the client, and the access frequency of the client, for example, the maximum processing limit of the server, the network state score of the client, and the access frequency of the client are substituted into the dynamic current limit calculation formula, so as to calculate the dynamic current limit.
The dynamic current limit calculation formula may be a dynamic current limit calculation formula shown in formula two:
the dynamic current limit calculation formula shown in the formula two may be referred to as a first dynamic current limit calculation formula. The difference between the formula two and the formula one is that the network state score b of the client is newly added in the formula two, and other parameters are the same as those of the formula one. The value range of the network state score b is generally greater than 0 and less than 1.
For the newly added network state score b of the client in the formula II, the network state score b can be generally determined by a method that the server firstly sends a network state detection signal to the client, for example, the server can periodically send the network state detection signal to the client in a heartbeat detection mode; and then determining the network state grade of the client according to the response time of the client to the network state detection signal, wherein generally speaking, the longer the response time is, the worse the network state of the client is, the shorter the response time is, the better the network state of the client is, so that the network state grade table can be queried by utilizing the response time, and the network state grade of the client is obtained, wherein in the network state grade table, the network state grade corresponding to each different response time is specifically recorded. After determining the network state grade of the client, the network state grade of the client is further utilized to query the network state scoring table, so that the network state score of the client is determined. The network state scoring table is recorded with network state scoring tables corresponding to different network state grades respectively.
Thus, the network state score b of the client is obtained, and the resource allocation coefficient a and the access frequency amplification coefficient k are obtained 1 Maximum processing limit M of server and access frequency f of client 1 And then substituting the dynamic current limit value into the formula II so as to calculate the dynamic current limit value of the client.
It should be noted that, in the dynamic current limit calculation formula shown in the formula two, compared with the dynamic current limit calculation formula shown in the formula one, the newly added parameter is the network state score b of the client, and in practical application, when the network state of the client is better, for example, the network state grade of the client is higher, the network state score b of the client may not be considered, so that the dynamic current limit of the client is calculated by adopting the dynamic current limit calculation formula shown in the formula one; when the network state of the client is poor, for example, the network state level of the client is low, even if a higher dynamic current limit is allocated to the client, the network state of the client is poor, which may cause resource waste, so that the dynamic current limit calculation formula shown in the formula two can be adopted to calculate the dynamic current limit of the client, that is, the formula one or the formula two can be determined and selected according to the network state level of the client and used as the dynamic current limit calculation formula to calculate the dynamic current limit of the client.
It should be further noted that, in practical applications, in addition to considering the network status of the client, in some cases, it may be necessary to consider the accumulation of the request frequency of the client for a period of time, so as to comprehensively determine the dynamic current limit of the client.
The dynamic current limit calculation formula may be a dynamic current limit calculation formula shown in formula three (the dynamic current limit calculation formula shown in formula three may be referred to as a second dynamic current limit calculation formula):
in the formula III, L is the calculated dynamic current limit; m is the maximum processing limit of the server; a is a resource allocation coefficient used for representing the importance level of the client; b is the network state grading of the client; f (f) i K is the access frequency of the client in the ith period i The access frequency amplification factor of the ith period is i=1, and the access frequency amplification factor k in the above formula two and formula one can be obtained 1 And the access frequency f of the client 1 The method comprises the steps of carrying out a first treatment on the surface of the n is the number of accumulated periods, and the value of n can be 5, 6 or 7, so that the access frequency f in n preset time periods i Multiplied by the access frequency amplification factor k respectively i And accumulate.
For example, the above-mentioned access frequency of the client may be the number of times the client transmits the access request to the server in a preset period of time, for example, the preset period of time may be 30 minutes, where the number of times of the access request in 30 minutes is taken as the access frequency f 1 The corresponding access frequency amplification factor is k 1 The method comprises the steps of carrying out a first treatment on the surface of the At this time, the preset time period, that is, 30 minutes is taken as one period, and then 30 minutes before the preset time period is taken as the previous period, and the number of access requests of the previous period is obtained as the access frequency f 2 The corresponding access frequency amplification factor is k 2 And the like, the access frequency f of the client in the ith period can be obtained i And its corresponding access frequency amplification factor is k i
Wherein, since the time accumulation effect is reduced from the first period (i=1) to the nth period, the access frequency amplification factor of the latter period can be 0 of the previous access frequency amplification factor5 times, e.g. k 2 =0.5*k 1 、k 3 =0.5*k 2 、k 4 =0.5*k 3 ,…,k i =0.5 i-1 *k 1 ,…,k n =0.5 n-1 *k 1 This can obtain the access frequency amplification factor for each cycle.
In the third formula, the access frequency amplification coefficients of n periods are multiplied by the access frequency and then accumulated, so that the method is more suitable for the situation that the access frequency of the client is frequently changed compared with the situation that only the access frequency amplification coefficient and the access frequency of the first period are considered in the second formula. For example, the access frequency of a certain client is not stable, but changes frequently with time, and the dynamic current limit of the client can be calculated by using the formula three types.
Step S13: and limiting the current of the client under the condition that the access frequency is greater than the dynamic current limit.
After determining that the access frequency of the client is greater than the dynamic limit value unit in step S12, the client is limited in the case that the access frequency is greater than the dynamic limit value unit, and the limiting mode includes rejecting the access request sent by the client, or sending a limiting prompt message to the client, so as to prompt the user of the client to limit the current. Of course, if the access frequency of the client is determined to be less than or equal to the dynamic limit, it is not necessary to limit the current by multiple clients.
The access flow limiting method of the server provided by the embodiment of the application comprises the steps of determining the access frequency of a client, judging whether the access frequency of the client is larger than the dynamic flow limiting limit, and limiting the flow of the client under the condition that the access frequency is larger than the dynamic flow limiting limit. In the method, the dynamic current limit is dynamically calculated through the maximum processing limit of the server and the access frequency of the client, the access frequencies of different clients are usually different, and even the same client is used, the access frequencies of different times are usually different, so that the dynamic current limit of the client can be dynamically changed, different dynamic current limit can be set for different clients by the method, and the current limit is limited for the client based on the dynamic current limit, so that the current limit effect can be improved.
Based on the same inventive concept as the method for limiting access to a server provided in the embodiments of the present application, the embodiments of the present application further provide an apparatus for limiting access to a server, and if it is unclear, reference may be made to the corresponding content of the method embodiments. As shown in fig. 2, which is a specific structural schematic diagram of the apparatus 20, the apparatus 20 includes an access frequency determining unit 201, a judging unit 202, and a current limiting unit 203, where:
an access frequency determining unit 201 for determining an access frequency of a client;
a judging unit 202, configured to judge whether the access frequency is greater than a dynamic current limit, where the dynamic current limit is obtained by dynamically calculating a maximum processing limit of a server and an access frequency of the client;
and the current limiting unit 203 is configured to limit the current to the client when the access frequency is greater than the dynamic current limit.
By adopting the device 20 provided in the embodiment of the present application, since the device 20 adopts the same inventive concept as the method provided in the embodiment of the present application, the device 20 can solve the technical problem on the premise that the method can solve the technical problem, which is not described here again.
The apparatus 20 may further include a dynamic current limit calculation unit, configured to calculate the dynamic current limit according to the maximum processing limit of the server and the access frequency of the client.
The dynamic current limit calculating unit may include a network state scoring subunit and a dynamic current limit calculating subunit, where:
a network state scoring subunit, configured to determine a network state score of the client;
and the dynamic current limit calculation subunit is used for calculating the dynamic current limit according to the maximum processing limit of the server, the network state score of the client and the access frequency of the client.
The dynamic current limit calculation subunit specifically includes a dynamic current limit calculation submodule, configured to calculate the dynamic current limit through a first dynamic current limit calculation formula as follows:
wherein: l is the calculated dynamic current limit; m is the maximum processing limit of the server; f (f) 1 An access frequency for the client; k (k) 1 Amplifying the coefficient for the access frequency; a is a resource allocation coefficient used for representing the importance level of the client; b is the network status score of the client.
The dynamic current limit calculation subunit specifically includes a second dynamic current limit calculation submodule, configured to calculate the dynamic current limit through the following second dynamic current limit calculation formula:
wherein: l is the calculated dynamic current limit; m is the maximum processing limit of the server; a is a resource allocation coefficient used for representing the importance level of the client; b is the network state grading of the client; f (f) i The access frequency of the client in the ith period is the access frequency of the client; k (k) i Amplifying the coefficient for the access frequency of the ith period; n is the number of accumulated cycles.
The network state evaluation sub-unit specifically comprises a network state evaluation sub-module, which is used for sending a network state detection signal to the client; determining the network state grade of the client according to the response time of the client to the network state detection signal; and querying a network state scoring table by using the network state grade of the client to determine the network state score of the client.
The calculating the dynamic current limit according to the maximum processing limit of the server and the access frequency of the client may specifically include: and under the condition that the access frequency of the client is greater than a preset threshold, calculating the dynamic current limit according to the maximum processing limit of the server and the access frequency of the client, wherein the preset threshold is smaller than the dynamic current limit.
The apparatus 20 may further comprise an authentication unit, configured to obtain an access request of the client, before determining the access frequency of the client, where the access request carries authorization information; judging whether the client has access rights or not according to the authorization information; and, the access frequency determining unit 201 may specifically include an access frequency determining subunit configured to determine an access frequency of the client in a case where the client has access rights.
As shown in fig. 3, which is a schematic diagram of a specific structure of the electronic device provided in this embodiment, the electronic device 3 includes: at least one processor 31 and a memory 32, one processor being exemplified in fig. 3. The processor 31 and the memory 32 may be connected by a bus 30, the memory 32 storing instructions executable by the processor 31, the instructions being executable by the processor 31 to cause the electronic device 3 to perform all or part of the flow of the method in the embodiments of the present application. The electronic device 3 may be a mobile phone or a computer of the user, or may be a server.
The embodiment of the invention also provides a storage medium, which comprises: a program which, when run on an electronic device, causes the electronic device to perform all or part of the flow of the method in the above-described embodiments. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a Flash Memory (Flash Memory), a Hard Disk (HDD), or a Solid State Drive (SSD), etc. The storage medium may also comprise a combination of memories of the kind described above.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations are within the scope of the invention as defined by the appended claims.

Claims (10)

1. A method for limiting access to a server, the method comprising:
determining the access frequency of a client;
judging whether the access frequency is greater than a dynamic limit, wherein the dynamic limit is obtained by dynamically calculating the maximum processing limit of a server and the access frequency of the client;
and limiting the current of the client under the condition that the access frequency is greater than the dynamic current limit.
2. The method according to claim 1, wherein the method further comprises:
and calculating the dynamic current limit according to the maximum processing limit of the server and the access frequency of the client.
3. The method of claim 2, wherein calculating the dynamic current limit according to the maximum processing limit of the server and the access frequency of the client comprises:
determining a network status score for the client;
and calculating the dynamic current limit according to the maximum processing limit of the server, the network state score of the client and the access frequency of the client.
4. The method of claim 3, wherein calculating the dynamic current limit according to the maximum processing limit of the server, the network status score of the client, and the access frequency of the client, specifically comprises calculating the dynamic current limit by a first dynamic current limit calculation formula as follows:
wherein: l is the calculated dynamic current limit; m is the maximum processing limit of the server; f (f) 1 An access frequency for the client; k (k) 1 Amplifying the coefficient for the access frequency; a is a resource allocation coefficient used for representing the importance level of the client; b is the network status score of the client.
5. The method of claim 3, wherein calculating the dynamic current limit according to the maximum processing limit of the server, the network status score of the client, and the access frequency of the client, specifically comprises calculating the dynamic current limit by a second dynamic current limit calculation formula as follows:
wherein: l is the calculated dynamic current limit; m is the maximum processing limit of the server; a is a resource allocation coefficient used for representing the importance level of the client; b is the network state grading of the client; f (f) i The access frequency of the client in the ith period is the access frequency of the client; k (k) i Amplifying the coefficient for the access frequency of the ith period; n is the number of accumulated cycles.
6. A method according to claim 3, characterized in that determining the network status score of the client comprises in particular:
sending a network state detection signal to the client;
determining the network state grade of the client according to the response time of the client to the network state detection signal;
and querying a network state scoring table by using the network state grade of the client to determine the network state score of the client.
7. The method of claim 2, wherein calculating the dynamic current limit according to the maximum processing limit of the server and the access frequency of the client comprises:
and under the condition that the access frequency of the client is greater than a preset threshold, calculating the dynamic current limit according to the maximum processing limit of the server and the access frequency of the client, wherein the preset threshold is smaller than the dynamic current limit.
8. The method of claim 1, wherein prior to determining the access frequency of the client, the method further comprises:
acquiring an access request of a client, wherein the access request carries authorization information;
judging whether the client has access rights or not according to the authorization information; the method comprises the steps of,
the method for determining the access frequency of the client specifically comprises the following steps:
and under the condition that the client has access authority, determining the access frequency of the client.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor configured to perform the method of any one of claims 1 to 8.
10. A storage medium, comprising: program which, when run on an electronic device, causes the electronic device to perform the method of any one of claims 1 to 8.
CN202311801130.0A 2023-12-25 2023-12-25 Access restriction method of server, electronic device and storage medium Pending CN117768396A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311801130.0A CN117768396A (en) 2023-12-25 2023-12-25 Access restriction method of server, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311801130.0A CN117768396A (en) 2023-12-25 2023-12-25 Access restriction method of server, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN117768396A true CN117768396A (en) 2024-03-26

Family

ID=90314125

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311801130.0A Pending CN117768396A (en) 2023-12-25 2023-12-25 Access restriction method of server, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN117768396A (en)

Similar Documents

Publication Publication Date Title
US10516730B2 (en) Distributing application traffic to servers based on dynamic service response time
US8689280B2 (en) DNS-based content routing
US10432551B1 (en) Network request throttling
CN111262795B (en) Service interface-based current limiting method and device, electronic equipment and storage medium
CN110191159B (en) Load adjusting method, system and equipment of resource server
CN110471749B (en) Task processing method, device, computer readable storage medium and computer equipment
CN111031035A (en) Sensitive data access behavior monitoring method and device
CN112995046B (en) Content distribution network traffic management method and device
CN108229176A (en) A kind of method and device of determining Web applications protection effect
CN111562884B (en) Data storage method and device and electronic equipment
CN111291252A (en) Method and device for adjusting query rate per second, electronic equipment and storage medium
CN115001747A (en) Device control method, device, electronic device and storage medium
CN117768396A (en) Access restriction method of server, electronic device and storage medium
CN111966918B (en) Current limiting method, device and system for concurrent access request
CN110569114B (en) Service processing method, device, equipment and storage medium
CN111031350B (en) Transcoding resource scheduling method, electronic device and computer readable storage medium
CN109245943B (en) Fault positioning method and device
CN108234658B (en) Method and device for sensing health condition of server cluster and server
CN109150819B (en) A kind of attack recognition method and its identifying system
CN112579639A (en) Data processing method and device, electronic equipment and storage medium
CN113905092B (en) Method, device, terminal and storage medium for determining reusable agent queue
JP2017156888A (en) Performance degradation factor estimation program, and performance degradation factor estimation device
CN110572700A (en) Client risk identification method and system
CN110851258B (en) API calling method, API calling device, computer equipment and storage medium
CN111031355B (en) Media resource playing processing method, device and system

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