Interface current limiting method, device, equipment, system and storage medium

By determining the call volume and weight value of each interface of the system, and combining the highest load value of the system, the current limit value of each interface is calculated, which solves the problem of inaccurate interface current limit in the existing technology, and realizes the efficient and efficient interface current limit. Accuracy, ensure system stability.

CN113992596BActive Publication Date: 2024-11-22BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 15 Cites 0 Cited by

Patent Information

Application Number
CN202111210131.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-18
Publication Date
2024-11-22
Estimated Expiration
2041-10-18

AI Technical Summary

Technical Problem

In the prior art, the current limiting of the system interface depends on manual interference and cannot be accurately controlled, resulting in the system load not being maximized and the efficient current limiting of the interface cannot be achieved.

Method used

By determining the call volume and weight value of each interface of the system, and combining the highest load value of the system, the current limit value of each interface is calculated to achieve accurate current limit of the interface.

Benefits of technology

Improve the accuracy and efficiency of interface current limiting, ensure that the system provides stable services under the situation of maximum load, and avoid service abnormalities or system paralysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113992596B_ABST
    Figure CN113992596B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses an interface current limiting method, device, equipment, system and storage medium, the method comprising: determining the call volume of each interface of the system, and determining the weight value of each interface according to each call volume; determining the maximum load value of the system, and determining the total call volume of the system according to the maximum load value; determining the current limiting value of each interface according to the total call volume and the weight value of each interface. The above technical scheme determines the call volume of each interface contained in the system, and determines the call volume of each interface based on the proportion of the call volume of all interfaces, that is, the weight value, determines the maximum load of the system according to the hardware information of the system, and determines the total call volume that the system can support according to the maximum load, determines the current limiting value of each interface according to the total call volume and the weight value of each interface, and realizes the current limiting of the interface under the condition of the maximum load of the system, improves the efficiency and accuracy of determining the current limiting value of each interface, and further improves the accuracy and efficiency of interface current limiting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to computer technology, and in particular to an interface current limiting method, device, equipment, system and storage medium. Background Art

[0002] In World Wide Web (web) applications, providing remote services of the system through the exposure of interfaces is an indispensable way of interaction between systems. Within the tolerable range of the system load, the system can efficiently process requests, and the system load capacity increases with the number of requests received by the system; after breaking through the system load bottleneck, the system cannot withstand overloaded requests, and the response time will increase, causing the system load capacity to begin to decrease with the number of requests received by the system, and even cause service anomalies or system paralysis in severe cases. In order to provide services more efficiently and accurately, maintain system stability, and ensure the speed of request response, it is necessary to limit the flow of the service interface and limit the number of requests received by the system.

[0003] In the prior art, based on the current-limiting token bucket technology, under the model of specifying the token bucket capacity and the speed of putting tokens in, the total amount of tokens called by the system within a certain time range is limited, so as to maintain system stability and availability.

[0004] In the process of implementing the present invention, it is found that there are at least the following technical problems in the prior art:

[0005] 1. Excessive reliance on manual intervention and manually evaluated total system call volume cannot maximize the system load and cannot accurately limit the flow of the interface;

[0006] 2. It is impossible to accurately control the system call volume near the total system call volume. If the call volume needs to be increased, the size of the token bucket and the speed of putting tokens in need to be manually adjusted. Summary of the invention

[0007] The present invention provides an interface current limiting method, device, equipment, system and storage medium, which realize interface current limiting under the condition of maximum system load rate and improve the accuracy and efficiency of interface current limiting.

[0008] In a first aspect, an embodiment of the present invention provides an interface current limiting method, comprising:

[0009] Determine the call volume of each interface of the system, and determine the weight value of each interface according to each call volume;

[0010] Determine a maximum load value of the system, and determine a total call amount of the system according to the maximum load value;

[0011] The current limiting value of each of the interfaces is determined according to the total number of calls and the weight value of each of the interfaces.

[0012] Furthermore, the call volume of each interface of the system is determined, including:

[0013] If the interface is a preset interface, determining the call amount according to the real-time traffic value and the configuration value range of the interface;

[0014] Otherwise, the call amount is determined according to the real-time traffic value of the interface.

[0015] Further, the preset interface includes an important interface and a low-importance interface, the configuration value range includes a lower limit value and an upper limit value, and accordingly, the call amount is determined according to the real-time traffic value of the interface and the configuration value range, including:

[0016] If the preset interface is an important interface and the real-time traffic is less than the lower limit, determining the call amount according to the lower limit;

[0017] If the preset interface is a low importance interface and if the real-time traffic is greater than the upper limit value, the call amount is determined according to the upper limit value.

[0018] Further, determining the weight value of each of the interfaces according to each of the call amounts includes:

[0019] The total call volume is determined according to each of the call volumes, and the weight value of each of the interfaces is determined according to each of the call volumes and the total call volume.

[0020] Further, determining the maximum load value of the system includes:

[0021] The highest load value of the system is determined according to hardware information supporting the system.

[0022] Further, determining the total amount of calls of the system according to the highest load value includes:

[0023] Determine the forecast call volume and adjustment granularity;

[0024] Adjusting the predicted call amount based on the adjustment granularity, and determining the system load value corresponding to each predicted call amount until the system load value meets a preset condition;

[0025] The predicted call amount corresponding to the system load value is determined as the total call amount.

[0026] Further, adjusting the predicted call amount based on the adjustment granularity, and determining the system load value corresponding to each predicted call amount until the system load value meets a preset condition, including:

[0027] Adjusting the predicted call amount according to the adjustment granularity, and determining the system load value corresponding to the predicted call amount;

[0028] If the system load value does not meet the preset conditions, the adjustment granularity is updated based on a preset method, and the predicted call amount is adjusted according to the adjustment granularity, and the system load value corresponding to the predicted call amount is determined until the system load value meets the preset conditions.

[0029] Further, determining the current limiting value of each of the interfaces according to the total number of calls and the weight value of each of the interfaces includes:

[0030] The current limiting value of each of the interfaces is determined according to the product of the total number of calls and the weight value of each of the interfaces.

[0031] In a second aspect, an embodiment of the present invention further provides an interface current limiting device, comprising:

[0032] A weight determination module is used to determine the call volume of each interface of the system, and determine the weight value of each interface according to each call volume;

[0033] A call total amount determination module, used to determine the maximum load value of the system, and determine the total call amount of the system according to the maximum load value;

[0034] The current limiting value determination module is used to determine the current limiting value of each interface according to the total number of calls and the weight value of each interface.

[0035] In a third aspect, an embodiment of the present invention further provides a computer device, the device comprising:

[0036] one or more processors;

[0037] a storage device for storing one or more programs,

[0038] When the one or more programs are executed by the one or more processors, the one or more processors implement the interface current limiting method as described in any one of the first aspects.

[0039] In a fourth aspect, an embodiment of the present invention further provides a processing system, the system comprising: at least one interface, when each of the interfaces is called, the current limiting value of each of the interfaces is determined based on any interface current limiting method described in the first aspect.

[0040] In a fifth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the interface current limiting method as described in any one of the first aspects.

[0041] The embodiments of the above invention have the following advantages or beneficial effects:

[0042] The embodiment of the present invention provides an interface current limiting method, including: determining the call volume of each interface of the system, and determining the weight value of each interface according to each call volume; determining the maximum load value of the system, and determining the total call volume of the system according to the maximum load value; determining the current limiting value of each interface according to the total call volume and the weight value of each interface. The above technical scheme can first determine the call volume of each interface included in the system, and determine the proportion of the call volume of each interface based on the call volume of all interfaces, that is, the weight value, and then determine the maximum load of the system according to the hardware information of the system, and determine the total call volume that the system can support according to the maximum load, and then determine the current limiting value of each interface according to the total call volume and the weight value of each interface, so as to realize the interface current limiting under the condition of using the maximum load of the system, and improve the efficiency and accuracy of determining the current limiting value of each interface, and further improve the accuracy and efficiency of interface current limiting. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A flowchart of an interface current limiting method provided in Embodiment 1 of the present invention;

[0044] Figure 2 A schematic diagram of a curve showing the interface call volume and system load in an interface current limiting method provided in the first embodiment of the present invention;

[0045] Figure 3 A flowchart of an interface current limiting method provided in Embodiment 2 of the present invention;

[0046] Figure 4 A schematic diagram of determining a system load value in an interface current limiting method provided in Embodiment 2 of the present invention;

[0047] Figure 5 A schematic diagram of an interface current limiting model constructed in an interface current limiting method provided in Embodiment 2 of the present invention;

[0048] Figure 6 A flowchart of an implementation method of an interface current limiting method provided in Embodiment 2 of the present invention;

[0049] Figure 7 A schematic diagram of the structure of an interface current limiting device provided in Embodiment 3 of the present invention;

[0050] Figure 8 A schematic diagram of the structure of a computer device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0051] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0052] It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe various operations (or steps) as sequential processes, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of various operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to methods, functions, procedures, subroutines, subprograms, etc. In addition, the embodiments in the present invention and the features in the embodiments can be combined with each other without conflict.

[0053] Embodiment 1

[0054] Figure 1 This is a flow chart of an interface current limiting method provided in Embodiment 1 of the present invention. Embodiments of the present invention are applicable to situations where current limiting is required for the interface of a system. The method can be executed by an interface current limiting device, which can be implemented by software and / or hardware. Optionally, the interface current limiting device can be configured in a computer device. Figure 1 Said method specifically comprises the following steps:

[0055] Step 110: Determine the call volume of each interface of the system, and determine the weight value of each interface according to the call volume.

[0056] The system may be located in a server and include at least one interface through which a client accesses the system to obtain services provided by the system. The number of interfaces included in the system may be determined based on the services provided by the system and actual needs, and is not specifically limited here.

[0057] System load is one of the factors to measure system stability. The number of requests that the system can successfully process per second reflects the system load capacity. The call volume of each interface at the current moment can be determined based on the number of requests that each interface in the system can process at the current moment.

[0058] Table 1 is an interface requirement table consisting of interfaces and call volumes. Specifically, the call volume of each interface at the current moment is obtained in real time, the call volume of each interface corresponding to the same moment is obtained, and each interface and its corresponding call volume are stored based on the interface requirement table.

[0059] Table 1 Interface requirements

[0060] interface Interface A Interface B Interface C Interface D Interface E Call volume 150 100 200 50 100

[0061] In the embodiment of the present invention, the system may include five interfaces A, B, C, D, and E, and the call volume of each interface at the current moment is 150, 100, 200, 50, and 100 respectively. According to the call volume of each interface, the total call volume of the system at the current moment can be determined to be 150+100+200+50+100=600, and then the flow ratio of each interface, i.e., the weight value, can be determined according to the flow value corresponding to each interface and the total call volume of the system. For example, it can be determined that the flow ratio of interface A=150 / 600=25%, the flow ratio of interface B=100 / 600=16.7%, the flow ratio of interface C=200 / 600=33.3%, the flow ratio of interface D=50 / 600=8.3%, and the flow ratio of interface E=100 / 600=16.7%. It can be determined that the weight value of interface A is 25%, the weight value of interface B is 16.7%, the weight value of interface C is 33.3%, the weight value of interface D is 8.3%, and the weight value of interface E is 16.7%.

[0062] Table 2 Interface flow ratio table

[0063] interface Interface A Interface B Interface C Interface D Interface E Call volume 150 100 200 50 100 Traffic ratio\weight value 25% 16.7% 33.3% 8.3% 16.7%

[0064] Table 2 is an interface traffic ratio table consisting of interfaces, call volumes and traffic ratios. Specifically, after obtaining the call volume of each interface at the current moment, the total call volume of the system can be determined, and the traffic ratio of each interface can be determined based on the call volume of each interface and the total call volume of the system, and then the interface, call volume and traffic ratio are stored based on the interface traffic ratio table.

[0065] In an embodiment of the present invention, the call volume at the current moment can be obtained in real time, and each interface and the corresponding call volume can be stored based on the interface demand table. At the same time, the total call volume of the system can be determined, and the traffic ratio of each interface can be determined based on the call volume of each interface and the total call volume of the system. The traffic ratio of each interface can be further determined as the weight value of each interface.

[0066] It should be noted that the call volume of each interface can be obtained in real time, and the real-time weight value of each interface can be further determined. Of course, if the system has many interfaces, the call volume of the interface obtained in real time is also large, which is easy to affect the server hardware equipment or network. Therefore, the call volume of each interface can be sampled according to the preset period, and the weight value of each interface at the sampling time point can be determined. The preset period can be 5 minutes, 30 minutes, 1 hour, etc. The specific value of the preset period is not specifically limited here, and can be set by the stability of conditions such as hardware equipment and network.

[0067] Step 120: Determine the maximum load value of the system, and determine the total call amount of the system according to the maximum load value.

[0068] Among them, the hardware information of the server where the system is located, such as the central processing unit (CPU), and the number of GC (garbage collector) of the virtual machine, etc. can determine the maximum load of the system. The storage module of the server can store a corresponding relationship table of the hardware information and the number of GC times of the virtual machine and the maximum load of the system. When the load of the system is the maximum load, the call volume that the system interface can support can be the total call volume.

[0069] Specifically, the hardware information of the server where the system is located and the GC times of the virtual machine may be determined first, and then the highest load corresponding to the hardware information and the GC times of the virtual machine may be searched in the corresponding table. Figure 2 The interface call volume and system load in the interface current limiting method provided in the first embodiment of the present invention are shown in a curve diagram, such as Figure 2 As shown in the figure, when the system load is within the tolerable range of 0-X, the system can efficiently process requests, and the system load capacity increases with the number of requests received by the system; after the system load exceeds the maximum load value X, it cannot bear overloaded requests, and the response time will increase, causing the system load capacity to begin to decrease with the number of requests received by the system, and even cause service abnormalities or system paralysis in severe cases. Therefore, the system load can be maintained below the critical point to determine the total number of calls to the system interface at this time.

[0070] In the embodiment of the present invention, current limiting adjustment can be performed on a single interface based on the highest load value of the system to determine the total call volume of the interface, and then the determined total call volume is determined as the total call volume of each interface included in the system.

[0071] Step 130: Determine the current limiting value of each of the interfaces according to the total number of calls and the weight value of each of the interfaces.

[0072] Specifically, according to the above steps, the total call amount corresponding to the highest load of the system can be obtained, and the total call amount can be the total call amount of each interface included in the system. The weight value of each interface included in the system can also be obtained, and the weight value can indicate the flow ratio of each interface. Then, according to the total call amount of the system and the flow ratio of each interface, the product of the total call amount and the flow ratio of each interface can be determined, and the product value can be determined as the current limiting value of each interface. If the total call amount is X1, the weight value of each interface is W, and then the current limiting value of each interface can be determined as X1*W, such as the current limiting value of interface A is X1*25%, the current limiting value of interface B is X1*16.7%, the current limiting value of interface C is X1*33.3%, the current limiting value of interface D is X1*8.3%, and the current limiting value of interface E is X1*16.7%.

[0073] As time changes, the hardware information of the server where the system is located is changing, and thus the maximum load of the system is also changing; the real-time call volume of each interface included in the system is changing, and thus the weight value of each interface is also changing. Therefore, the real-time current limiting value of each interface can be adjusted in real time according to the real-time maximum load of the system and the real-time weight value of each interface included in the system, thereby changing the current limiting configuration of each interface, further realizing the current limiting of the system interface, and improving the service capacity of the system on the basis of highly utilizing the system load.

[0074] Of course, each time the call volume of each interface contained in the system and the maximum load value of the system are calculated, the current limit value of the interface needs to be recalculated once, which can ensure that the total call volume of the system is generated dynamically in real time by the change of the maximum load value of the system, and can ensure that the maximum call of the interface is achieved while maximizing the utilization of the system load.

[0075] The first embodiment of the present invention provides an interface current limiting method, including: determining the call volume of each interface of the system, and determining the weight value of each interface according to each call volume; determining the maximum load value of the system, and determining the total call volume of the system according to the maximum load value; determining the current limiting value of each interface according to the total call volume and the weight value of each interface. The above technical scheme can first determine the call volume of each interface included in the system, and determine the proportion of the call volume of each interface based on the call volume of all interfaces, that is, the weight value, and then determine the maximum load of the system according to the hardware information of the system, and determine the total call volume that the system can support according to the maximum load, and then determine the current limiting value of each interface according to the total call volume and the weight value of each interface, so as to realize the current limiting of the interface under the condition of using the maximum load of the system, and improve the efficiency and accuracy of determining the current limiting value of each interface, and further improve the accuracy and efficiency of interface current limiting.

[0076] Embodiment 2

[0077] Figure 3 This is a flow chart of an interface current limiting method provided by Embodiment 2 of the present invention. Embodiment of the present invention is applicable to the situation where the current limiting of the system interface is required. This embodiment is specific based on the above embodiment, and the explanation of the terms that are the same or corresponding to the above embodiments will not be repeated here. Figure 3 , the interface current limiting method provided by the embodiment of the present invention includes:

[0078] Step 310: Determine the call volume of each interface of the system, and determine the weight value of each interface according to the call volume.

[0079] In one implementation, determining the call volume of each interface of the system includes:

[0080] If the interface is a preset interface, the call amount is determined according to the real-time traffic value and the configuration value range of the interface; otherwise, the call amount is determined according to the real-time traffic value of the interface.

[0081] In actual applications, if a low-importance interface receives an abnormally large amount of traffic requests, the traffic ratio of the important interface may be diluted. Therefore, it is necessary to set the minimum flow limit value of the important interface and the maximum flow limit value of the low-importance interface to ensure that the service provision of the important interface is not affected to a certain extent.

[0082] Specifically, if the interface is a preset interface, and the interface may receive a large number of requests in a short period of time, and therefore there may be a short-term large real-time traffic value, and at the same time the interface is a low-importance interface, then the interface may be preset with a configuration value range. If the real-time traffic value of the interface exceeds the configuration value range, the call volume of the interface is determined according to the real-time traffic value and the configuration value range; if the interface is a preset interface, and the interface may have a short-term small real-time traffic value due to the influence of another interface that receives a large number of requests in a short period of time, and at the same time the interface is an important interface, then the interface may also be preset with a configuration value range. If the real-time traffic value of the interface falls out of the configuration value range, the call volume of the interface is determined according to the real-time traffic value and the configuration value range.

[0083] In one implementation, the preset interface includes an important interface and a low-importance interface, the configuration value range includes a lower limit value and an upper limit value, and accordingly, the call amount is determined according to the real-time traffic value of the interface and the configuration value range, including:

[0084] If the preset interface is an important interface and the real-time traffic is less than the lower limit, the call amount is determined according to the lower limit; if the preset interface is a low-importance interface and if the real-time traffic is greater than the upper limit, the call amount is determined according to the upper limit.

[0085] Specifically, if the preset interface is an important interface and is affected by another interface that receives a large number of requests in a short period of time, resulting in the real-time traffic value being less than the lower limit of the corresponding configuration value range, the lower limit of the configuration value range is determined as the call volume to ensure that the important interface provides normal services; if the preset interface is a low-importance interface and receives a large number of requests in a short period of time, resulting in the real-time traffic being greater than the upper limit of the corresponding configuration value range, the upper limit of the configuration value range is determined as the call volume, so as to ensure that the low-importance interface can also provide normal services without affecting the normal services provided by the important interface.

[0086] For example, interface A is a low-importance interface, and its configuration value range is (100, 150). If the real-time traffic value of interface A is 200, and 200 is greater than the upper limit of the configuration value range, it can be determined that the call value of interface A is 150.

[0087] In one implementation, determining the weight value of each of the interfaces according to each of the call amounts includes:

[0088] The total call volume is determined according to each of the call volumes, and the weight value of each of the interfaces is determined according to each of the call volumes and the total call volume.

[0089] Specifically, by summing up the call volume of each interface, the total call volume of the system can be obtained, and then the traffic ratio of each interface is determined according to the call volume of each interface and the total call volume of the system, and then the traffic ratio of each interface is determined as the weight value of each interface.

[0090] In an embodiment of the present invention, the real-time call value of each interface can be first determined based on the real-time traffic value of each interface, or the real-time traffic value and the configuration value range, and the real-time call values ​​are summed to obtain the total real-time call value of the system, and the real-time weight value of each interface is further determined based on the ratio of each real-time call value to the total real-time call value.

[0091] Step 320: determine the maximum load value of the system, and determine the total call amount of the system according to the maximum load value.

[0092] In one implementation, determining the maximum load value of the system includes:

[0093] The highest load value of the system is determined according to hardware information supporting the system.

[0094] Specifically, the storage module of the server may store a corresponding relationship table of hardware information and the GC times of the virtual machine and the maximum load of the system. In the embodiment of the present invention, the hardware information of the server where the system is located and the GC times of the virtual machine may be determined first, and then the maximum load corresponding to the hardware information and the GC times of the virtual machine may be searched in the corresponding table.

[0095] In one implementation, determining the total amount of calls to the system interface according to the highest load value includes:

[0096] Determine the predicted call amount and the adjustment granularity; adjust the predicted call amount based on the adjustment granularity, and simultaneously determine the system load value corresponding to each predicted call amount until the system load value meets a preset condition; determine the predicted call amount corresponding to the system load value as the total call amount.

[0097] In one implementation, adjusting the predicted call amount based on the adjustment granularity and determining a system load value corresponding to each predicted call amount until the system load value meets a preset condition includes:

[0098] The predicted call amount is adjusted according to the adjustment granularity, and the system load value corresponding to the predicted call amount is determined; if the system load value does not meet the preset conditions, the adjustment granularity is updated based on a preset method, and the adjustment of the predicted call amount according to the adjustment granularity is continued, and the system load value corresponding to the predicted call amount is determined until the system load value meets the preset conditions.

[0099] The system may pre-store an initial predicted call volume and an initial adjustment granularity. The preset condition may be that the system load value is infinitely close to the maximum load value of the system.

[0100] Figure 4 A schematic diagram of determining a system load value in an interface current limiting method provided in Embodiment 2 of the present invention, such as Figure 4 As shown, the horizontal dotted line represents the maximum load value X of the system, and the vertical dotted line represents the maximum call amount X1 of the system interface under the maximum load. If the total call amount of the interface is lower than X1, resources will be wasted at the system load level. Therefore, the total call amount of the interface can be determined when the system load value is infinitely close to the safe upper limit of the system load, that is, the maximum load value.

[0101] Specifically, the call volume of the initial interface is the initial predicted call volume b0, and the adjustment granularity is n. When the real-time traffic value of the interface is the initial predicted call volume, the system load value is lower than the maximum load value X of the system; then the predicted call volume is adjusted to b0+n, and the change of the system load value is observed. If the system load value is still lower than the maximum load value X, the predicted call volume is continuously added with n until the system load value exceeds the maximum load value X of the system. In order to avoid the linear change of the adjustment granularity causing the predicted call volume to never be close to the maximum call volume X1, the adjustment granularity is gradually updated to Then adjust the predicted call volume to Observe the changes in system load values ​​and continue to reduce the predicted call volume Until the system load value is lower than the maximum load value X. The next round of change of direction is carried out to approach the maximum load value X, and the adjustment granularity is gradually changed to Repeat the above steps until the system load value is infinitely close to the maximum load value X, and the predicted call volume at this moment is infinitely close to the maximum call volume X1.

[0102] Of course, we can also use the formula Determine the maximum call volume X1, where X1 is the maximum call volume, b0 is the initial predicted call volume, n, and To adjust the granularity, after a times of adding n, the system load value exceeds the maximum load value of the system, and after b times of decreasing The system load value is lower than the maximum load value of the system. After c times of addition The system load value exceeds the maximum load value of the system... after i times of addition / decrement The system load value is lower than / exceeds the maximum load value of the system after j times of addition / decrement The system load value exceeds / is below the maximum load value of the system.

[0103] Of course, in practical applications, it can be combined with Figure 4 The schematic diagram and formula for determining the system load value are shown Determine the maximum call amount X1.

[0104] In the embodiment of the present invention, the schematic diagram and formula for determining the system load value can be combined based on the predicted call volume and adjustment granularity. The maximum call amount of the system interface may be determined, and the maximum call amount may be determined as the total call amount of the system interface.

[0105] Step 330: Determine the current limiting value of each of the interfaces according to the total number of calls and the weight value of each of the interfaces.

[0106] In one implementation, step 330 may specifically include:

[0107] The current limiting value of each of the interfaces is determined according to the product of the total number of calls and the weight value of each of the interfaces.

[0108] Specifically, the above steps can obtain the total call amount corresponding to the highest load of the system, which can be the total call amount of each interface included in the system. The weight value of each interface included in the system can also be obtained. The weight value can indicate the traffic ratio of each interface. Then, according to the total call amount of the system and the traffic ratio of each interface, the product of the total call amount and the traffic ratio of each interface can be determined, and the product value can be determined as the current limiting value of each interface.

[0109] Figure 5 A schematic diagram of an interface current limiting model constructed in an interface current limiting method provided in Embodiment 2 of the present invention, such as Figure 5 As shown, in actual applications, an interface current limiting model can also be constructed, which can store an interface demand table, an interface traffic ratio table, an initial predicted call volume and an adjustment granularity, and the aforementioned steps 310-330 can be executed to determine the current limiting value of each interface included in the system according to the call volume of each interface at the sampling time point, the configuration value range of the preset interface and the maximum load value of the system, and to achieve real-time adjustment of the current limiting value of each interface included in the system according to the call volume of each interface at each moment, the configuration value range of the preset interface and the maximum load value of the system.

[0110] The second embodiment of the present invention provides an interface current limiting method, including: determining the call volume of each interface of the system, and determining the weight value of each interface according to each call volume; determining the maximum load value of the system, and determining the total call volume of the system according to the maximum load value; determining the current limiting value of each interface according to the total call volume and the weight value of each interface. The above technical scheme can first determine the call volume of each interface included in the system, and determine the proportion of the call volume of each interface based on the call volume of all interfaces, that is, the weight value, and then determine the maximum load of the system according to the hardware information of the system, and determine the total call volume that the system can support according to the maximum load, and then determine the current limiting value of each interface according to the total call volume and the weight value of each interface, so as to realize the interface current limiting under the condition of using the maximum load of the system, and improve the efficiency and accuracy of determining the current limiting value of each interface, and further improve the accuracy and efficiency of interface current limiting.

[0111] Figure 6 The following is a flowchart of an implementation method of an interface current limiting method provided in the second embodiment of the present invention, and exemplarily provides one implementation method. Figure 6 As shown, including:

[0112] Step 610: Determine whether the interface is a preset interface.

[0113] If the interface is a preset interface, execute step 611; otherwise, execute step 612.

[0114] Step 611: Determine the call volume according to the real-time traffic value and the configuration value range of the interface.

[0115] Step 612: Determine the call volume according to the real-time traffic value of the interface.

[0116] Step 613: Determine the maximum load value of the system according to the hardware information supporting the system.

[0117] Step 614: Determine the predicted call volume and adjustment granularity.

[0118] Step 615: adjust the predicted call amount according to the adjustment granularity, and determine the system load value corresponding to the predicted call amount.

[0119] Step 616: Determine whether the system load value meets a preset condition.

[0120] If the system load value meets the preset condition, execute step 617; otherwise, execute step 618.

[0121] Step 617: Update the adjustment granularity based on a preset method, and return to execute step 615 until the system load value meets the preset condition.

[0122] Step 618: Determine the predicted call volume corresponding to the system load value as the total call volume.

[0123] Step 619: Determine the current limiting value of each of the interfaces according to the product of the total number of calls and the weight value of each of the interfaces.

[0124] An implementation method of an interface current limiting method provided in Embodiment 2 of the present invention comprises the following steps: first, determining whether the interface is a preset interface; if the interface is a preset interface, determining the call volume according to the real-time traffic value and the configuration value range of the interface; otherwise, determining the call volume according to the real-time traffic value of the interface; determining the maximum load value of the system according to the hardware information supporting the system; determining the predicted call volume and adjustment granularity; adjusting the predicted call volume according to the adjustment granularity, and determining the system load value corresponding to the predicted call volume; determining whether the system load value meets a preset condition; if the system load value meets the preset condition, updating the adjustment granularity based on a preset method, and continuing to adjust the predicted call volume according to the adjustment granularity, and determining the system load value corresponding to the predicted call volume, until the system load value meets the preset condition; determining the predicted call volume corresponding to the system load value as the total call volume; determining the current limiting value of each interface according to the product of the total call volume and the weight value of each interface. The above technical scheme can first determine the call volume of each interface included in the system, and determine the ratio of the call volume of each interface based on the call volume of all interfaces, that is, the weight value. Then, the maximum load of the system can be determined according to the hardware information of the system, and the total number of calls that the system can support can be determined according to the maximum load. Secondly, the current limiting value of each interface can be determined according to the total number of calls and the weight value of each interface, and the current limiting of the interface can be achieved when the maximum load of the system is used, and the efficiency and accuracy of determining the current limiting value of each interface are improved, thereby further improving the accuracy and efficiency of the interface current limiting.

[0125] Embodiment 3

[0126] Figure 7 A structural schematic diagram of an interface current limiting device provided in Embodiment 3 of the present invention is provided. The interface current limiting device and the interface current limiting methods of the above-mentioned embodiments belong to the same inventive concept. For details not fully described in the embodiment of the interface current limiting device, reference can be made to the embodiment of the above-mentioned interface current limiting method.

[0127] The specific structure of the interface current limiting device is as follows Figure 7 As shown, including:

[0128] The weight determination module 710 is used to determine the call volume of each interface of the system, and determine the weight value of each interface according to each call volume;

[0129] A call total amount determination module 720 is used to determine the maximum load value of the system, and determine the total call amount of the system according to the maximum load value;

[0130] The current limiting value determination module 730 is used to determine the current limiting value of each interface according to the total call amount and the weight value of each interface.

[0131] The interface current limiting device provided in the third embodiment of the present invention determines the call volume of each interface of the system, and determines the weight value of each interface according to each call volume; determines the maximum load value of the system, and determines the total call volume of the system according to the maximum load value; determines the current limiting value of each interface according to the total call volume and the weight value of each interface. The above technical scheme can first determine the call volume of each interface included in the system, and determine the proportion of the call volume of each interface based on the call volume of all interfaces, that is, the weight value, and then determine the maximum load of the system according to the hardware information of the system, and determine the total call volume that the system can support according to the maximum load, and then determine the current limiting value of each interface according to the total call volume and the weight value of each interface, so as to realize the current limiting of the interface under the condition of using the maximum load of the system, and improve the efficiency and accuracy of determining the current limiting value of each interface, and further improve the accuracy and efficiency of interface current limiting.

[0132] Based on the above embodiment, the weight determination module 710 is specifically used for:

[0133] If the interface is a preset interface, determining the call amount according to the real-time traffic value and the configuration value range of the interface;

[0134] Otherwise, determining the call amount according to the real-time traffic value of the interface;

[0135] The total call volume is determined according to each of the call volumes, and the weight value of each of the interfaces is determined according to each of the call volumes and the total call volume.

[0136] On the basis of the above embodiment, the preset interface includes an important interface and a low importance interface, the configuration value range includes a lower limit value and an upper limit value, and accordingly, according to the real-time traffic value of the interface and the configuration value range, the call amount is determined, including:

[0137] If the preset interface is an important interface and the real-time traffic is less than the lower limit, determining the call amount according to the lower limit;

[0138] If the preset interface is a low importance interface and if the real-time traffic is greater than the upper limit value, the call amount is determined according to the upper limit value.

[0139] Based on the above embodiment, the total amount determination module 720 is called to specifically:

[0140] Determining the maximum load value of the system according to hardware information supporting the system;

[0141] Determine the forecast call volume and adjustment granularity;

[0142] Adjusting the predicted call amount based on the adjustment granularity, and determining the system load value corresponding to each predicted call amount until the system load value meets a preset condition;

[0143] The predicted call amount corresponding to the system load value is determined as the total call amount.

[0144] On the basis of the above embodiment, adjusting the predicted call amount based on the adjustment granularity, and determining the system load value corresponding to each predicted call amount until the system load value meets the preset condition, including:

[0145] Adjusting the predicted call amount according to the adjustment granularity, and determining the system load value corresponding to the predicted call amount;

[0146] If the system load value does not meet the preset conditions, the adjustment granularity is updated based on a preset method, and the predicted call amount is adjusted according to the adjustment granularity, and the system load value corresponding to the predicted call amount is determined until the system load value meets the preset conditions.

[0147] Based on the above embodiment, the current limiting value determination module 730 is specifically used for:

[0148] The current limiting value of each of the interfaces is determined according to the product of the total number of calls and the weight value of each of the interfaces.

[0149] The interface current limiting device provided in the embodiment of the present invention can execute the interface current limiting method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the interface current limiting method.

[0150] It is worth noting that in the embodiment of the above-mentioned interface current limiting device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0151] Embodiment 4

[0152] Figure 8 A schematic diagram of the structure of a computer device provided in Embodiment 4 of the present invention. Figure 8 A block diagram of an exemplary computer device 8 suitable for use in implementing embodiments of the present invention is shown. Figure 8The computer device 8 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0153] like Figure 8 As shown, the computer device 8 is in the form of a general purpose computing computer device. The components of the computer device 8 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).

[0154] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0155] The computer device 8 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 8, including volatile and non-volatile media, removable and non-removable media.

[0156] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer device 8 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 8 not shown, usually called a "hard drive"). Although Figure 8 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0157] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0158] The computer device 8 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the computer device 8, and / or any device that enables the computer device 8 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 22. Furthermore, the computer device 8 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 20. Figure 8 As shown, the network adapter 20 communicates with other modules of the computer device 8 via the bus 18. It should be understood that although Figure 8 Not shown, other hardware and / or software modules may be used in conjunction with computer device 8, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0159] The processing unit 16 executes various functional applications and page displays by running the program stored in the system memory 28, for example, implementing the interface current limiting method provided in the embodiment of the present invention, wherein the method includes:

[0160] Determine the call volume of each interface of the system, and determine the weight value of each interface according to each call volume;

[0161] Determine a maximum load value of the system, and determine a total call amount of the system according to the maximum load value;

[0162] The current limiting value of each of the interfaces is determined according to the total number of calls and the weight value of each of the interfaces.

[0163] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the interface current limiting method provided by any embodiment of the present invention.

[0164] Embodiment 5

[0165] Embodiment 5 of the present invention provides a processing system, the system comprising: at least one interface, when each interface is called, the current limiting value of each interface is determined based on the interface current limiting method described in any one of Embodiment 1 and Embodiment 2.

[0166] Embodiment 6

[0167] Embodiment 6 of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the interface current limiting method provided in the embodiment of the present invention is implemented, wherein the method includes:

[0168] Determine the call volume of each interface of the system, and determine the weight value of each interface according to each call volume;

[0169] Determine a maximum load value of the system, and determine a total call amount of the system according to the maximum load value;

[0170] The current limiting value of each of the interfaces is determined according to the total number of calls and the weight value of each of the interfaces.

[0171] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0172] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0173] The program code embodied on the computer 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.

[0174] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0175] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0176] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. An interface current limiting method, characterized in that: include: Determine the call volume of each interface at the current moment according to the number of requests of each interface of the system at the current moment, and determine the real-time weight value of each interface according to each call volume; Determine the maximum load value of the system at the current moment, and determine the total call amount of the system according to the maximum load value; Determine the current limit value of each interface according to the total number of calls and the real-time weight value of each interface; The calling amount of each interface at the current moment is determined according to the number of requests of each interface of the system at the current moment, including: The interface is an important interface in the preset interface, and when the number of real-time requests of the interface is less than a lower limit value in the configuration value range, the call amount is determined according to the lower limit value; The interface is a low-importance interface among preset interfaces, and when the number of real-time requests is greater than an upper limit value in a configuration value range, the call amount is determined according to the upper limit value.

2. The interface current limiting method according to claim 1, characterized in that: Determine the call volume of each interface according to the number of requests of each interface of the system at the current moment, including: If the interface is an interface other than the preset interface, the call amount is determined according to the real-time request quantity value of the interface.

3. The interface current limiting method according to claim 1, characterized in that: Determining the real-time weight value of each of the interfaces according to each of the call amounts includes: The total call volume is determined according to each of the call volumes, and the real-time weight value of each of the interfaces is determined according to each of the call volumes and the total call volume.

4. The interface current limiting method according to claim 1, characterized in that: Determine the maximum load value of the system, including: The highest load value of the system is determined according to hardware information supporting the system.

5. The interface current limiting method according to claim 1, characterized in that: Determining the total amount of calls of the system according to the highest load value includes: Determine the forecast call volume and adjustment granularity; Adjusting the predicted call amount based on the adjustment granularity, and determining the system load value corresponding to each predicted call amount until the system load value meets a preset condition, wherein the preset condition is that the system load value is infinitely close to the maximum load value; The predicted call amount corresponding to the system load value is determined as the total call amount.

6. The interface current limiting method according to claim 5, characterized in that: Adjusting the predicted call amount based on the adjustment granularity, and determining a system load value corresponding to each predicted call amount until the system load value meets a preset condition, including: Adjusting the predicted call amount according to the adjustment granularity, and determining the system load value corresponding to the predicted call amount; If the system load value does not meet the preset conditions, the adjustment granularity is updated based on a preset method, and the predicted call amount is adjusted according to the adjustment granularity, and the system load value corresponding to the predicted call amount is determined until the system load value meets the preset conditions.

7. The interface current limiting method according to claim 1, characterized in that: Determining the current limiting value of each of the interfaces according to the total call amount and the real-time weight value of each of the interfaces includes: The current limiting value of each of the interfaces is determined according to the product of the total call amount and the real-time weight value of each of the interfaces.

8. An interface current limiting device, characterized in that: include: A weight determination module is used to determine the call volume of each interface at the current moment according to the number of requests of each interface of the system at the current moment, and determine the real-time weight value of each interface according to each call volume; A call total amount determination module is used to determine the maximum load value of the system at the current moment, and determine the total call amount of the system according to the maximum load value; A current limiting value determination module, used to determine the current limiting value of each of the interfaces according to the total number of calls and the real-time weight value of each of the interfaces; The calling amount of each interface at the current moment is determined according to the number of requests of each interface of the system at the current moment, including: The interface is an important interface in the preset interface, and when the number of real-time requests of the interface is less than a lower limit value in the configuration value range, the call amount is determined according to the lower limit value; The interface is a low-importance interface among preset interfaces, and when the number of real-time requests is greater than an upper limit value in a configuration value range, the call amount is determined according to the upper limit value.

9. A computer device, characterized in that: The device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the interface current limiting method as described in any one of claims 1-7.

10. A processing system, characterized in that: The system comprises: at least one interface, and when each of the interfaces is called, a current limiting value of each of the interfaces is determined based on the interface current limiting method described in any one of claims 1-7.

11. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute the interface current limiting method according to any one of claims 1 to 7 when executed by a computer processor.

Citation Information

Patent Citations

  • Method and device for adjusting uneven load sharing

    CN103139094A

  • Method and device for realizing software bypass in firewall

    CN106603427A

  • Flow control method and device

    CN107770088A

  • Equivalent routing load sharing method and device

    CN108055203A

  • Network flow control method

    CN111083060A